Create a VRF Instance

About this task

Create a VRF instance to provide a virtual routing interface for a user.

For more information on route scaling, see VSP 8600 Release Notes.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Create a VRF instance and specify a VRF name:

    ip vrf WORD<1–16>

  3. Configure the maximum number of routes:
    • For IPv4:

      ip vrf WORD<1–16> max-routes <max-routes>

    • For IPv6:

      ip vrf WORD<1–16> ipv6-max-routes <max-routes>

  4. Enable max-routes traps:
    • For IPv4:

      ip vrf WORD<1–16> max-routes-trap enable

    • For IPv6:

      ip vrf WORD<1–16> ipv6-max-routes-trap enable

      Note

      Note

      The maximum number of IPv6 routes for the Global Router are fixed and cannot be changed.

  5. Enter VRF Router Configuration mode:

    router vrf WORD<1–16>

  6. Configure the IP routing protocol triggers for the VRF:

    Use one of the following commands on your switch:

    • ip bgp

      ip bgp creates both ipv4 and ipv6 instances.

    • ip ospf

      Use ipv6 ospf to create an OSPFv3 instance.

    • ip rip

      RIPng is not virtualized, hence the IPv6 configuration is not applicable here.

    Note

    Note

    You cannot configure BGP, OSPF, or RIP on a VRF instance unless you first configure the routing protocol trigger.

  7. Ensure that the instance is configured correctly:

    show ip vrf WORD<1–16>

Example

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        OSPF       RIP        BGP        PIM        ARP        PIM6        OSPFv3
COUNT      COUNT      COUNT      COUNT      COUNT      COUNT      COUNT       COUNT 
-----------------------------------------------------------------------------------------
1          1          1          1          1          7          1           1

VRF           VRF                                  VLAN    ARP                
NAME          ID   OSPF    RIP     BGP     PIM     COUNT   COUNT   PIM6       OSPFv3
-----------------------------------------------------------------------------------------
vrfRED        3    TRUE    TRUE    TRUE    TRUE    0       7       TRUE       FALSE

1 out of 1 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 VSP 8600 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 VSP 8600 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.

vrfids WORD<0-512>

Specifies a list of VRFs by VRF IDs.

WORD<1-16>

Specifies a VRF by name.