Experiment - 12: To Configure Intervlan Routing On Layer 3 Switches
Experiment - 12: To Configure Intervlan Routing On Layer 3 Switches
-171302052
Experiment -12
To Configure InterVLAN Routing on Layer 3 Switches
1. Enable routing on the switch with the ip routing command. Even if IP routing was
previously enabled, this step ensures that it is activated.
Switch(config)#ip routing
hostname Switch
!
!
ip subnet-zero
ip routing
!
vtp domain Cisco
vtp mode transparent
2. Make note of the VLANs that you want to route between. In this example, you want to
route traffic between VLANs 2, 3 and 10.
3. Use the show vlan command in order to verify that the VLANs exist in the VLAN
database. If they do not exist, add them on the switch. This example shows the addition
of VLANs 2, 3, and 10 to the switch VLAN database
Switch#vlan database
Switch(vlan)#vlan 2
VLAN 2 added:
Name: VLAN0002
Switch(vlan)#vlan 3
VLAN 3 added:
Name: VLAN0003
Switch(vlan)#vlan 10
VLAN 10 added:
Name: VLAN0010
Switch(vlan)#exit
APPLY completed.
Exiting...
4. Determine the IP addresses you want to assign to the VLAN interface on the switch. For
the switch to be able to route between the VLANs, the VLAN interfaces must be
35
Reg No.-171302052
configured with an IP address. When the switch receives a packet destined for another
subnet/VLAN, the switch looks at the routing table in order to determine where to
forward the packet. The packet is then passed to the VLAN interface of the destination. It
is in turn sent to the port where the end device is attached.
5. Configure the VLAN interfaces with the IP address identified in step 4.
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface Vlan2
Switch(config-if)#ip address 10.1.2.1 255.255.255.0
Switch(config-if)#no shutdown
6. Configure the interface to the default router. In this scenario you have a Layer 3
FastEthernet port.
The no switchport command makes the interface Layer 3 capable. The IP address is in
the same subnet as the default router.
From the diagram in the Task section, note that the IP address of the default router is
200.1.1.2. If the switch receives a packet for a network not in the routing table, it
forwards it to the default gateway for further processing. From the switch, verify that you
can ping the default router.
8. Configure your end devices to use the respective Catalyst 3550 VLAN interface as their
default gateway. For example, devices in VLAN 2 should use the interface VLAN 2 IP
address as its default gateway. Refer to the appropriate client configuration guide for
more information on how to designate the default gateway.
9. When you implement Inter-VLAN routing, you can also isolate some VLANs from being
routed. Refer to the Isolation Between Two Layer 3 VLANs section of Creating Ethernet
VLANs on Catalyst Switches for more information.
36
Reg No.-171302052
37