To set the default VPN routing and forwarding (VRF) instance for the current session, use the set default-vrf command in or XR EXEC mode.
set default-vrf {name | none}
Syntax Description
name
|
Default VPN
routing and forwarding name.
|
none
|
Sets the
default VPN routing and forwarding name to empty.
|
Command Default
The default VRF
setting is set to empty.
Command History
Release |
Modification |
Release 7.0.1
|
This command was introduced.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user
group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the
set
default-vrf command to set the default VRF setting for the
current session. This command acts as a keystroke shortcut for
show commands.
For example, if the default VRF is configured, you can issue the
show route
command without specifying the VRF name.
When the default VRF
for the session is set to
none , then
IPv4 routes for the system default VRF are displayed.
Note
|
To override the
default VRF setting, specify the VRF name in the
show command.
|
Use the
show
default-afi-safi-vrf command to display the
default VRF setting.
Task ID
Task ID
|
Operations
|
basic-services
|
read,
write
|
Examples
In the following
example, the default VRF is set to “dft_vrf:”
RP/0/RP0/CPU0:router# set default-vrf dft_vrf
%% Default Virtual Routing/Forwarding is set to 'dft_vrf'
In the following
command, the
show
route
command is entered without specifying a VRF name. The results
for the "dft_vrf" VRF are displayed because the default VRF was set to
“dft_vrf.”
RP/0/RP0/CPU0:router# show route ipv4
% No matching vrf found
When the default
VRF for the session is set to
none , the
system default VRF routes are displayed. In the following example, the default
VRF is set to (empty) and the
show route
command displays the system default VRF information:
RP/0/RP0/CPU0:router# set default-vrf none
%% Default Virtual Routing/Forwarding is set to ''
RP/0/RP0/CPU0:router# show route ipv4
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, su - IS-IS summary null, * - candidate default
U - per-user static route, o - ODR, L - local
Gateway of last resort is 12.29.0.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 12.29.0.1, 00:31:30
L 10.10.10.10/32 is directly connected, 3d02h, Loopback1
C 12.29.0.0/16 is directly connected, 00:31:30, MgmtEth0/0/CPU0/0
L 12.29.56.21/32 is directly connected, 00:31:30, MgmtEth0/0/CPU0/0