BGP Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Release

PDF

BGP address family configuration and behavior

Want to summarize with AI?

Log in

Overview

Explains the configuration and operational behaviors of BGP address families, supporting users in managing multi-protocol BGP environments effectively.

BGP supports multiple address families, such as IPv4 and IPv6, each of which must be explicitly enabled and configured. Proper address family configuration ensures correct routing behavior for various protocol families.

No default address family in BGP

  • You must explicitly configure each required address family at the BGP router level for it to be active.

  • To activate a BGP session for a neighbor under a specific address family, you must configure that address family under both the router and the neighbor configuration.

  • You can configure a neighbor without any address family, but cannot configure an address family under a neighbor unless that address family is present at the global BGP router level.

Key Point:

No address family is enabled by default in BGP. Every address family must be explicitly defined both at the global router level and under the neighbor if required.

Neighbor address family combinations

  • Default VRF

    In the default VRF, you can configure both:

    • IPv4 unicast

    • IPv4 labeled-unicast

    Both address families are supported and can be enabled under the same neighbor.

  • Non-default VRF

    In non-default VRFs, configuring both IPv4 unicast and IPv4 labeled-unicast address families under the same neighbor is not supported.

    The router allows the configuration but displays this error:

    Router: %ROUTING-BGP-4-INCOMPATIBLE_AFI : IPv4 Unicast and IPv4 Labeled-unicast Address families together are not supported under the same neighbor.

    If both address families are present in a BGP session for a neighbor in a non-default VRF, behavior becomes unpredictable, which can result in:

    • Incorrect advertisement of prefixes

    • Reachability issues

Tip

To avoid reachability issues, explicitly configure a route policy to advertise prefixes only through either IPv4 unicast or IPv4 labeled-unicast address families, not both.

Default address family for show commands

Many BGP operational (show) commands allow specifying the Address Family Identifier (AFI) and Subsequent Address Family Identifier (SAFI).

For protocol definitions, see RFC 1700 and RFC 2858.

Setting default AFI and SAFI

In Cisco IOS XR, you can define default AFI and SAFI values for parser commands, eliminating the need to specify them repeatedly.

Parser commands to set defaults:

  • set default-afi { ipv4 | ipv6 | all }

  • set default-safi { unicast | multicast | all }

Default values:

  • AFI: ipv4

  • SAFI: unicast

    To change these defaults, you must use the parser commands.

Note

If you specify an AFI or SAFI in a show command, those supplied values override any parser defaults.

Checking current AFI or SAFI defaults

Use the show default-afi-safi-vrf command to view the current default AFI and SAFI settings.