环境

  • Red Hat Enterprise Linux 5

问题

We're getting errors and settings are not applied when using the following options for bonding:

​Raw​

BONDING_OPTS="mode=802.3ad downdelay=300 miimon=100"

Ordering them differently causes no issues:

​Raw​

BONDING_OPTS="mode=802.3ad miimon=100 downdelay=300"

决议

This behavior is expected as some options can only applied if others are already set. The init script just iterates through the given options. All options need to be specified in the proper order (e.g. "downdelay" can only be specified after enabling "miimon").

诊断步骤

wrong order: downdelay=300 miimon=100

​Raw​

[root@fiirisp01 network-scripts]# service network start
Bringing up loopback interface: [ OK ]
Bringing up interface bond0: Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
Loading kernel module for a network device with CAP_SYS_MODULE (deprecated). Use CAP_NET_ADMIN and alias netdev-bond0 instead
bonding: bond0: setting mode to 802.3ad (4).
bonding: bond0: Unable to set down delay as MII monitoring is disabled
/etc/sysconfig/nbonding: bond0: Setting MII monitoring interval to 100.

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

correct order: miimon=100 downdelay=300

​Raw​

[root@fiirisp01 network-scripts]# service network start
Bringing up loopback interface: [ OK ]
Bringing up interface bond0: Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
Loading kernel module for a network device with CAP_SYS_MODULE (deprecated). Use CAP_NET_ADMIN and alias netdev-bond0 instead
bonding: bond0: setting mode to 802.3ad (4).
bonding: bond0: Setting MII monitoring interval to 100.
bonding: bond0: Setting down delay to 300.

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 300