This is obviously a rookie question, but I haven't found anything by searching. I'm looking to set up a small testbed to simulate our internal network topology, and I want to have a realistic BGP table from the fake "upstream" routers. Ideally what I'd like to do is dump the BGP table from our production routers, strip the immediate neighbor AS, and load the table into Quagga or OpenBGPD to advertise. I'm running into two problems: how do you dump BGP tables in a machine-parseable format from IOS, and how do you make the route server advertise the routes as they were in the original table, including the full AS-path, communities, etc? If Quagga/OpenBGPD aren't the right tools, I'm happy to use something else. This seems like it would be a pretty standard thing to do, but none of the tools I've found seem aimed at this sort of testbed. Thanks! -Ben Jencks
On 2010-01-12 21:27, Ben Jencks wrote:
This is obviously a rookie question, but I haven't found anything by searching. I'm looking to set up a small testbed to simulate our internal network topology, and I want to have a realistic BGP table from the fake "upstream" routers. Ideally what I'd like to do is dump the BGP table from our production routers, strip the immediate neighbor AS, and load the table into Quagga or OpenBGPD to advertise. I'm running into two problems: how do you dump BGP tables in a machine-parseable format from IOS, and how do you make the route server advertise the routes as they were in the original table, including the full AS-path, communities, etc? If Quagga/OpenBGPD aren't the right tools, I'm happy to use something else.
Use libbgpdump from ris.ripe.net to get raw data from http://data.ris.ripe.net/ (you're looking for newest bview file), and dump them using bgpdump to something easily to parse. Then using bgpsimple (from googlecode) simulate a peer with specific number of prefixes advertised - up to the limit of the contents of the file. You can spoof next-hop, AS, etc. As for the attribute manipulation, fire up a couple of VMWare/VirtualBox/vimage instances with quagga/openbgpd to accept the prefixes from bgpsimple and mangle them in some manner. Here you go. -- "Everything will be okay in the end. | Łukasz Bromirski If it's not okay, it's not the end. | http://lukasz.bromirski.net
2010/1/12 Łukasz Bromirski <lukasz@bromirski.net>:
On 2010-01-12 21:27, Ben Jencks wrote:
This is obviously a rookie question, but I haven't found anything by searching. I'm looking to set up a small testbed to simulate our internal network topology, and I want to have a realistic BGP table from the fake "upstream" routers. Ideally what I'd like to do is dump the BGP table from our production routers, strip the immediate neighbor AS, and load the table into Quagga or OpenBGPD to advertise. I'm running into two problems: how do you dump BGP tables in a machine-parseable format from IOS, and how do you make the route server advertise the routes as they were in the original table, including the full AS-path, communities, etc? If Quagga/OpenBGPD aren't the right tools, I'm happy to use something else.
Use libbgpdump from ris.ripe.net to get raw data from http://data.ris.ripe.net/ (you're looking for newest bview file), and dump them using bgpdump to something easily to parse. Then using bgpsimple (from googlecode) simulate a peer with specific number of prefixes advertised - up to the limit of the contents of the file. You can spoof next-hop, AS, etc. As for the attribute manipulation, fire up a couple of VMWare/VirtualBox/vimage instances with quagga/openbgpd to accept the prefixes from bgpsimple and mangle them in some manner.
Thanks everyone. bgpsimple ended up being the tool I wanted, and I just used the RIPE data. If I was more adventurous I would have hooked Quagga up with a BGP session to the production routers and generated my own dumps, but the RIPE data was good enough for now. -Ben
This might do what you need: MDFMT - MRT dump file manipulation toolkit http://caia.swin.edu.au/urp/bgp/tools.html On Tue, Jan 12, 2010 at 3:27 PM, Ben Jencks <ben@bjencks.net> wrote:
This is obviously a rookie question, but I haven't found anything by searching. I'm looking to set up a small testbed to simulate our internal network topology, and I want to have a realistic BGP table from the fake "upstream" routers. Ideally what I'd like to do is dump the BGP table from our production routers, strip the immediate neighbor AS, and load the table into Quagga or OpenBGPD to advertise. I'm running into two problems: how do you dump BGP tables in a machine-parseable format from IOS, and how do you make the route server advertise the routes as they were in the original table, including the full AS-path, communities, etc? If Quagga/OpenBGPD aren't the right tools, I'm happy to use something else.
This seems like it would be a pretty standard thing to do, but none of the tools I've found seem aimed at this sort of testbed.
Thanks!
-Ben Jencks
This is how you can do it with Quagga: http://wiki.nil.com/Use_Quagga_to_generate_BGP_routes You could write a Perl (or whatever your favorite scripting language is) script to get Quagga/IOS configuration from live BGP data, but it would be non-trivial and the resulting configuration would be enormous. I know there was a similar discussion months ago on the NANOG mailing list; browse the archives. Ivan Pepelnjak blog.ioshints.info / www.ioshints.info
-----Original Message----- From: Ben Jencks [mailto:ben@bjencks.net] Sent: Tuesday, January 12, 2010 9:28 PM To: nanog@nanog.org Subject: BGP testbed tools
This is obviously a rookie question, but I haven't found anything by searching. I'm looking to set up a small testbed to simulate our internal network topology, and I want to have a realistic BGP table from the fake "upstream" routers. Ideally what I'd like to do is dump the BGP table from our production routers, strip the immediate neighbor AS, and load the table into Quagga or OpenBGPD to advertise. I'm running into two problems: how do you dump BGP tables in a machine-parseable format from IOS, and how do you make the route server advertise the routes as they were in the original table, including the full AS-path, communities, etc? If Quagga/OpenBGPD aren't the right tools, I'm happy to use something else.
This seems like it would be a pretty standard thing to do, but none of the tools I've found seem aimed at this sort of testbed.
Thanks!
-Ben Jencks
-----Original Message----- From: Ben Jencks [mailto:ben@bjencks.net] Sent: Tuesday, January 12, 2010 3:28 PM To: nanog@nanog.org Subject: BGP testbed tools
This is obviously a rookie question, but I haven't found anything by searching. I'm looking to set up a small testbed to simulate our internal network topology, and I want to have a realistic BGP table from the fake "upstream" routers. Ideally what I'd like to do is dump the BGP table from our production routers, strip the immediate neighbor AS, and load the table into Quagga or OpenBGPD to advertise. I'm running into two problems: how do you dump BGP tables in a machine-parseable format from IOS, and how do you make the route server advertise the routes as they were in the original table, including the full AS-path, communities, etc? If Quagga/OpenBGPD aren't the right tools, I'm happy to use something else.
This seems like it would be a pretty standard thing to do, but none of the tools I've found seem aimed at this sort of testbed.
Cisco has a tool called RouteM which they use for lots of BGP scalability testing. I used it a lot back in my testing days at UU. Basically you just saved the contents of "show ip route" and you could replay that using the tool. Man I wish I saved that tool somewhere, it was incredibly valuable. You might be able find someone out there that still has this tool. And please get me an extra copy if you do manage to find it ;) Stefan Fouant, CISSP, JNCIE-M/T www.shortestpathfirst.net GPG Key ID: 0xB5E3803D
participants (5)
-
Ben Jencks
-
Ivan Pepelnjak
-
Jason Lewis
-
Stefan Fouant
-
Łukasz Bromirski