Create a VRF Instance
About this task
Create a VRF instance to provide a virtual routing interface.
For information on route scaling, see VOSS Release Notes.
Note
You cannot configure BGP, OSPF, or RIP on a VRF instance unless you first configure the routing protocol trigger.
Procedure
Examples
Create a VRF instance:
Switch:1>enable Switch:1#configure terminal Switch:1(config)#ip vrf vrfRED
Configure the maximum number of IPv4 routes and enable max-routes traps.
Switch:1(config)#ip vrf vrfRED max-routes 12000 Switch:1(config)#ip vrf vrfRED max-routes-trap enable
Enter Router Configuration mode and configure the routing protocol triggers for the VRF:
Switch:1(config)#router vrf vrfRED Switch:1(router-vrf)#ip bgp Switch:1(router-vrf)#ip ospf Switch:1(router-vrf)#ip rip
To Configure OSPFv3 instance for the VRF:
Switch:1(config)#router vrf vrfRED Switch:1(router-vrf)#ipv6 ospf
Exit to Global configuration mode:
Switch:1(router-vrf)#exit
Configure the maximum number of IPv6 routes and enable IPv6 max-routes traps.
Switch:1(config)#ip vrf vrfRED ipv6-max-routes 7700 Switch:1(config)#ip vrf vrfRED ipv6-max-routes-trap enable
Ensure that the instance is configured correctly:
Switch:1#show ip vrf vrfRED ============================================================================================================== VRF INFORMATION ============================================================================================================== VRF VLAN ARP RIP OSPF BGP PIM NBRv6 RIPng OSPFv3 PIM6 COUNT COUNT COUNT COUNT COUNT COUNT COUNT COUNT COUNT COUNT COUNT -------------------------------------------------------------------------------------------------------------- 2 5 0 1 1 1 1 0 1 1 1 VRF VRF VLAN ARP NBRv6 VRF NAME ID COUNT COUNT RIP OSPF BGP PIM COUNT RIPng OSPFv3 PIM6 ACTIVE ORIGIN -------------------------------------------------------------------------------------------------------------- vrfRED 1 0 0 TRUE TRUE TRUE TRUE 0 FALSE FALSE TRUE TRUE CONFIG 1 out of 2 Total Num of VRF Entries displayed.
View the VRF configuration on the switch:
Switch:1#show ip vrf ====================================================================================================================== VRF INFORMATION ====================================================================================================================== VRF VLAN ARP RIP OSPF BGP PIM NBRv6 RIPng OSPFv3 PIM6 COUNT COUNT COUNT COUNT COUNT COUNT COUNT COUNT COUNT COUNT COUNT ---------------------------------------------------------------------------------------------------------------------- 3 9 1 1 2 1 1 0 1 2 1 VRF VRF VLAN ARP NBRv6 UNICAST VRF NAME ID COUNT COUNT RIP OSPF BGP PIM COUNT RIPng OSPFv3 PIM6 ACTIVE ORIGIN ----------------------------------------------------------------------------------------------------------------------- GlobalRouter 0 7 1 TRUE TRUE TRUE TRUE 0 TRUE TRUE TRUE TRUE DYNAMIC l3vsn-100 1 1 0 FALSE TRUE FALSE FALSE 0 FALSE TRUE FALSE TRUE DYNAMIC vrfred 1 0 0 TRUE TRUE TRUE TRUE 0 FALSE FALSE TRUE TRUE CONFIG ospf 3 2 6 FALSE TRUE FALSE FALSE 0 FALSE FALSE FALSE TRUE CONFIG sd-wan 511 1 3 FALSE FALSE FALSE FALSE 0 FALSE FALSE FALSE FALSE DYNAMIC MgmtRouter 512 1 0 FALSE FALSE FALSE FALSE 0 FALSE FALSE FALSE TRUE DYNAMIC 6 out of 6 Total Num of VRF Entries displayed.
Variable Definitions
The following table defines parameters for the ip vrf command.
Variable |
Value |
---|---|
Depending on your hardware platform: max-routes <max-routes> |
Specifies the maximum number of IPv4 routes for the VRF. Depending on the hardware platform, the parameter range and default value can vary. Use the CLI Help to see the available range for the switch. For route scaling information, see VOSS Release Notes. |
ipv6-max-routes <max-routes> |
Specifies the maximum number of IPv6 routes for the VRF. Depending on the hardware platform, the parameter range and default value can vary. Use the CLI Help to see the available range for the switch. For route scaling information, see VOSS Release Notes. |
max-routes-trap enable |
Enables SNMP traps after the maximum number of IPv4 routes are reached. |
ipv6-max-routes-trap enable |
Enables SNMP trap generation based on the configured number of maximum IPv6 routes. The default is enabled. |
name WORD<0-16> |
Renames the VRF instance. |
vrf-trap |
Enables the device to send VRF-related traps. |
The following table defines parameters for the show ip vrf command.
Variable |
Value |
---|---|
max-routes [vrfids WORD<0-512>] [WORD <1–16>] |
Displays the maximum number of routes for the specified VRFs.
|
vrfids WORD<0-512> |
Specifies a list of VRFs by VRF IDs. |
WORD<1-16> |
Specifies a VRF by name. |