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 Fabric Engine 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 does not apply 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>]

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                             
NAME                       ID   COUNT  COUNT  RIP    OSPF   BGP    PIM    COUNT  RIPng  OSPFv3 PIM6   ACTIVE
--------------------------------------------------------------------------------------------------------------
vrfRED                     1    0      0      TRUE   TRUE  TRUE   TRUE    0      FALSE  FALSE  TRUE  TRUE  

1 out of 2 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>

Note:

Exception: not supported on 5320-16P-4XE, 5320-16P-4XE-DC, 5320-24P-8XE, or 5320-24T-8XE.

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 Fabric Engine Release Notes.

ipv6-max-routes <max-routes>

Note:

Exception: not supported on 5320-16P-4XE, 5320-16P-4XE-DC, 5320-24P-8XE, or 5320-24T-8XE.

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 Fabric Engine 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.