Results 1 to 6 of 6
Hi All,
I need help!
i'm with a problem and i didn't find a solution nowhere. In fact, i'm confused even how to find this my problem in the forums ...
- 12-16-2011 #1Just Joined!
- Join Date
- Dec 2011
- Posts
- 2
2 NICs on same subnet
Hi All,
I need help!
i'm with a problem and i didn't find a solution nowhere. In fact, i'm confused even how to find this my problem in the forums for example.
Well, i have a equipment with Linux Centos and 2ethernet ports. I enabled 2 ports, eth0 and eth1, and configured them with static ips (eth0 = 192.168.31.5 and eth1 = 192.168.31.9). Ok!
If i plug 2 ethernet cables, one for each, i can to ping my equipment by 2 ips, 192.168.31.5 and 192.168.31.9. But, if i remove the cable from eth1, i still can to ping in these 2 ips. After of this i can to disable the eth1 and 2 ips still will be available for me in the eth0 port.
I did a test, and if i configure the 2 ips in distinct subnets this problem doesn't occur.
Right now, if i to plug the cable in eth1 will not do difference, just eth0 port is working.
Someone know about this? Sorry,but my english is not so good...
Thanks!
- 12-16-2011 #2
It doesnt work that way.
You need to create a "bond" device first, that consists of eth0 and eth1.
Once you have that, you can then create aliases on it to have multipe IPs in the same network.
http://www.kernel.org/doc/Documentat...ng/bonding.txtYou must always face the curtain with a bow.
- 12-16-2011 #3
The reason you are able to ping 2 IPs regardless of if its plugged in may be a result of having forwarding enabled. With ip forwarding, even if the cable is unplugged to one NIC, the other will pass it through.
linux user # 503963
- 12-16-2011 #4
Yes, and packets are only routed to one interface.
That explains the ping results.You must always face the curtain with a bow.
- 12-16-2011 #5Just Joined!
- Join Date
- Dec 2011
- Posts
- 2
The first thing: Thanks at all!
For scathefire
/etc/sysctl.conf:
net.ipv4.ip_forward = 0
It seems disabled.
For Irithori
Yes, i know bonding but i want know if this behavior is normal?
There is a method for disable this behavior?
Without bonding, I want that if I disconnect eth1 then i shouldn't ping 192.168.31.9!
- 12-23-2011 #6
Does pinging still work when you do:
and then unplug the cable from eth1?Code:$ ifdown eth1


Reply With Quote