[Xorp-users] Emulating simple network for testing XORP code

*Uttam* *Kumawat* eruttamkumawat at gmail.com
Tue Jun 30 21:37:42 PDT 2009


hi,

I had tried the emulation of a simple network using XORP router. Brief
overview is
as follows:

Initially, started working with OpenVZ only. Created containers with
ostemplate fedoracore-
4-i386-minimal and configured them appropriately i.e. assigned hostname,
ipaddress, enabled services such as ssh, web service, etc. It was able to
ping any of the
configured system in container from anywhere. Then copied the binary of xorp
in two
container VH101 and VH102. ( You can also compile xorp in a container but it
will require gcc to be installed in container.) Configured static route in
xorp in VH101 such that it
should take packets from hardware and forward it to VH101. Similarly
configured static
route in xorp in VH102 such that it should forward the received packets to
hardware
node. In this simple setup, OpenVZ was creating an interface venet0 and all
the
containers were connected with this interface.

Problems faced :
· After configuration of xorp, it was not able to commit the configuration.
· There was only one interface of communication among containers and
hardware
node.
· There was no MAC address of the venet0 interface.

To solve this problem,  used the concept of bridge along with OpenVZ.
Created a bridge and assigned the eth0 of the hardware node to the bridge.
Assigned ip
address to this interface. Created the container with an eth0 interface and
added it to the
bridge and also done the necessary configuration of the container. Installed
xorp in it.
Configured static route and commited. It is now working fine.

Software Requirements:

Hardware Node Configuration: Red Hat Enterprise Linux 4 with ovzkernel
version 2.6.9-023stab048.4 i686 i686 i386 GNU/Linux
OpenVZ Software
OS Template Used for Containers : fedora-core-4-i386-minimal OS template
Bridge Utility Package: bridge-utils-1.0.4-4.i386.rpm


Regards
Uttam

>Does anyone have recommendations for emulating a small, simple network of
>XORP routers on a single Linux platform? I want to test my XORP code.

On Wed, Jul 1, 2009 at 12:30 AM, <xorp-users-request at xorp.org> wrote:

> Send Xorp-users mailing list submissions to
>        xorp-users at xorp.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users
> or, via email, send a message with subject or body 'help' to
>        xorp-users-request at xorp.org
>
> You can reach the person managing the list at
>        xorp-users-owner at xorp.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Xorp-users digest..."
>
>
> Today's Topics:
>
>   1. Emulating simple network for testing XORP code (Rae Harbird)
>   2. Re: Emulating simple network for testing XORP code (Bruce Simpson)
>   3. Re: Basic questions for static routing (Bruce Simpson)
>   4. Re: Emulating simple network for testing XORP code (Rae Harbird)
>   5. Re: Emulating simple network for testing XORP code (Bruce Simpson)
>   6. Re: Emulating simple network for testing XORP code (Ben Greear)
>   7. Re: Emulating simple network for testing XORP code (Yue Li)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 30 Jun 2009 11:29:19 +0100
> From: Rae Harbird <rae.harbird at gmail.com>
> Subject: [Xorp-users] Emulating simple network for testing XORP code
> To: xorp-users at xorp.org
> Message-ID:
>        <b228526b0906300329l47e2555h8af07ce139ba6b1c at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi
>
>
> Does anyone have recommendations for emulating a small, simple network of
> XORP routers on a single Linux platform? I want to test my XORP code.
>
>
> Cheers,
>
>
>
>
> Rae
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20090630/c317111a/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Tue, 30 Jun 2009 12:02:03 +0100
> From: Bruce Simpson <bms at incunabulum.net>
> Subject: Re: [Xorp-users] Emulating simple network for testing XORP
>        code
> To: r.harbird at cs.ucl.ac.uk
> Cc: xorp-users at xorp.org
> Message-ID: <4A49F0AB.6010001 at incunabulum.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Rae Harbird wrote:
> >
> > Hi
> >
> >
> > Does anyone have recommendations for emulating a small, simple network
> > of XORP routers on a single Linux platform? I want to test my XORP code.
>
> There is something out there that might wrap XORP in some kind of
> virtualization environment, although I can't remember what the name of
> this thing is -- it was mentioned on this list in the last 12 months, a
> trawl through the list archives may help. Sorry, it's just a vague
> memory at the moment.
>
> thanks,
> BMS
>
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 30 Jun 2009 12:11:13 +0100
> From: Bruce Simpson <bms at incunabulum.net>
> Subject: Re: [Xorp-users] Basic questions for static routing
> To: Robert Appleton <appletrp at gmail.com>
> Cc: xorp-users at xorp.org
> Message-ID: <4A49F2D1.7010801 at incunabulum.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hello,
>
> Robert Appleton wrote:
> > Hi All,
> >
> > I just got xorp running today, but now am trying to figure out how to
> > configure a simple static route between 2 computers (3 including the
> > one xorp is on) on different subnets. I have them set on different
> > subnets through a switch (for testing purposes at the moment. I just
> > want them to be able to ping each other. How do I need to configure
> > the computer with xorp on it? (I'm running fedora). Do I need to alter
> > anything in my boot file pasted below? Thanks for the help. Let me
> > know if more information is needed.
> >
>
>    You might want to fold the vif {} and static {} blocks together as
> they should actually get parsed as same block, however this may just be
> stylistic. Not knowing your network topology, I couldn't say further,
> apart from the above issue your config looks fine.
>
>    Do remember that in order for ICMP echo packets to be transmitted
> and received, all of the machines involved must have valid routes
> pointing to each other's network prefix, or otherwise be reachable i.e.
> in both directions.
>
>    You need at least one way of reaching the XORP box i.e. a management
> interface, normally this must be configured at boot in your distribution
> using its normal procedures.
>    Different subnets on same physical switch is fine for testing, but
> it's usually discouraged for operational reasons. You will of course
> need to have the appropriate configuration in place on the other
> machines for this.
>
>    I'm not familiar with Fedora, so can't advise on how you might do
> that, hopefully others can help.
>
> hope this helps
> BMS
>
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 30 Jun 2009 12:33:03 +0100
> From: Rae Harbird <r.harbird at cs.ucl.ac.uk>
> Subject: Re: [Xorp-users] Emulating simple network for testing XORP
>        code
> To: Bruce Simpson <bms at incunabulum.net>
> Cc: xorp-users at xorp.org, Marko Zec <zec at freebsd.org>, zec at fer.hr
> Message-ID:
>        <b228526b0906300433o490f53ecme43be12d9b7bd17d at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi
>
> This was probably IMUNES. Since I last touched IMUNES, I believe it is
> being
> ported rewritten for the FreeBSD Network Stack Virtualization Project:
>
> http://wiki.FreeBSD.org/Image <http://wiki.freebsd.org/Image>
>
> >From the wiki: "The network stack virtualization project aims at extending
> the FreeBSD kernel to maintain multiple independent instances of networking
> state"
>
> I don't think it's ready for use in this incarnation yet and I'm not sure
> that the previous instantiation (imunes) is supported.
>
> I have cc'd Marco Zec, the principle developer, as this information may not
> be up-to-date.
>
> Any other options?
>
>
>
> Rae
> ===
>
> 2009/6/30 Bruce Simpson <bms at incunabulum.net>
>
> > Rae Harbird wrote:
> >
> >>
> >> Hi
> >>
> >>
> >> Does anyone have recommendations for emulating a small, simple network
> of
> >> XORP routers on a single Linux platform? I want to test my XORP code.
> >>
> >
> > There is something out there that might wrap XORP in some kind of
> > virtualization environment, although I can't remember what the name of
> this
> > thing is -- it was mentioned on this list in the last 12 months, a trawl
> > through the list archives may help. Sorry, it's just a vague memory at
> the
> > moment.
> >
> > thanks,
> > BMS
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20090630/4e256ca0/attachment-0001.html
>
> ------------------------------
>
> Message: 5
> Date: Tue, 30 Jun 2009 12:52:20 +0100
> From: Bruce Simpson <bms at incunabulum.net>
> Subject: Re: [Xorp-users] Emulating simple network for testing XORP
>        code
> To: Rae Harbird <r.harbird at cs.ucl.ac.uk>
> Cc: xorp users <xorp-users at xorp.org>
> Message-ID: <4A49FC74.8000507 at incunabulum.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Rae Harbird wrote:
> > Hi
> >
> > This was probably IMUNES. Since I last touched IMUNES, I believe it is
> > being ported rewritten for the FreeBSD Network Stack Virtualization
> > Project:
>
> I was actually thinking of a Linux based solution with a somewhat
> obscure name :-)  It had a XORP config generator, I think parts of it
> were written in Python or possibly Ruby.
>
> I believe IMUNES should supported by the upcoming FreeBSD 8.0 release,
> of course Marko would know more.
>
> Not sure if XORP integration is on the radar there, if at all. Major
> code surgery is likely anyway, so if it did, it would probably be locked
> to an earlier release.
>
> cheers,
> BMS
>
>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 30 Jun 2009 08:46:58 -0700
> From: Ben Greear <greearb at candelatech.com>
> Subject: Re: [Xorp-users] Emulating simple network for testing XORP
>        code
> To: r.harbird at cs.ucl.ac.uk
> Cc: xorp-users at xorp.org
> Message-ID: <4A4A3372.1050404 at candelatech.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Rae Harbird wrote:
> >
> > Hi
> >
> >
> > Does anyone have recommendations for emulating a small, simple network
> > of XORP routers on a single Linux platform? I want to test my XORP code.
> >
> Our LANforge product uses a slightly modified xorp (and modified linux
> kernel) to achieve this.   Our main controller
> code isn't open-source though, and to add support for new Xorp features
> requires code changes to our product
> (we do work for hire and general improvement of our products, and may be
> willing to do work for free,
> depending on the nature of the work).
>
> Our kernel patches (minus the impairment generator) are open-source and
> freely available, as is my git tree of
> xorp plus my changes.
>
> I can tell you though:  It is not trivial to write a virtual router
> framework.  It took us several months and we already
> had part of the work done, and the general framework in place.  I'm
> still debugging xorp too, it just barely deals with
> dynamic network re-configuration, for example, but it's pretty solid
> with a static network emulation (ie, no links between
> routers coming and going.)
>
> We auto-generate perl scripts that do the linux stack configuration, and
> we auto-generate the xorp config files.
> If these things don't scare you, I'll be happy to a post simple example.
>
> Thanks,
> Ben
>
> --
> Ben Greear <greearb at candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com
>
>
>
>
> ------------------------------
>
> Message: 7
> Date: Tue, 30 Jun 2009 12:13:23 -0400
> From: Yue Li <yueli.m at gmail.com>
> Subject: Re: [Xorp-users] Emulating simple network for testing XORP
>        code
> To: Rae Harbird <r.harbird at cs.ucl.ac.uk>
> Cc: xorp-users at xorp.org, Marko Zec <zec at freebsd.org>, zec at fer.hr
> Message-ID:
>        <49567c360906300913w16cc311dkdcbb001d67e1136b at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> We have done this using OpenVZ and a network emulator PRIME on Linux.
> Please check out the link below.
>
> http://www.primessf.net/pub/Public/WebHome/paper-xorpbgp.pdf
>
>
>
> On Tue, Jun 30, 2009 at 7:33 AM, Rae Harbird <r.harbird at cs.ucl.ac.uk>
> wrote:
>
> > Hi
> >
> > This was probably IMUNES. Since I last touched IMUNES, I believe it is
> > being ported rewritten for the FreeBSD Network Stack Virtualization
> Project:
> >
> > http://wiki.FreeBSD.org/Image <http://wiki.freebsd.org/Image>
> >
> > From the wiki: "The network stack virtualization project aims at
> extending
> > the FreeBSD kernel to maintain multiple independent instances of
> networking
> > state"
> >
> > I don't think it's ready for use in this incarnation yet and I'm not sure
> > that the previous instantiation (imunes) is supported.
> >
> > I have cc'd Marco Zec, the principle developer, as this information may
> not
> > be up-to-date.
> >
> > Any other options?
> >
> >
> >
> > Rae
> > ===
> >
> > 2009/6/30 Bruce Simpson <bms at incunabulum.net>
> >
> >> Rae Harbird wrote:
> >>
> >>>
> >>> Hi
> >>>
> >>>
> >>> Does anyone have recommendations for emulating a small, simple network
> of
> >>> XORP routers on a single Linux platform? I want to test my XORP code.
> >>>
> >>
> >> There is something out there that might wrap XORP in some kind of
> >> virtualization environment, although I can't remember what the name of
> this
> >> thing is -- it was mentioned on this list in the last 12 months, a trawl
> >> through the list archives may help. Sorry, it's just a vague memory at
> the
> >> moment.
> >>
> >> thanks,
> >> BMS
> >>
> >
> >
> >
> >
> > _______________________________________________
> > Xorp-users mailing list
> > Xorp-users at xorp.org
> > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20090630/e234bf75/attachment-0001.html
>
> ------------------------------
>
> _______________________________________________
> Xorp-users mailing list
> Xorp-users at xorp.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users
>
>
> End of Xorp-users Digest, Vol 39, Issue 19
> ******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20090701/0f91f97f/attachment-0001.html 


More information about the Xorp-users mailing list