Configuring a VRF instance

Do the following to configure a VRF instance.

About this task

A device can be configured with more than one VRF instance. You should define each VRF instance before assigning the VRF to a Layer 3 interface. The range of the instance name is from 1 through 255 alphanumeric characters. An optional router ID can also be assigned.

Use the address-family command in VRF configuration mode to specify an IPv4 or IPv6 address family. For a specific address family you can also configure static route, static ARP, and static route, IPv6 neighbor, and multicast for IPv6.

Important

Important

Using the overwrite option while downloading a configuration from a TFTP server to the running-config will lead to the loss of all VRF configurations when a VRF is configured on a routing interface.

Procedure

  1. Enter global configuration mode and create a VRF instance.
    device# configure terminal
    device(config)# vrf corporate
    device(config-vrf-corporate)# 
  2. (Optional) Assign a router ID.
    device(config-vrf-corporate)# ip router-id 1.1.1.1
  3. Use the address-family unicast (VRF) command to configure an address family on the VRF and exit. This example uses IPv4.
    device(config-vrf-corporate)# address-family ipv4 unicast
    device(config-vrf-corporate-ipv4)# exit 
  4. Verify the configuration.
    device(config-vrf-corporate)# do show vrf
    Total number of VRFs configured: 4
    VrfName                          VrfId  V4-Ucast  V6-Ucast  
    corporate                        3      Enabled   Disabled  
    default-vrf                      1      Enabled   Enabled  
    mgmt-vrf                         0      Enabled   Enabled  
    test1                            2      Enabled   Enabled