Nic Bonding + Route Problems.

Issues related to configuring your network
Post Reply
wongxx
Posts: 11
Joined: 2008/03/10 06:17:14

Nic Bonding + Route Problems.

Post by wongxx » 2008/03/14 05:53:17

Hello,

Ive been working on a bonding configuration and everything seems fine.
But for some reason the default gateway won't stick.

I just did a fresh install and everything was working fine, default gateway was set during setup.
rebooted for updates and what not, network still working fine.

created the bond.
network route no longer there.


here is my configs.

modprobe.conf

alias eth0 e100
alias eth1 e100
alias scsi_hostadapter aic7xxx
alias usb-controller ohci-hcd

alias bond0 bonding
options bond0 miimon=50 mode=6

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=caspar.fakedomain.com
GATEWAY=206.53.50.152


/etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
ONBOOT=yes
BOOTPROTO=static
USERCTL=no
IPV6INIT=no
CLONENUM_START=1

GATEWAY=206.53.50.152
BROADCAST=206.53.50.159
NETMASK=255.255.255.0
NETWORK=205.53.50.0
IPADDR_START=206.53.50.153
IPADDR_END=206.53.50.154

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
IPV6INIT=no
HWADDR=00:09:6B:58:AC:04

BROADCAST=206.53.50.159
NETMASK=255.255.255.0
NETWORK=206.53.50.0
GATEWAY=206.53.50.152
#IPADDR=206.53.50.153

/etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
IPV6INIT=no
HWADDR=00:09:6B:58:AC:05

BROADCAST=206.53.50.159
NETMASK=255.255.255.0
NETWORK=206.53.50.0
GATEWAY=206.53.50.152
#IPADDR=206.53.50.154

route -n

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
206.53.50.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 bond0
0.0.0.0 206.53.50.152 0.0.0.0 UG 0 0 0 bond0

thats a working config when i add "route add default gw 206.53.50.152"
but it won't stick on reboot.

unless i'm missing something huge.
also here is the results of "ifconfig"


bond0 Link encap:Ethernet HWaddr 00:09:6B:58:AC:04
inet addr:206.53.50.154 Bcast:206.53.50.159 Mask:255.255.255.0
inet6 addr: fe80::209:6bff:fe58:ac04/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:5354 errors:0 dropped:0 overruns:0 frame:0
TX packets:177388 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:479301 (468.0 KiB) TX bytes:10880216 (10.3 MiB)

eth0 Link encap:Ethernet HWaddr 00:09:6B:58:AC:04
inet6 addr: fe80::209:6bff:fe58:ac04/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:822 errors:0 dropped:0 overruns:0 frame:0
TX packets:90471 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:79870 (77.9 KiB) TX bytes:5664797 (5.4 MiB)

eth1 Link encap:Ethernet HWaddr 00:09:6B:58:AC:05
inet6 addr: fe80::209:6bff:fe58:ac04/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:4532 errors:0 dropped:0 overruns:0 frame:0
TX packets:86918 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:399431 (390.0 KiB) TX bytes:5215573 (4.9 MiB)

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:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)

i've tried multiple configs and still no dice.

here is the route table on another system on the same network.

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
206.53.50.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
206.53.50.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 206.53.50.152 0.0.0.0 UG 0 0 0 eth1

wongxx
Posts: 11
Joined: 2008/03/10 06:17:14

Re: Nic Bonding + Route Problems.

Post by wongxx » 2008/03/14 07:03:22

Ok so i made some changes..


/etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none
#BOOTPROTO=static
USERCTL=no
IPV6INIT=no

GATEWAY=206.53.50.152
BROADCAST=206.53.50.255
NETMASK=255.255.255.0
NETWORK=206.53.50.0

ifcfg-eth0


DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
IPV6INIT=no
HWADDR=00:09:6B:58:AC:04

BROADCAST=206.53.50.255
NETMASK=255.255.255.0
NETWORK=206.53.50.0
GATEWAY=206.53.50.152

ifcfg-eth1


DEVICE=eth1
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
IPV6INIT=no
HWADDR=00:09:6B:58:AC:05

BROADCAST=206.53.50.255
NETMASK=255.255.255.0
NETWORK=206.53.50.0
GATEWAY=206.53.50.152

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
206.53.50.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 bond0
0.0.0.0 206.53.50.152 0.0.0.0 UG 0 0 0 bond0

so that works out..

If your wondering why theres no IP Address set its cause i have it setup to use multiple IP's on the bond.
here is the config.

created a new ifcnf-bond0-range1

DEVICE=bond0
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none

IPADDR_START=206.53.50.153
IPADDR_END=206.53.50.154
CLONENUM_START=1

BROADCAST=206.53.50.255
NETMASK=255.255.255.0
NETWORK=206.53.50.0
GATEWAY=206.53.50.152

ifconfig
bond0 Link encap:Ethernet HWaddr 00:09:6B:58:AC:04
inet6 addr: fe80::209:6bff:fe58:ac04/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:143491 errors:0 dropped:0 overruns:0 frame:0
TX packets:89490 errors:34 dropped:0 overruns:0 carrier:34
collisions:0 txqueuelen:0
RX bytes:203081202 (193.6 MiB) TX bytes:6538088 (6.2 MiB)

bond0:1 Link encap:Ethernet HWaddr 00:09:6B:58:AC:04
inet addr:206.53.50.153 Bcast:206.53.50.255 Mask:255.255.255.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1

bond0:2 Link encap:Ethernet HWaddr 00:09:6B:58:AC:04
inet addr:206.53.50.154 Bcast:206.53.50.255 Mask:255.255.255.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1

eth0 Link encap:Ethernet HWaddr 00:09:6B:58:AC:05
inet6 addr: fe80::209:6bff:fe58:ac04/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:21583 errors:0 dropped:0 overruns:0 frame:0
TX packets:75005 errors:28 dropped:0 overruns:0 carrier:28
collisions:0 txqueuelen:1000
RX bytes:26921743 (25.6 MiB) TX bytes:5199347 (4.9 MiB)

eth1 Link encap:Ethernet HWaddr 00:09:6B:58:AC:04
inet6 addr: fe80::209:6bff:fe58:ac04/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:121908 errors:0 dropped:0 overruns:0 frame:0
TX packets:14486 errors:6 dropped:0 overruns:0 carrier:6
collisions:0 txqueuelen:1000
RX bytes:176159459 (167.9 MiB) TX bytes:1338895 (1.2 MiB)

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:16436 Metric:1
RX packets:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1232 (1.2 KiB) TX bytes:1232 (1.2 KiB)

i have seem to have solved my own problem. hope this helps someone.

arrfab
Site Admin
Posts: 870
Joined: 2005/01/03 21:30:54
Location: /country/belgium
Contact:

Nic Bonding + Route Problems.

Post by arrfab » 2008/03/14 08:49:16

When you're using a bond interface, you can not have something defined in the ifcfg-eth* members .. try maybe to remove everything related to ip in these files to see if that corrects the problem ...
Have you read the article on the wiki ? http://wiki.centos.org/TipsAndTricks/BondingInterfaces

wongxx
Posts: 11
Joined: 2008/03/10 06:17:14

Re: Nic Bonding + Route Problems.

Post by wongxx » 2008/03/14 17:59:54

Ya i did read it.
and for some reason it seems to only work if i have the IP info on the ifcfg-ethX

ill do more testing to see if it still works with out the IP's but for now this config works out fine..
i don't feel like dealing with route problems again :P

Post Reply

Return to “CentOS 4 - Networking Support”