401
Command:
ip route vrf <name> {<ip-prefix>
<mask>|<ip-prefix/<prefix-length>}
{<gateway-address>|<gateway-interface>} [<distance>]
no ip route vrf <name> {<ip-prefix> <mask>|<ip-prefix/<prefix-length>}
[<gateway-address>|<gateway-interface>] [<distance>]
Function: <name>
is the name of VPN route forwarding instances;
<ip-prefix>
and
<mask>
are respectively destination IP address and sub network mask shown in dotted
decimal notation;
<ip-prefix>
and
<prefix-length>
are respectively destination IP
address and prefix length;
<gateway-address>
is the next-hop IP address show in
dotted decimal notation;
<gateway-interface>
is the next-hop interface,
< distance >
is
the route managing distance value ranging between 1
~
255.
Default:
Default static route managing value is 1.
Command Mode:
Global mode
Usage Guide:
VPN route forwarding instances have to be successfully configured before
using this command.
14.3.5 Configuration Examples
The figure shown below is a simple network consisting of three layer3 switches, the
network mask for all switches and PC is 255.255.255.0. PC-A and PC-C are connected
via the static route set in SwtichA and SwitchC; PC-C and PC-B are connected via the
static route set in SwtichC to SwitchB; PC-B and PC-C is connected via the default route
set in SwitchB.
Fig 14-2 Static Route Configurations
Configuration steps:
SwitchB
PC-A:10.1.1.2 PC-B:10.1.4.2
vlan3:10.1.5.1
vlan1:10.1.1.1
vlan2:10.1..2.1
vlan2:10.1.4.1
vlan2:10.1.2.2
vlan1:10.1.3.2
SwitchA
SwitchC
vlan1:10.1.3.1
PC-C:10.1.5.2