Hi,

There are a few things that I'm not sure to understand.

First of all why are there two different fields vlan_vid and dl_vlan
and what's the difference between both?

I wanna have a vlan tag in all the packets but I'm not sure how to
make sure that it's present.
I was thinking about putting this instruction in table 0 to make sure
that all the packets have it:
curl -X POST -d '{
      "dpid": 1,
      "table_id": 0,
      "match":{
        "nw_dst": "11.0.0.0/16",        # all my hosts are in this
subnetworks so all the packets will be matched
        "eth_type": 2048
     },
      "actions":[
          {
              "type": "PUSH_VLAN",
              "ethertype": 33024
          },
          {
            "type": "GOTO_TABLE",
            "table_id": 1
        }
      ]
   }' http://localhost:8080/stats/flowentry/add

And I don't understand why you wrote 0x03 instead of 0x3. Does it make
a difference?
match":{
        "metadata": "0x2/0x03"  # "0x2/0x03" means in_port value is "2"
    },

I actually only want to have one bit stored in the metadata so I guess
I can use "metadata": "0x1/0x1" ?

And I'm not sure that I understand perfectly what you wrote here:
https://www.mail-archive.com/[email protected]/msg07966.html

How long is the vlan tag? I thought if was limited to 12 bits but you
write 0x1000 at some point so I guess it can be longer...

So if I wanna match on the 2 first bits (that should be at 1) of a
vlan tag that it 16 bits long I can write:
"match":{
          "dl_vlan": "0xB0/0xB0"
      },
right?

And if I wanna set those 2 first bits to 0 would this be correct?
actions":{
        "type": "SET_FIELD",
        "field": "dl_vlan",
       "value": "0x00/0xB0"
     }

Or just I use vlan_vid?

Thanks,
Clément

On 11 December 2014 at 02:39, Yusuke Iwase <[email protected]> wrote:
> Hi Clément,
>
> On 2014年12月10日 22:30, Clément Rault wrote:
>> Hi,
>>
>> It there a way to force the actions present in the actions set to be
>> immediately applied?
>
> If you use Apply-Actions instruction, please describe the "action" directly
> in actions array.
>
> e.g.)
>
>   curl -X POST -d '{
>       "dpid": 1,
>       "match":{
>           "dl_vlan": 5
>       },
>       "actions":[
>           {
>               "type": "PUSH_VLAN",     # Push a new VLAN tag if a input frame 
> is non-VLAN-tagged
>               "ethertype": 33024       # Ethertype 0x8100(=33024): IEEE 
> 802.1Q VLAN-tagged frame
>           },
>           {
>               "type": "SET_FIELD",
>               "field": "vlan_vid",     # Set VLAN ID
>               "value": 4102            # Describe sum of vlan_id(e.g. 6) | 
> OFPVID_PRESENT(0x1000=4096)
>           },
>           {
>               "type": "OUTPUT",
>               "port": 2
>           }
>       ]
>    }' http://localhost:8080/stats/flowentry/add
>
>
> For more details, please refer to "Description of Actions on request messages"
> (http://ryu.readthedocs.org/en/latest/app/ofctl_rest.html#description-of-actions-on-request-messages)
>
>
>>
>> It's quite important for me to be able to do that so that I can use
>> the metadata to communicate between tables but I couldn't find it in
>> the documentation
>> (http://ryu.readthedocs.org/en/latest/app/ofctl_rest.html).
>
> How about this scinario?
> I hope it is helpful for you.
>
>
> 1.Build topology
> $ sudo mn --topo single,2 --mac --switch ovsk --controller remote
>
>
> 2.Run ofctl_rest
> $ sudo ryu-manager ryu.app.ofctl_rest
>
>
> 3.Install Flow entries
> # Install the Flow entries to communicate between table 0 and table 1.
> $ curl -X POST -d '{
>     "dpid": "1",
>     "table_id": 0,   # The 1st table
>     "match":{
>         "in_port":1  # From Host 1
>     },
>     "actions":[
>         {
>             "type": "WRITE_METADATA",   # Write metadata.
>             "metadata": 0x1,            #  e.g.) "0x1" which shows in_port 
> value
>             "metadata_mask": 0x3
>         },
>         {
>             "type": "GOTO_TABLE",       # Describe next table
>             "table_id": 1
>         }
>     ]
>  }' http://localhost:8080/stats/flowentry/add
>
> $ curl -X POST -d '{
>     "dpid": "1",
>     "table_id": 0,   # The 1st table
>     "match":{
>         "in_port":2  # From Host 2
>     },
>     "actions":[
>         {
>             "type": "WRITE_METADATA",   # Write metadata.
>             "metadata": 0x2,            #  e.g.) "0x2" which shows in_port 
> value
>             "metadata_mask": 0x3
>         },
>         {
>             "type": "GOTO_TABLE",       # Describe next table
>             "table_id": 1
>         }
>     ]
>  }' http://localhost:8080/stats/flowentry/add
>
>
> # Install the Flow entries which use metadata to detect in_port.
> $ curl -X POST -d '{
>     "dpid": "1",
>     "table_id": 1,              # The 2nd table
>     "match":{
>         "metadata": "0x1/0x03"  # "0x1/0x03" means in_port value is "1"
>     },
>     "actions":[
>         {
>             "type": "OUTPUT",   # Output to Host 2
>             "port": 2
>         }
>     ]
>  }' http://localhost:8080/stats/flowentry/add
>
> $ curl -X POST -d '{
>     "dpid": "1",
>     "table_id": 1,              # The 2nd table
>     "match":{
>         "metadata": "0x2/0x03"  # "0x2/0x03" means in_port value is "2"
>     },
>     "actions":[
>         {
>             "type": "OUTPUT",   # Output to Host 1
>             "port": 1
>         }
>     ]
>  }' http://localhost:8080/stats/flowentry/add
>
>
> 3.Confirm Flow entries
> $ curl -X GET http://localhost:8080/stats/flow/1 | jq .
>
>
> 4.Ping test
> mininet> h1 ping h2
> PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
> 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.915 ms
> 64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.043 ms
> 64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=0.049 ms
> ...
>
>
> Tips for the above commands is described in the documentation.
> (http://ryu.readthedocs.org/en/latest/app/ofctl_rest.html)
>
> Thanks
>
>>
>> Thanks in advance.
>> Best,
>> Clément
>>
>> ------------------------------------------------------------------------------
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Ryu-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to