Step 1 |
enable
Example:
|
Enables privileged EXEC mode.
|
Step 2 |
configure
terminal
Example:
Device# configure terminal
|
Enters global configuration mode.
|
Step 3 |
router
bgp
autonomous-system-number
Example:
Device(config)# router bgp 45000
|
Enters router configuration mode and creates a BGP routing process.
|
Step 4 |
template
peer-session
session-template-name
Example:
Device(config-router)# template peer-session S1
|
Enters session-template configuration mode and creates a peer session template.
|
Step 5 |
ha-mode
graceful-restart
[disable]
Example:
Device(config-router-stmp)# ha-mode graceful-restart
|
Enables the BGP graceful restart capability and BGP NSF awareness.
Use the
disable keyword to disable BGP graceful restart capability.
If you enter this command after the BGP session has been established, you must restart the session in order for the capability to be exchanged with the BGP neighbor.
In this example, the BGP graceful restart capability is enabled for the peer session template named S1.
|
Step 6 |
exit-peer-session
Example:
Device(config-router-stmp)# exit-peer-session
|
Exits session-template configuration mode and returns to router configuration mode.
|
Step 7 |
template
peer-session
session-template-name
Example:
Device(config-router)# template peer-session S2
|
Enters session-template configuration mode and creates a peer session template.
|
Step 8 |
ha-mode
graceful-restart
[disable]
Example:
Device(config-router-stmp)# ha-mode graceful-restart disable
|
Enables the BGP graceful restart capability and BGP NSF awareness.
Use the
disable keyword to disable BGP graceful restart capability.
If you enter this command after the BGP session has been established, you must restart the session in order for the capability to be exchanged with the BGP neighbor.
In this example, the BGP graceful restart capability is disabled for the peer session template named S2.
|
Step 9 |
exit-peer-session
Example:
Device(config-router-stmp)# exit-peer-session
|
Exits session-template configuration mode and returns to router configuration mode.
|
Step 10 |
bgp
log-neighbor-changes
Example:
Device(config-router)# bgp log-neighbor-changes
|
Enables logging of BGP neighbor status changes (up or down) and neighbor resets.
|
Step 11 |
neighbor
ip-address
remote-as
autonomous-system-number
Example:
Device(config-router)# neighbor 192.168.1.2 remote-as 40000
|
Configures peering with a BGP neighbor in the specified autonomous system.
|
Step 12 |
neighbor
ip-address
inherit
peer-session
session-template-number
Example:
Device(config-router)# neighbor 192.168.1.2 inherit peer-session S1
|
Inherits a peer session template.
|
Step 13 |
neighbor
ip-address
remote-as
autonomous-system-number
Example:
Device(config-router)# neighbor 192.168.3.2 remote-as 50000
|
Configures peering with a BGP neighbor in the specified autonomous system.
|
Step 14 |
neighbor
ip-address
inherit
peer-session
session-template-number
Example:
Device(config-router)# neighbor 192.168.3.2 inherit peer-session S2
|
Inherits a peer session-template.
|
Step 15 |
end
Example:
Device(config-router)# end
|
Exits router configuration mode and enters privileged EXEC mode.
|
Step 16 |
show
ip
bgp
template
peer-session
[session-template-number]
Example:
Device# show ip bgp template peer-session
|
(Optional) Displays locally configured peer session templates.
|
Step 17 |
show
ip
bgp
neighbors
[ip-address
[received-routes |
routes |
advertised-routes |
paths [regexp] |
dampened-routes |
flap-statistics |
received
prefix-filter |
policy [detail]]]
Example:
Device# show ip bgp neighbors 192.168.1.2
|
(Optional) Displays information about TCP and BGP connections to neighbors.
“Graceful Restart Capability: advertised” will be displayed for each neighbor that has exchanged graceful restart capabilities with this router.
In this example, the output is filtered to display information about the BGP peer at 192.168.1.2.
|