From: Roger B. <ro...@ta...> - 2001-10-11 17:48:12
|
> ro...@ta... said: > > Kernel IP routing table > > Destination Gateway Genmask Flags Metric Ref Use Iface > > 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 > > I think this is the problem. Network routes don't work so well when the > network is split between different ethernet segments, as is effectively the > case with UML. I think you are referring to the UML routing table (host and UML both have that rule)? For reference: Host eth0 = 192.168.1.25 Host tap0 = 192.168.1.251 UML eth0 = 192.168.1.250 Windows = 192.168.1.101 Host: Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.250 * 255.255.255.255 UH 0 0 0 tap0 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 UML: Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 default 192.168.1.251 0.0.0.0 UG 0 0 0 eth0 > You need a host route and the default route to the host. Host route added like this: UML# route add -host 192.168.1.251 eth0 It already had the default route. From the host I can ping UML. I can even do it with ping -i 192.168.1.25. From UML I can ping 192.168.1.{25,251}. (BTW adding this extra route made no difference) > You can confirm this by runnng tcpdump on the tap device. If you see the > ping requests come in from the Windows box, and arp requests, but no ping > responses, coming out, this is the problem. tcpdump shows that the problem is UML doing arps back to tap0, and not getting responses. I ran network monitor on my Windows box and the arps aren't getting onto the real ethernet. 10:12:27.875832 arp who-has 192.168.1.250 tell 192.168.1.251 10:12:27.876090 arp reply 192.168.1.250 is-at fe:fd:c0:a8:1:fa 10:12:27.876106 192.168.1.101 > 192.168.1.250: icmp: echo request 10:12:31.931720 192.168.1.101 > 192.168.1.250: icmp: echo request 10:12:31.933940 arp who-has 192.168.1.101 tell 192.168.1.250 10:12:32.885035 arp who-has 192.168.1.101 tell 192.168.1.250 10:12:33.884896 arp who-has 192.168.1.101 tell 192.168.1.250 10:12:36.435219 192.168.1.101 > 192.168.1.250: icmp: echo request 10:12:36.435416 arp who-has 192.168.1.101 tell 192.168.1.250 10:12:37.434539 arp who-has 192.168.1.101 tell 192.168.1.250 10:12:38.434419 arp who-has 192.168.1.101 tell 192.168.1.250 10:12:40.443865 192.168.1.101 > 192.168.1.250: icmp: echo request 10:12:40.444275 arp who-has 192.168.1.101 tell 192.168.1.250 10:12:41.433880 arp who-has 192.168.1.101 tell 192.168.1.250 10:12:42.433721 arp who-has 192.168.1.101 tell 192.168.1.250 Host# arp -a ? (192.168.1.1) at 00:20:78:D5:1E:6F [ether] on eth0 ? (192.168.1.250) at FE:FD:C0:A8:01:FA [ether] on tap0 ? (192.168.1.101) at 00:80:AD:8F:B7:AB [ether] on eth0 ? (192.168.1.250) at * PERM PUP on eth0 Incidentally, I can't ping UML from within itself. I can ping every other interface on the host (tap0, eth0) and the host can ping every interface on itself and UML. Doing a ping to itself inside UML gives the following strace output: socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = 3 getuid32() = 0 setuid32(0) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 connect(4, {sin_family=AF_INET, sin_port=htons(1025), sin_addr=inet_addr("192.168.1.250")}}, 16) = -1 EINVAL (Invalid argument) Pinging 192.168.1.251 from inside UML has the following: socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = 3 getuid32() = 0 setuid32(0) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 connect(4, {sin_family=AF_INET, sin_port=htons(1025), sin_addr=inet_addr("192.168.1.251")}}, 16) = 0 getsockname(4, {sin_family=AF_INET, sin_port=htons(1024), sin_addr=inet_addr("192.168.1.250")}}, [16]) = 0 close(4) = 0 bind(3, {sin_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("192.168.1.250")}}, 16) = 0 Bringing up the loopback interface fixed things so that UML could ping itself although I don't quite see why pinging eth0 should require lo to be up. Sadly Windows still can't ping UML although it can ping tap0 and eth0 on the host. Roger -- Roger Binns ro...@ta... http://www.tarantella.com Business Development Manager, Tarantella 425 Encinal Street, Santa Cruz, CA 95060, USA Tel 831 427 7367 Fax 831 427 5406 |