Explains the specific submodes used for BGP neighbor configuration, illustrating how different operational contexts can impact neighbor relationships and parameter settings.
BGP neighbor configuration in Cisco IOS XR uses submodes to simplify and organize neighbor and address-family specific settings. Each submode determines the command scope and reduces repetitive command syntax for efficient configuration.
Neighbor submode
Neighbor submode allows you to configure attributes for a specific BGP neighbor without prefixing each command with the neighbor keyword.
You can enter neighbor submode by using the neighbor ip-address command in BGP configuration mode.
Benefit:
Streamlines configuration by targeting a single neighbor, reducing command repetition.
Router(config-bgp)# neighbor 192.23.1.2
Router(config-bgp-nbr)# remote-as 2002
Router(config-bgp-nbr)# address-family ipv4 unicast
Address-family submode
Address-family submode, accessed within neighbor submode, enables you to configure address-family-specific settings, such as IPv4 or IPv6 unicast, for a selected neighbor.
You can enter address-family submode for a specific neighbor by using the address-family <afi> <safi> command within neighbor submode.
Benefit:
Groups configuration by address family, minimizes command repetition, and clarifies parameter application.
Router(config-bgp)# neighbor 2002::2
Router(config-bgp-nbr)# remote-as 2023
Router(config-bgp-nbr)# address-family ipv6 unicast
Router(config-bgp-nbr-af)# next-hop-self
Router(config-bgp-nbr-af)# route-policy one in
Commands entered in a submode automatically apply to the appropriate neighbor and address-family context.
Leaving a submode returns you to the higher-level mode, and changes only apply within the current submode context.