Article Title: how to set Nic binding on the Linux system platform. 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.
Generally, servers have at least two NICs for high availability. in some high-end unix operating systems of aix, you can set multiple NICs to be bound together, so no Nic is broken, in linux, how do I set Nic binding?
Let's take setting two NICs as an example: one master and one slave. by default, the primary Eni works. if the primary Eni has problems, replace and take over the secondary Eni in time, ensures high system availability
1. Add/etc/sysconfig/network-scripts/ifcfg-bond1
DEVICE = bond0
BOOTPROTO = none
ONBOOT = yes
NETWORK = 10.1.1.0
NETMASK = 255.255.255.0
IPADDR = 10.1.1.125
USERCTL = no
GATEWAY = 10.1.1.254
2. modify/etc/modules. conf
Add
Alias bond0 bonding
Options bond0 mode = 1 miimon = 100 primary = eth0
3. modify/etc/sysconfig/network-scripts/ifcfg-eth0 ifcfg-eth1
DEVICE = eth0
BOOTPROTO = none
HWADDR = 00: 50: 56: 40: 5D: 95
ONBOOT = yes
TYPE = Ethernet
MASTER = bond0
SLAVE = yes
USERCTL = no
DEVICE = eth1
BOOTPROTO = none
HWADDR = 00: 50: 56: 40: 5D: 95
ONBOOT = yes
TYPE = Ethernet
MASTER = bond0
SLAVE = yes
USERCTL = no
OK, get it done. restart the network to unplug the network cable and perform a test to see if it works normally when the primary network card has a problem.