Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to bind Centos 6.564-bit dual Network Card

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to bind Centos 6.564-bit dual network card". In daily operation, I believe many people have doubts about how to bind Centos 6.564-bit dual network card. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the question of "how to bind Centos 6.564-bit dual network card". Next, please follow the editor to study!

1. Environment description

My Vmware workstation 10 installs the Centos 6.564-bit plus dual-port Intel Gigabit network card. I can see the eth3 and eth4 network cards through the ifconfig-a | grep eth command.

2. Binding steps for dual Nic:

2.1 modify / etc/sysconfig/network-scripts/ifcfg-eth3 configuration document, the modified content is as follows:

The code is as follows:

DEVICE=eth3

ONBOOT=yes # automatically enables the device when the system starts up

BOOTPROTO=none # starts without any protocol

MASTER=bond0

SLAVE=yes

2.2 modify the / etc/sysconfig/network-scripts/ifcfg-eth4 configuration document as follows:

The code is as follows:

DEVICE=eth4

ONBOOT=yes # automatically enables the device when the system starts up

BOOTPROTO=none # starts without any protocol

MASTER=bond0

SLAVE=yes

2.3 create a configuration document / etc/sysconfig/network-scripts/ifcfg-bond0 that binds to the network port, as follows:

The code is as follows:

DEVICE=bond0 # Virtual Network Card name

BOOTPROTO=static

IPADDR=192.168.88.11 # IP address

NETMASK=255.255.255.0 # Subnet Mask

GATEWAY=192.168.88.1 # Gateway

BORADCAST=192.168.88.255 # broadcast address

DNS1=8.8.8.8

DNS2=222.88.88.88

ONBOOT=yes

TYPE=Ethernet

2.4 modify / etc/modprobe.d/dist.conf, configure the binding model, and add the following at the end of the configuration file:

Alias bond0 bonding

Options bond0 miimon=100 mode=0

# option millmon specifies how often the link is monitored, in ms.

# option mode is the working mode of binding port. There are 7 modes from 0 to 7. The commonly used modes are 0 and 1. Mode=0 means "round-robin" strategy. Two cards work in load balance at the same time. Mode=1 stands for "active-backup" strategy, with a backup status of one card and one backup.

2.5 what is modified is / etc/rc.local, which is responsible for binding the virtual Nic to two physical NICs when the system starts up, adding the following:

Ifenslave bond0 eth3 eth4

3. Restart the Nic to make the operation effective

Service network restart

Note: turn off the networkmanager service and set it not to boot to prevent interference with related operations

The code is as follows:

Service NetworkManager stop

Chkconfig NetworkManager off

4. Test results

After any network card is ifdown, the normal communication of the server will not be affected.

At this point, the study on "how to bind Centos 6.564-bit dual network card" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report