To bind an IP address to a LINUX dual-nic

Source: Internet
Author: User
For details about how to bind an IP address to a LINUX dual-nic-Linux Enterprise Application-Linux server application, see the following section. Original: black bug Linux Space

1. New/etc/sysconfig/network-scripts/ifcfg-bond0 File
DEVICE = bond0
ONBOOT = yes
BOOTPROTO = none
IPADDR = 192.168.128.225
NETMASK = zookeeper
GATEWAY = 192.168.128.233
USERCTL = no

2. Change/etc/sysconfig/network-scripts/ifcfg-eth0 Nic Properties
DEVICE = eth0
ONBOOT = yes
BOOTPROTO = none
MASTER = bond0
USERCTL = no

3. Change the properties of the/etc/sysconfig/network-scripts/ifcfg-eth1 Nic
DEVICE = eth1
ONBOOT = yes
BOOTPROTO = none
MASTER = bond0
USERCTL = no

4. Edit the/etc/modprobe. conf file and add the following content:
Alias bond0 bonding
Options bond0 miimon = 100 mode = 0

5. Add the/etc/rc. d/rc. local startup Item.
Ifenslave bond0 eth0 eth1

6. Start the NIC
Ifconfig bond0 192.168.128.225 up
Ifenslave bond0 eth0 eth1

Note: After completing the above steps, you must restart the computer. As bonding needs to load the driver, the Environment passes the CentOS4.5 test.

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.