You are on page 1of 8

Cisco − How To Configure InterVLAN Routing on Layer 3 Switc

.............2 Task.....................................................................................................................................................................................................................................................................................................................................................................................................................................2 Configuring InterVLAN Routing...............................................Cisco − How To Configure InterVLAN Routing on Layer 3 Switches Table of Contents How To Configure InterVLAN Routing on Layer 3 Switches.........2 Step−by−Step Instructions..................1 Before You Begin...............................................................................................................................................................................................................................................................................................................................................................6 i .......................................1 Prerequisites.....................................................................................................................................................................................................................3 Verify......................................................................................5 Troubleshooting Procedure.....................................5 Troubleshoot.................................................................1 Conventions.....................................................................................................................................5 Related Information.............................................1 Introduction......................................................................................................1 Components Used................................................

This document provides the configuration and troubleshooting steps applicable to this capability. Catalyst 4000 Series with Sup II+ or higher. Before You Begin Conventions For more information on document conventions.How To Configure InterVLAN Routing on Layer 3 Switches Introduction Before You Begin Conventions Prerequisites Components Used Configuring InterVLAN Routing Task Step−by−Step Instructions Verify Troubleshoot Troubleshooting Procedure Related Information Introduction Layer 3 Catalyst switches incorporate routing functionality which allows the switch to perform interVLAN routing. please ensure that you meet the following prerequisites: • InterVLAN routing on the Catalyst 3550 has certain software requirements to support interVLAN routing on the switch. Please refer to the table below to determine whether your switch can support interVLAN routing Image Type and Version Enhanced Multilayer Image (EMI) − All Versions Standard Multilayer Image (SMI) − prior to 12.1(11)EA1 and later InterVLAN Routing Capability Yes No Yes Cisco − How To Configure InterVLAN Routing on Layer 3 Switches .1(11)EA1 Standard Multilayer Image (SMI) − 12. however. the concepts can also be applied to other Layer 3 switches running Cisco IOS® (for example. Prerequisites Before attempting this configuration. or Catalyst 6000 Series running Cisco IOS on the Supervisor and MSFC). Note: This document uses a Catalyst 3550 as an example. see the Cisco Technical Tips Conventions.

ensure that you understand the potential impact of any command before using it.1(12c)EA1 EMI Software release The information presented in this document was created from devices in a specific lab environment. • This document assumes that layer 2 has been configured and that the devices within the same VLAN connected to the 3550 can communicate with one another. All of the devices used in this document started with a cleared (default) configuration. access ports and trunking on the 3550. Cisco − How To Configure InterVLAN Routing on Layer 3 Switches . Components Used The information in this document is based on the software and hardware versions below. If you need information on configuring VLANs. please refer to the document Configuring InterVLAN Routing with Catalyst 3550 Series Switches. The scenario can be expanded to include a multi−switch environment by first configuring and testing inter−switch connectivity across the network before configuring the routing capability. • Catalyst 3550−48 running 12. you are presented with the information to configure the features described in this document. If you are working in a live network. The document also provides the procedure to upgrade the IOS code to a version that supports interVLAN routing. The following logical diagram explains a simple interVLAN routing scenario.For more information on the differences between SMI and EMI. refer to the document Upgrading Software Images on Catalyst 3550 Series Switches Using the Command Line Interface. For such a scenario using a Catalyst 3550. please refer to Creating Ethernet VLANs on Catalyst Switches or the Catalyst 3550 Software Configuration Guide for the specific IOS version you are running on the switch. Configuring InterVLAN Routing Task In this section.

1. The command. this step ensures that it is indeed activated. Tip: Check the show running−configuration and verify whether ip routing is enabled. we want to route traffic between VLANs 2. 3 and 10. In our example. or an EMI image. Refer to the Prerequisites section for more information. Even if IP routing was previously enabled. and repeat this step.1(11)EA1 or later. will appear towards the top of the output. Cisco − How To Configure InterVLAN Routing on Layer 3 Switches . Enable routing on the switch using the ip routing command.Step−by−Step Instructions Do the following to configure a switch to perform interVLAN routing. Make note of the VLANs that you want to route between. you will need to upgrade to either SMI image 12. hostname Switch ! ! ip subnet−zero ip routing ! vtp domain Cisco vtp mode transparent 2. if enabled. Switch(config)#ip routing Note: If the switch does not accept the ip routing command.

routing is enabled (from Step 1) hence the ip default−gateway command is unnecessary. Exiting.0 200. one per line.1.0 0. 4. Use the show vlan command to verify that the VLANs exist in the VLAN database. End with CNTL/Z. the VLAN interfaces must be configured with an IP address.255. configure an IP address for that VLAN interface..1 255.1.0 Switch(config−if)#no shutdown The no switchport command makes the interface Layer 3 capable.. Configure the interface to the default router. Switch(config)#interface FastEthernet 0/1 Switch(config−if)#no switchport Switch(config−if)#ip address 200. note that the IP address of the default router is 200.1. 5.255. Note: This step can be omitted if the switch can reach the default router through a VLAN.0.2. in this case. When the switch receives a packet destined for another subnet/VLAN.255. Determine the IP addresses you want to assign to the VLAN interface on the switch.255.1.0 Switch(config−if)#no shutdown Repeat this process for all VLANs identified in Step 1.3. you must add them on the switch. Also notice that the IP address is in the same subnet as the default router.0. Cisco − How To Configure InterVLAN Routing on Layer 3 Switches . 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. Refer to the document Understanding and Configuring VLAN Trunk Protocol (VTP). Switch#conf t Enter configuration commands. Configure the VLAN interfaces with the IP address identified in Step 4.. However. For the switch to be able to route between the VLANs. the switch looks at the routing table to determine where to forward the packet. In this scenario we have a Layer 3 FastEthernet port.1. it forwards it to the default gateway for further processing From the switch verify that you can ping the default router. If they do not exist. Note: The ip default−gateway command is used to specify the default gateway when routing is not enabled.1 255. In its place. Switch(config)#interface Vlan2 Switch(config−if)#ip address 10.2 From the diagram in the Task section. Configure the default route for the switch Switch(config)#ip route 0.1. The packet is then passed to the VLAN interface of the destination and in turn it is sent to the port where the end device is attached. If the switch receives a packet for a network not in the routing table.2.0. 7. 6.1. Tip: You can use VTP to propagate these VLANs to other switches.0.

FastEthernet0/48 10.0. E − EGP i − IS−IS. the default route with the next hop 200. O − OSPF. L1 − IS−IS level−1. M − mobile. which allows you to view an analysis of show command output. Vlan3 10.10.0 is directly connected.0 C C C C S* 200. Verify you have Layer 2 connectivity by issuing ICMP pings. refer to the document Creating Ethernet VLANs Cisco − How To Configure InterVLAN Routing on Layer 3 Switches . Vlan2 0.2 to network 0. • show ip route − Provides a snapshot of the routing table entries. For more information. Hence.8.0. E2 − OSPF external type 2.0.1.1.0 is directly connected. Vlan10 10.0/0 [1/0] via 200.2 Note that the routing table has an entry for each VLAN interface subnet. R − RIP.2.2 allows the switch to forward traffic to the gateway of last resort (for traffic the switch cannot route). 1 subnets 200.0.1.1. verify that your source and destination ports have devices connected to them and are assigned to the same VLAN. B − BGP D − EIGRP. This command can be used to verify that the VLAN interfaces and ports on the switch are up/up. Configure your end devices to use the respective Catalyst 3550 VLAN interface as their default gateway For example. Troubleshoot This section provides information you can use to troubleshoot your configuration. Also.3. 3 subnets 10. devices in VLAN 2 should use the interface VLAN 2 IP address as its default gateway.1. VLAN 2 and vice versa. IA − OSPF inter area N1 − OSPF NSSA external type 1. U − per−user static route.0 is directly connected. S − static.1.0. 1.1. Verify This section provides information you can use to confirm your configuration is working properly. N2 − OSPF NSSA external type 2 E1 − OSPF external type 1. Refer to the appropriate client configuration guide for more information on designating the default gateway.1.1. L2 − IS−IS level−2.1.0 is directly connected. Follow the instructions to troubleshoot your configuration.1.0/24 is subnetted. devices in VLAN 3 can communicate with devices in VLAN 10. Cat3550#show ip route Codes: C − connected.0.0/30 is subnetted. ia − IS−IS inter area * − candidate default. I − IGRP. o − ODR P − periodic downloaded static route Gateway of last resort is 200. EX − EIGRP external. Certain show commands are supported by the Output Interpreter Tool ( registered customers only) . Troubleshooting Procedure Below is troubleshooting information relevant to this configuration.1. • show ip interface brief − Lists a brief summary of an interface's IP information and status.1. ♦ If you are not able to ping between two devices on the same VLAN on the same switch.

verify that the default route on the 3550 is pointing to the correct IP address on the default router. issue the no shutdown command in the VLAN interface configuration mode. ♦ If the interface status is down/down. If the ping fails.1) to Interface VLAN 3 (10. If you are not able to reach the Internet or corporate network. 3. verify that the default gateway on the connected device is configured correctly. For example. For example. If you are not able to ping the interface. In this example.1).2. the default gateway of the device on VLAN 2 should point to Interface VLAN 2 (10.2) and ping Interface VLAN 2 (10. In this example we would ping from VLAN 2 (10. Initiate a ping from an end device in one VLAN to the interface VLAN on another VLAN to verify that the switch can route between VLANs.1). verify the VTP configuration and that the VLANs have been added to the VLAN database.1. but fails to reach the end device on other VLAN. a device on VLAN 2 should be able to ping a device on VLAN 3. ♦ If you are not able to ping between two devices on the same VLAN but not on the same switch. verify that trunking is configured properly and that the native VLAN matches on both sides of the trunk. If the ping test was successful in step 3. Cisco − How To Configure InterVLAN Routing on Layer 3 Switches .1. All rights reserved. 4.1).1. Important Notices and Privacy Statement.Also verify the interface VLAN status by issuing the show ip interface brief command. 5.2.1. 2. Related Information • Configuring InterVLAN Routing with Catalyst 3550 Series Switches • Configuring Layer 3 Interfaces for the Catalyst 4000 • Technical Support − Cisco Systems All contents are Copyright © 1992−2003 Cisco Systems.3.2. ♦ If the interface status is administratively down.1.1. Inc.2. Initiate a ping from the end device in one VLAN to the end device in another VLAN. verify that IP routing is enabled and that the VLAN interfaces status is up by issuing the show ip interface brief command.on Catalyst Switches.1) or Interface VLAN 10 (10.10. Also verify that the IP address and subnet mask on the switch are configured correctly. verify that the host's default gateway points to the corresponding VLAN interface IP address and that the subnet masks match. you could use a host on VLAN 2 (10. You should also check to see if a port is assigned to the VLAN and whether it is in the Spanning Tree forwarding state. Initiate a ICMP ping from an end device connected to the Catalyst 3550 to its corresponding VLAN interface.