[Xorp-hackers] loading complete routing tables

Atanu Ghosh atanu@ICSI.Berkeley.EDU
Fri, 16 Sep 2005 08:53:09 -0700


Hi,

We use the test harness to load routes into BGP:
<http://www.xorp.org/releases/1.1/docs/test_harness/test_harness.pdf>

Some examples of this are in bgp/harness/test_peering2.sh, test1 and
test15 are the most interesting examples. These tests load data from
mtrd format files. The tests by default also start the BGP process
unless the "-s" argument is used. As an aside the gmake check target
runs all these tests.

The way that I currently load routes from mrtd files into BGP is to use
the bgp/harness/harness.py script.

1) Configure BGP to accept a peering from the test peer. The XORP BGP
can be configured to accept connections on ports other than 179 if you
want to do everything on a single host. But you will need to edit the
script to use a port number other than 179.

2) A number of processes need to be started. I typically use separate xterms.
	a) The finder process (libxipc/xorp_finder) if there is a router
        manager running on this host this step is not necessary.
	b) bgp/harness/coord
	c) bgp/harness/test_peer -s peer1

3) The harness program can now be used to inject routes or even save
routes from the BGP process. Many separate files can be loaded as the
session is maintained by the test_peer not the harness program.

$ ./test_harness.py -e -p bgp_host -a asnum -b bgp-id -i mtrd_file1 
$ ./test_harness.py -p bgp_host -a asnum -b bgp-id -i mtrd_file12

Note the first time "-e" is used to establish the the session the second
time the session exists. If you want to see the protocol packets then
add "-v" to the list of test_peer arguments.

We do not rewrite the contents of the MRTD file so the ASPATH in the
file will need to be acceptable to the BGP process.

This is the file used by our regression tests:
<http://xorpc.icir.org/cgi-bin/cvsweb.cgi/data/bgp/icsi1.mrtd>

    Atanu.

>>>>> "Ratul" == Ratul Mahajan <ratul@cs.washington.edu> writes:

    Ratul> hi -

    Ratul> what method do the developers/testers use to load complete
    Ratul> routing tables into xorp_bgp?

    Ratul> i want to load mrtd table_dumps and updates from routeviews
    Ratul> (the dumps have routes from multiple peers). i am wondering
    Ratul> what the best (fastest) way is to achieve this.

    Ratul> thanks.  _______________________________________________
    Ratul> Xorp-hackers mailing list Xorp-hackers@icir.org
    Ratul> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers