[ovs-discuss] Open vSwitch with tap interface

Justin Pettit jpettit at nicira.com
Thu Jul 19 01:00:21 UTC 2012


What does your flow table look like?  You can find out by running "ovs-ofctl dump-flows mxu-br0".  Can you also dump your kernel flow table?  That's with "ovs-dpctl dump-flows mxu-br0".

--Justin


On Jul 18, 2012, at 5:48 PM, Milton Xu (mxu) wrote:

> Hi OVS experts,
>  
> I am new to OVS and trying to replace Linux bridge (brctl) utility with OVS.
>  
> Using Linux  bridge, I have two VM’s based on QEMU/KVM using two tap interfaces tap0.mxu and tap1.mxu and they are connected thru my bridge mxu-br0:
>  
> brctl show mxu-br0
> bridge name     bridge id               STP enabled          interfaces
> mxu-br0         8000.6a403c9462ff       no                   tap0.mxu
>                                                                                           tap1.mxu
>  
>  
>  
> My two VM’s, mxu-br0,  tap0.mxu and tap1.mxu are all on the same Liunx machine and you can see them all up so I can send ping btw my two VM’s without any problem.
>  
> >ifconfig | more
> eth0      Link encap:Ethernet  HWaddr 30:e4:db:c2:a1:a4 
>           inet addr:172.19.124.54  Bcast:172.19.124.255  Mask:255.255.255.0
>           inet6 addr: fe80::32e4:dbff:fec2:a1a4/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:15000589 errors:0 dropped:870 overruns:0 frame:0
>           TX packets:7831073 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:15172609160 (15.1 GB)  TX bytes:2499636852 (2.4 GB)
>           Memory:b3160000-b3180000
>  
> eth1      Link encap:Ethernet  HWaddr 30:e4:db:c2:a1:a5 
>           inet addr:21.255.255.253  Bcast:21.255.255.255  Mask:255.0.0.0
>           inet6 addr: fe80::32e4:dbff:fec2:a1a5/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:2611 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:0 (0.0 B)  TX bytes:241898 (241.8 KB)
>           Memory:b3120000-b3140000
>  
>  
> lo        Link encap:Local Loopback 
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:10098544920 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:10098544920 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:811112857751 (811.1 GB)  TX bytes:811112857751 (811.1 GB)
>  
> mxu-br0   Link encap:Ethernet  HWaddr 6a:40:3c:94:62:ff 
>           inet6 addr: fe80::6840:3cff:fe94:62ff/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:0 (0.0 B)  TX bytes:4101 (4.1 KB)
>  
> tap0.mxu  Link encap:Ethernet  HWaddr 6a:40:3c:94:62:ff 
>           inet6 addr: fe80::6840:3cff:fe94:62ff/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:19 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:500
>           RX bytes:2742 (2.7 KB)  TX bytes:8854 (8.8 KB)
>  
> tap1.mxu  Link encap:Ethernet  HWaddr ee:0d:fe:17:53:5d 
>           inet6 addr: fe80::ec0d:feff:fe17:535d/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:21 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:24 errors:0 dropped:1 overruns:0 carrier:0
>           collisions:0 txqueuelen:500
>           RX bytes:2598 (2.5 KB)  TX bytes:4450 (4.4 KB)
>  
>  
> Now I use OVS to create bridge mxu-ovs-br1:
>  
> >ovs-vsctl show
> 92076a61-e1bc-4610-997e-22cc173891ab
>     Bridge "mxu-ovs-br1"
>         Port "mxu-ovs-br1"
>             Interface "mxu-ovs-br1"
>                 type: internal
>         Port "tap1.mxu"
>             Interface "tap1.mxu"
>         Port "tap0.mxu"
>             Interface "tap0.mxu"
>  
> I see tap0.mxu and tap1.mxu are up but not bridge mxu-ovs-br1 and it seems that I could not use ifconfig to bring up mxu-ovs-br1
> (not the same as the Linux bridge utility).  With OVS as my soft switch, my two VMs (still the same, identical QEMU/KVM based ) could not ping each other.
>  
> Does anybody know whether this is because OVS does not work with tap interface (created using tunctl utility) or I did not configure everything correctly?
> My OVS is built from  openvswitch-1.6.1.
>  
> > ifconfig | more
> eth0      Link encap:Ethernet  HWaddr 58:8d:09:08:9a:04 
>           inet addr:172.28.12.88  Bcast:172.28.12.255  Mask:255.255.255.0
>           inet6 addr: fe80::5a8d:9ff:fe08:9a04/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:3512603 errors:0 dropped:1265 overruns:0 frame:0
>           TX packets:6108402 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:567115246 (567.1 MB)  TX bytes:9147031239 (9.1 GB)
>           Memory:b1960000-b1980000
>  
>  
> tap0.mxu  Link encap:Ethernet  HWaddr 4a:ad:a0:91:81:f9 
>           inet6 addr: fe80::48ad:a0ff:fe91:81f9/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:402 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:62 errors:0 dropped:1 overruns:0 carrier:0
>           collisions:0 txqueuelen:500
>           RX bytes:81538 (81.5 KB)  TX bytes:10343 (10.3 KB)
>  
> tap1.mxu  Link encap:Ethernet  HWaddr ee:dc:21:63:c0:79 
>           inet6 addr: fe80::ecdc:21ff:fe63:c079/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:401 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:500
>           RX bytes:80879 (80.8 KB)  TX bytes:5762 (5.7 KB)
>  
>  
> Thanks in advance,
>  
> Milton
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss




More information about the discuss mailing list