From: William S. <wst...@po...> - 2000-09-07 20:44:48
|
Good day, James, Jeff, et al, I've had some luck with the new Ethernet code, but some things aren't working exactly as I'd expect. May I bore you with the details? :-) The UML is 192.168.0.12 with mac address cc0:ff:ee:c0:ff:ee, the host is 192.168.0.254 with mac address FE:FD:00:00:00:00. Network 100 for simplicity. In host, as root: ifconfig tap0 192.168.0.254 netmask 255.255.255.0 broadcast 192.168.0.255 up um_eth_net_util tap0 100 Gives: [root@sparrow /root]# um_eth_net_util tap0 100 /dev/tap0: No such file or directory PHY: tap0 connect From uml, .12, I try to ping the host: bash# ping 192.168.0.254 PING 192.168.0.254 (192.168.0.254) from 192.168.0.12 : 56(84) bytes of data. From 192.168.0.12 (192.168.0.12): Destination Host Unreachable From 192.168.0.12 (192.168.0.12): Destination Host Unreachable ... The output from um_eth_net_util is: 05 100 -> ff ff ff ff ff ff c0 ff ee c0 ff ee 08 06 00 01 -> 04 05 100 -> ff ff ff ff ff ff c0 ff ee c0 ff ee 08 06 00 01 -> 04 ... Running tcpdump on the host gives: [root@sparrow /root]# tcpdump -i tap0 -qtn User level filter, protocol ALL, datagram packet socket tcpdump: listening on tap0 > 0:0:0:0:0:0 > c0:ff:ee:c0:ff:ee null I (s=4,r=0,R) len=24 0604 0001 c0ff eec0 ffee c0a8 000c 0000 0000 0000 c0a8 00fe > 0:0:0:0:0:0 > c0:ff:ee:c0:ff:ee null I (s=4,r=0,R) len=24 0604 0001 c0ff eec0 ffee c0a8 000c 0000 0000 0000 c0a8 00fe ... ----------------------------------------------------------------- In the above tests, the host has no file called /dev/tap0. Let's make one: mknod /dev/tap0 c 36 16 Now, try the same again: [root@sparrow /root]# um_eth_net_util tap0 100 TAP: tap0 05 100 -> ff ff ff ff ff ff c0 ff ee c0 ff ee 08 06 00 01 -> 04 05 100 -> ff ff ff ff ff ff c0 ff ee c0 ff ee 08 06 00 01 -> 04 ... bash# ping 192.168.0.254 PING 192.168.0.254 (192.168.0.254) from 192.168.0.12 : 56(84) bytes of data. From 192.168.0.12 (192.168.0.12): Destination Host Unreachable From 192.168.0.12 (192.168.0.12): Destination Host Unreachable [root@sparrow /root]# tcpdump -i tap0 -qtn User level filter, protocol ALL, datagram packet socket tcpdump: listening on tap0 B arp who-has 192.168.0.254 tell 192.168.0.12 B arp who-has 192.168.0.254 tell 192.168.0.12 ... Verrrrrrrrry Eeeeeeenteresting! I still can't ping, but tcpdump is at least showing me more reasonable output; these actually look like arp requests. OK, why isn't the host replying? Let's add arp to tap0 on the host: ifconfig tap0 192.168.0.254 netmask 255.255.255.0 broadcast 192.168.0.255 arp up Here's tcpdump as uml starts up: [root@sparrow /root]# tcpdump -i tap0 -qtn User level filter, protocol ALL, datagram packet socket tcpdump: listening on tap0 B arp who-has 192.168.0.254 tell 192.168.0.12 > arp reply 192.168.0.254 (fe:fd:0:0:0:0) is-at fe:fd:0:0:0:0 (c0:ff:ee:c0:ff:ee) < 192.168.0.12.2048 > 192.168.0.254.domain: udp 42 (DF) > 192.168.0.254 > 192.168.0.12: icmp: 192.168.0.254 udp port domain unreachable (DF) [tos 0xc0] < 192.168.0.12.2048 > 192.168.0.254.domain: udp 42 (DF) > 192.168.0.254 > 192.168.0.12: icmp: 192.168.0.254 udp port domain unreachable (DF) [tos 0xc0] < 192.168.0.12.2048 > 192.168.0.254.domain: udp 42 (DF) > 192.168.0.254 > 192.168.0.12: icmp: 192.168.0.254 udp port domain unreachable (DF) [tos 0xc0] < 192.168.0.12.2048 > 192.168.0.254.domain: udp 42 (DF) > 192.168.0.254 > 192.168.0.12: icmp: 192.168.0.254 udp port domain unreachable (DF) [tos 0xc0] < 192.168.0.12.2048 > 192.168.0.254.domain: udp 61 (DF) > 192.168.0.254 > 192.168.0.12: icmp: 192.168.0.254 udp port domain unreachable (DF) [tos 0xc0] < 192.168.0.12.2048 > 192.168.0.254.domain: udp 61 (DF) > 192.168.0.254 > 192.168.0.12: icmp: 192.168.0.254 udp port domain unreachable (DF) [tos 0xc0] < 192.168.0.12.2048 > 192.168.0.254.domain: udp 61 (DF) > arp who-has 192.168.0.12 tell 192.168.0.254 (fe:fd:0:0:0:0) < arp reply 192.168.0.12 is-at c0:ff:ee:c0:ff:ee (fe:fd:0:0:0:0) < 192.168.0.12.2048 > 192.168.0.254.domain: udp 61 (DF) > 192.168.0.254 > 192.168.0.12: icmp: 192.168.0.254 udp port domain unreachable (DF) [tos 0xc0] < 192.168.0.12.2048 > 192.168.0.254.domain: udp 42 (DF) > 192.168.0.254 > 192.168.0.12: icmp: 192.168.0.254 udp port domain unreachable (DF) [tos 0xc0] < 192.168.0.12.2048 > 192.168.0.254.domain: udp 42 (DF) > 192.168.0.254 > 192.168.0.12: icmp: 192.168.0.254 udp port domain unreachable (DF) [tos 0xc0] < 192.168.0.12.2048 > 192.168.0.254.domain: udp 42 (DF) > 192.168.0.254 > 192.168.0.12: icmp: 192.168.0.254 udp port domain unreachable (DF) [tos 0xc0] < 192.168.0.12.2048 > 192.168.0.254.domain: udp 42 (DF) > 192.168.0.254 > 192.168.0.12: icmp: 192.168.0.254 udp port domain unreachable (DF) [tos 0xc0] < 192.168.0.12.2048 > 192.168.0.254.domain: udp 61 (DF) > 192.168.0.254 > 192.168.0.12: icmp: 192.168.0.254 udp port domain unreachable (DF) [tos 0xc0] < 192.168.0.12.2048 > 192.168.0.254.domain: udp 61 (DF) At this point, I just have incomplete dns information; putting the hosts IP in the uml's /etc/hosts allows the ping to proceed correctly. Nicely enough, I can ping in and out, and even ssh in from the outside world. So _finally_ (:-), here are the minor issues: - Should um_eth_net_util require a real file called /dev/tap0? If that file is missing, should it still work? - Could the uml's eth0 be brought up by default with the "arp" flag set? At this point I have to run the following lines before the networking is brought up: /sbin/ifconfig eth0 hw ether c0:ff:ee:c0:ff:ee /sbin/ifconfig eth0 arp It would be cool if some random mac address could be assigned if the user doesn't assign one and the arp flag could be set automatically. ----------------------------------------------------------------- Just for reference, here's the setup inside the uml: bash# ifconfig eth0 Link encap:Ethernet HWaddr C0:FF:EE:C0:FF:EE inet addr:192.168.0.12 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:57 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 Interrupt:4 bash# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.12 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 eth0 0.0.0.0 192.168.0.254 0.0.0.0 UG 1 0 0 eth0 Cheers, - Bill --------------------------------------------------------------------------- Having Microsoft give us advice on open standards is like W.C. Fields giving moral advice to the Mormon Tabernacle Choir -- Scott McNealy, Sun Microsystems Inc. (Courtesy of Michael Remski <mr...@ix...>) -------------------------------------------------------------------------- William Stearns (wst...@po...). Mason, Buildkernel, named2hosts, and ipfwadm2ipchains are at: http://www.pobox.com/~wstearns LinuxMonth; articles for Linux Enthusiasts! http://www.linuxmonth.com -------------------------------------------------------------------------- |
From: James R. L. <jl...@mi...> - 2000-09-07 22:32:01
|
On Thu, Sep 07, 2000 at 05:01:45PM -0400, William Stearns wrote: > Good day, James, Jeff, et al, > I've had some luck with the new Ethernet code, but some things > aren't working exactly as I'd expect. May I bore you with the details? > :-) > The UML is 192.168.0.12 with mac address cc0:ff:ee:c0:ff:ee, the > host is 192.168.0.254 with mac address FE:FD:00:00:00:00. Network 100 for > simplicity. > > In host, as root: > ifconfig tap0 192.168.0.254 netmask 255.255.255.0 broadcast 192.168.0.255 up > um_eth_net_util tap0 100 > Gives: > [root@sparrow /root]# um_eth_net_util tap0 100 > /dev/tap0: No such file or directory > PHY: tap0 I should probably have a more meaningful error message. /dev/tap0 is required. > Verrrrrrrrry Eeeeeeenteresting! I still can't ping, but tcpdump > is at least showing me more reasonable output; these actually look like > arp requests. > OK, why isn't the host replying? Let's add arp to tap0 on the > host: > > ifconfig tap0 192.168.0.254 netmask 255.255.255.0 broadcast 192.168.0.255 arp up Yep. Tap interfaces do not respond to arp by default. It seems like that should be a default being that it is called "ethertap" oh well. > - Should um_eth_net_util require a real file called /dev/tap0? If that > file is missing, should it still work? > > - Could the uml's eth0 be brought up by default with the "arp" flag > set? At this point I have to run the following lines before the > networking is brought up: I think the uml's ethernets have "arp" on by default. I will double check. I do know that you need to add "arp" to the tap0 interface. > It would be cool if some random mac address could be assigned if > the user doesn't assign one and the arp flag could be set > automatically. I would like to have a scheme for coming up with a unique MAC address, but I haven't yet figured one out. Any ideas? Jim -- James R. Leu |