xdel / bgpsimple Goto Github PK
View Code? Open in Web Editor NEWsimple BGP peering and route injection script
simple BGP peering and route injection script
Thanks for this tool which is very useful and helpful for me to inject full
BGP routing tables in my lab.
Please find attached a small patch that makes KeepAlive and HoldTimes
values available.
This feature was needed to test some routers disconnect behaviour while
updating a full routing table dump (955k entries, 321k active prefixes on
March, 16 2010) in heavy load conditions (filters, acls, ...).
See below for the new usage info :
bgp_simple.pl:
-myas ASNUMBER # (mandatory) our AS number
-myip IP address # (mandatory) our IP
address to source the sesion from
-peerip IP address # (mandatory) peer IP address
-peeras ASNUMBER # (mandatory) peer AS number
[-holdtime] Seconds # (optional) BGP hold time
duration in seconds (default 60s)
[-keepalive] Seconds # (optional) BGP KeepAlive
timer duration in seconds (default 20s)
[-v] # (optional) provide
verbose output to STDOUT, use twice to get debugs
[-p file] # (optional) prefixes to
advertise (bgpdump formatted)
[-o file] # (optional) write all sent
and received UPDATE messages to file
[-m number] # (optional) maximum number
of prefixes to advertise
[-n IP address] # (optional) next hop self,
overrides original value
[-l number] # (optional) set default
value for LOCAL_PREF
[-dry] # (optional) dry run; dont
build adjacency, but check prefix file (requires -p)
[-f KEY=REGEX] # (optional) filter on
input prefixes (requires -p), repeat for multiple filters
KEY is one of the
following attributes (CaSE insensitive):
NEIG
originating neighbor
NLRI
NLRI/prefix(es)
ASPT AS_PATH
ORIG ORIGIN
NXHP
NEXT_HOP
LOCP
LOCAL_PREF
MED
MULTI_EXIT_DISC
COMM
COMMUNITY
ATOM
ATOMIC_AGGREGATE
AGG
AGGREGATOR
REGEX is a perl
regular expression to be expected in a
match statement
(m/REGEX/)
Without any prefix file to import, only an adjacency is established and the
received NLRIs, including their attributes, are logged.
Original issue reported on code.google.com by [email protected]
on 22 Mar 2010 at 11:17
Attachments:
What steps will reproduce the problem?
1. I aim to inject some MRT snapshots to my Quagga machines. My feeder
(bgp_simple) is supposed to advertise a MRT of almost 400,000 lines (taken from
what my actual transit is sending to me)
2. But bgp_simple never stops sending updates, It keeps resetting the session
and sending the updates again and again, and finally after 4-5 hours suddenly
completely tears down the session.
3. during this time my Quagga's "sh ip bgp summ" shows that the neighbourship
forms, nothing in the queues (router can process all received messages), while
prefix counter never stops increasing since the session breaks and then become
Idle, Active and again increasing. Therefore, I can say my routing never
converges.
What is the expected output? What do you see instead?
Although I am advertising a full BGP dump, I expect it to converge at some
point! My question is is bgp_simple is able to inject this size of MRT ?
What version of the product are you using? On what operating system?
I am using bgp_simple on a linux machine (customized kernel for Netkit)
and my router is Quagga, I have also tested Dynamips
Please provide any additional information below.
I have also tried this:
http://code.google.com/p/bgpsimple/issues/detail?id=4&can=1
Many thanks,
Original issue reported on code.google.com by [email protected]
on 19 Sep 2012 at 2:02
I need a perl script to have BGP peering for ipv6 support.
Original issue reported on code.google.com by [email protected]
on 2 Mar 2012 at 11:00
trying the following command:
sudo ./bgp_simple.pl -myas 65000 -myip 192.168.6.43 -peerip 192.168.6.33 -peeras 65001 -p myroutes -v
gives me the following error after 2 seconds:
Error occured: type [Cease] Send Update: prfx [1.0.204.0/22] aspath [65000 49432 48362 6939 4766 38040 23969] orig [IGP] nxthp [192.168.6.43] 192.168.6.43:65000<=>192.168.6.33:65001: Internal error - no _peer_socket - Connection is shutdown
the myroutes file is a RIS file that was converted using the method described in the docs.
What steps will reproduce the problem?
1. I established BGP session with cisco.
2. I tried sending 1000 routes but only 800+ routes are getting updated.
3. Format in myroutes
Send Update: prfx [11.1.5.233/32] aspath [] locprf [0] orig [IGP] nxthp
[13.0.0.20]
Like the above prefix i tried sending 1000 /32 prefix. In some attempt 714
routes are loaded, in some 834 but not the expected 1000.
Linux Machine - cisco
Linux Machine - ISS.
What is the expected output? What do you see instead?
1000 rotues are expected in the cisco router.
What version of the product are you using? On what operating system?
Linux Fedora release 7
Kernel - 2.6.25.4
Product Version
my $version = "v0.12";
my $version_date = "22-Jan-2011";
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 26 Apr 2012 at 2:05
Do you have any idea whether it is possible to talk to multiple peers by some trivial changes to the script? I am no Perl coder myself. Does Net:BGP support that so it could be done relatively easy?
before and after:
dysnomia:~% sudo lsof -i|grep perl
perl 1032 root 3u IPv4 0x0b040b1c 0t0 TCP *:bgp
(LISTEN)
perl 1032 root 4u IPv4 0x098f0740 0t0 TCP
10.0.0.2:54447->10.0.0.1:bgp (ESTABLISHED)
dysnomia:~% sudo lsof -i|grep perl
perl 1039 root 3u IPv4 0x0b04d6b0 0t0 TCP
10.0.0.2:bgp (LISTEN)
perl 1039 root 4u IPv4 0x08686680 0t0 TCP
10.0.0.2:bgp->10.0.0.1:14592 (ESTABLISHED)
Index: bgp_simple.pl
===================================================================
--- bgp_simple.pl (revision 10)
+++ bgp_simple.pl (working copy)
@@ -204,7 +204,7 @@
exit;
}
-my $bgp = Net::BGP::Process->new();
+my $bgp = Net::BGP::Process->new( ListenAddr => $myip );
my $peer = Net::BGP::Peer->new(
Start => 0,
ThisID => $myip,
Original issue reported on code.google.com by [email protected]
on 8 Sep 2009 at 4:44
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.