Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Ubuntu 12.04 Desktop with wired network connection, eth0 and eth1 bonded and bridged. After reboot

  • ping ubuntu.com fails
  • ping 8.8.8.8 fails
  • access to web server by noip domain name fails
  • access to web server by external IP address fails
  • access to web server (ssh, etc.) by internal IP address succeeds (another machine)

The culprit seems to be a route on eth0. This route seems odd because eth0 is bonded and bridged into br0 and isn't used as eth0.

route output

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
default         192.168.0.1     0.0.0.0         UG    100    0        0 br0
link-local      *               255.255.0.0     U     1000   0        0 br0
192.168.0.0     *               255.255.255.0   U     0      0        0 br0
192.168.0.0     *               255.255.255.0   U     1      0        0 eth0
192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0

If I add a gateway route for br0 (duplicating the second line above except metric=0) by running

route add default gw 192.168.2.1 br0

ping works and access from outside the local network is possible.

route output after above

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 br0
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
default         192.168.0.1     0.0.0.0         UG    100    0        0 br0
link-local      *               255.255.0.0     U     1000   0        0 br0
192.168.0.0     *               255.255.255.0   U     0      0        0 br0
192.168.0.0     *               255.255.255.0   U     1      0        0 eth0
192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0

How do I prevent the route(s) on eth0 from being created? (I note there's another eth0 route in the list. Again, I don't know why eth0 would have routes on it when it's bonded.)

Should I do something to change the metric on br0's default route to 0? (If so, what?)

/etc/network/interfaces

iface lo inet loopback

auto eth0
iface eth0 inet manual
        bond-master bond0

auto eth1
iface eth1 inet manual
        bond-master bond0

auto bond0
iface bond0 inet manual
        bond-miimon 100
        bond-mode balance-rr
        bond-slaves none

auto br0
iface br0 inet static
        address 192.168.0.105
        gateway 192.168.0.1
        dns-nameservers 192.168.0.1 8.8.8.8 8.8.8.4
        dns-search xxx.xxx.xxx    <- localhost's domain name
        netmask 255.255.255.0
        bridge_ports bond0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0

Thanks.

share|improve this question
    
Perhaps NetworkManager is interfering? It supposedly reads the interfaces file and stays away from interfaces listed there, but maybe some aspect of that is breaking in your setup. It wouldn't hurt at least rule out NM by stopping it. –  Kaz Apr 3 '13 at 16:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.