[Xorp-hackers] loading complete routing tables

Atanu Ghosh atanu@ICSI.Berkeley.EDU
Fri, 16 Sep 2005 15:54:05 -0700


Hi,

You are absolutely correct, I was thinking about routing updates not the
table dumps. The harness code can write table dumps but it can't read
them.

I think reading a table dump and sending it to a BGP process using a
single session should be relatively easy. It won't of course be possible
to preserve the fact that the routes originally came from different
peers. If you use an IBGP peering it shouldn't even be necessary to
modify the aspath.

I would add the entry point to bgp/harness/peer.cc:Peer::send_dump. 
Modify it to support "table" as well as "update". Create an instance of
UpdatePacket read the path attributes from the file into the
UpdatePacket call encode to get the wire format and you should be
done. I look forward to receiving the patch.

	Atanu.

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

    Ratul> atanu -

    Ratul> thanks for the response.

    Ratul> so i looked at the harness code some time back and came away with the
    Ratul> following impressions regarding the current code:
    Ratul> - it (harness/Peer::send_dump) does not support mtrd records of type
    Ratul> TABLE_DUMP (entire table dumps). it assumes BGP4MP (dumps of routing
    Ratul> updates).
    Ratul> - it does not support having updates from multiple peers in the same
    Ratul> mrtd file (as would be generated by a router with many peers).

    Ratul> please correct me if any of the above is wrong. none of it seems
    Ratul> insurmountable but i just wanted to ensure that i wasn't missing
    Ratul> something easier.

    Ratul> thanks.

    Ratul> Atanu Ghosh wrote:
    >> 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
    >> _______________________________________________
    >> Xorp-hackers mailing list
    >> Xorp-hackers@icir.org
    >> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers