From: Net Llama! <netllama@li...> - 2002-08-23 16:03:18
I've been struggling to get UML tun/tap networking running on a RH-7.2
host, RH-7.2 UML-install for about 3 weeks, and i've made marginal
progress, but i'm still running up against a huge wall. Now, i'm also
seeing some very strange behavior in addition. All that I want to be able
to do is allow the UML install to communicate with the internet and
vice-versa, and i assume that tun/tap is the way to go.
I'm using this line to boot UML:
linux ubd0=rootfs mem=256M ubd1=sourceforge_fs ubd2=swapfs umid=llama
On the host side i've done the following (as root):
1) I didn't have a /dev/net/tun device, so i created it with mknod, and
that allowed me to successfully run "tunctl trial", which created a tap0
2) ifconfig tap0 192.168.0.254 up
3) chown root.trial /dev/net/tun
4) chmod 666 /dev/net/tun
5) echo 1 > /proc/sys/net/ipv4/ip_forward
6) route add -host 192.168.0.253 dev tap0
7) echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp
8) arp -Ds 192.168.0.253 eth0 pub
At this point, i booted into UML, with the command i referenced above.
However, i was unable to bring up UML, and things got really weird here.
I kept getting SIO errors when trying to bring up eth0. So, in my
attempts to fix things, i ended up setting up more tap interfaces on the
host, and i now have 4 of them (how do i remove them??). So oddly, tap3
seems to be the magical one which provided me with some progress. Once it
was up on the host, i could bring up eth0 in UML, and i could ping the
gateway IP adddress. If I bring down all the tap interfaces in the host,
and just bring tap0 back up, then i can't ping the gateway anymore (even
if i reboot UML).
So, i figured i'd settle for a small victory, and trudge onward. In the
host, i reran the commands that effected /proc (from above) so that they
would setup the neccesary ip_forward stuff for tap3. I attempted to ping
beyond the gateway IP, and that's where i get 100% packet loss. So, it
seems that nothing is getting forwarded from the tap3 interface to the
eth0 interface of the host. I can definitely see the internet through the
eth0 interface on the host, so its not a firewalling problem, as best as i
I'm really stumped here, and would greatly appreciate any advice that
anyone could offer. If you need more info, let me know, and i'll be happy
to provide it. thanks in advance.
Lonni J Friedman netllama@...
Linux Step-by-step & TyGeMo http://netllama.ipfox.com