Configuring a VRF instance
Do the following to configure a VRF instance.
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. Each VRF instance is identified by a unique Route Distinguisher (RD), which is prepended to the address being advertised. Because the RD provides overlapping client address space with a unique identifier, the same IP address can be used for different VRFs without conflict. The RD can be an AS number, followed by a colon (:) and a unique arbitrary number as shown below. Alternatively, it can be a local IP address followed by a colon (:) and a unique arbitrary number, as in "18.104.22.168:100." 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, IGMP, and multicast for IPv4, and static route, IPv6 neighbor, and multicast for IPv6.
Create a VRF instance.
device(config)# vrf corporate
Assign a Route Distinguisher (RD).
device(config-vrf-corporate)# rd 11:11
(Optional) Assign a router ID.
device(config-vrf-corporate)# ip router-id 22.214.171.124
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
Verify the configuration.
device(config-vrf-corporate)# show vrf Total number of VRFs configured: 2 Status Codes - A:active, D:pending deletion, I:inactive Name Default RD vrf|v4|v6 Routes Interfaces corporate 11:11 A | A| I 0 guest 10:10 A | A| I 0 Total number of IPv4 unicast route for all non-default VRF is 0 Total number of IPv6 unicast route for all non-default VRF is 0