|
Command or Action |
Purpose |
|
enable
Example:
Router> enable
|
Enables privileged EXEC mode.
-
Enter your password if prompted.
|
|
configure terminal
Example:
Router# configure terminal
|
Enters global configuration mode. |
|
router bgp autonomous-system-number
Example:
Router(config)# router bgp 45000
|
Enters router configuration mode and creates a BGP routing process. |
|
template peer-session session-template-name
Example:
Router(config-router)# template peer-session S1
|
Enters session-template configuration mode and creates a peer session template.
-
In this example, a peer session template named S1 is created.
|
|
ha-mode graceful-restart [disable]
Example:
Router(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.
|
|
exit-peer-session
Example:
Router(config-router-stmp)# exit-peer-session
|
Exits session-template configuration mode and returns to router configuration mode. |
|
template peer-session session-template-name
Example:
Router(config-router)# template peer-session S2
|
Enters session-template configuration mode and creates a peer session template.
-
In this example, a peer session template named S2 is created.
|
|
ha-mode graceful-restart [disable]
Example:
Router(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.
|
|
exit-peer-session
Example:
Router(config-router-stmp)# exit-peer-session
|
Exits session-template configuration mode and returns to router configuration mode. |
|
bgp log-neighbor-changes
Example:
Router(config-router)# bgp log-neighbor-changes
|
Enables logging of BGP neighbor status changes (up or down) and neighbor resets.
-
Use this command for troubleshooting network connectivity problems and measuring network stability. Unexpected neighbor resets might indicate high error rates or high packet loss in the network and should be investigated.
|
|
neighbor ip-address remote-as autonomous-system-number
Example:
Router(config-router)# neighbor 192.168.1.2 remote-as 40000
|
Configures peering with a BGP neighbor in the specified autonomous system.
-
In this example, the BGP peer at 192.168.1.2 is an external BGP peer because it has a different autonomous system number from the router where the BGP configuration is being entered (see Step 3).
|
|
neighbor ip-address inherit peer-session session-template-number
Example:
Router(config-router)# neighbor 192.168.1.2 inherit peer-session S1
|
Inherits a peer session template.
-
In this example, the peer session template named S1 is inherited, and the neighbor inherits the enabling of BGP graceful restart.
|
|
neighbor ip-address remote-as autonomous-system-number
Example:
Router(config-router)# neighbor 192.168.3.2 remote-as 50000
|
Configures peering with a BGP neighbor in the specified autonomous system.
-
In this example, the BGP peer at 192.168.3.2 is an external BGP peer because it has a different autonomous system number from the router where the BGP configuration is being entered (see Step 3).
|
|
neighbor ip-address inherit peer-session session-template-number
Example:
Router(config-router)# neighbor 192.168.3.2 inherit peer-session S2
|
Inherits a peer session-template.
-
In this example, the peer session template named S2 is inherited, and the neighbor inherits the disabling of BGP graceful restart.
|
|
end
Example:
Router(config-router)# end
|
Exits router configuration mode and enters privileged EXEC mode. |
|
show ip bgp template peer-session [session-template-number]
Example:
Router# show ip bgp template peer-session
|
(Optional) Displays locally configured peer session templates.
-
The output can be filtered to display a single peer policy template with the session-template-name argument. This command also supports all standard output modifiers.
|
|
show ip bgp neighbors [ip-address [received-routes | routes | advertised-routes | paths [regexp] | dampened-routes | flap-statistics| received prefix-filter| policy[detail]]]
Example:
Router# 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.
|