On Sun, Nov 09, 2003 at 11:47:37PM -0500, David Nettles wrote:
I am having difficulty getting networking to work under User Mode Linux.
Can someone explain how they got networking to work?
Here is what works for me. Create a uml0 configuration file /etc/sysconfig/network/ifcfg-uml0: BOOTPROTO="static" BROADCAST="172.21.255.255" IPADDR="172.21.3.119" NETMASK="255.255.0.0" NETWORK="172.21.0.0" STARTMODE="manual" Of course, put IP address, netmask, etc of your choice there, this is just an example. The IP address is for the host side of the tunnel. Make sure you have a route to your uml machine in /etc/sysconfig/network/routes: 172.21.1.190 0.0.0.0 255.255.255.255 uml0 (172.21.1.190 is the uml(guest) side of the tunnel) Load tun.o kernel module: modprobe tun Configure a tunnel device to be used by your user ID: /usr/bin/tunctl -t uml0 -u <your UID> Bring up the tunnel device: /sbin/ifup uml0 Allow proxy arp on the tunnel device: /sbin/sysctl -w net.ipv4.conf.uml0.proxy_arp=1 /sbin/arp -Ds 172.21.1.190 eth0 pub (use your own uml IP address here) I assume forwarding is enabled, if not, run: echo 1 > /proc/sys/net/ipv4/ip_forward All preceding commands have to be run as root. Now as your regular user start uml_switch: /usr/bin/uml/switch -tap uml0 At this point everything should be ready to start your uml. linux ubd0=root.img ubd1=swap.img umid=<some name for your machine> con=pty con0=fd:0,fd:1 eth0=daemon This is a manual way of doing things. I also developed an rc-style script (/etc/init.d/uml) which uses a configuration file /etc/sysconfig/uml to make sysadmin life easier. If there is interest to this script, I can post it to the list. Regards, -Kastus