[ovs-discuss] Setting up host bridge with VLAN tags

Joshua Schaeffer jschaeffer0922 at gmail.com
Thu Jul 30 21:08:05 UTC 2015


I'm trying to create a bridge with openvswitch on a new physical system 
I have that I'm planing to connect LXC's to but can't get the bridge to 
connect to my network. I installed openvswitch from the Ubuntu 
repositories without any issue. I have my system connected to my switch 
that allows tagged VLAN 31 traffic. The VLAN network is 10.1.10.32/27

I've been following the openvswitch-switch.README.Debian document 
(specifically example 4). Here is what I've done on the system:

cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-br0 vlan31
iface vlan31 inet manual
	ovs_bridge br0
	ovs_type OVSIntPort
	ovs_options tag=31
	ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)

# Bridge device
allow-ovs br0
iface br0 inet static
	ovs_type OVSBridge
	ovs_ports vlan31
	address 10.1.10.52
	netmask 255.255.255.224
	gateway 10.1.10.33
	dns-servers 10.1.10.6

I can bring up the bridge successfully and ifconfig shows the correct 
information:

sudo ifconfig
br0       Link encap:Ethernet  HWaddr ca:75:db:04:e7:41
           inet addr:10.1.10.52  Bcast:10.1.10.63  Mask:255.255.255.224
           inet6 addr: fe80::c875:dbff:fe04:e741/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:7 errors:0 dropped:1 overruns:0 frame:0
           TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:558 (558.0 B)  TX bytes:1026 (1.0 KB)

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:65536  Metric:1
           RX packets:3773 errors:0 dropped:0 overruns:0 frame:0
           TX packets:3773 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:305456 (305.4 KB)  TX bytes:305456 (305.4 KB)

vlan31    Link encap:Ethernet  HWaddr 96:d5:8a:3f:6f:66
           inet6 addr: fe80::94d5:8aff:fe3f:6f66/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:0 (0.0 B)  TX bytes:648 (648.0 B)

sudo ovs-vsctl show
430caed4-a66f-4577-96eb-48e7841905e8
     Bridge "br0"
         Port "br0"
             Interface "br0"
                 type: internal
         Port "vlan31"
             tag: 31
             Interface "vlan31"
                 type: internal
     ovs_version: "2.3.1"

However I can't ping the gateway:

ping 10.1.10.33
PING 10.1.10.33 (10.1.10.33) 56(84) bytes of data.
 From 10.1.10.52 icmp_seq=1 Destination Host Unreachable
 From 10.1.10.52 icmp_seq=2 Destination Host Unreachable
 From 10.1.10.52 icmp_seq=3 Destination Host Unreachable

--- 10.1.10.33 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2999ms
pipe 3

I know the NIC, VLAN, and switch are operating correctly. If just use 
the vlan program to configure eth0 directly to send tagged VLAN traffic 
I can reach the outside world.

Thanks,
Joshua



More information about the discuss mailing list