Users Guide

Layer 3 Routing Commands 1505
Subnet 8.0.0.0/24 is a directly connected subnetwork in VLAN 30 in virtual
router Red.
Subnet 66.6.6.x is reachable via VLAN 30 in vrf Red.
The first ip route command below leaks the 66.6.6.x subnet from vrf Red into
the default routing table.
The second ip route command configures a gateway for the default routing
table.
The next ip route commands leak the 9.0.0.x route from the default route
table into the virtual router Red.
The last ip route command configures the 66.6.6.x subnet as reachable via
next hop 8.0.0.2 in Vrf Red.
configure
vlan 10,30
exit
ip vrf Red
ip routing
exit
ip routing
interface vlan 10
ip address 9.0.0.1 255.255.255.0
exit
interface vlan 30
ip vrf forwarding Red
ip address 8.0.0.1 255.255.255.0
exit
ip route 66.6.6.0 255.255.255.0 Vl30
ip route 0.0.0.0 0.0.0.0 9.0.0.2 253
ip route vrf Red 9.0.0.0 255.255.255.0 Vl10
ip route vrf Red 66.6.6.0 255.255.255.0 8.0.0.2
!
interface Gi1/0/1
switchport access vlan 10
exit
!
interface Gi1/0/3
switchport access vlan 30
exit
console(config)#show ip route
Route Codes: R - RIP Derived, O - OSPF Derived, C - Connected, S - Static
B - BGP Derived, E - Externally Derived, IA - OSPF Inter Area
E1 - OSPF External Type 1, E2 - OSPF External Type 2
N1 - OSPF NSSA External Type 1, N2 - OSPF NSSA External Type 2