Ask Your Question
0

set vlan through postman

asked 2015-03-17 01:47:41 -0700

Janki gravatar image

Hi

I have 1 switch connected to 2 hosts. The hosts can ping each other. I now want 2 ports of the switch to be on different vlan so that they cant ping each other.

I know tagging of port through ovs-vsctl. I want to do this through postman. I wrote xml code where ethernet source is the MAC of host connected to port 1 on switch.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
    <strict>false</strict>
    <instructions>
        <instruction>
            <order>0</order>
            <apply-actions>
                <action>
                    <order>0</order>
                    <push-vlan-action/>
                  **<tag>2</tag>**
                </action>
            </apply-actions>
        </instruction>
    </instructions>
    <table_id>0</table_id>
    <id>138</id>
    <cookie_mask>255</cookie_mask>
    <match>
        <ethernet-match>
            <ethernet-type>
                <type>2048</type>
            </ethernet-type>
            <ethernet-source>
                <address>22:60:37:46:b6:2d</address>
            </ethernet-source>
        </ethernet-match>
    </match>
    <hard-timeout>1200</hard-timeout>
    <cookie>15</cookie>
    <idle-timeout>3400</idle-timeout>
    <flow-name>FooXf15</flow-name>
    <priority>2</priority>
    <barrier>false</barrier>
</flow>

It returns saying <error-message>Schema node "tag" was not found in module.</error-message>

I tried with word "vlan", "vlanid", "vlan-id". Same error.

Can anyone guide on how to set it and where can I find a documentation containing all the match, action keywords?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-03-18 11:01:39 -0700

Vishal Thapar gravatar image

This covers a good chunk of flows.

Another good way is to open the Rest API explorer, it provides all the options, though can be a bit overwhelming early on.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Follow
1 follower

Stats

Asked: 2015-03-17 01:47:41 -0700

Seen: 413 times

Last updated: Mar 18 '15