Set Nic binding on the Linux System Platform

Source: Internet
Author: User
Linux system platform sets the NIC binding-Linux Enterprise Application-Linux server application information. The following is a detailed description. Generally, servers have at least two NICs for high availability. In some high-end unix operating systems of aix, you can set multiple NICs to be bound together, so no Nic is broken, in linux, how do I set Nic binding?

Let's take setting two NICs as an example: one master and one slave. By default, the primary Eni works. If the primary ENI has problems, replace and take over the secondary ENI in time, ensures high system availability

1. Add/etc/sysconfig/network-scripts/ifcfg-bond1

DEVICE = bond0

BOOTPROTO = none

ONBOOT = yes

NETWORK = 10.1.1.0

NETMASK = 255.255.255.0

IPADDR = 10.1.1.125

USERCTL = no

GATEWAY = 10.1.1.254

2. Modify/etc/modules. conf

Add

Alias bond0 bonding

Options bond0 mode = 1 miimon = 100 primary = eth0

3. Modify/etc/sysconfig/network-scripts/ifcfg-eth0 ifcfg-eth1

DEVICE = eth0

BOOTPROTO = none

HWADDR = 00: 50: 56: 40: 5D: 95

ONBOOT = yes

TYPE = Ethernet

MASTER = bond0

SLAVE = yes

USERCTL = no



DEVICE = eth1

BOOTPROTO = none

HWADDR = 00: 50: 56: 40: 5D: 95

ONBOOT = yes

TYPE = Ethernet

MASTER = bond0

SLAVE = yes

USERCTL = no

OK, get it done. restart the network to unplug the network cable and perform a test to see if it works normally when the primary network card has a problem.

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.