CentOS 6.X converged Link
0, check NetworkManager service, stop NetworkManager service. Not doing this is likely to be a problem.
Service NetworkManager Status
Service NetworkManager Stop
1. Modify three types of files
ifcfg-* files under/etc/sysconfig/network-scripts/
/etc/modprobe.conf file
/etc/init.d/rc.local file
2, edit the virtual network port configuration file, remember this file copy when you want to remove the MAC address, remove the UUID
Vi/etc/sysconfig/network-scripts/ifcfg-bond0
Device=bond0
Type=ethernet
Onboot=yes
Bootproto=static
ipaddr=192.168.1.111
netmask=255.255.255.0
gateway=192.168.1.1
3. Edit the configuration file of each network card
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Bootproto=none
Type=ethernet
Device=em1
Onboot=yes
Master=bond0
Slave=yes
Vi/etc/sysconfig/network-scripts/ifcfg-eth1
Bootproto=none
Type=ethernet
Device=em2
Onboot=yes
Master=bond0
Slave=yes
4, Modified/etc/modprobe.conf CentOS 6.5 is/etc/modprobe.d/bonding.conf
The last two lines join
Alias Bond0 Bonding
Options Bond0 miimon=100 mode=6
If you have more than one bond profile, you can add it as follows
Alias Bond1 Bonding
Options Bond1 miimon=100 mode=6
Note:
(1), Miimon is the link monitoring time interval unit is milliseconds, miimon=100 means, every 100 milliseconds to detect connectivity between the network card and switch, such as the general use of additional links.
(2), mode=0 means load Balancing mode, two network cards are working, need to support the switch
Mode=1 means redundancy, Nic only one job, one problem enable additional
Mode=6 means load balancing, both NICs work without the need for a switch for support
5, modify the/etc/rc.d/rc.local, add the following content, configured modprobe.conf may no longer need to configure rc.local
Modprobe bonding miimon=100 mode=6//also has joined Ifenslave bond0 eth0 eth1 This form
6, service network restart//See if the virtual interface is up
Reboot//Check whether the boot starts
=====================================================
CentOS 7.X converged Link
Network management tools in Redhat 7
There are two ways, one is the command line NMCLI one is the graphical interface Nmtui
NMCLI [OPTIONS] OBJECT {COMMAND | help}
OBJECT: = {General | networking | radio | connection | device | agent}
OPTIONS: = {
-t[erse]
-p[retty]
-m[mode] tabular | Multiline
-f[ields] <field1,field2,... > | All | Common
-e[scape] yes | No
-n[ocheck]
-A[SK]
-w[ait] <seconds>
-v[ersion]
-H[ELP]
}
Redhat 7 using NMCLI to set up NIC bindings
First, create a group interface
NMCLI con Add type team con-name CNAME ifname iname [config JSON]
The CNAME refers to the name of the connection, the name of the Iname interface, and the JSON (JavaScript Object Notation) that specifies the processor (runner) used.
The JSON syntax is formatted as follows
' {' runner ': {' name ': ' METHOD '} '
METHOD can be broadcast, Activebackup, Roundrobin, LoadBalance, LACP
Example:
NMCLI con Add type team con-name TEAM0 ifname team0 config ' {"runner": {"name": "Activebackup"}} '
Second, add the device to the group interface
Nmcli con Add type team-slave con-name CNAME ifname iname Master Team
Example: Nmcli con add type team-slave con-name TEAM0-PORT1 ifname eth0 Master Team0
Nmcli con Add type team-slave con-name TEAM0-PORT2 ifname eth1 Master Team0
Third, configure the IP address
Nmcli con mod team0 ipv4.addresses "192.168.1.24/24"
Nmcli con mod team0 ipv4.gateway "192.168.1.1"
Nmcli con mod team0 ipv4.dns "192.168.1.1"
Nmcli con mod team0 ipv4.method Manual
Nmcli con up Team0-port1
Nmcli con up Team0
Teamdctl Team0 State
This article is from the "Blossom as ever" blog, please be sure to keep this source http://sunrisenan.blog.51cto.com/10217407/1864748
Linux CentOS Aggregation link configuration ideas explained