In fact, I have also written a blog post about bind dual NICs in Linux. Today, I conducted another binding experiment and found that it is much simpler than the original binding. It may be caused by different system or system versions. A series of previous articles about bind dual network interfaces in Linux. Today, we found that it is okay not to perform those operations. Therefore, the following is a simple record. [Root @ localhost ~] # Cd/etc/sysconfig/network-scripts/[root @ localhostnetw
In fact, I have also written a blog post about bind dual NICs in Linux. Today, I conducted another binding experiment and found that it is much simpler than the original binding. It may be caused by different system or system versions. A series of previous articles about bind dual network interfaces in Linux. Today, we found that it is okay not to perform those operations. Therefore, the following is a simple record.
[Root @ localhost ~] # Cd/etc/sysconfig/network-scripts/[root @ localhost network-scripts] # cp ifcfg-eth1 ifcfg-bond0
Vim ifcfg-bond0.
[Root @ localhost network-scripts] # cat ifcfg-bond0DEVICE = "bond0" BOOTPROTO = "static" NM_CONTROLLED = "no" ONBOOT = "yes" TYPE = "Ethernet" BONDING_OPTS = "mode = "1 miimon = 100 "IPADDR = 192.168.2.115NETMASK = 255.255.255.0DNS1 = 192.168.2.115DNS2 = 192.168.8.2 [root @ localhost network-scripts] #
Vim ifcfg-eth1.
[Root @ localhost network-scripts] # cat ifcfg-eth1DEVICE = "eth1" BOOTPROTO = "static" HWADDR = "00: 0C: 29: 72: 88: DC "NM_CONTROLLED =" no "ONBOOT =" yes "TYPE =" Ethernet "MASTER = bond0SLAVE = yes [root @ localhost network-scripts] #
Vim ifcfg-eth2 (I have three NICs here, starting from eth0 so to eth2)
[Root @ localhost network-scripts] # cat ifcfg-eth2DEVICE = "eth2" BOOTPROTO = "static" NM_CONTROLLED = "no" ONBOOT = "yes" TYPE = "Ethernet" MASTER = bond0SLAVE = yes [root @ localhost network-scripts] #
Restart the network. [Root @ localhost network-scripts] # service network restart
The test results after network restart are as follows: