CentOS 7 NIC Bond configuration

Source: Internet
Author: User

P1P1 p1p2 Two card to do bond step1) before doing, please backup the configuration of each NIC

1 log in to the server using the root account

2 cp p1p1 P1P2 Initial configuration of the NIC to the TMP directory for backup.

--------------------------------------------------------------

[Email protected] ~]# cd/etc/sysconfig/network-scripts/

[email protected] network-scripts]# CP ifcfg-p1p1/tmp

[email protected] network-scripts]# CP ifcfg-p1p2/tmp

--------------------------------------------------------------

2) Configure bond with the NMCLI command

Build Bond Configuration


--------------------------------------------------------------

Nmcli con Add type Bond ifname bond0 mode 1

Nmcli con Add type bond-slave ifname p1p1 Master bond0

Nmcli con Add type bond-slave ifname p1p2 Master bond0


Note: P1p1 p1p2 is the name of the physical NIC


Bond's mode is as follows:

BALANCE-RR (0)-Polling mode (bond default mode)

Active-backup (1)--main standby mode (common)

Balance-xor (2)

Broadcast (3)

802.3AD (4)--Aggregation mode

Balance-tlb (5)

Balance-alb (6)

--------------------------------------------------------------


3) Modify the bond0 NIC configuration

Modify the red content in the table below

---------------------------------------------------------------

Cd/etc/sysconfig/network-scripts

[Email protected] network-scripts]# vim ifcfg-bond-bond0

Device=bond0

Bonding_opts=mode=active-backup

Type=bond

Bonding_master=yes

Bootproto=static---Change the original DHCP to static

Defroute=yes

Peerdns=yes

Peerroutes=yes

Ipv4_failure_fatal=no

Name=bond-bond0

uuid=f4146d29-d694-4f13-ae59-56f940c7d120

Onboot=yes

ipaddr=192.168.80.7---Configure the IP address assigned to the server

PREFIX=24--Configuring the subnet mask

gateway=192.168.80.1---Configuring the Gateway

Save and exit

---------------------------------------------------------------

4) Restart the network

Systemctl Restart network– Restart Network Service

CAT/PROC/NET/BONDING/BOND0---View information about the Bond0 interface

----------------------------------------------------------------

[Email protected] network-scripts]# cat/proc/net/bonding/bond0

Ethernet Channel Bonding driver:v3.7.1 (April 27, 2011)

Bonding mode:fault-tolerance (Active-backup)

Primary Slave:none

Currently Active SLAVE:P1P2

MII Status:up

MII Polling Interval (ms): 100

Up Delay (ms): 0

Down Delay (ms): 0

Slave INTERFACE:P1P1

MII Status:up

speed:10000 Mbps

Duplex:full

Link Failure Count:2

Permanent HW addr:f4:e9:d4:9a:f1:a0

Slave Queue id:0

Slave INTERFACE:P1P2

MII Status:up

speed:10000 Mbps

Duplex:full

Link Failure Count:2

Permanent HW ADDR:F4:E9:D4:9A:F1:A2

Slave Queue id:0

----------------------------------------------------------------

---to complete the bond configuration---



This article is from the "Goodlife" blog, make sure to keep this source http://g00dlife.blog.51cto.com/12052420/1851628

CentOS 7 NIC Bond configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.