address-family (BGP)
To enter various address family configuration modes while configuring Border Gateway Protocol (BGP), use the address-family command in an appropriate configuration mode. To disable support for an address family, use the no form of this command.
address-family { ipv4 unicast | ipv4 multicast | ipv4 labeled-unicast | ipv4 tunnel | vpnv4 unicast }
no address-family { ipv4 unicast | ipv4 multicast | ipv4 labeled-unicast | ipv4 tunnel | vpnv4 unicast }
Syntax Description
ipv4 unicast |
Specifies IP Version 4 (IPv4) unicast address prefixes. |
ipv4 multicast |
Specifies IPv4 multicast address prefixes. |
ipv4 labeled-unicast |
Specifies IPv4 labeled-unicast address prefixes. This option is available in IPv4 neighbor configuration mode and VRF neighbor configuration mode. |
ipv4 tunnel |
Specifies IPv4 tunnel address prefixes. |
vpnv4 unicast |
Specifies VPN Version 4 (VPNv4) unicast address prefixes. This option is not available in VRF or VRF neighbor configuration mode. |
Command Default
An address family must be explicitly configured in the router configuration mode for the address family to be active in BGP. Similarly, an address family must be configured under the neighbor for the BGP session to be established for that address family. An address family must be configured in router configuration mode before it can be configured under a neighbor.
Command Modes
Router configuration
Neighbor configuration
Neighbor group configuration
VRF configuration
VRF neighbor configuration (IPv4 address families)
Command History
Release |
Modification |
---|---|
Release 6.1.42 |
This command was introduced. |
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the address-family command to enter various address family configuration modes while configuring BGP routing sessions. When you enter the address-family command from router configuration mode, you enable the address family and enter global address family configuration mode.
The IPv4 unicast address family must be configured in router configuration mode before configuring the IPv4 labeled-unicast address family for a neighbor in neighbor configuration mode.
Address Family |
Supported in Router Submode |
Supported in Neighbor Submode |
Comments |
ipv4 unicast |
Yes |
Yes |
- |
ipv4 multicast |
Yes |
Yes |
- |
ipv4 tunnel |
Yes |
Yes |
- |
ipv4 labeled-unicast |
Yes |
Yes |
The ipv4 labeled-unicast address family can be configured only as a neighbor address family;however, the ipv4 unicast address family must be configured as the router address family first. |
vpnv4 unicast |
Yes |
Yes |
- |
When you enter the address-family command from neighbor configuration mode, you activate the address family on the neighbor and enter neighbor address family configuration mode.
IPv4 neighbor sessions support IPv4 unicast, multicast, labeled-unicast, and VPNv4 unicast address families.
Task ID
Task ID |
Operations |
---|---|
bgp |
read, write |
Examples
The following example shows how to place the router in global address family configuration mode for the IPv4 address family:
RP/0/RP0:hostname# configure
RP/0/RP0:hostname(config)# router bgp 100
RP/0/RP0:hostname(config-bgp)# address-family ipv4 unicast
RP/0/RP0:hostname(config-bgp-af)#
RP/0/RP0:hostname# configure
RP/0/RP0:hostname# router bgp 1
RP/0/RP0:hostname(config-bgp)# address-family ipv4 multicast
RP/0/RP0:hostname(config-bgp-af)# exit
RP/0/RP0:hostname(config-bgp)# neighbor 10.0.0.1
RP/0/RP0:hostname(config-bgp-nbr)# remote-as 1
RP/0/RP0:hostname(config-bgp-nbr)# address-family ipv4 multicast
RP/0/RP0:hostname(config-bgp-nbr-af)#