1. Add 2 network cards
2. vim / etc / sysconfig / network-scripts / ifcfg-bond0 ## New
3. Add the following
DEVICE = bond0
BOOTPROTO = "static"
ONBOOT = "yes"
TYPE = bond
IPADDR = 192.168.1.12 ### IP address is assigned by yourself
NETMASK = 255.255.255.0
GATEWAY = 192.168.1.1 ####
BONDING_OPTS = "miimon = 100 mode = 1 updelay = 60000 primary = eno16777736"
4. vim / etc / sysconfig / network-scripts / ifcfg-eno16777736 #### eno16777736 is the name of the network card is equivalent to eth0, each is different, check it under network-scripts yourself
5. Add to
DEVICE = eno16777736
ONBOOT = yes
MASTER = bond0
SLAVE = yes
TYPE = Ethernet
BOOTPROTO = none
6.vim / etc / sysconfig / network-scripts / ifcfg-eno33554992 ##### Edit the second network card
7. Add
EVICE = "eno33554992"
ONBOOT = yes
MASTER = bond0
SLAVE = yes
TYPE = Ethernet
8.nmcli connecion reload #### Reload the configuration file
9.systemctl restart network ##### Restart network service
10. If no error is reported, it is successful. You can verify it. Method: find another machine ping -t 192.168.1.12, you can ping
Manually turn off one of the network cards and find that it can still ping through, so it's OK.
Red Hat 7.2 dual network card bonding