Lesson 7: Online bindings, sub-interfaces
- Mii-toll eth0, view online status
- Ethtool Ehto Check the physical characteristics of the network,-I display network card driver,-s check NIC status
- IP aliases: Linux supports the configuration of multiple IP addresses on a physical network card, which is used to implement sub-interface-like functions called IP aliases
- The CentOS or Rhel system is enabled by default NetworkManager to network card management for user convenience, if you need to disable NetworkManager using sub-interfaces
Service NetWorkManager
Chkconfig Networkmanger
- Ip addr Add 192.168.1.1/24 dev eth0 label eth0:0,eth0:0 The second 0 is the alias number and the second can have a full name of Eth0:1
- To permanently add an IP alias, you need to add an alias profile under/etc/sysconfig/network-scripts/: ifcfg-eth0:0, Content:
device=eth0:0
ipaddr=10.1.1.1
Prefix=24
Onparent=yes
- Multi-NIC binding for increased bandwidth and stability. After binding, the physical network card is no longer used directly, and the IP address is configured on the bundled logical NIC.
- Linux support NIC binding mode: Mode 0: Balanced polling; Mode 1: Active backup; Mode 3: Broadcast mode
- NIC binding configuration: The full name of the logical NIC after binding is: Bondn,n is numbered, such as/DEV/BOND0,/dev/bond1
- Create a configuration file that binds the NIC:/etc/sysconfig/network-scripts/ifcfg-bond0
Device=bond0
ipaddr=192.168.1.200
Prefix=24
Onboot=yes
Bootproto=none
Userctl=no
bonding_opts= "Mode=1 millmon=50"
- Modify the configuration file for each physical NIC that belongs to the logical Nic:/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
Bootproto=none
Onboot=yes
Master=bond0
Slave=yes
Userctl=no
Then the NIC adds driver support:/etc/modprobe.d/bonding.conf
Alias bond0 Bonding
Linux Advanced Management (III)