Exp4 inter-VLAN Routing
Exp4 inter-VLAN Routing
Objectives
Now that you know how to configure VLANs on a network switch, the next step is to allow
devices connected to the various VLANs to communicate with each other. In a previous
experiment, you learned that each VLAN is a unique broadcast domain, so computers on separate
VLANs are, by default, not able to communicate. There is a way to permit these end stations to
communicate; it is called inter-VLAN routing. In this experiment, you will learn what inter-
VLAN routing is and some of the different ways to accomplish inter-VLAN routing on a
network.
In this example, the router was configured with two separate physical interfaces to interact with
the different VLANs and perform the routing.
1. PC1 on VLAN10 is communicating with PC3 on VLAN30 through router R1 using a single,
physical router interface.
2. PC1 sends its unicast traffic to switch S2.
3. Switch S2 then tags the unicast traffic as originating on VLAN10 and forwards the unicast
traffic out its trunk link to switch S1.
4. Switch S1 forwards the tagged traffic out the other trunk interface on port F0/5 to the interface
on router R1.
5. Router R1 accepts the tagged unicast traffic on VLAN10 and routes it to VLAN30 using its
configured subinterfaces.
6. The unicast traffic is tagged with VLAN30 as it is sent out the router interface to switch S1.
7. Switch S1 forwards the tagged unicast traffic out the other trunk link to switch S2.
8. Switch S2 removes the VLAN tag of the unicast frame and forwards the frame out to PC3 on
port F0/6.
1. PC1 on VLAN10 is communicating with PC3 on VLAN30 through switch S1 using VLAN
interfaces configured for each VLAN.
2. PC1 sends its unicast traffic to switch S2.
3. Switch S2 tags the unicast traffic as originating on VLAN10 as it forwards the unicast traffic
out its trunk link to switch S1.
4. Switch S1 removes the VLAN tag and forwards the unicast traffic to the VLAN10 interface.
5. Switch S1 routes the unicast traffic to its VLAN30 interface.
6. Switch S1 then retags the unicast traffic with VLAN30 and forwards it out the trunk link back
to switch S2.
To enable a multilayer switch to perform routing functions, the multilayer switch must have IP
routing enabled.
Multilayer switching is more scalable than any other inter-VLAN routing implementation. This is
because routers have a limited number of available ports to connect to networks. Additionally, for
interfaces that are configured as a trunk line, limited amounts of traffic can be accommodated on
that line at one time.
With a multilayer switch, traffic is routed internal to the switch device, which means packets are
not filtered down a single trunk line to obtain new VLAN-tagging information. A multilayer
switch does not, however, completely replace the functionality of a router. Routers support a
significant number of additional features, such as the ability to implement greater security
controls. Rather, a multilayer switch can be thought of as a Layer 2 device that is upgraded to
have some routing capabilities.
In this section, you will learn how to configure a Cisco IOS router for inter-VLAN routing, as
well as review the commands needed to configure a switch to support inter-VLAN routing.
Configure VLANs
Switch(config)#vlan 10
Switch(config-vlan)#vlan 11
There are several common switch misconfigurations that can arise when configuring routing
between multiple VLANs.
When using the traditional routing model for inter-VLAN routing, ensure that the switch ports
that connect to the router interfaces are configured with the correct VLANs. If a switch port is not
configured for the correct VLAN, devices configured on that VLAN cannot connect to the router
interface; therefore, those devices are unable to send data to the other VLANs.
As shown in the Figure topology below, PC1 and router R1 interface G0/0 are configured to be
on the same logical subnet, as indicated by their IP address assignment. However, the switch port
F0/4 that connects to router R1 interface G0/0 has not been configured and remains in the default
VLAN. Because router R1 is on a different VLAN than PC1, they are unable to communicate. To
correct this problem, execute the switchport access vlan 10 interface configuration mode
command on switch port F0/4 on switch S1. When the switch port is configured for the correct
VLAN, PC1 can communicate with router R1 interface G0/0, which allows it to access the other
VLANs connected to router R1.
To correct this problem, issue the switchport mode trunk interface configuration mode
command on switch port F0/5 on S1. This converts the interface to a trunk port, allowing a trunk
to be established between R1 and S1. When the trunk is successfully established, devices
connected to each of the VLANs are able to communicate with the subinterface assigned to their
VLAN, thus enabling inter-VLAN routing.
The Figure topology below shows the trunk link between S1 and S2 is down. Because there is no
redundant connection or path between the devices, all devices connected to S2 are unable to reach
router R1. As a result, all devices connected to S2 are unable to route to other VLANs through
R1. To reduce the risk of a failed inter-switch link disrupting inter-VLAN routing, redundant
links and alternate paths should be accounted for within the network design.
To correct this problem, configure subinterface G0/0.10 to be on the correct VLAN using the
encapsulation dot1q 10 subinterface configuration mode command. When the subinterface has
been assigned to the correct VLAN, it is accessible by devices on that VLAN and the router can
perform inter-VLAN routing. With proper verification, router configuration problems are quickly
addressed, allowing inter-VLAN routing to function properly.
Procedure:
You can find the lab problem sheet and the packet tracer activities on the lab website.
Reference: