7.54 BGP Timers Tuning
• Configure R2’s BGP process to process conditional route advertisement every 20 seconds.
• R2 should not batch routing updates to BB2 and advertise them
immediately.
• Configure R2 so that session deactivation happens within 15 seconds of no session activity.
-------------------------------------------------------
bgp scan-time 20
neighbor 192.10.1.254 advertisement-interval 0
bgp timer 5 15
BGP routing process is complicated and uses many data structures and
periodically scheduled tasks. One of the most important BGP processes is “BGP
scanner” which performs the following important functions:
1) Runs through all prefixes in BGP table and check the validity and reachability of BGP NEXT_HOP attribute.
2) Performs conditional advertisement and route injection.
3) Imports new routes into BGP table from RIB (via network and redistribute commands).
4) Performs route dampening.
Later you will some that some of this periodic behavior became event-driven in
recent IOS releases (BGP next-hop trigger feature). However, for now what’s
important is that BGP scanner runs every 60 seconds by default. You can
change this interval using the command bgp scan-time <5-60>. The shorter
is the interval, the better is routing convergence, but at the same time the more
load is put on the router’s CPU. You may check the BGP scanner runs using the
command debug ip bgp events.
Another important BGP process is “BGP I/O”, which processes BGP UPDATE
and KEEPALIVE messages. By default, BGP batches all new prefixes and
delays the sending of an update packet to the peer until the next advertisement-interval
timer expires. This interval is configured on a per-peer basis using the
command neighbor <IP> advertisement-interval <seconds>.
Decreasing this interval (the minimum value is zero) improves BGP convergence
but generates more BGP traffic and puts more stress on router’s CPU.
The last important timer is the BGP session keepalive interval. Keepalives are
important to validate BGP session health, to avoid routing blackholes. BGP peers
advertise the hold time interval when establishing BGP peering session and send
KEEPALIVE message to inform each other of their availability. Peers may
advertise different hold-time interval – it’s only important that the peer receive the
KEEPALIVE message until its hold-time interval expires. You can change the
keepalive and hold-time periods on per-process basis using the command
timers bgp <keepalive> <holdtime>. The default values are 60 and 180
for keepalive and holdtime intervals respectively. Setting the keepalive interval
too small results in faster peering deactivation detection, but may lead to “false
positives” and disruption of BGP session by mistake and excessive route
flapping. Keep in mind that you need to completely reset the BGP session in
order for the new keepalive timers to take effect. If you want to observe the BGP
keepalive exchange process, use the command debug ip bgp keepalive.
-------------------------------------------------------
Rack1R2#show ip bgp summary
BGP router identifier 150.1.2.2, local AS number 200
BGP table version is 15, main routing table version 15
14 network entries using 1680 bytes of memory
25 path entries using 1300 bytes of memory
5/4 BGP path/bestpath attribute entries using 620 bytes of memory
4 BGP AS-PATH entries using 96 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
Bitfield cache entries: current 2 (at peak 2) using 64 bytes of memory
BGP using 3760 total bytes of memory
BGP activity 28/14 prefixes, 50/25 paths, scan interval 20 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
155.1.0.5 4 200 464 457 15 0 0 00:02:48 11
155.1.23.3 4 200 467 456 15 0 0 00:02:48 11
192.10.1.254 4 254 454 469 15 0 0 00:02:48 3
Rack1R2#
Rack1R2#show ip bgp neighbors 192.10.1.254
BGP neighbor is 192.10.1.254, remote AS 254, external link
BGP version 4, remote router ID 222.22.2.1
BGP state = Established, up for 00:03:21
Last read 00:00:01, last write 00:00:01, hold time is 15, keepalive interval is 5 seconds
Configured hold time is 15,keepalive interval is 5 seconds, Minimum holdtime from neighbor is 0 seconds
Neighbor capabilities:
Route refresh: advertised and received(old & new)
Address family IPv4 Unicast: advertised and received
Message statistics:
InQ depth is 0
OutQ depth is 0
Sent Rcvd
Opens: 2 2
Notifications: 0 0
Updates: 16 3
Keepalives: 457 456
Route Refresh: 1 0
Total: 476 461
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 15, neighbor version 15/0
Output queue size: 0
Index 1, Offset 0, Mask 0x2
1 update-group member
Sent Rcvd
Prefix activity: ---- ----
Prefixes Current: 11 3 (Consumes 156 bytes)
Prefixes Total: 11 3
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath: n/a 3
Used as multipath: n/a 0
Outbound Inbound
Local Policy Denied Prefixes: -------- -------
Bestpath from this peer: 3 n/a
Total: 3 0
Number of NLRIs in the update sent: max 8, min 1
Minimum time between advertisement runs is 0 seconds
沒有留言:
張貼留言