[ovs-discuss] OVS host management with Vlan tagged port

Ben Pfaff blp at nicira.com
Tue Jan 17 17:42:49 UTC 2012


On Tue, Jan 17, 2012 at 12:08:04PM -0400, Ariel Moreno wrote:
> We are facing a problem configuring ovs to manage VLAN tagged
> traffic, in particular we have configured a bridge "bt-int" and
> added a bond0 interface joining eth0 and eth1
>
> root at ism15vms:~# ovs-vsctl show 
> 93741536-21a1-4216-9d84-f49dfbef0752 
> Bridge br-int 
> Port "bond0" 
> trunks: [446] 
> Interface "eth0" 
> Interface "eth1" 
> Port br-int 
> Interface br-int 
> type: internal 
> 
> 
> And following the recipes I have configured the host mgmt IP to the
> bond0 interface
> 
> bond0 Link encap:Ethernet HWaddr 00:25:90:1f:b5:ae 
> inet addr:172.16.167.24 Bcast:172.16.167.255 Mask:255.255.255.0 
> inet6 addr: fe80::225:90ff:fe1f:b5ae/64 Scope:Link 
> UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 
> RX packets:23613 errors:0 dropped:0 overruns:0 frame:0 
> TX packets:7635 errors:0 dropped:0 overruns:0 carrier:0 
> collisions:0 txqueuelen:0 
> RX bytes:2960928 (2.9 MB) TX bytes:1061892 (1.0 MB) 

You have configured bond0 as a trunk port that trunks only a single
VLAN.  Presumably that is the VLAN on which you want the configured IP
address.  However, Linux doesn't directly understand how to talk IP
when it is encapsulated in an 802.1Q header.  In the case of bridged
networking, you would create a VLAN device and put the IP address on
that; in the case of Open vSwitch, you create an access port as an
internal device and put the IP address on that, e.g.:

        # Remove IP address from bond0, since it won't be useful.
        ifconfig bond0 0.0.0.0

        # Create access port.
        ovs-vsctl add-port br-int vlan446 tag=446 \
                set Interface br-int type=internal

        # Put IP address on vlan446.
        ifconfig bond0 172.16.167.24

This is also covered in the "Configuration Cookbook" section of
ovs-vsctl(8).



More information about the discuss mailing list