[Xorp-users] xorp and uml
Pavlin Radoslavov
pavlin@icir.org
Thu, 04 Nov 2004 02:58:18 -0800
> > On Friday 29 October 2004 05:13, Dario VIEIRA wrote:
> > > Hi,
> > >
> > > I am trying to set up a topology using a single machine in XORP and
> > > using "user mode linux". We'd like to set up something like:
> > > http://www.lathspell.de/linux/uml/.
> > >
> > > However, when we run rtrmgr, it starts and dies very fast without
> > > any error message :-(!
> > >
> > > Do I need to do something special in order to get xorp running
> > > into uml?
> >
> >
> > Hi Dario,
> >
> > this might not be a direct answer to your question, but you may wish to
> > take a look at IMUNES (http://tel.fer.hr/imunes/). This thing offers a
> > handy GUI tool which completely automates all the tasks starting from
> > the specification of the network topology, IP address assignment etc.
> > up to the creation of router configuration files and instantiation of
> > virtual nodes and links. XORP runs unmodified on top of IMUNES, in
> > fact you can grab a bootable CD which includes everything you need to
> > start creating virtual network topologies using XORP (and/or quagga)
> > routers. Besides, from both scalability and performance points of
> > view, UML and IMUNES can hardly be compared...
>
> Dario,
>
> I would also strongly recommend trying Marko's IMUNES. I have seen a
> demo, and it is really cool and easy to use.
>
> Nevertheless, the fact that XORP dies without an error within UML is
> odd. We will install UML and will look into that.
Dario,
I installed UML, and was able to successfully start XORP.
What I did was the following:
1. I used a RedHat-7.3 machine with Linux-2.4.20-28.7smp kernel as
the host to install UML.
2. Downloaded and installed the following RPM:
user_mode_linux-2.4.19.5um-0.i386.rpm
3. Downloaded and uncompressed the following root FS:
root_fs.rh-7.2-full.pristine.20020312.bz2
4. Loaded the tun module (though this may not be needed):
insmod /lib/modules/2.4.20-28.7smp/kernel/drivers/net/tun.o
5. Followed some of the instructions from the following URL
to preconfigure the tap device:
http://user-mode-linux.sourceforge.net/networking.html
The commands were:
tunctl -u 0
ifconfig tap0 192.168.0.254 up
6. Ran the following script as a root
(I ran it as a root to short-cut some permission related extra
setup):
#!/bin/sh
linux \
umid=uml1 \
ubd0=root_fs.rh-7.2-full.pristine.20020312 \
mem=128M \
con0=fd:0,fd:1 con=xterm \
eth0=tuntap,tap0
7. Verified that I can ping and ssh to UML
8. Compiled the lastest XORP code (from the CVS repository) on the
base host.
9. Prepared an installation tarball:
gmake install
cd /usr/local
# Strip all binaries
find . -name "*" -exec strip {} \;
# Copy all XORP installation to the UML host:
scp -pr xorp 192.168.0.144:/usr/local
10. Prepare the configuration file:
interfaces {
interface eth0 {
description: "control interface"
default-system-config
}
}
11. Copy the above config file to /usr/local/xorp/config.boot
12. Login to UML, and try to run xorp
cd /usr/local/xorp/bin
./xorp_rtrmgr -b /usr/local/xorp/config.boot
13. After the rtrmgr started, I was able to login again, and then
run xorpsh from /usr/local/xorp/bin
I didn't encounter any XORP-related problems, but I haven't
tried to test many things. Indeed, one of the few messages I
noticed on startup was regarding missing UNIX group "xorp",
but that group can easily by added:
[ 2004/11/04 04:00:06 ERROR xorp_rtrmgr:743 RTRMGR +116 userdb.cc
add_user ] Group "xorp" does not exist on this system.
Regards,
Pavlin