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