Re: Connect two PC's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 14 Sep 2005, Stephan Wehner wrote:

I'm trying to connect two PC's with a network cable. A simple ping
doesn't work in either direction. One machine has two network cards.
So I can see that its routing table may need to be adjusted. But the
other machine has only one network card, and the cable goes straight
to the first machine. How can I find out what is wrong? Below is the
output of

Start with an arping. With this you can verify that the NICs, IP addresses and cabling works.

  arping -I interface other.pc.ip

if you have problem here then verify the cabling.

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

Having the same network on two nics is generally not a good idea. It is possible, but requires a lot of work to configure proper.

I would recommend you to either create a bridge of eth0+eth1 with the 192.168.2.x address assigned to the bridge (the ethernet NICs as such will not have individual IP addresses, only the virtual bridge device), or use another IP network on one of the interfaces.

If you really really want to use the same IP on both interfaces then you must decide what destination addresses belongs where and make sure your routing table matches this. Then enable proxy-ARP and things should mostly work. But I can not recommend such configuration. Bridgeing is much more suitable for such situations.

Regards
Henrik
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux