Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

Equivalence of flow: text flow and XML format flow

I'm newbie to OpenFlow, I try to verify this video via rest api(I have worked thru with ovs cmd line). But now I'm in troble of converting text flow to XML format flow. Server1 side flows can be found there.

I picked 3 here, are these XML format flows correct?

table=0,inport=1,actions=setfield:100->tun_id,resubmit(,1)

``` <flow xmlns="urn:opendaylight:flow:inventory"> <flow-name>S1T0F1</flow-name> <table_id>0</table_id> <id>1</id> <installhw>false</installhw> <strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <write-actions>
            <action>
                <order>0</order>
                <set-field>
                    <tunnel>
                        <tunnel-id>100</tunnel-id>
                    </tunnel>
                </set-field>
            </action>
        </write-actions>
    </instruction>
    <instruction>
        <order>1</order>
        <go-to-table>
            <table_id>1</table_id>
        </go-to-table>
    </instruction>
</instructions>

<match>
    <in-port>1</in-port>
</match>

</flow> ```

  1. table=1,tunid=100,dldst=00:00:00:00:aa:01,actions=output:1

``` <flow xmlns="urn:opendaylight:flow:inventory"> <flow-name>S1T1F1</flow-name> <table_id>1</table_id> <id>1</id> <installhw>false</installhw> <strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>

<match>
    <ethernet-match>
        <ethernet-type>
            <type>2054</type>
        </ethernet-type>
        <ethernet-destination>
            <address>00:00:00:00:aa:01</address>
        </ethernet-destination>
    </ethernet-match>   
    <tunnel>
        <tunnel-id>100</tunnel-id>
    </tunnel>
</match>

</flow> ```

  1. table=1,tunid=100,arp,nwdst=10.0.0.1,actions=output:1

``` <flow xmlns="urn:opendaylight:flow:inventory"> <flow-name>S1T1F5</flow-name> <table_id>1</table_id> <id>5</id> <installhw>false</installhw> <strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>

<match>
    <ethernet-type>
        <type>2054</type>
    </ethernet-type>
    <arp-op>1</arp-op>
    <ipv4-destination>10.0.0.1/8</ipv4-destination>
    <tunnel>
        <tunnel-id>100</tunnel-id>
    </tunnel>
</match>

</flow> ```

Equivalence of flow: text flow and XML format flow

I'm newbie to OpenFlow, I try to verify followed this video viavideo rest api(I have worked thru and tried to build VXLAN with ovs cmd line). But now I'm in troble of converting text flow to restconf REST API. My problem is I don't know whether these XML format flow. Server1 side flows can be found are correct or not. Bold flows get from theregithub.

Could anyone help to check XML flow is equivalent to the Bold one? I picked 3 here, are these XML format flows correct?really appreciate your help ;)

table=0,inport=1,actions=setfield:100->tun_id,resubmit(,1)

```

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
 <flow-name>S1T0F1</flow-name>
 <table_id>0</table_id>
 <id>1</id>
    <installhw>false</installhw>
    <strict>false</strict>

<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <write-actions>
            <action>
                <order>0</order>
                <set-field>
                    <tunnel>
                        <tunnel-id>100</tunnel-id>
                    </tunnel>
                </set-field>
            </action>
        </write-actions>
    </instruction>
    <instruction>
        <order>1</order>
        <go-to-table>
            <table_id>1</table_id>
        </go-to-table>
    </instruction>
</instructions>

<match>
    <in-port>1</in-port>
</match>
</flow>

</flow> ```

  1. table=1,tunid=100,dldst=00:00:00:00:aa:01,actions=output:1

```

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
 <flow-name>S1T1F1</flow-name>
 <table_id>1</table_id>
 <id>1</id>
    <installhw>false</installhw>
    <strict>false</strict>

<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>

<match>
    <ethernet-match>
        <ethernet-type>
            <type>2054</type>
        </ethernet-type>
        <ethernet-destination>
            <address>00:00:00:00:aa:01</address>
        </ethernet-destination>
    </ethernet-match>   
    <tunnel>
        <tunnel-id>100</tunnel-id>
    </tunnel>
</match>
</flow>

</flow> ```

  1. table=1,tunid=100,arp,nwdst=10.0.0.1,actions=output:1

```

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
 <flow-name>S1T1F5</flow-name>
 <table_id>1</table_id>
 <id>5</id>
    <installhw>false</installhw>
    <strict>false</strict>

<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>

<match>
    <ethernet-type>
        <type>2054</type>
    </ethernet-type>
    <arp-op>1</arp-op>
    <ipv4-destination>10.0.0.1/8</ipv4-destination>
    <tunnel>
        <tunnel-id>100</tunnel-id>
    </tunnel>
</match>
</flow>

</flow> ```

Equivalence of flow: text flow and XML format flowAdd flows via restconf to build VXLAN

I followed this video and tried to build VXLAN with restconf REST API. My problem is I don't know whether these XML flows are correct or not. Bold flows get from github.

Could anyone help to check XML flow is equivalent to the Bold one? I really appreciate your help ;)

Rest API returns 200, but get nothing when using cmd "ovs-ofctl -O OpenFlow13 dump-flows mybridge".

table=0,inport=1,actions=setfield:100->tun_id,resubmit(,1)

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T0F1</flow-name>
<table_id>0</table_id>
<id>1</id>
<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <write-actions>
            <action>
                <order>0</order>
                <set-field>
                    <tunnel>
                        <tunnel-id>100</tunnel-id>
                    </tunnel>
                </set-field>
            </action>
        </write-actions>
    </instruction>
    <instruction>
        <order>1</order>
        <go-to-table>
            <table_id>1</table_id>
        </go-to-table>
    </instruction>
</instructions>

<match>
    <in-port>1</in-port>
</match>
</flow>

table=1,tunid=100,dldst=00:00:00:00:aa:01,actions=output:1

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T1F1</flow-name>
<table_id>1</table_id>
<id>1</id>
<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>

<match>
    <ethernet-match>
        <ethernet-type>
            <type>2054</type>
        </ethernet-type>
        <ethernet-destination>
            <address>00:00:00:00:aa:01</address>
        </ethernet-destination>
    </ethernet-match>   
    <tunnel>
        <tunnel-id>100</tunnel-id>
    </tunnel>
</match>
</flow>

table=1,tunid=100,arp,nwdst=10.0.0.1,actions=output:1

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T1F5</flow-name>
<table_id>1</table_id>
<id>5</id>
<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>

<match>
    <ethernet-type>
        <type>2054</type>
    </ethernet-type>
    <arp-op>1</arp-op>
    <ipv4-destination>10.0.0.1/8</ipv4-destination>
    <tunnel>
        <tunnel-id>100</tunnel-id>
    </tunnel>
</match>
</flow>

Add flows via restconf to build VXLAN

I followed this video and tried to build VXLAN with restconf REST API. My problem is I don't know whether these XML flows are correct or not. Bold flows get from github.

Could anyone help to check XML flow is equivalent to the Bold one? I really appreciate your help ;)

Rest API returns 200, but get nothing when using cmd "ovs-ofctl -O OpenFlow13 dump-flows mybridge".

table=0,inport=1,actions=setfield:100->tun_id,resubmit(,1)

[edit] POST:http://172.171.2.156:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T0F1</flow-name>
<table_id>0</table_id>
<id>1</id>
<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <write-actions>
            <action>
                <order>0</order>
                <set-field>
                    <tunnel>
                        <tunnel-id>100</tunnel-id>
                    </tunnel>
                </set-field>
            </action>
        </write-actions>
    </instruction>
    <instruction>
        <order>1</order>
        <go-to-table>
            <table_id>1</table_id>
        </go-to-table>
    </instruction>
</instructions>

<match>
    <in-port>1</in-port>
</match>
</flow>

table=1,tunid=100,dldst=00:00:00:00:aa:01,actions=output:1

[edit] POST: http://172.171.2.156:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T1F1</flow-name>
<table_id>1</table_id>
<id>1</id>
<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>

<match>
    <ethernet-match>
        <ethernet-type>
            <type>2054</type>
        </ethernet-type>
        <ethernet-destination>
            <address>00:00:00:00:aa:01</address>
        </ethernet-destination>
    </ethernet-match>   
    <tunnel>
        <tunnel-id>100</tunnel-id>
    </tunnel>
</match>
</flow>

table=1,tunid=100,arp,nwdst=10.0.0.1,actions=output:1

[edit] POST: http://172.171.2.156:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T1F5</flow-name>
<table_id>1</table_id>
<id>5</id>
<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>

<match>
    <ethernet-type>
        <type>2054</type>
    </ethernet-type>
    <arp-op>1</arp-op>
    <ipv4-destination>10.0.0.1/8</ipv4-destination>
    <tunnel>
        <tunnel-id>100</tunnel-id>
    </tunnel>
</match>
</flow>

Add flows via restconf to build VXLAN

I followed this video and tried to build VXLAN with restconf REST API. My problem is I don't know whether these XML flows are correct or not. Bold flows get from github.

Could anyone help to check XML flow is equivalent to the Bold one? I really appreciate your help ;)

Rest API returns 200, but get nothing when using cmd "ovs-ofctl -O OpenFlow13 dump-flows mybridge".

table=0,inport=1,actions=setfield:100->tun_id,resubmit(,1)

[edit] POST:http://172.171.2.156:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/POST: http://172.171.2.156:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T0F1</flow-name>
<table_id>0</table_id>
<id>1</id>
<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <write-actions>
            <action>
                <order>0</order>
                <set-field>
                    <tunnel>
                        <tunnel-id>100</tunnel-id>
                    </tunnel>
                </set-field>
            </action>
        </write-actions>
    </instruction>
    <instruction>
        <order>1</order>
        <go-to-table>
            <table_id>1</table_id>
        </go-to-table>
    </instruction>
</instructions>

<match>
    <in-port>1</in-port>
</match>
</flow>

table=1,tunid=100,dldst=00:00:00:00:aa:01,actions=output:1

[edit] POST: http://172.171.2.156:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T1F1</flow-name>
<table_id>1</table_id>
<id>1</id>
<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>

<match>
    <ethernet-match>
        <ethernet-type>
            <type>2054</type>
        </ethernet-type>
        <ethernet-destination>
            <address>00:00:00:00:aa:01</address>
        </ethernet-destination>
    </ethernet-match>   
    <tunnel>
        <tunnel-id>100</tunnel-id>
    </tunnel>
</match>
</flow>

table=1,tunid=100,arp,nwdst=10.0.0.1,actions=output:1

[edit] POST: http://172.171.2.156:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T1F5</flow-name>
<table_id>1</table_id>
<id>5</id>
<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>

<match>
    <ethernet-type>
        <type>2054</type>
    </ethernet-type>
    <arp-op>1</arp-op>
    <ipv4-destination>10.0.0.1/8</ipv4-destination>
    <tunnel>
        <tunnel-id>100</tunnel-id>
    </tunnel>
</match>
</flow>

Add flows via restconf to build VXLANVXLAN - Resolved

I followed this video and tried to build VXLAN with restconf REST API. My problem is I don't know whether these XML flows are correct or not. Bold flows get from github.

Could anyone help to check XML flow is equivalent to the Bold one? I really appreciate your help ;)

Rest API returns 200, but get nothing when using cmd "ovs-ofctl -O OpenFlow13 dump-flows mybridge".

NOTE: flow-name, for example, S1T0F1 means Server1Table0Flow0. Refers this video and code repository: github.

table=0,inport=1,actions=setfield:100->tun_id,resubmit(,1)

[edit] POST: http://172.171.2.156:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T0F1</flow-name>
<table_id>0</table_id>
<id>1</id>
<installHw>false</installHw>
<strict>false</strict>
<priority>10</priority>

<instructions>
    <instruction>
        <order>0</order>
        <write-actions>
<apply-actions>
            <action>
                <order>0</order>
                <set-field>
                    <tunnel>
                        <tunnel-id>100</tunnel-id>
                    </tunnel>
                </set-field>
            </action>
        </write-actions>
</apply-actions>
    </instruction>
    <instruction>
        <order>1</order>
        <go-to-table>
            <table_id>1</table_id>
        </go-to-table>
    </instruction>
</instructions>

<match>
    <in-port>1</in-port>
</match>
</flow>

table=1,tunid=100,dldst=00:00:00:00:aa:01,actions=output:1

[edit] POST: http://172.171.2.156:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T1F1</flow-name>
<table_id>1</table_id>
<id>1</id>
<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>

<match>
    <ethernet-match>
        <ethernet-type>
            <type>2054</type>
<type>2048</type>
        </ethernet-type>
        <ethernet-destination>
            <address>00:00:00:00:aa:01</address>
        </ethernet-destination>
    </ethernet-match>   
</ethernet-match>
    <tunnel>
        <tunnel-id>100</tunnel-id>
    </tunnel>
</match>
</flow>

table=1,tunid=100,arp,nwdst=10.0.0.1,actions=output:1

[edit] POST: http://172.171.2.156:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T1F5</flow-name>
<table_id>1</table_id>
<id>5</id>
<installHw>false</installHw>
<strict>false</strict>

<instructions>
    <instruction>
        <order>0</order>
        <apply-actions>
            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>1</output-node-connector>
                </output-action>
            </action>
        </apply-actions>
    </instruction>
</instructions>

<match>
    <ethernet-match>
        <ethernet-type>
         <type>2054</type>
     </ethernet-type>
    <arp-op>1</arp-op>
    <ipv4-destination>10.0.0.1/8</ipv4-destination>
</ethernet-match>
    <arp-target-transport-address>10.0.0.1/0</arp-target-transport-address>
    <tunnel>
        <tunnel-id>100</tunnel-id>
    </tunnel>
</match>
</flow>

table=0,actions=resubmit(,1)

POST: http://172.171.2.156:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T0F3</flow-name>
<table_id>0</table_id>
<id>3</id>
<strict>false</strict>
<installHw>false</installHw>
<priority>1</priority>

<instructions>
    <instruction>
        <order>0</order>
        <go-to-table>
            <table_id>1</table_id>
        </go-to-table>
    </instruction>
</instructions>

<match>
</match>
</flow>

table=1,priority=100,actions=drop

POST: http://172.171.2.156:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>S1T0F3</flow-name>
<table_id>0</table_id>
    <id>3</id>
<strict>false</strict>
<installHw>false</installHw>
<priority>1</priority>

<instructions>
    <instruction>
        <order>0</order>
        <go-to-table>
            <table_id>1</table_id>
        </go-to-table>
    </instruction>
</instructions>

<match>
</match>
</flow>