Cisco administrators and implementers come across queries related to Cisco BGP neighbor output. One such typical query is difference between “Implicit Withdraw” and “Explicit Withdraw” when one issues the command “show ip bgp neighbors” and output displays both the terms i.e. Explicit and Implicit. Below is one sample output –
R2#sh ip bgp neighb | include Withdraw
Explicit Withdraw: 0 2
In simple terms, “Implicit Withdraw” counter increases when prefix has been withdrawn and re advertised. Most of times, prefix is updated with new attribute (Like metric change, AS path attribute change etc) and received by BGP speaking device.
“Explicit Withdraw” counter increases when prefix has been withdrawn because it is no longer feasible.
Scenario: Cisco BGP Implicit Withdraw and Explicit Withdraw
The above difference between both the terms can be illustrated in better way through below scenario –
R1 config
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Loopback11
ip address 11.11.11.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
!
router bgp 1
network 1.1.1.0 mask 255.255.255.0
network 11.11.11.0 mask 255.255.255.0
network 192.168.12.0
neighbor 192.168.12.2 remote-as 2
neighbor 192.168.12.2 soft-reconfiguration inbound
R2 config
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.12.2 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.23.2 255.255.255.0
!
router bgp 2
network 2.2.2.0 mask 255.255.255.0
network 192.168.12.0
network 192.168.23.0
neighbor 192.168.12.1 remote-as 1
neighbor 192.168.12.1 soft-reconfiguration inbound
neighbor 192.168.23.3 remote-as 3
neighbor 192.168.23.3 soft-reconfiguration inbound
R3 Config
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.23.3 255.255.255.0
!
router bgp 3
network 3.3.3.0 mask 255.255.255.0
network 192.168.23.0
neighbor 192.168.23.2 remote-as 2
neighbor 192.168.23.2 soft-reconfiguration inbound
R3#sh ip bgp
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.0/24 192.168.23.2 0 2 1 i
*> 2.2.2.0/24 192.168.23.2 0 0 2 i
*> 3.3.3.0/24 0.0.0.0 0 32768 i
*> 11.11.11.0/24 192.168.23.2 0 2 1 i
*> 192.168.12.0 192.168.23.2 0 0 2 i
* 192.168.23.0 192.168.23.2 0 0 2 i
*> 0.0.0.0 0 32768 i
Further, output for Implicit and Explicit Withdraw is available via below command –
R3#sh ip bgp neighb | incl With
Explicit Withdraw: 0 0
The output shows Withdraw type in 1st column, Withdrawals sent in 2nd column and Withdrawals received in 3rd column. Our focus will be on 3rd column ie withdrawals received.
Now, 1st we will change the AS-Path attribute for Network 11.11.11.0/24 on R1 by adding 5 AS path (AS 1) as below –
R1(config)#route-map NET11 permit 10
match ip address 11
set as-path prepend 1 1 1 1 1
!
route-map NET11 permit 20
R1(config)#router bgp 1
R1(config-router)#neighbor 192.168.12.2 route-map NET11 out
R3#sh ip bgp
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.0/24 192.168.23.2 0 2 1 i
*> 2.2.2.0/24 192.168.23.2 0 0 2 i
*> 3.3.3.0/24 0.0.0.0 0 32768 i
*> 11.11.11.0/24 192.168.23.2 0 2 1 1 1 1 1 1 i
*> 192.168.12.0 192.168.23.2 0 0 2 i
* 192.168.23.0 192.168.23.2 0 0 2 i
*> 0.0.0.0 0 32768 i
As shown in above output, the AS Path attribute is changed for network 11.11.11.0/24 from “2 1 i” to “2 1 1 1 1 1 1 i”.
This corresponding change in path attribute results in increment of Implcit withdraw counter by 1 as shown below (value is now 7) –
R3#sh ip bgp neighb | incl With
Explicit Withdraw: 0 0
Next, we will stop advertising network 1.1.1.0/24 from R1 a bellow –
R1(config-router)#no network 1.1.1.0 mask 255.255.255.0
R3#sh ip bgp
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete
Network Next Hop Metric LocPrf Weight Path
*> 2.2.2.0/24 192.168.23.2 0 0 2 i
*> 3.3.3.0/24 0.0.0.0 0 32768 i
*> 11.11.11.0/24 192.168.23.2 0 2 1 1 1 1 1 1 i
*> 192.168.12.0 192.168.23.2 0 0 2 i
* 192.168.23.0 192.168.23.2 0 0 2 i
*> 0.0.0.0 0 32768 i
Since network 1.1.1.0/24 has been withdrawn, a corresponding increment is seen in Explicit Withdraw counter as below –
R3#sh ip bgp neighb | incl With
Explicit Withdraw: 0 1
Hope the overall lab tested scenario is able to clarify the differences between “Implicit Withdraw” and “Explicit Withdraw” in simple terms.
Continue Reading:
Sample Configuration for eBGP and iBGP
ABOUT THE AUTHOR
I am here to share my knowledge and experience in the field of networking with the goal being – “The more you share, the more you learn.”
I am a biotechnologist by qualification and a Network Enthusiast by interest. I developed interest in networking being in the company of a passionate Network Professional, my husband.
I am a strong believer of the fact that “learning is a constant process of discovering yourself.”
– Rashmi Bhardwaj (Author/Editor)