Hello,

I'm wondering if/how I can establish a relation between an OVS interface (such 
as vnet0) and its port number as used in openflow entries?
Everything is working fine, I'm just trying to better understand how the 
various components work together.

For example:

root@qemu-kvm:/# ovs-vsctl -V
ovs-vsctl (Open vSwitch) 1.11.90
Compiled May  8 2013 11:11:41
root@qemu-kvm:/#
root@qemu-kvm:/# ovs-ofctl dump-ports-desc br0
OFPST_PORT_DESC reply (xid=0x2):
1(eth1): addr:00:50:56:a5:50:44
     config:     0
     state:      0
     current:    1GB-FD COPPER AUTO_NEG
     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG
     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG
     speed: 1000 Mbps now, 1000 Mbps max
5(vnet0): addr:fe:54:00:a5:77:73
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
6(vnet1): addr:fe:54:00:6b:64:ed
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
LOCAL(br0): addr:00:50:56:a5:50:44
     config:     0
     state:      0
     speed: 0 Mbps now, 0 Mbps max


è Vnet0 appears to have port id 5 while vnet1 has port id 6. Now if I check the 
fdb on br0 I get different port numbers:

root@qemu-kvm:/# ovs-appctl fdb/show br0
port  VLAN  MAC                Age
    2     0  00:18:74:c2:40:00  151
    2     0  00:50:56:a5:28:9c   66
   3     0  52:54:00:a5:77:73    1
    4     0  52:54:00:6b:64:ed    1
root@qemu-kvm:/#

Flow entries match numbering found in the fdb:

root@qemu-kvm:/# ovs-ofctl dump-flows br0
NXST_FLOW reply (xid=0x4):
cookie=0x0, duration=10877.038s, table=0, n_packets=7649, n_bytes=3550080, 
idle_age=1, priority=0 actions=NORMAL
root@qemu-kvm:/# ovs-appctl dpif/dump-flows br0
in_port(4),eth(src=52:54:00:6b:64:ed,dst=52:54:00:a5:77:73),eth_type(0x0800),ipv4(src=7.7.7.57,dst=7.7.7.56,proto=6,tos=0x10,ttl=64,frag=no),tcp(src=32770,dst=22),
 packets:1458, bytes:97428, used:0.536s, flags:P., actions:3
in_port(3),eth(src=52:54:00:a5:77:73,dst=52:54:00:6b:64:ed),eth_type(0x0800),ipv4(src=7.7.7.56,dst=7.7.7.57,proto=6,tos=0x10,ttl=64,frag=no),tcp(src=22,dst=32770),
 packets:1474, bytes:1128004, used:0.536s, flags:P., actions:4
root@qemu-kvm:/#


è Here I see ports 3 and 4 in use (they match the previous fdb output) for 
vnet0 and vnet1

How come the numbers don't match? Now I noticed that only table Interfaces has 
an ofport tuple, while table Port doesn't. Am I mixing interfaces and ports?

Thanks!

Chris.

_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to