From: Jonas M. <Jon...@al...> - 2007-11-23 22:18:31
|
I would recommend you use tun/tap. I use the following scripts that I wrote. They assume that you have installed the "uml-utilities" package, that each uml has a file named "root_fs" and "swap" in its home directory, and that each uml user was added to the "uml-net" group. Also, you need to create a /etc/uml directory, and put the startup scripts for each uml in there. Lastly, I created these for ubuntu, so they will probably work with debian, but I'm not sure. In /etc/rc.local: --------------------------------------------- # make it so umls can use taptun chown root:uml-net /dev/net/tun # make the host forward low level ip packets from umls to the local subnet # This lets routers and stuff know how to find the uml echo 1 > /proc/sys/net/ipv4/ip_forward # These lines are a workaround for a bug where permanent entries disappear from the arp table # Don't ask. I have no real idea how this works echo 512 > /proc/sys/net/ipv4/neigh/default/gc_thresh1 echo 1024 > /proc/sys/net/ipv4/neigh/default/gc_thresh2 echo 2048 > /proc/sys/net/ipv4/neigh/default/gc_thresh3 echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp # Crank up the UMLs - order is important, as some machines depend on other machines' services /etc/uml/machine1.sh sleep 15 /etc/uml/machine2.sh exit 0 ------------------------------------------- Example startup script at /etc/uml/machine1.sh: ---------------------------------------- #!/bin/sh -e # Set global variables HOST_IP="192.168.1.1" GUEST_IP="192.168.1.2" USER="machine1" TAP="machine1tap" MAC="fe:fd:00:00:00:02" MEMORY="256M" # make a tap interface (fake ethernet link that the host and guest communicate via tunctl -u $USER -b -t $TAP ifconfig $TAP $HOST_IP up netmask 255.255.255.255 # tell the host how to talk to the uml route add -host $GUEST_IP dev $TAP # make the host forward low level ip packets from umls to local subnet # This lets routers and stuff know how to find the uml echo 1 > /proc/sys/net/ipv4/conf/$TAP/proxy_arp # now do it back the other way to the uml arp -Ds $GUEST_IP eth0 pub # Crank up UMLs screen -d -m -S $USER su - $USER -c "cd /home/$USER ; /usr/local/bin/linux ubda=root_fs ubdb=swap eth0=tuntap,$TAP,$MAC mem=$MEMORY" ---------------------------------------------- Watch out for my email client mangling newlines in these scripts, but they should be very helpful. Jonas On Wed, 2007-11-21 at 16:09 -0500, Jason Gauthier wrote: > Greetings all, > > > > I’m very new to UML, but not new to Linux itself. I’ve stumbled > into a need for UML, and decided to give it a spin. I’ve done a lot > of reading, and experimenting. I’ve compiled my own kernel, and > bootstrapped a debian system. > > > > I’ve currently got a usable and booted debian system. I did some > networking bridging, but I can’t figure out, nor find documentation on > exactly what I am trying to accomplish. > > > > On my host, eth1 is plugged into a tagged VLAN network. > > I need to get all those VLANs accessible inside my guest OS. I > figured I had to do this one of two ways: > > > > 1) Create a bridge for each interface (eth1.xxx, eth1.yyy, > eth1.zzz) > > 2) Create a bridge for eth1, and build the tagged interface in the > guest OS. > > > > > > Neither method has seemed to work. Can anyone drop me some > documentation or guidance on how I can accomplish this? > > > > Thanks! > > > > Jason > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ User-mode-linux-user mailing list Use...@li... https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user |