Jeff Dike <[EMAIL PROTECTED]> writes:
> Run a UML on the one machine you have root on as the gateway to the
> outside world - either with TUN/TAP or a uml_switch attached to a
> TUN/TAP device.
okay, I am trying to implement your suggestion (I am starting with
getting this single UML up and running with access to the outside
world, on the box I actually have root on) and I ran into a problem.
I run the following as root on 'host', which has IP address
140.254.80.34:
#!/bin/sh
set -x
tunctl -u rutt
ifconfig tap0 192.168.0.254 up
echo 1 > /proc/sys/net/ipv4/ip_forward
route add -host 192.168.0.253 dev tap0
bash -c 'echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp'
arp -Ds 192.168.0.253 eth0 pub
chmod 666 /dev/net/tun
Then try to ping another host which exists on my network, again from
'host' (I'll use the fact I can ping this host, later):
# ping 140.254.80.4
PING 140.254.80.4 (140.254.80.4) 56(84) bytes of data.
64 bytes from 140.254.80.4: icmp_seq=1 ttl=128 time=0.231 ms
64 bytes from 140.254.80.4: icmp_seq=2 ttl=128 time=0.223 ms
--- 140.254.80.4 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.223/0.227/0.231/0.004 ms
I then the run the following on the same box to produce my 'guest':
$ linux ubd0=root_fs eth0=tuntap,tap0
[... login as root ...]
Linux (none) 2.4.27-1um #1 Mon Feb 20 16:29:33 EST 2006 i686 unknown
Most of the programs included with the Debian GNU/Linux system are
freely redistributable; the exact distribution terms for each program
are described in the individual files in /usr/share/doc/*/copyright
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
(none):~# ifconfig eth0 192.168.0.253 up
(none):~# route add default gw 192.168.0.254
(none):~# ping 192.168.0.254
PING 192.168.0.254 (192.168.0.254): 56 data bytes
64 bytes from 192.168.0.254: icmp_seq=0 ttl=64 time=0.7 ms
64 bytes from 192.168.0.254: icmp_seq=1 ttl=64 time=0.5 ms
--- 192.168.0.254 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.5/0.6/0.7 ms
(none):~# route
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
default 192.168.0.254 0.0.0.0 UG 0 0 0 eth0
(none):~# route del -net 192.168.0.0 dev eth0 netmask 255.255.255.0
(none):~# route add -host 192.168.0.254 dev eth0
(none):~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.0.254 * 255.255.255.255 UH 0 0 0 eth0
default 192.168.0.254 0.0.0.0 UG 0 0 0 eth0
(none):~# ping 140.254.80.34
PING 140.254.80.34 (140.254.80.34): 56 data bytes
64 bytes from 140.254.80.34: icmp_seq=0 ttl=64 time=1.5 ms
64 bytes from 140.254.80.34: icmp_seq=1 ttl=64 time=0.5 ms
--- 140.254.80.34 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.5/1.0/1.5 ms
(none):~# ping 140.254.80.4
PING 140.254.80.4 (140.254.80.4): 56 data bytes
So it appears that the packets coming from the guest are not able to
be forwarded across the host's network. Does anyone see what I might
be doing wrong?
Thank you,
--
Benjamin
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user