3

When I tried to create VLANs and bridges on Ubuntu 14.04 (as in the following configuration), the network connection is always lost.

What is the problem?

Note that the if I only set the interface em1(no em1.100, cloudbr0 and cloudbr1) with the same IP, gateway etc. settings, the network works fine.

Is the following way of setting up for VLANs and bridges wrong or have I missed something? I have also checked that 802.1q module has been loaded already.

#cat /etc/network/interfaces

auto lo 
iface lo inet loopback

#The primary network interface
auto em1.100 
iface em1.100 inet static 
address 192.168.42.11 
netmask 255.255.255.240 
gateway 192.168.42.1 
dns-nameservers 8.8.8.8 8.8.4.4 

#Public network
auto cloudbr0 
iface cloudbr0 inet manual 
bridge_ports em1.200 
bridge_fd 5 
bridge_stp off 
bridge_maxwait 1

#Private network
auto cloudbr1 
iface cloudbr1 inet manual 
bridge_ports em1.300 
bridge_fd 5 
bridge_stp off 
bridge_maxwait 1

#reboot ==> then lost network connection.

3 Answers 3

1

You need to define the vlan interfaces before including them in the bridge. You might try the following changing the ip addresses for your own:

auto lo 
iface lo inet loopback

#The primary network interface
auto em1.100 
  iface em1.100 inet static 
  address 192.168.42.11 
  netmask 255.255.255.240 
  gateway 192.168.42.1 
  dns-nameservers 8.8.8.8 8.8.4.4
  vlan-raw-device em1 

auto em1.200
  iface em1.200 inet static
  address 172.22.1.1
  netmask 255.255.255.0
  vlan-raw-device em1

auto em1.300
  iface em1.300 inet static
  address 172.22.2.1
  vlan-raw-device em1
  netamsk 255.255.255.0

#Public network
auto cloudbr0 
iface cloudbr0 inet manual 
bridge_ports em1.200 
bridge_fd 5 
bridge_stp off 
bridge_maxwait 1

#Private network
auto cloudbr1 
iface cloudbr1 inet manual 
bridge_ports em1.300 
bridge_fd 5 
bridge_stp off 
bridge_maxwait 1
0

If bridge_ports option from the bridge-utils package is specified then, VLAN configuration will NOT be performed on Ubuntu as specified here: http://manpages.ubuntu.com/manpages/saucy/man5/interfaces.5.html

0

Check the VLAN settings to verify this:

cat /proc/net/vlan/config

Install the vlan package which adds some scripts to the ifup/ifdown mimic:

apt-get install vlan
1
  • Welcome to Ask Ubuntu! ;-) Could you please review my edits and also review the editing help to improve the readability of your questions in the future... ;-)
    – Fabby
    Feb 25, 2015 at 20:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .