Configure an AS Number for a Non-default VRF

The Autonomous System (AS) number configured on the global Virtual Routing Forwarding (VRF) instance, called the GlobalRouter (GRT), is inherited by all user-created VRFs by default, however, you can override the AS number for the specific VRF instance using the following procedure.

Before you begin

  • Disable BGP synchronization.

Procedure

  1. Enter VRF Router Configuration mode for a specific VRF context:

    enable

    configure terminal

    router vrf WORD<1-16>

  2. Set the AS number:

    ip bgp vrf-as WORD<0-11>

Example

Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#router vrf vrfred
Switch:1(router-vrf)#ip bgp vrf-as 3

Variable Definitions

The following table defines parameters for the ip bgp vrf-as command.

Variable

Value

WORD<0-11>
Configures the local autonomous system (AS) number for the specific VRF instance. You cannot change local-as when BGP is set to enable.
  • To configure a 2-byte local AS number, enter a local-as number in the range of 0 to 65535.

  • To configure a 4-byte local-as number, enable the 4-byte as variable and enter a number in the range of 0 to 4294967295.

Note:

If as-4-byte is configured to false, the range for AS number is 0–65535 and if as-4-byte is configured to true, the range is 0–4294967295.

If you enable as-dot, enter the AS number in octets in the range of 1.0 to 65535.65535.

The AS number in a specific VRF instance inherits the AS number in the GlobalRouter in the following instances:

  • Configuring the AS number in a specific VRF instance to 0 (ip bgp vrf-as 0) .

  • Deleting the AS number in a specific VRF instance (no ip bgp vrf-as or default ip bgp vrf-as.