Linux multi-NIC multi-IP configuration: One host multi-NIC configuration multiple IP for the same network segment

Source: Internet
Author: User


Now some hosts have multiple NICs how to configure each NIC with a different IP address for the same network segment:

1. Use Ifconfig to see how many network cards are available:

I'm hosts are Nic:eth0 and Eth8.

An IP has been configured on the eth0 now I need to configure the IP address on the ETH8


2. First check that the NIC is well connected: for example, if the light on the interface is shining, the line of the interface is good

Tool Ethtool View: Ethtool Eth8,

Show Link detected:yes indicates a good connection , but does not necessarily mean that packets can be received


3, in the IP address of ip-2 host on ping eth0 configured IP, (recommended with arping Ip-eth0)

Use: Tcpdump-i eth6 host Ip-2

Check to see if there are packets arriving on NIC Eth6 that have a good description


4. Configure IP Address:

Enter directory:

cd/etc/sysconfig/network-scripts/
   Select the NIC you want to configure and refer to the configured eth0

after setting the Eth8.Service Network Restart
5, may also be on the other host connection different to the ETH8 configuration new IPWORKAROUND: Multi-nic BoundingSettings: Ifcfg-bond0

Device=bond0
Bootproto=static
Onboot=yes
Ipaddr=You ipaddr
netmask=255.255.255.0
gateway=GATEWAY
set Ifcfg-eth8 as follows
Device= "Ethx"
Bootptoto=none
Onboot=yes
master=bond0
Slave=yes
Userctl=no

Last: service Network restart

Other hosts can connect to the newly set IP


Reference:

Multiple IP configuration on multiple NIC on same server

Http://stackoverflow.com/questions/14583984/multiple-ip-configuration-on-multiple-nic-on-same-server

http://z-issue.com/wp/linux-rhel-6-centos-6-two-nics-in-the-same-subnet-but-secondary-doesnt-ping/



Linux multi-NIC multi-IP configuration: One host multi-NIC configuration multiple IP for the same network segment

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.