LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   dual ethernet port ping problem (https://www.linuxquestions.org/questions/linux-networking-3/dual-ethernet-port-ping-problem-363245/)

rani_162 09-14-2005 07:27 AM

dual ethernet port ping problem
 
I have a x86 based PCM 6892 motherboard with a dual ethernet port 8139too.I am using Fedora Core 3 linux. I configured the devices so that eth0 has ip address x.x.x.1 and eth1 has ip address x.x.x.2. If eth0 cable is removed then x.x.x.1 and x.x.x.2 both do not respond to a ping request, whereas when eth1 cable is removed i get a response. I also tried bonding. I created a bond0 in active backup mode and enslaved eth0 and eth1. My problem was solved and i began to get response to ping even if one of the cables was removed. BUT if both the cables are present i recieve a DUPLICATE response to ping. Is there any solution?
Or is there any other solution other than bonding?
It would be ok even if i could configure the dual port so that it would behave like 2 separate ports
Thanking in anticipation

daem 09-15-2005 05:46 PM

We have the same issue at the office. Two IP addresses over two NICs on the same subnet. The problem is that Linux picks one NIC to route the traffic out of and sticks to it. Only if you ifdown the NIC does it failover to the other connection. Your pings are being received by the server but it can't route them back out as the route it wants to send the traffic over isn't up (cos you unplugged the cable). You can see it in more detail by doing a netstat -rn

You'll see that there is one route for your subnet and it goes out of one NIC. The ip route command helps partially. It will instruct the routing table to send traffic back through the NIC it came in on, which will sort out your ping problem. However, if you need to initiate a connect from the Linux box itself, that will go down a black hole so not ideal.

Could do with a little more info on what you're trying to achieve here as there might be a better way of doing it. Are you looking for resilience across the two NICs? i.e. unplug one cable and you still have connectivity? or are you try to have more than one IP address to bind different applications to (e.g. multiple web instances).

If you're after resilience, then bonding should be the best way. I don't know why you'd be getting duplicate ping responses though I'm afraid.

D

rani_162 12-11-2005 10:05 PM

Hi,
First of all, sorry for replying so late. I was keeping track of replies but donno how I overlooked your reply.
Initially I was using RedHat 8.0, and when I configured them in bonding, active-backup mode, I used to get duplicate responses to pings when both the cables were intact.

Now I am working on X-Linux.I need to have the two ethernet NIC's configured on the same subnet, and routing based on the source address of the packet.Is there any way of achieving this? Currently it routes all packets from one NIC UNLESS you ifconfig it down, in which case it switches to the second NIC.Also I have not tried bonding in embedded linux yet(I dont know if it gives duplicate packets here also), so I have to try it out.

Basically I need to have both
1. Independent operation of NICs
2. Bonded operation of NICs

Thanks a lot for your reply,
Rani


All times are GMT -5. The time now is 09:51 PM.