Administrator Guide

Layer 3 Routing Commands 1826
console#configure terminal
console(config)#vlan 100-109
console(config-vlan100-109)#exit
3
Assign the VLAN to an interface.
console(config)#interface gi1/0/1
console(config-if-Gi1/0/1)#switchport access vlan 100
console(config-if-Gi1/0/1)#exit
4
Create the VRF and enable routing.
console(config)#ip vrf red
console(config-vrf-red)#ip routing
console(config-vrf-red)#exit
5
Assign IP addresses to the interfaces.
console(config)#interface vlan 100
console(config-if-vlan100)#ip address 192.168.0.1 /24
6
Put the VLAN interface into the VRF.
console(config-if-vlan100)#ip vrf forwarding red
console(config-if-vlan100)#exit
7
Routing interface moved from Default router instance to red router
instance.
8
Enable OSPF on the VRF, assign a network, and enable OSPF for the VRF
console(config)#router ospf vrf red
console(Config-router-vrf-red)#network 192.168.0.0 0.0.0.255 area 0
console(Config-router-vrf-red)#router-id 192.168.0.253
console(Config-router-vrf-red)#redistribute connected
console(Config-router-vrf-red)#enable
console(Config-router-vrf-red)#exit
Commands in this Section
This section explains the following commands, which are exclusive to VRFs.
Other commands such as ip routing may also be executed in VRF
configuration mode.
description ip vrf forwarding
ip vrf maximum routes
show ip vrf