cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2959
Views
16
Helpful
4
Replies

What is difference between two kinds of vrf?

wfqk
Level 5
Level 5

Hi Usually when we configure mpls, we need to configure vrf, which is like below:

R3(config)#ip vrf RED
R3(config-vrf)#rd 100:3
R3(config-vrf)#route-target export 100:3
R3(config-vrf)#route-target import 100:1

But I found there is another way to create vrf below. My question is why we use the below to create vrf? Thank you

vrf context ABC

  ip route 10.10.10.5/32 10.10.64.9 name ABCDE

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

The first syntax with ip vrf RED is the older way of defining VRFs on IOS-based devices. The second syntax with vrf context is used on Nexus switches running NX-OS.

The ip vrf syntax on IOS is in fact deprecated because it was only supported with IPv4. The new style of VRF configuration supports both IPv4 and IPv6, and looks like this:

vrf definition RED
 route-target export 100:3
 route-target import 100:1
 address-family ipv4
 address-family ipv6
!
interface FastEthernet0/0
 vrf forwarding RED

Best regards,
Peter

View solution in original post

4 Replies 4

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

The first syntax with ip vrf RED is the older way of defining VRFs on IOS-based devices. The second syntax with vrf context is used on Nexus switches running NX-OS.

The ip vrf syntax on IOS is in fact deprecated because it was only supported with IPv4. The new style of VRF configuration supports both IPv4 and IPv6, and looks like this:

vrf definition RED
 route-target export 100:3
 route-target import 100:1
 address-family ipv4
 address-family ipv6
!
interface FastEthernet0/0
 vrf forwarding RED

Best regards,
Peter

Thank you so much. I think you are right.

interface FastEthernet0/0
 vrf forwarding RED

but I still see vrf configuration for interface like below. Do you think it is the same thing?

interface FastEthernet0/0
 vrf member RED

Hi,

The vrf member syntax is again used on NX-OS.

Check out this webpage - it's a fairly nice comparison of IOS and NX-OS syntax pertaining to VRFs.

http://www.netcraftsmen.com/using-vrfs-in-nx-os-compared-to-ios/

Best regards,
Peter

Excellent, thank you