Saturday, 16 March 2013

HITTING BGP TIMERS (HOLD-TIME, SCAN TIME, UPDATE-TIME)



HITTING BGP TIMERS (HOLD-TIME, SCAN TIME, UPDATE-TIME)

Range of AS 1 -65535 [public uses 1-64511] [private uses 64512-65535]
Default keep-alive is 60s and Holdtime is 180s
Default update(advertisement) is 5s(ibgp) and 30s(EBGP)
Default bgp scan time is 60s
We need BGP if we need to connect to more than 1 service provider or we are a transit AS
Assuming bgp has already been configured, I would only point out some key points. These are my default configs
r1
int s0/0
ip add 10.1.13.1 255.255.255.0
no shut
int f0/0
ip add 192.168.1.1 255.255.255.0
no shut
int lo 0
ip add 1.1.1.1 255.255.255.255
no shut
exit
router ospf 1
network 10.1.13.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
network 1.1.1.1 0.0.0.0 area 0
exit
router bgp 100
nei 2.2.2.2 remote-as 100
nei 2.2.2.2 update-source lo 0
nei 3.3.3.3 remote-as 100
nei 3.3.3.3 update-source lo 0
nei 4.4.4.4 remote-as 100
nei 4.4.4.4 update-source lo 0


r2
int s0/0
ip add 10.1.12.1 255.255.255.0
no shut
int f0/0
ip add 192.168.2.1 255.255.255.0
no shut
int lo 0
ip add 2.2.2.2 255.255.255.255
no shut
exit
router ospf 1
network 10.1.12.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 2.2.2.2 0.0.0.0 area 0
exit
router bgp 100
nei 1.1.1.1 remote-as 100
nei 1.1.1.1 update-source lo 0
nei 3.3.3.3 remote-as 100
nei 3.3.3.3 update-source lo 0
nei 4.4.4.4 remote-as 100
nei 4.4.4.4 update-source lo 0



r3
int s0/1
ip add 10.1.12.2 255.255.255.0
no shut
int s0/0
ip add 10.1.13.2 255.255.255.0
no shut
int f0/0
ip add 10.1.10.2 255.255.255.0
no shut
int lo 0
ip add 3.3.3.3 255.255.255.255
no shut
exit
router ospf 1
network 10.1.13.0 0.0.0.255 area 0
network 10.1.12.0 0.0.0.255 area 0
network 3.3.3.3 0.0.0.0 area 0
exit
router bgp 100
nei 2.2.2.2 remote-as 100
nei 2.2.2.2 update-source lo 0
nei 1.1.1.1 remote-as 100
nei 1.1.1.1 update-source lo 0
nei 4.4.4.4 remote-as 100
nei 4.4.4.4 update-source lo 0



r4
int f0/0
ip add 192.168.1.2 255.255.255.0
no shut
int f0/1
ip add 192.168.2.2 255.255.255.0
no shut
int lo 0
ip add 4.4.4.4 255.255.255.255
no shut
exit
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 4.4.4.4 0.0.0.0 area 0
exit
router bgp 100
nei 2.2.2.2 remote-as 100
nei 2.2.2.2 update-source lo 0
nei 3.3.3.3 remote-as 100
nei 3.3.3.3 update-source lo 0
nei 1.1.1.1 remote-as 100
nei 1.1.1.1 update-source lo 0


Now lets get to the problems.


 1)   Cfg timers on R3 to use hold timer of 21seconds
R3(config)#router bgp 100
                    #timers bgp 7 21      {that’s it}
Now how to we view our changes.
R3#clear ip bgp * [dont  do this in a production network]
R3#sh ip bgp nei  1.1.1.1
Configured hold time is 21,keepalive interval is 7 seconds, Minimum holdtime from neighbor is 0 seconds
R1#sh ip bgp nei 3.3.3.3
hold time is 21, keepalive interval is 7 seconds
This takes into the assumption that R1 was configured with the default values




        2)      Lets configure R1 to use a hold time of 90s.Remember Routers will use the lower hold-time
R1(conf)#router bgp 100
              #timers bgp 30 90
             #do clear ip bgp *
R1#sh ip bgp nei 3.3.3.3
Last read 00:00:03, last write 00:00:03, hold time is 21, keepalive interval is 7 seconds
  Configured hold time is 90, keepalive interval is 30 seconds, Minimum holdtime from neighbor is 0 seconds



3)      Change the scan time on R3 to 50s
R3(conf)#router bgp 100
              #bgp scan-time 50
To verify,
R3#sh ip bgp summary
BGP activity 4/3 prefixes, 4/3 paths, scan interval 50 secs



4)       Cfg R3 such that it send adverts(updates) to R1 very 3s
R3(conf)#router bgp 100
               #nei 1.1.1.1 advertisement-interval 3
              #do clear ip bgp *
To view changes made
#sh ip bgp nei 1.1.1.1
Scroll down to  For address family: IPv4 Unicast
Minimum time between advertisement runs is 3 seconds


No comments:

Post a Comment