CLI Guide

Layer 3 Routing Commands 1513
interface vlan 1
ip address 172.16.0.1 255.240.0.0
exit
interface vlan 10
ip vrf forwarding red-1
ip address 192.168.0.1 255.255.255.0
ip ospf area 0
exit
router ospf vrf “red-1”
router-id 1.1.1.1
network 192.168.0.0 0.0.0.255 area 0
exit
!
interface Gi1/0/1
switchport mode trunk
switchport access vlan 10
exit
!
interface loopback 0
ip vrf forwarding red-1
ip address 1.1.1.1 255.255.255.255
exit
Route Leaking Example 2
Subnetwork 9.0.0.0/24 is a directly connected subnetwork on VLAN 10 in the
default routing table.
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