On Tuesday 21 February 2006 19:04, Benjamin Rutt wrote:
> 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.

Ok, I've read and it's a well-known one.

Since you used a non-routable IP for the UML and the host, the echo-request 
arrives to the foreign host, but it can't route it back, nor the default 
gateway of that host can.

And the solution is not to add a route back (which obviously wouldn't scale, 
and wouldn't work when pinging outside hosts), but to use Source NAT / 
masquerading (-j SNAT / -j MASQUERADE). The same way you'd have to do if 
sharing a dialup / home connection with only 1 public IP among various hosts, 
so you can look at the tons of HOWTOs and explaination about the issue if you 
need.


Indeed, with
        arp -Ds 192.168.0.253 eth0 pub
you've setup proxy ARP.

If the LAN address had been 192.168.0.0/24 it would have been enough - the 
foreign host would have had a route to the LAN for the UML address and sent 
an ARP request. Again, for the whole LAN to connect to the outside someone 
would have setup a NAT for it.

But it's not the case.

>     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,

-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

        

        
                
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it



-------------------------------------------------------
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
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to