![](/images/new-backgrounds/1149832/149832165x1.webp)
13 VLAN Routing
Next specify the VLAN ID assigned to untagged frames received on the ports.
config interface 0/1
vlan pvid 10 exit interface 0/2
vlan pvid 10 exit interface 0/3
vlan pvid 20 exit
exit
Example 2: Set Up VLAN Routing for the VLANs and the Switch.
The following commands show how to enable routing for the VLANs:
vlan database vlan routing 10 vlan routing 20
exit
show ip vlan
This returns the logical interface IDs that will be used in subsequent routing commands. Assume that VLAN 10 is assigned ID 4/1 and VLAN 20 is assigned ID 4/2.
Enable routing for the switch:
config
ip routing exit
The next sequence shows an example of configuring the IP addresses and subnet masks for the VLAN router ports.
config interface 4/1
ip address 192.150.3.1 255.255.255.0 exit
interface 4/2
ip address 192.150.4.1 255.255.255.0 exit
exit
CLI Examples 83