two netcard configed in one subnet problem
two linux machines A and B , they are in one network: 192.168.160.0 A has two netcards: eth0 Link encap:Ethernet HWaddr 00:0C:29:F9:DD:29 inet addr:192.168.160.11 Bcast:192.168.160.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fef9:dd29/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:448 errors:0 dropped:0 overruns:0 frame:0 TX packets:361 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:42722 (41.7 Kb) TX bytes:46887 (45.7 Kb) eth1 Link encap:Ethernet HWaddr 00:0C:29:F9:DD:33 inet addr:192.168.160.21 Bcast:192.168.160.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fef9:dd33/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:73 errors:0 dropped:0 overruns:0 frame:0 TX packets:7 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9926 (9.6 Kb) TX bytes:578 (578.0 b) B has one netcard: eth0 Link encap:Ethernet HWaddr 00:0C:29:A9:5F:E2 inet addr:192.168.160.12 Bcast:192.168.160.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fea9:5fe2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:793 errors:0 dropped:0 overruns:0 frame:0 TX packets:649 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:74366 (72.6 Kb) TX bytes:80645 (78.7 Kb) Interrupt:17 Base address:0x2000 now on B :ping 192.168.160.11 and 192.168.160.21, both are ok run arp -a,result is as follows:? (192.168.160.21) at 00:0C:29:F9:DD:29 [ether] on eth0? (192.168.0.59) at 00:0C:29:F9:DD:1F [ether] on eth1? (192.168.160.1) at 00:50:56:C0:00:01 [ether] on eth0? (192.168.0.1) at 00:11:95:CD:35:66 [ether] on eth1Vsles11sp1 (192.168.160.11) at 00:0C:29:F9:DD:29 [ether] on eth0 then I unplug eth1 , ethtool eth1 show "Link detected: no", now on B :ping 192.168.160.11 and 192.168.160.21, both are ok, too. I was confused that things. Google , I has understanded a little . on A , I run "echo 1 >/proc/sys/net/ipv4/conf/all/arp_ignore",then on B , ping ping 192.168.160.11 and 192.168.160.21, both still are ok Can you give me advise ? What will I do for on B pinging 192.168.160.21 is not ok?
Hi.... On Mon, Jan 16, 2012 at 09:16, hu jun <duanshuidao@hotmail.com> wrote:
then I unplug eth1 , ethtool eth1 show "Link detected: no",
now on B :ping 192.168.160.11 and 192.168.160.21, both are ok, too.
Maybe the thing that happen is that when you ping eth1 of A from B, the flow is: B send ICMP--> A' eth0 receives it--> forward it to eth1 Eth1, in my humble opinion, is not really answering "by hardware", but just it's network stack. Since you made eth0 and eth1 under the same broadcast address, the effect is like you were doing bonding between eth0+eth1 in A. Just curious, are you enabling IP forwarding in A? Or bridging or something? -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
Just curious, are you enabling IP forwarding in A? Or bridging or something?
I am not enabling IP forwarding in A. no bridging . I haven't set som special network configuration.
From: mulyadi.santosa@gmail.com Date: Mon, 16 Jan 2012 12:18:17 +0700 Subject: Re: two netcard configed in one subnet problem To: duanshuidao@hotmail.com CC: kernelnewbies@kernelnewbies.org
Hi....
On Mon, Jan 16, 2012 at 09:16, hu jun <duanshuidao@hotmail.com> wrote:
then I unplug eth1 , ethtool eth1 show "Link detected: no",
now on B :ping 192.168.160.11 and 192.168.160.21, both are ok, too.
Maybe the thing that happen is that when you ping eth1 of A from B, the flow is: B send ICMP--> A' eth0 receives it--> forward it to eth1
Eth1, in my humble opinion, is not really answering "by hardware", but just it's network stack. Since you made eth0 and eth1 under the same broadcast address, the effect is like you were doing bonding between eth0+eth1 in A.
Just curious, are you enabling IP forwarding in A? Or bridging or something?
-- regards,
Mulyadi Santosa Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (2)
-
hu jun -
Mulyadi Santosa