Linux dual network card binding steps

In the active standby mode, bind the dual network cards. The binding is named server0,

The configuration steps are as follows (the original dual network card names are eth0 and eth1 respectively): & nbsp;

① modify network card 1 (network card name “eth0”) & nbsp;

Command: VI / etc / sysconfig / network scripts / ifcfg-eth0 & nbsp;

 

The edited text is as follows: & nbsp;

TYPE=Ethernet 

BOOTPROTO=none 

DEVICE=eth0 

ONBOOT=yes 

USERCTL=no 

MASTER=server0 

SLAVE=yes 

   

② modify other network card configuration files as above.  

③ create a new binding configuration & nbsp;

Command: VI / etc / sysconfig / network scripts / ifcfg server0 & nbsp;

The edited text is as follows: & nbsp;

TYPE=server 

BOOTPROTO=none 

DEVICE=server0 

ONBOOT=yes 

IPADDR=192.168.8.8 

NETMASK=255.255.255.0 

GATEWAY=192.168.8.1 

USERCTL=no 

serverING_MASTER=yes 

serverING_OPTS=”mode=1 miimon=100″ 

 

④ create binding configuration file (servering. CONF) & nbsp;

Command: VI / etc / modprobe.d/server.conf

The edited text is as follows: & nbsp;

alias server0 servering 

options server0 mode=1 miimon=100 

⑤ update load binding module & nbsp;

Command: modprobe server & nbsp;

⑥ view the update loading results & nbsp;

Command: lsmod | grep server & nbsp; & nbsp;

⑦ restart network service & nbsp;

Command: & nbsp;

systemctl stop NetworkManager 

systemctl disable NetworkManager 

systemctl restart network 

⑧ view binding mode and network card status & nbsp;

⑨ command: cat / proc / net / server / server0 & nbsp;


Leave a Reply

Your email address will not be published. Required fields are marked *