Saturday, March 2, 2024

Cisco BGP neighbor shutdown Command

To administratively shutdown a BGP neighbor in a Cisco router, issue a neighbor <BGP PEER IP> shutdown command under the BGP routing process. This will stop the BGP route exchange with the BGP neighbor/peer and it's often useful when performing a maintenance such as policy change with the peer/upstream ISP.

R1#show run | sec router bgp

router bgp 64001

 bgp router-id 62.19.10.15

 bgp log-neighbor-changes

 no bgp default ipv4-unicast

 neighbor 62.19.10.16 remote-as 700

 neighbor 62.19.10.16 description ISP

 neighbor 62.19.10.16 password cisco123

 neighbor 62.19.10.16 update-source GigabitEthernet0/0

 neighbor 62.19.10.16 version 4

 

<OUTPUT TRUNCATED>

 

 

R1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

R1(config-router)#neighbor 62.19.10.16 ?

  ao                         TCP-AO authentication

  bmp-activate               Activate the BMP monitoring for a BGP peer

  cluster-id                 Configure Route-Reflector Cluster-id (peers may reset)

  description                Neighbor specific description

  disable-connected-check    one-hop away EBGP peer using loopback address

  dont-capability-negotiate  Send Capability parameters in Open

  ebgp-multihop              Allow EBGP neighbors not on directly connected networks

  fall-over                  session fall on peer route lost

  ha-mode                    high availability mode

  inherit                    Inherit a template

  local-as                   Specify a local-as number

  log-neighbor-changes       Log neighbor up/down and reset reason

  password                   Set a password

  path-attribute             BGP optional attribute filtering

  peer-group                 Member of the peer-group

  remote-as                  Specify a BGP neighbor

  shutdown                   Administratively shut down this neighbor

  timers                     BGP per neighbor timers

  transport                  Transport options

  ttl-security               BGP ttl security check

  update                     Modify update processing

  update-source              Source of routing updates

  version                    Set the BGP version to match a neighbor

 

R1(config-router)#neighbor 62.19.10.16 shutdown

R1(config-router)#end

 

R1#show run | sec router bgp

router bgp 64001

 bgp router-id 62.19.10.15

 bgp log-neighbor-changes

 no bgp default ipv4-unicast

 neighbor 62.19.10.16 remote-as 700

 neighbor 62.19.10.16 description ISP

 neighbor 62.19.10.16 shutdown

 neighbor 62.19.10.16 password cisco123

 neighbor 62.19.10.16 update-source GigabitEthernet0/0

 neighbor 62.19.10.16 version 4

 

<OUTPUT TRUNCATED>

 

 

R1#show ip bgp summary

BGP router identifier 62.19.10.15, local AS number 64001

BGP table version is 394500023, main routing table version 394500023

860025 network entries using 213286200 bytes of memory

1720036 path entries using 233924896 bytes of memory

431848/148584 BGP path/bestpath attribute entries using 120917440 bytes of memory

240343 BGP AS-PATH entries using 11369538 bytes of memory

25898 BGP community entries using 3703042 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

BGP using 583201116 total bytes of memory

BGP activity 19138181/18274056 prefixes, 156266333/154546297 paths, scan interval 60 secs

 

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

62.19.10.16     4          700       0       0        1    0    0 00:00:28 Idle (Admin)

 

 

R1#show ip bgp neighbor 62.19.10.16

BGP neighbor is 62.19.10.16,  remote AS 700, external link

 Description: ISP

 Administratively shut down

  BGP version 4, remote router ID 0.0.0.0

  BGP state = Idle, down for 00:00:43

  Neighbor sessions:

    0 active, is not multisession capable (disabled)

    Stateful switchover support enabled: NO

  Do log neighbor state changes (via global configuration)

  Default minimum time between advertisement runs is 30 seconds

 

<OUTPUT TRUNCATED>

 

 

To re-enable the BGP neighbor, just use the 'no' form of the said command.

 

R1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)#router bgp 64001

R1(config-router)#no neighbor 62.19.10.16 shutdown

R1(config-router)#end

 

R1#show run | sec router bgp

router bgp 64001

 bgp router-id 62.19.10.15

 bgp log-neighbor-changes

 no bgp default ipv4-unicast

 neighbor 62.19.10.16 remote-as 700

 neighbor 62.19.10.16 description ISP

 neighbor 62.19.10.16 password cisco123

 neighbor 62.19.10.16 update-source GigabitEthernet0/0

 neighbor 62.19.10.16 version 4

 <OUTPUT TRUNCATED>