Skip to main content
edited tags
Link
A.B
  • 39.5k
  • 2
  • 87
  • 134
Source Link
Martin Vegter
  • 758
  • 81
  • 257
  • 448

default gateway not set when using bond0 interface

This is my /etc/network/interfaces file:

auto bond0
iface bond0 inet manual
    address 10.66.7.11/24
    gateway 10.66.7.1
    bond-mode 802.3ad
    bond-slaves eth2 eth3
    bond-miimon 100
    bond-downdelay 200
    bond-updelay 400
    bond-lacp-rate 1
    up ifconfig bond0 10.66.7.11/24 up

when I bring the bond0 interface up, it works, but the default gateway is not set

# route -n
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.66.7.0       0.0.0.0         255.255.255.0   U     0      0        0 bond0

I have to set the default gateway manually, and then everything works fine:

route add default gw 10.66.7.1 bond0

#route -n
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface  
0.0.0.0         10.66.7.1       0.0.0.0         UG    0      0        0 bond0
10.66.7.0       0.0.0.0         255.255.255.0   U     0      0        0 bond0

why is my default gateway not set automatically, when I have it defined in the /etc/network/interfaces file ?