Currently, I only use two UMLs at the same time. To set up networking i stick all this into a file:
tunctl -u toni -t uml0
tunctl -u toni -t uml1
ifconfig uml0 192.168.1.25
ifconfig uml1 192.168.1.27
route del -net 192.168.1.0 netmask 255.255.255.0 dev uml0
route del -net 192.168.1.0 netmask 255.255.255.0 dev uml1
route add -host 192.168.1.26 dev uml0
route add -host 192.168.1.28 dev uml1
bash -c "echo 1 > /proc/sys/net/ipv4/conf/uml0/proxy_arp"
bash -c "echo 1 > /proc/sys/net/ipv4/conf/uml1/proxy_arp"
arp -Ds 192.168.1.26 eth0 pub
arp -Ds 192.168.1.28 eth0 pub
Then, when inside UML's, we need default route, to be able to get to anyplace outside of the LAN:
route add default gw 192.168.1.1
192.168.1.1 being my router on the LAN that does the NATing (masquerading in my case) for all hosts on LAN.
See attached script to see how firewall is being setup to route UMLs.
then i start a UML with:
usr/bin/linux mem=64M eth0=tuntap,uml0 ubd0=/home/toni/uml/fs_root/stac/deWo-p561-stac.ext3 ubd1=/home/toni/uml/fs_root/swap_fs ubd2r=/dev/cdrom con=pty con0=fd:0,fd:1 :
to top