[ovs-dev] Q on sending packets from the system running ovs

Ravi.Kerur at telekom.com Ravi.Kerur at telekom.com
Mon Feb 13 13:09:51 PST 2012


Hello,



I am trying to send simple vlan packets via a C program and wanted a vlan specific action executed before sending out on wire. I have configured following flows in ovs



root at rkerur-ThinkPad-T400:~/mpls_vlan_0209/openvswitch# ovs-ofctl dump-flows br0

NXST_FLOW reply (xid=0x4):

 cookie=0x0, duration=4685.567s, table=0, n_packets=110, n_bytes=5808,

idle_timeout=50000,idle_age=27,priority=65535,arp actions=NORMAL



 cookie=0x0, duration=4685.566s, table=0, n_packets=0, n_bytes=0,

idle_timeout=50000,idle_age=4685,priority=65535,dl_type=0x8100

actions=strip_vlan,output:1



I basically assuming generated vlan packets from the program would match the second flow entry and strip vlan before sending it. From the stats (n_packets=0) looks like it's not matched. What's coming out from tcpdump capture is



root at rkerur-ThinkPad-T400:~# cat vlan_logs

12:49:30.932648 00:27:13:67:b9:9b > 00:1f:9e:2a:7f:dd, ethertype

802.1Q (0x8100), length 512: vlan 1, p 0, ethertype IPv4, (tos 0x0,

ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 494)

   10.117.46.196.3840 > 10.117.46.193.3840: [no cksum] UDP, length 466

       0x0000:  0001 0800 4500 01ee 0000 0000 4011 0691  ....E....... at ...

       0x0010:  0a75 2ec4 0a75 2ec1 0f00 0f00 01da 0000  .u...u..........

       0x0020:  4242 4242 4242 4242 4242 4242 4242 4242  BBBBBBBBBBBBBBBB

       0x0030:  4242 4242 4242 4242 4242 4242 4242 4242  BBBBBBBBBBBBBBBB

       0x0040:  4242 4242 4242 4242 4242 4242 4242 4242  BBBBBBBBBBBBBBBB

       0x0050:  4242 4242 4242 4242 4242 4242 4242 4242  BBBBBBBBBBBBBBBB

       0x0060:  4242 4242 4242 4242 4242 4242 4242 4242  BBBBBBBBBBBBBBBB

...



Ovs-ofctl man page talks about packet-out argument, however, I am not quite clear on the syntax.



ovs-ofctl packet-out br0 local strip_vlan,1 <packet>, what should packet be? Should it point to the packet sent out by the program?



Inputs appreciated.



Thanks

Ravi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/dev/attachments/20120213/a4ee799a/attachment.htm>


More information about the dev mailing list