Click to See Complete Forum and Search --> : eth0 & eth1 on same box with IP's from same subnet


veletron2
03-04-2004, 08:59 AM
Hi

My router supports QOS which I am using with my linux box. I only want WAN access to my linux box to be throttled not LAN access. On my router the QOS sits right behind the ethernet port, and so restricts both.

To get the LAN (fullspeed) and WAN (qos) that I want, I added another ethernet card in my linux box this:

eth0: 192.168.20.2
eth1: 192.168.20.3

Now, forget QOS, for the moment. Eth0 is physically disconnected, and eth1 is connected to a windows box via a cross-over cable.

I can ping 192.168.20.3 (eth1 IP) from the windows box as expected, but I can also ping 192.168.20.2 (eth0). There is no physical route to eth0, so why is eth1 responding to a ping to an IP that it knows nothing about??

Is there any way to prevent linux responding to any known IP on any any ethernet port?

I cannot use separate subnets since this would mean multiple VPN tunnels (1 for each subnet) which becomes a pain in the neck.

I am using Mandrake 9.1

Regards

Nigel

EnigmaOne
03-04-2004, 12:22 PM
I don't have an exact document name but, IIRC, I believe I ran across a LDP document, a while back, that may help you:
http://www.tldp.org/HOWTO/HOWTO-INDEX/networking.html

jumpedintothefire
03-04-2004, 05:58 PM
There is no physical route to eth0, so why is eth1 responding to a ping to an IP that it knows nothing about??

You have forwarding turned on in the kernel? that will do what your seeing
Have a look at this post:

http://www.justlinux.com/forum/showthread.php?s=&threadid=84253&highlight=iproute2

And the thread that the above post is based on:

http://www.justlinux.com/forum/showthread.php?s=&threadid=82190