Bonding and default gateway problem (CentOS)

16,358

Solution 1

NETWORK=10.0.0.0/16

I don't think this is specified correctly. It should be just

NETWORK=10.0.0.0

or try leaving it out entirely its redundant information

Solution 2

TrevorH (a linux sysadmin) solved my problem (I post my question also into centos forum).

Removing NETWORK and BROADCAST lines from ifcfg-bond0, the default gateway is configured.

Share:
16,358

Related videos on Youtube

lg.
Author by

lg.

Updated on September 17, 2022

Comments

  • lg.
    lg. over 1 year

    I configured network bonding on two machine with centos 5.5. Bonding works well, but the problem is default gateway: it is not configured!

    I follow this tutorial. I added GATEWAY in both (and either) /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-bond0. But, when I restart network (or server) there is no default gateway (route command).

    This is ip route ls output after network restart:

    10.0.0.0/16 dev bond0 proto kernel scope link src 10.0.0.88

    Where is my mistake?

    /etc/sysconfig/network
    NETWORKING=yes
    NETWORKING_IPV6=no
    IPV6INIT=no
    HOSTNAME=mysql2
    NOZEROCONF=yes
    GATEWAY=10.0.1.10
    
    /etc/sysconfig/network-scripts/ifcfg-bond0 
    DEVICE=bond0
    IPADDR=10.0.0.88
    NETMASK=255.255.0.0
    NETWORK=10.0.0.0/16
    BROADCAST=10.0.255.255
    GATEWAY=10.0.1.10
    ONBOOT=yes
    BOOTPROTO=none
    USERCTL=no
    TYPE=Ethernet
    
    /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE=eth0
    ONBOOT=yes
    BOOTPROTO=none
    USERCTL=no
    MASTER=bond0
    SLAVE=yes
    
    /etc/sysconfig/network-scripts/ifcfg-eth1
    DEVICE=eth1
    ONBOOT=yes
    BOOTPROTO=none
    USERCTL=no
    MASTER=bond0
    SLAVE=yes
    
  • lg.
    lg. over 13 years
    I didn't wrote, but I also tried to remove GATEWAY from bond script. Now, I add ip route output into my question.