Redhat/Centos NIC binding basic tutorial

  
 

The NIC binding function can play the role of line redundancy, which is a very useful function

Basic configuration is as follows

Bundled NIC

[ ,null,null,3],Root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=”bond0″NM_CONTROLLED=”yes”ONBOOT=”yes”IPADDR=192.168.1.2NETMASK=255.255.255.0GATEWAY=192.168 .1.1USERCTL=noBONDING_OPTS=”mode=1 miimon=50″

Note: mode=1 is in active/standby mode, 0 is load balancing mode, and switch segment needs to be port aggregated

member NIC [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=”eth0″NM_CONTROLLED=”no”ONBOOT=”yes”#IPADDR=192.168.1.2#NETMASK=255.255.255.0 MASTER=bond0SLAVE=yesUSERCTL=no

Member NIC [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1DEVICE=”eth1″NM_CONTROLLED=”no”ONBOOT=” Yes”#IPADDR=192.168.1.2#NETMASK=255.255.255.0MASTER=bond0SLAVE=yesUSERCTL=no

After the binding is complete, restart Network service (recommended to restart the system)

service network restart

After the network restarts, the bond is as follows, and it has been successfully configured [root@localhost ~]# cat /proc/net/bonding/Bond0 Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)

Bonding Mode: fault-tolerance (active-backup)Primary Slave: NoneCurrently Active Slave: eth0MII Status: upMII Polling Interval (ms): 50Up Delay (ms): 0Down Delay (ms): 0

Slave Interface: eth0MII Status: upLink Failure Count: 0Permanent HW addr: 00:0c:29:ff:3a:81

Slave Interface: eth1MII Status: upLink Failure Count: 0Permanent HW addr: 00:0c:29:ff:3a:8b

Copyright © Windows knowledge All Rights Reserved