Cisco BGP implicit withdraw and explicit withdraw

Cisco administrators and implementers come across queries related to 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 ie Explicit and Implicit. Below is one sample output –

R2#sh ip bgp neighb | include Withdraw

Implicit Withdraw:              0         10

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.

Advertisements

Explicit Withdraw” counter increases when prefix has been withdrawn because it is no longer feasible.

The above difference between both the terms can be illustrated in better way through below scenario –

R1 config

hostname R1
!
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

hostname R2
!
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

hostname R3
!
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
Once the neighborship is formed between eBGP speaking neighbors, the output on R3 will be –

R3#sh ip bgp

BGP table version is 8, local router ID is 3.3.3.3

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

Implicit Withdraw:              0          6

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)#access-list 11 permit 11.11.11.0 0.0.0.255

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

Below is the output received on R3 –

R3#sh ip bgp

BGP table version is 9, local router ID is 3.3.3.3

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

Implicit Withdraw:              0          7
Explicit Withdraw:              0          0

Next, we will stop advertising network 1.1.1.0/24 from R1 a bellow –

R1(config-router)#router bgp 1
R1(config-router)#no network 1.1.1.0 mask 255.255.255.0
The corresponding change will be reflected in “show ip bgp” command output on R3 –

R3#sh ip bgp

BGP table version is 10, local router ID is 3.3.3.3

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

Implicit Withdraw:              0          7
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.

Share this:
Advertisements

Related Posts

About The Author

Add Comment

Social Media Auto Publish Powered By : XYZScripts.com