Bind a CentOS dual Nic to bond0 and a centos dual Nic to bond0
A) copy the hosts file and configure the hosts file in vim/etc/sysconfig/network-scripts/ifcfg-bond0 (the file is automatically created)
DEVICE = bond0
TYPE = Ethernet
ONBOOT = yes
BOOTPROTO = static
IPADDR = xxx. xxx
NETMASK = xxx. xxx
GATEWAY = xxx. xxx
USERCTL = no
B) EDIT em1, em2/eth0, and eth1.
Vim/etc/sysconfig/network-scripts/ifcfg-em1
DEVICE = em1
TYPE = Ethernet
ONBOOT = yes
BOOTPROTO = none
MASTER = bond0
SLAVE = yes
USERCTL = no
Vim/etc/sysconfig/network-scripts/ifcfg-em2
DEVICE = em2
TYPE = Ethernet
ONBOOT = yes
BOOTPROTO = none
MASTER = bond0
SLAVE = yes
USERCTL = no
C) Configure vim/etc/modprobe. d/bonding. conf (CentOS 6.4)
Vim/etc/modprobe. conf (CentOS 5.9)
Add:
Alias bond0 bonding
Options bond0 miimon = 100 mode = 0
D. Restart the network.
Service network restart
Redhat64 dual Nic binding
Echo "alias bond0 bonding">/etc/modprobe. d/dist. confecho "options bond0 mode = 1 miimon = 100">/etc/modprobe. d/dist. conf cd/etc/sysconfig/network-scriptsvi ifcfg-bond0 # content is as follows: DEVICE = bond0BOOTPROTO = none ONBOOT = yesNETWORK = x. x. x.0 # network NETMASK = 255.255.255.0IPADDR = x. x. x. x # IP address USERCTL = novi ifcfg-eth0 # Nic 1, the content is as follows: DEVICE = eth0BOOTPROTO = none ONBOOT = yesTYPE = Ethernet MASTER = bond0 SLAVE = yesUSERCTL = novi ifcfg-eth1 # Nic 2, the content is as follows: DEVICE = eth1BOOTPROTO = none ONBOOT = yes TYPE = Ethernet MASTER = bond0 SLAVE = yesUSERCTL = novi/etc/sysconfig/network # The content is as follows: NETWORKING = yesHOSTNAME = MYHOSTNAME # host name IPV6INIT = noGATEWAY = xxx. xxx. xxx. xxx # Default Gateway IPservice network restart or reboot
LINUX Red Hat 60 dual Nic binding: I have an HP Server with four NICs. Now I want to bind two NICs to BOND0.
We recommend that you use the first method. The first method can better differentiate different services ~ What data does bond0 use? What data does bond1 use?