Operating System - Linux
1752576 Members
4121 Online
108788 Solutions
New Discussion юеВ

Need help configuring bond1

 
SOLVED
Go to solution
Randy Hagedorn
Regular Advisor

Need help configuring bond1

Hi,

I have the need to create a network bond0 and bond1. bond0 appears to be configured OK, but when starting the network for bond1 I get this error.

[root@robin etc]# uname -r
2.6.18-8.el5
[root@robin etc]#

[root@robin etc]# ifup bond1
bonding device bond1 does not seem to be present, delaying initialization.
[root@robin etc]#

Here are thke configuration files:
[root@robin etc]# cat ifcfg-bond1
DEVICE=bond1
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.2.0
NETMASK=255.255.255.0
IPADDR=192.168.2.11
USERCTL=no
TYPE=Ethernet
IPV6INIT=no
PEERDNS=yes
BONDING_OPTS="mode=1 miimon=500"

[root@robin etc]# cat ifcfg-eth2
# Broadcom Corporation NetXtreme BCM5715S Gigabit Ethernet
DEVICE=eth2
BOOTPROTO=none
ONBOOT=no
MASTER=bond1
SLAVE=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
[root@robin etc]# cat ifcfg-eth3
# Broadcom Corporation NetXtreme BCM5715S Gigabit Ethernet
DEVICE=eth3
BOOTPROTO=none
ONBOOT=no
MASTER=bond1
SLAVE=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
[root@robin etc]# cat /etc/modprobe.conf
alias bond0 bonding
alias bond1 bonding
alias scsi_hostadapter1 usb-storage
alias scsi_hostadapter2 qla2xxx_conf
alias scsi_hostadapter3 qla2xxx
alias scsi_hostadapter4 qla2300
alias scsi_hostadapter5 qla2400
options qla2xxx ql2xmaxqdepth=16 qlport_down_retry=30 ql2xloginretrycount=30 ql
2xfailover=1 ql2xlbType=1 ql2xautorestore=0xa0 ConfigRequired=0
remove qla2xxx /sbin/modprobe -r --first-time --ignore-remove qla2xxx && { /sbin
/modprobe -r --ignore-remove qla2xxx_conf; }
alias eth0 bnx2
alias eth1 bnx2
alias eth2 tg3
alias eth3 tg3
[root@robin etc]#

Thanks,
Randy
6 REPLIES 6
FLQ
Valued Contributor
Solution

Re: Need help configuring bond1

Hi Randy,

default max_bond = 1 when not specified.

Try reloading bonding driver with max_bonds = 2


Cheers
Randy Hagedorn
Regular Advisor

Re: Need help configuring bond1

FLQ,

Thanks for the suggestion, but I read on a post that max_bonds shouldn't be used when configuring networking with sysconfig files as it may confuse things. Instead using multiple ifcfg-bondX files is preferred.

Thanks,
Randy
KuehnUl
Advisor

Re: Need help configuring bond1


Hi Randy,

you didn't tell the os which interfaces he should use.

This is a exsample from a SLES10 system:

/etc/sysconfig/network/ifcfg-bond0:

BONDING_MASTER=yes
BONDING_MODULE_OPTS='miimon=100 mode=1 use_carrier=1'
BONDING_SLAVE0='eth-id-00:17:a4:77:d4:60'
BONDING_SLAVE1='eth-id-00:17:a4:77:d4:62'
BOOTPROTO='static'
IPADDR='192.168.2.7'
MTU='1500'
NETMASK='255.255.255.0'
STARTMODE='onboot'

regards, Uli
Randy Hagedorn
Regular Advisor

Re: Need help configuring bond1

Uli,

The O/S is RHEL 5.

# uname -r
2.6.18-8.el5

Thanks,
Randy
Tim Nelson
Honored Contributor

Re: Need help configuring bond1

RHEL example

/etc/modprob.conf
alias bond0 bonding
options bonding max_bonds=2
alias bond1 bonding

/etc/sysconfig/network-scripts
ifcfg-bond0
DEVICE=bond0
IPADDR=xx.xx.xx.xx
NETMASK=255.255.255.192
BROADCAST=xx.xx.xx.127
ONBOOT=YES
BOOTPROTO=none
USERCTL=no
TYPE=Bonding
BONDING_OPTS="mode=1 miimon=100"

ifcfg-eth0
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
BOOTPROTO=none
SLAVE=yes

ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
BOOTPROTO=none
SLAVE=yes


repeat the above for bond1 and ethx associated.

service network restart

cat /proc/net/bonding/bond0
cat /proc/net/bonding/bond1
Randy Hagedorn
Regular Advisor

Re: Need help configuring bond1

This issue was resolved by simply rebooting the system. Apparently the eth3 device that was missing was actually created as dev24262, which was seen by the command ifconfig -a. The 'service network restart' command wasn't able to properly name the eth3 device.

Also, it is possible the nics can be mapped differently on each boot. So to prevent this on RHEL 5, we created the file /etc/udev/rules.d/50-netdev.rules containing

KERNEL =="eth*" , SYSFS{address} =="00:17:a4:77:24:10 " , NAME ="eth0"

KERNEL =="eth*" , SYSFS{address} =="00:17:a4:77:24:12" , NAME ="eth1"

KERNEL =="eth*" , SYSFS{address} =="00:17:a4:77:24:0c " , NAME ="eth2"

KERNEL =="eth*" , SYSFS{address} =="00:17:a4:77:24:0e" , NAME ="eth3"

Another method would be adding the HWADDR option to the /etc/sysconfig/network-scripts/ethX files.

Thanks,
Randy