8.Linux Multi-NIC bindings, sub-interfaces
· mii-tool eth0 to view the network card speed, status, physical connection,
· ethtool eth0 to view the physical properties of the NIC, - I. View network card driver information, - S Check the status of the network card
· IP Aliases :Linux supports the configuration of multiple IP addresses on a physical network card to implement functions such as sub-interfaces.
· Centos/rhel The system is enabled by default NetworkManager management of network cards for user-friendly use ( Small Network icon ) ,
if using sub-interfaces requires disabling chkconfig networkmanager off
• temporary Create an alias using ifconfig or ip ip addr add 10.1.1.1/24 dev eth0 label eth0:0 , last 0
permanently add alias, config file /etc/sysconfig/network-scripts/ ifcfg-eth0:0
· device=eth0:0 line Break ipaddr=10.1.1.1 line Break prefix=24 line Break Onparent=yes , ( meaning of onparent attachment ) ,
· multi-nic binding :Linux supports the binding of multiple physical network cards to a logical network card, the binding of the logical network card can be used in parallel with all network cards, to improve bandwidth and stability, after binding physical network card is no longer directly used,IP The address is configured on the bound logical NIC,
· Linux support NIC binding mode: need to disable NetworkManager
• Mode 0 Balanced polling increases bandwidth,
• Mode 1 active backup listens on standby,
• Mode 3 broadcast,
• After binding the logical NIC is named bondn,n is numbered, such as /dev/bond0,/dev/bond1 ,
· 1 , Create a binding NIC configuration file /etc/sysconfig/network-scripts/ifcfg-bond0, content:
· device=bond0 , ipaddr=192.168.1.209 , prefix=24 , Onboot=yes , Bootproto=none , Userctl=no , bonding_opts="mode=1 miimon=50"mode is 1, each line is wrapped,
· 2 , modify the configuration file for each physical NIC that belongs to the logical NIC, first Ifdown network card, /etc/sysconfig/network-scripts/ifcfg-eth0 , 1 etc:
slave=yes ,userctl =no
· 3 , Bond NIC Add driver Support /etc/modprobe.d/bonding.conf , the new file is added alias bond0 Bonding ,
· 4 , start bond0 , ifup bond0 ,
· watch-n 1 ifconfig Monitor network card data,
8.Linux multi-NIC bindings, sub-interfaces