I've been playing with a multiple ethernet card configuration. There's a
lot of info online about how to deal with routing tables, *if the cards
are on different networks*. What I'm curious about is if I hook the two
cards up to the same switch, with different IP addresses. I'd like to be
able to write servers that bind to the different addresses but run on
the same machine.
Problem is, I can't get it to work. Here's ifconfig's output:
eth0 Link encap:Ethernet HWaddr 00:0C:6E:3D:F2:B0
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:214294 errors:0 dropped:0 overruns:0 frame:0
TX packets:168729 errors:0 dropped:0 overruns:0 carrier:168376
collisions:0 txqueuelen:100
RX bytes:40815289 (38.9 Mb) TX bytes:115947325 (110.5 Mb)
Interrupt:10 Memory:ee000000-ee001080
eth1 Link encap:Ethernet HWaddr 00:50:BF:05:13:5F
inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3087 (3.0 Kb) TX bytes:240 (240.0 b)
Interrupt:9 Base address:0x7000
My routing table, though I don't think it matters:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
loopback localhost 255.0.0.0 UG 0 0 0 lo
default 192.168.0.1 0.0.0.0 UG 1 0 0 eth0
The computer with two ethernet cards is called milhouse, and a seperate
machine on the network is boris.
Now, when I ping 192.168.0.10 from boris, I only see eth0's light blink.
I can completely disconnect eth1 and it still works.
"ip neigh show"'s output:
boris root # ip neigh show
192.168.0.2 dev eth0 lladdr 00:0c:6e:3d:f2:b0 nud reachable
192.168.0.10 dev eth0 lladdr 00:0c:6e:3d:f2:b0 nud reachable
It shows that it thinks 192.168.0.10 belongs to eth0 of milhouse (based on
the MAC address). How do I get milhouse to accept traffic to 192.168.0.10
only on eth1? Is this possible at all?
Thanks for any info or links...
Wes
--
[EMAIL PROTECTED] mailing list