At the moment, only RIPNG and BGP route server are completely supported. RIP1/2 and BGP4 mostly work -- just a little matter of finishing up the code.
After reading the configuration file, MRT scans the kernel for existing routes, scans the kernel interface list, and then initiates routing protocol communication. MRT and also begins listening on the mrt service port (specificied in /etc/services) for user telnet connections.
password cairn ! debug rip all stdout debug ripng all stdout debug bgp all stdout ! !access-list 1 permit 198 255.0.0.0 !access-list 2 permit 192 255.0.0.0 !access-list 3 permit 191 255.0.0.0 ! router bgp 185 network 198.108.60.0 network 192.168.10.0 !neighbor 198.108.60.244 remote-as 65 view 0 neighbor 192.168.10.1 remote-as 65 view 0 !neighbor 198.108.60.244 transparent-as !neighbor 198.108.60.61 remote-as 66 !neighbor 192.168.10.2 remote-as 21 view 1 !neighbor 198.108.60.23 remote-as 12 !neighbor 198.108.60.28 remote-as 82 view 1 !neighbor 198.108.60.23 weight 50 !neighbor 192.168.10.3 remote-as 1002 !neighbor 192.168.10.2 distribute-list 1 in !neighbor 192.168.10.2 distribute-list 3 in view 1 !neighbor 192.168.10.2 distribute-list 2 out !neighbor 198.108.60.244 view 1 !neighbor 198.108.60.244 transparent redistribute static ! router rip network 192.168.10.0 network 198.108.60.0 redistribute static ! interface tunnel0 tunnel source sit0 tunnel destination 192.168.10.103 tunnel destination fe80::c051:6042 tunnel destination 5fff:ff00:c0a8:0a00::103 ! access-list 9 permit 5f00:ed00:c66c:3c00::/80 access-list 9 permit 5fff:ff00:c0a8:0a00::/80 access-list 9 permit 5fff:ff00:c0a8:0b00::/80 access-list 9 permit 5fff:ff00:c0a8:0c00::/80 ! router ripng network 5f00:ed00:c66c:3c00::/80 !lnc0 network 5fff:ff00:c0a8:0a00::/80 network 5fff:ff00:c0a8:0b00::/80 network 5fff:ff00:c0a8:0c00::/80 !ep0 network tunnel0 redistribute static distribute-list 9 in distribute-list 9 out ! !ip route 83.0.0.0 192.168.10.100 !ip route 84.0.0.0 192.168.10.100 !ip route 17.0.0.1 192.168.10.100 ip route 200.0.0.1 192.168.10.100 ! ip route 5f25:5400::/32 ::38.245.76.17 !isi ip route 5f00:6d00::/32 ::192.31.7.41 !cisco ip route 5f00::/8 ::192.31.7.41 !others !
sbgp AS2011 enss131.t3.ans.net AS690attempts to initiate a BGP4 peering session with the old NSFNET backone on enss131. By default, SBGP writes logging information to /tmp/bgp.log.
The following command directs tracing information to stdout (the -v option) and will save MRT messages containing the contents of BPG4 update packets to /tmp/data (the -o option).
sbgp -vo data AS2011 enss131.t3.ans.net AS690Note that the remote peer must be configured to accept a BGP4 peering session from the machine on which SBGP is running.
The following command will inject routes stored in the binary MRT message file data into the peering sessions with enss131:
sbgp -vi data AS185 enss131.t3.and.net AS690
Route_btoa includes a perl version of the program. In general, the perl version is probably the most robust and uptodate.
sbgp -bo stdout | route_btoa -i stdinThe above command produces the following output.
Route_atob includes a perl version of the program. In general, the perl version is probably the most robust and uptodate.
route_atob -i /tmp/input | sbgp -i stdin enss131 AS690
Three scripts are provided with CiscoBGP. Cisco_fetch takes the Cisco's IP address and password as input, automatically sets up a telnet session to the router, issues a 'show ip bgp' command, and dumps the BGP routing tables to a file on the local workstation. Usage is as follows:
cisco_fetch hostname password > sample_outputThe cisco_check script then processes the 'show ip bgp' output and lists prefixes with AS origins different than those registered in the IRR. Usage is as follows:
cisco_check sample_output [AS_Number]
The optional [AS_Number] argument is the AS number that is used for local routes originating, or going from IGP to EGP on the Cisco.
This command produces output in this format:
0.0.0.0 [????] 6503 185 i 12.0.0.0 [????] 6503 185 3561 701 i 35.42.1.0/24 [237] 6503 185 i 39.2.254.0 [????] 6503 185 3561 1133 1128 2043 766 i 39.7.8.0 [????] 6503 185 3561 1800 i 39.7.88.0 [????] 6503 185 3561 1800 1883 1880 i 39.7.90.0 [????] 6503 185 3561 1800 1883 1880 1882 i 39.11.6.0 [????] 6503 185 3561 1849 2822 i * 39.7.8.0/24 [1800] 6503 185 3561 1800 i 39.13.135.0 [????] 6503 185 3561 1239 1795 3463 i 39.13.229.0 [????] 6503 185 3561 701 3557 i 128.35.0.0 [560] 6503 185 3561 560 701 6 i 128.60.0.0 [86] 6503 185 3561 86 48 i 128.91.0.0 [3576] 6503 185 3561 690 1324 1336 55 i 128.122.0.0 [1785] 6503 185 3561 1239 1785 3973 12 i 128.140.0.0 [279] 6503 185 3561 279 3591 i 128.151.0.0 [1785] 6503 185 3561 1239 1785 20 iIf the origin AS differs from the origin registered in the RADB, the correct origin is given in brackets. '?????' indicates that the route object for a given prefix is not registered in the IRR.
A starred entry ('*') means that an exact match was NOT found for the prefix in the list of prefixes registered as originating in the given AS, but that the prefix falls under a less specific prefix that does originate in the AS.
CiscoBGP also includes the aggstats script by Randy Bush <randy@psg.com>. Aggstats is a filter which accepts the output of the command 'show ip bg' on a Cisco and produces a small table showing for each prefix length the count of routes which explicitly declared that prefix length and the total count of routes of that prefix length. Usage is as follows:
agg.pl < sample_output
RouteFlap produces generates output of the form:
192.135.172/24 reachability= [up 21:41:15, down 0:0:0] transitions= [up 0, down 0, change 0] (185 3561 286 1836) reachability= [up 21:41:15, down 0:0:0], transitions= 0 192.136.109/24 reachability= [up 21:39:32, down 0:1:32] transitions= [up 0, down 2, change 0] (185 3561 1239 1792 2899) reachability= [up 9:51:38, down 0:0:0], transitions= 0 202.37/16 reachability= [up 21:41:2, down 0:0:0] transitions= [up 0, down 0, change 0] (185 3561 297 681) reachability= [up 21:41:2, down 0:0:0], transitions= 0 199.251.241/24 reachability= [up 0:0:30, down 20:46:56] transitions= [up 0, down 1, change 1] (185 3561 568) reachability= [up 20:46:56, down 0:0:0], transitions= 0 204.142.34/24 reachability= [up 21:40:39, down 0:0:34] transitions= [up 0, down 1, change 0] (185 3561 97) reachability= [up 6:56:57, down 0:0:0], transitions= 0
BGPSim includes a perl program, bgpsim.pl used to generate ASCII descriptions of BGP traffic for use with route_btoa, and sbgp. This is pretty much a rough hack.
! network-list 1 range 10.0.0.0 11.0.0.0 network-list 1 nexthop 1 198.108.60.8 network-list 1 aspath 1 123 23 23 12 !network-list 1 stability 10 1000 ! network-list 2 range 129.0.0.0 129.20.0.0 network-list 2 nexthop 1 198.108.60.18 network-list 2 aspath 1 56 78 34 89 network-list 2 community 1 56:123 78:234 3670139 network-list 2 dpa 1 as 56 121 network-list 2 aspath 2 100 10 102 network-list 2 community 2 100:345 10:456 network-list 2 dpa 2 3 23 network-list 2 localpref 1 23 network-list 2 localpref 2 83 !network-list 2 stability 9 network-list 2 change 12 ! router bgp 185 neighbor 198.108.60.244 remote-as 65 neighbor 198.108.60.244 announce 1 neighbor 198.108.60.112 remote-as 165 neighbor 198.108.60.112 announce 1 2 network-list 2 range 10.0.0.0 10.0.255.0 network-list 2 aspath 1 network-list 2 stability 10 60 ! neighbor 198.108.60.244 remote-as 65 neighbor 198.108.60.244 announce 1 ! neighbor 198.108.60.112 remote-as 165 neighbor 198.108.60.112 announce 1 neighbor 198.108.60.112 announce 2 !This file describes a simulation of two BGP peers (AS 65 and AS165).
The first peer (AS 65) announces routes using network list
one. Network list 1 has a series of attributes of the form
network-list
The attribute-num value allows users to specify multiple
attribute paths for a given network list. Initially, all the
prefixes in a network-list are announced with path attributes
attribute-num=1. If "change
This network list describes the range of routes from 192.32.0 to 192.32.255 (i.e.
192.32.1.0, 192.32.2.0, etc.) All of these routes have an inital
aspath of (123 23 23 12) and a next-hop of 198.108.60.244. The
stability-random
Note that network-lists cannot overlap.