M BUZZ CRAZE NEWS
// news

14.04 no internet connection when I up the bridge interface (for LXC container)

By Daniel Rodriguez

I have VM Ubuntu 14.04 32bit running in VMware Workstation on Win 10.

I'm trying to set up the LXC container having its own IP address so I set the bridge interface in /etc/network/interfaces (tried static and dhcp):

 # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback auto br0 iface br0 inet dhcp bridge_ports eth0 bridge_fd 0 bridge_maxwait 0

But then I reboot it and have no internet on my host mashine Ubuntu.

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 1999ms
pipe 3

But it can connect to the router and I can ssh it from my main OS (win 10)

my host ifconfig:

root@ubuntu:~# ifconfig
br0 Link encap:Ethernet HWaddr 00:0c:29:68:f1:39 inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe68:f139/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:483 errors:0 dropped:0 overruns:0 frame:0 TX packets:180 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:39212 (39.2 KB) TX bytes:28823 (28.8 KB)
eth0 Link encap:Ethernet HWaddr 00:0c:29:68:f1:39 inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:488 errors:0 dropped:0 overruns:0 frame:0 TX packets:268 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:46338 (46.3 KB) TX bytes:39955 (39.9 KB) Interrupt:19 Base address:0x2000
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:128 errors:0 dropped:0 overruns:0 frame:0 TX packets:128 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:20434 (20.4 KB) TX bytes:20434 (20.4 KB)

I read all the similar posts but did not help. Any thoughts?

1 Answer

Sorry for the late reply, but just started writing in here.

I assume you have installed the bridge-utils via apt-get.

Edit the /etc/network/interfaces file. It should seem similar to this:

# Bridge between eth0 and eth1
auto br0
iface br0 inet dhcp
# For static configuration delete or comment out the above line and uncomment the following:
# iface br0 inet static
# address 192.168.1.10
# netmask 255.255.255.0
# gateway 192.168.1.1
# dns-nameservers 192.168.1.5
# dns-search example.com
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0

So quickly put, give your br0 the values originally handled by the eth0. Your eth0 should not contain any IP-information.

ifup br0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy