[ovs-discuss] Strange behavior when rewriting custom Ethernet frames

Peter Dely peter.dely at kau.se
Thu Nov 1 12:44:20 UTC 2012


Hello,

I am trying to use OVS to rewrite some bytes in an custom-made 
Ethernet-header (written to a veth interface via a raw-socket). However, 
OVS does not behave as expected.

For example:
ovs-ofctl mod-flows br0 
in_port=1,action=load:0x99'->'NXM_OF_ETH_DST[],output:3
should result in the value 0x99 at the destination field of the MAC 
header. OVS writes the value there, BUT it also writes 0x99 in other 
locations of the whole frame (and thereby destroying the frame).

Details:

tcpdump -i veth1 -xxx -c 1  //Incoming interface, port 1
tcpdump: WARNING: veth1: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on veth1, link-type EN10MB (Ethernet), capture size 96 bytes
13:17:37.922175 IP0 bad-hlen 0
         0x0000:  ffff ffff ffff 0200 0000 0000 0800 0000
         0x0010:  0e00 0e00 0000 006c a014 c000 8000 0000
         0x0020:  ffff ffff ffff 0200 0000 0000 0200 0000
         0x0030:  0000 0000 0000 0000 0000 0000 6400 0100
         0x0040:  0008 434c 4f55 444d 4143 0101 ec03 0138
         0x0050:  0504 0002 0000



tcpdump -i veth4 -xxx -c 1 //outgoing interface, port 3


tcpdump: WARNING: veth4: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on veth4, link-type EN10MB (Ethernet), capture size 96 bytes
13:17:41.922153 08:00:01:00:03:00 (oui Unknown) > 00:00:00:00:00:99 (oui 
Ethernet) Null Information, send seq 0, rcv seq 76, Flags [Poll], length 72
         0x0000:  0000 0000 0099 0800 0100 0300 0000 0000
         0x0010:  0099 0800 0000 006c a014 c000 8000 0000
         0x0020:  ffff ffff ffff 0200 0000 0000 0200 0000
         0x0030:  0000 0000 0000 0000 0000 0000 6400 0100
         0x0040:  0008 434c 4f55 444d 4143 0101 ec03 0138
         0x0050:  0504 0002 0000



 > ovs-ofctl dump-flows br0
NXST_FLOW reply (xid=0x4):
  cookie=0x0, duration=1286.064s, table=0, n_packets=12858, 
n_bytes=1105746, in_port=1 actions=load:0x99->NXM_OF_ETH_DST[],output:3

 >ovs-ofctl --version
ovs-ofctl (Open vSwitch) 1.3.0



Any ideas?

//Peter

-- 
Peter Dely

Karlstad University
Computer Science Department
Universitetsgatan 2

65188 Karlstad
Sweden

Tel: ++46 (0)54 700-2156
Fax: ++46 (0)54 700-1828

eMail: peter.dely at kau.se
msn: peter.dely at kau.se
skype: peterdely





More information about the discuss mailing list