16.1. VRF Commands

16.1.1. ip vrf

Command Purpose

To configure a VPN routing and forwarding (VRF) routing table, use the ip vrf command in Global Config mode. To remove a VRF routing table, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ip vrf VRF-NAME

no ip vrf VRF-NAME

Parameter

Parameter Description

Parameter Value

VRF-NAME

VPN Routing/Forwarding instance name

Up to 15 characters

Command Mode

Global Config

Default

None

Usage

None

Examples

Switch# configure terminal
Switch(config)# ip vrf ComA
Switch(config-vrf)# route-target both 100:2
Switch(config-vrf)# route-target import 200:1

16.1.2. show ip vrf

Command Purpose

To show the set of defined VRFs and assocaited interfaces, use the show ip vrf command in Privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show ip vrf ( bgp ( brief | detail ) | interfaces | ospf | rip | VRF-NAME | )

Parameter

Parameter Description

Parameter Value

bgp

Border Gateway Protocol (BGP)

-

brief

Brief VPN Routing/Forwarding instance information

-

detail

Detailed VPN Routing/Forwarding instance information

-

interfaces

Show VPN Routing/Forwarding interface information

-

ospf

Open Shortest Path First (OSPF)

-

rip

Routing Information Protocol (RIP)

-

VRF-NAME

VPN Routing/Forwarding instance name

Up to 15 characters

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

Switch# show ip vrf

Related Commands

None

16.1.3. ip vrf forwarding

Command Purpose

To associate a VPN routing and forwarding (VRF) instance with an Layer3 interface, use the ip vrf forwarding command in interface configuration mode. To disassociate a VRF, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ip vrf forwarding VRF-NAME

no ip vrf forwarding

Parameter

Parameter Description

Parameter Value

VRF-NAME

VPN Routing/Forwarding instance name

Up to 15 characters

Command Mode

Interface Configuration

Default

None

Usage

Executing this command on an interface removes the IP address on this interface, The IP address should be reconfigured.

Examples

Switch# configure terminal
Switch(config)# ip vrf ComA
Switch(config-vrf)# exit
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# ip vrf forwarding ComA

Related Commands

ip vrf

ip route vrf

16.1.4. ip route vrf

Command Purpose

To establish static routes for a VPN routing and forwarding (VRF) instance, use the ip route vrf command in Global Config mode. To remove static routes, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ip route vrf VRF-NAME ( PREFIX MASK | PREFIX/PREFIX-LENGTH ) ( NH-ADDRESS ( public | ) | vrf VRF-NAME NH-ADDRESS | IFNAME | REMOTE-VTEP ) ( DISTANCE | ) ( bind bfd BFD-NAME | track NUMBER | )

no ip route vrf VRF-NAME ( PREFIX MASK | PREFIX/PREFIX-LENGTH ) ( NH-ADDRESS ( public | ) | vrf VRF-NAME NH-ADDRESS | IFNAME | REMOTE-VTEP | ) ( bind bfd | track | )

Parameter

Parameter Description

Parameter Value

VRF-NAME

VPN Routing/Forwarding instance name

Up to 15 characters

PREFIX

IP route prefix for the destination

IPv4 address

MASK

Prefix mask for the destination

Mask in IPv4 address format

PREFIX-LENGTH

Prefix length for the destination

1-32

NH-ADDRESS

IP address of the next hop that can be used to reach that network

IPv4 address

IFNAME

Interface name of the next hop that can be used to reach that network

Only support tunnel and null interface

REMOTE-VTEP

Overlay tunnel of the next hop that can be used to reach that network.

remote-vtep index

DISTANCE

(Optional) An administrative distance. The default administrative distance for a static route is 1

1-255

BFD-NAME

Specify the name of bfd

A string up to 16 characters

NUMBER

Specify the ID of track object

1-500

Command Mode

Global Config

Default

None

Usage

None

Examples

Switch# configure terminal
Switch(config)# ip route vrf VPN-NAME 2.2.2.0/24 1.1.1.2

Related Commands

show ip route vrf

16.1.5. arp vrf

Command Purpose

To add a permanent entry in the Address Resolution Protocol (ARP) cache for VRF, use the arp vrf command in Global Config mode. To remove an entry from VRF ARP cache, enter the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

arp vrf VRF_NAME IP_ADDR MAC

no arp vrf VRF_NAME IP_ADDR

Parameter

Parameter Description

Parameter Value

VRF-NAME

VPN Routing/Forwarding instance name

Up to 15 characters

IP_ADDR

IP address of the ARP entry

IPv4 Address

MAC

Hardware address of the ARP entry in HHHH.HHHH.HHHH format

MAC Address

Command Mode

Global Config

Default

None

Usage

None

Examples

Switch# configure terminal
Switch(config)# arp vrf vpn3 1.1.1.1 0000.1111.2222

Related Commands

show ip arp vrf VRF-NAME

clear ip arp vrf VRF-NAME A.B.C.D

16.1.6. show ip arp vrf

Command Purpose

Use this command to show arp entry in VRF instance.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show ip arp vrf VRF-NAME

Parameter

Parameter Description

Parameter Value

VRF-NAME

VPN Routing/Forwarding instance name

Up to 15 characters

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

This example shows how to display all arp entry in the arp table of the VRF:

Switch# show ip arp vrf ComA
 

 Protocol    Address          Age (min)  Hardware Addr   Interface 
 Internet    1.1.1.1                 -   0000.1111.2222 

Related Commands

arp vrf

16.1.7. clear ip arp vrf

Command Purpose

Use this command to refresh a specific dynamic ARP entry from ARP cache for the VRF.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

clear ip arp vrf VRF-NAME IP_ADDR

Parameter

Parameter Description

Parameter Value

VRF-NAME

VPN Routing/Forwarding instance name

Up to 15 characters

IP_ADDR

Dynamic learned ARP entry IP address

IPv4 Address

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

This example shows how to refresh a dynamic arp entry in VRF.:

Switch# clear ip arp vrf ComA 1.1.1.1

Related Commands

arp vrf

16.1.8. ping vrf

Command Purpose

Use this command to ping address in VRF.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ping vrf VRF-NAME IPV4_HOST

Parameter

Parameter Description

Parameter Value

VRF-NAME

VPN Routing/Forwarding instance name

-

IPV4_HOST

Ping destination address or hostname

IPv4 Address or host name string

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

Switch# ping vrf vpn 1.1.1.1

PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=0 ttl=64 time=0.114 ms
64 bytes from 1.1.1.1: icmp_seq=1 ttl=64 time=0.087 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=64 time=0.087 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=64 time=0.097 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=64 time=0.133 ms
--- 1.1.1.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4041ms
rtt min/avg/max/mdev = 0.087/0.103/0.133/0.020 ms, pipe 2

Related Commands

None

16.1.9. traceroute vrf

Command Purpose

Use this command to trace route in VRF.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

traceroute vrf VRF-NAME IPV4_HOST

Parameter

Parameter Description

Parameter Value

VRF-NAME

VPN Routing/Forwarding instance name

Up to 15 characters

WORD

Trace route destination address or hostname

IPv4 Address or host name string

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

Switch# traceroute vrf vpn 1.1.1.1

traceroute to 1.1.1.1 (1.1.1.1), 30 hops max, 38 byte packets
 1  1.1.1.1 (1.1.1.1)  0.222 ms  0.169 ms  0.169 ms

Related Commands

None

16.1.10. telnet vrf

Command Purpose

Use this command to telnet in VRF.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

telnet vrf VRF-NAME WORD

Parameter

Parameter Description

Parameter Value

VRF-NAME

VPN Routing/Forwarding instance name

Up to 15 characters

WORD

The destination address or hostname for telnet

-

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

Switch# telnet vrf vpn 9.9.9.2

Trying 9.9.9.2...
Connected to 9.9.9.2.
Escape character is '^]'.
Fedora Core release 4 (Stentz)
Kernel 2.6.32.23 on an i686
login: root
Password:

Related Commands

None

16.1.11. rd

Command Purpose

Use this command to set route distinguisher.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

rd RD-VALUE

Parameter

Parameter Description

Parameter Value

RD-VALUE

Route distinguisher value. ASN:nn or IP-address:nn

The range of ASN is 1-4294967295 or in IPv4 format, The range of nn is 1-65535

Command Mode

VRF Configuration

Default

None

Usage

None

Examples

Switch# configure terminal
Switch(config)# ip vrf test
Switch(config-vrf)# rd 1.1.1.1:1

Related Commands

None

16.1.12. route-target

Command Purpose

Use this command to set route target. To unset route target, enter the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

route-target ( both | export | import ) RT-VALUE

no route-target ( both | export | import ) ( RT-VALUE | )

Parameter

Parameter Description

Parameter Value

both

Import and export

-

export

Export

-

import

Import

-

RT-VALUE

Route-target value. ASN:nn or IP-address:nn

The range of ASN is 1-4294967295 or in IPv4 format, The range of nn is 1-65535

Command Mode

VRF Configuration

Default

None

Usage

None

Examples

Switch# configure terminal
Switch(config)# ip vrf test
Switch(config-vrf)# route-target import 100:1

Related Commands

None

16.1.13. import map

Command Purpose

Use this command to set import map. To unset import map, enter the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

import map WORD

no import map

Parameter

Parameter Description

Parameter Value

WORD

Pointer to route-map entries

Up to 20 characters

Command Mode

VRF Configuration

Default

None

Usage

None

Examples

Switch# configure terminal
Switch(config)# ip vrf test
Switch(config-vrf)# import map 100

Related Commands

export map

16.1.14. export map

Command Purpose

Use this command to set export map. To unset export map, enter the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

export map WORD

no export map

Parameter

Parameter Description

Parameter Value

WORD

Pointer to route-map entries

Up to 20 characters

Command Mode

VRF Configuration

Default

None

Usage

None

Examples

Switch# configure terminal
Switch(config)# ip vrf test
Switch(config-vrf)# export map 100

Related Commands

import map

16.1.15. router-id

Command Purpose

Use this command to set router-id.To unset router-id, enter the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

router-id IP_ADDR

no router-id

Parameter

Parameter Description

Parameter Value

IP_ADDR

Router identifier in IP address format

IPv4 Address

Command Mode

VRF Configuration

Default

None

Usage

None

Examples

Switch# configure terminal
Switch(config)# ip vrf test
Switch(config-vrf)# router-id 1.1.1.1

Related Commands

show ip vrf

16.1.16. description

Command Purpose

Use this command to specific VRF description. To remove VRF description, enter the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

description LINE

no description

Parameter

Parameter Description

Parameter Value

LINE

Characters describing this VRF

The name length should be no more than 40 and the first character must be a-z, A-Z or 0-9.

Command Mode

VRF Configuration

Default

None

Usage

None

Examples

Switch# configure terminal
Switch(config)# ip vrf test
Switch(config-vrf)# description VrfName1

Related Commands

show ip vrf

16.1.17. show resource vrf

Command Purpose

Use this command to display the resources used by vrfs.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show resource vrf

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

The following is sample output from the show resource vrf command:

Switch# show resource vrf

VRF
Resource                         Used          Capability
=============================================================
VRF number                        1                252

Related Commands

None