Article title: RedhatAS4.0 dual-Nic binding. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. environment description
In my RedHat Linux Enterprise AS 4, the dual-port Intel Gigabit Nic is installed, and two NICs eth0 and eth1 are displayed through the ifconfig-a command.
2. bind two Nics:
2.1 modify the/etc/sysconfig/network-scripts/ifcfg-eth0 configuration document, the modified content is as follows:
DEVICE = eth0
ONBOOT = yes # enable the device automatically when the system starts
BOOTPROTO = none # No protocol is used at startup
2.2 modify the/etc/sysconfig/network-scripts/ifcfg-eth1 configuration document, the modified content is as follows:
DEVICE = eth1
ONBOOT = yes # enable the device automatically when the system starts
BOOTPROTO = none # No protocol is used at startup
2.3 Create a configuration file/etc/sysconfig/network-scripts/ifcfg-bond0 bound to the network port, the content is as follows:
DEVICE = bond0 # virtual Nic name
BOOTPROTO = static
IPADDR = 192.168.254.38 # IP address
NETMASK = 255.255.255.0 # subnet mask
GATEWAY = 192.168.254.254 # GATEWAY
BORADCAST = 192.168.254.255 # broadcast address
ONBOOT = yes
TYPE = Ethernet
2.4 modify/etc/modprobe. conf, configure the binding model, and add the following content:
Alias bond0 bonding
Options bond0 millmon = 100 mode = 0
# The millmon option specifies the interval for link monitoring. the unit is ms.
# Option mode indicates the working mode of the binding Port. There are 7 modes in total from 0 to 7. commonly used modes include 0 and 1. mode = 0 indicates the "round-robin" policy, two cards work in the load balancing status at the same time
Status. Mode = 1 indicates the "active-backup" policy. two cards use the backup status of one slave.
2.5 The modification is/etc/rc. local, which is responsible for binding the virtual network card and two physical network cards at system startup. add the following content:
Ifenslave bond0 eth0 eth1