Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
To initiate a BGP route refresh then use one of the following commands
# clear ip bgp 1.1.1.1 soft ! If no direction specified, affect both direction. # clear ip bgp 1.1.1.1 (soft) in ! Effect inbound. Soft keyword could be left, still same affect.
At a packet level then the requesting BGP peer will send a ROUTE-REFRESH message (as shown below) and the responding peer will simply send a standard UPDATE message.
When we enable soft reconfiguration then BGP route refresh capability is no longer used, we will discuss this further near the end.
Soft Reconfiguration
To configure soft reconfiguration we do the following
(config) # router bgp 179 (config-rtr)# neighbor 10.1.1.1 soft-reconfiguration inbound
Or we can also configure the router to configure BGP sessions with soft reconfiguration only when BGP route refresh capability is not supported by our BGP peer.
(config-rtr)# bgp soft-reconfig-backup
When we have soft reconfiguration configured, Cisco router starts to keep a copy of adj-RIB-in. 1. When BGP receives routes from a peer it places them into adj-RIB-in unaltered 2. Routes in adj-RIB-in are then passed through inbound routing policy and go into locRIB. Loc-RIB is essentially the best paths of the BGP RIB. 3. Adj-RIB-out is a table of routes after they have passed through the outbound routing policy. Therefore there is an adj-RIB-out for each peer-group. In short Adj-RIB-in = table before inbound routing policy Loc-RIB = table after inbound routing policy (best paths of BGP) Adj-RIB-out = table after outbound routing policy
# sh ip bgp neighbors 10.1.1.1 received-routes ! Show routes received from 10.1.1.1 before inbound routing policy. ! In other words, show adj-RIB-in table for 10.1.1.1 peer. # sh ip bgp neighbors 10.1.1.1 routes ! Show routes received from 10.1.1.1 after inbound routing policy. ! In other words, show loc-RIB table for 10.1.1.1 peer. # sh ip bgp neighbors 10.1.1.1 advertised-routes ! Show routes advertised to 10.1.1.1 peer after outbound routing policy. ! In other words, show adj-RIB-out table for 10.1.1.1 peer.
And to refresh routes from the adj-RIB-in to the loc-RIB we can use the following commands
# clear ip bgp 1.1.1.1 soft ! If no direction specified, affect both direction. # clear ip bgp 1.1.1.1 (soft) in ! Effect inbound. Soft keyword could be left, still same affect.
So we can see straight away that the behavior of the above two clear commands differs depending on whether soft reconfiguration is enabled or not.
Ref http://jaluther.blogspot.com/2012/04/bgp-route-refresh-capability.html
Hard reset
A hard reset tears down the specified peering sessions including the TCP connection and deletes routes coming from the specified peer.
Soft reset
A soft reset uses stored prefix information to reconfigure and activate BGP routing tables without tearing down existing peering sessions. Soft reconfiguration uses stored update information, at the cost of additional memory for storing the updates, to allow you to apply new BGP policy without disrupting the network. Soft reconfiguration can be configured for inbound or outbound sessions.
Disadvantages The prefixes in the BGP, IP, and Forwarding Information Base (FIB) tables provided by the neighbor are lost. A hard reset is not recommended. Does not reset inbound routing table updates. Both BGP devices must support the route refresh capability. Does not reset outbound routing table updates.
No configuration, and no storing of routing table updates. Does not clear the BGP session and cache.
Does not require storing of routing table updates, and has no memory overhead. Note Configured inbound soft reset (uses the neighbor softreconfiguration router configuration command)
Can be used when both BGP Requires preconfiguration. devices do not support the automatic route refresh Stores all received (inbound) capability. routing policy updates without modification; is memoryThe bgp soft-reconfig-backup intensive. command was introduced to configure inbound soft Recommended only when reconfiguration for peers that absolutely necessary, such as do not support the route when both BGP devices do refresh capability. not support the automatic route refresh capability. Does not reset outbound routing table updates.
Note
Ref http://www.cisco.com/en/US/docs/ios-xml/ios/iproute_bgp/configuration/xe-3se/3850/irg-soft-reset.html
1. Except for clear ip bgp * and clear ip bgp neighbor-id, all are soft resets. 2. If no direction is specified, then will be both direction. 3. Using soft keyword or not, result will be same.
Cheat Sheet
1. By default, BGP router uses Route Refresh capability if it supports. 2. With route refresh, clear ip bgp IP soft command works this way: a. At a packet level then the requesting BGP peer will send a ROUTE-REFRESH
message and the responding peer will simply send a standard UPDATE message. 3. If no route refresh, or even if route refresh is supported, soft reconfiguration can be used.
a. (config-rtr)# bgp soft-reconfig-backup command enable soft reconfiguration on BGP router which doesnt support route refresh. b. (config-rtr)# neighbor 10.1.1.1 soft-reconfiguration inbound command enable soft reconfiguration for 10.1.1.1 peer in the presence of route refresh support. 4. With soft reconfiguration, clear ip bgp IP soft works this way. a. Refresh routes from the adj-RIB-in (pre inbound policy table) to the loc-RIB (post
inbound policy table). 5. Route refresh is preferred in Cisco docs. However, soft reconfiguration is useful for troubleshooting purpose as you can examine pre inbound policy table.
a. E.g. # sh ip bgp neighbors 10.1.1.1 received-routes command only works if soft reconfiguration is enabled for that peer 10.1.1.1.
Useful Commands
#sh ip bgp neighbors 10.1.1.1 | s Neighbor capabilities: ! Show whether route refresh is supported on router. If supported, this output will be shown
Neighbor capabilities: Route refresh: advertised and received (old & new)
(config-rtr)# neighbor 10.1.1.1 soft-reconfiguration inbound ! Enable soft reconfiguration for neighbor 10.1.1.1. (config-rtr)# bgp soft-reconfig-backup ! Enable soft reconfiguration only if route refresh isnt supported.
# sh ip bgp neighbors 10.1.1.1 received-routes ! Show routes received from 10.1.1.1 before inbound routing policy. ! In other words, show adj-RIB-in table for 10.1.1.1 peer. ! Command works only if soft reconfiguration is enabled for that peer. # sh ip bgp neighbors 10.1.1.1 routes ! Show routes received from 10.1.1.1 after inbound routing policy. ! In other words, show loc-RIB table for 10.1.1.1 peer.
# sh ip bgp neighbors 10.1.1.1 advertised-routes ! Show routes advertised to 10.1.1.1 peer after outbound routing policy.
! In other words, show adj-RIB-out table for 10.1.1.1 peer. # clear ip bgp 1.1.1.1 soft ! If no direction specified, affect both direction. # clear ip bgp 1.1.1.1 (soft) in ! Effect inbound. Soft keyword could be left, still same affect.