Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question

4 Answers 4

up vote 2 down vote accepted
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

share|improve this answer

The correct place for the default gateway is /etc/sysconfig/network - remove it from your bond scripts. Also ensure that your route defined as

GATEWAY=x.x.x.x

What does ip route ls show after service network restart

share|improve this answer
    
I didn't wrote, but I also tried to remove GATEWAY from bond script. Now, I add ip route output into my question. –  lg. Jan 10 '11 at 14:25

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|improve this answer

You cannot use booth like that, or you set network=10.0.0.0/16 without netmask or you set network=10.0.0.0 and netmask=255.255.0.0.

Regards.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.