5000 Series Layer 2/3 Managed Data Center Switch CLI Reference Guide
644
ip route [vrf vrf-name] ipaddr subnetmask {nexthopip | Null0 | interface {slot/port | vlan-id}}
[preference] [description description]
no ip route ipaddr subnetmask [{nexthopip [preference] | Null0}]
Parameters
vrf vrf-name
Enter the VRF name which includes maximum 64 ASCII characters.
ipaddr
Enter the destination prefix.
subnetmask
Enter the destination network mask.
nexthopip
Enter the IP address of the next router.
Null0
Indicates the null Interface.
slot/port
Enter an interface in slot/port format.
vlan-id
Enter an interface in VLAN format.
preference
Indicates the route preference (1 – 255).
description description
Indicates the description for the route.
Default
The default is None.
Command Mode
Global Config
Example
Subnetwork 9.0.0.0/24 is a connected subnetwork in global table and subnet 56.6.6.0/24 is reachable via
a gateway 9.0.0.2 in the global table.
Subnet 8.0.0.0/24 is a connected subnetwork in virtual router Red.
Now we leak the 2 routes from global route table into the virtual router Red and leak the connected
subnet 8.0.0.0/24 from Red to global table.
When leaking a connected route in the global routing to a virtual router, the /32 host route for the leaked
host is added in the virtual router instance’s route table.
Also we add a non-leaked static route for 66.6.6.0/24 subnetwork scoped to the domain of virtual router
Red below.
(Router)(Config)#ip routing
(Router)(Config)#ip vrf Red
(Router)(Config)#interface 0/27
(Router)(Interface 0/27)#routing
(Router)(Interface 0/27)#ip vrf forwarding Red
(Router)(Interface 0/27)#ip address 8.0.0.1 /24
(Router)(Interface 0/27)#interface 0/26
(Router)(Interface 0/26)#routing
(Router)(Interface 0/26)#ip address 9.0.0.1 /24
(Router)(Interface 0/26)#exit