You are on page 1of 4

CCNA Exploration: LAN Switching and Wireless

Chapter 3 Case Study

Consolidate the VLAN concept and configuration
Introduce the router-on-a-stick concept and configuration
Ajax Enterprise wants to optimize their network and asked you to lead the project.

The Scenario:
Ajax increased the number of computers on their network and because of that, they decided to ensure
their network will support it with no impact on the performance. Ajax also has no plans to buy new devices
now; they want to use the gear they already have. After a study on Ajax network devices, you decide to
implement the topology shown below.
The topology uses 3 different VLANs to separate traffic: VLAN10, VLAN20 and VLAN30. The router R1
will route between them.


2009 Cisco Learning Institute

CCNA Exploration: LAN Switching and Wireless

Chapter 3 Case Study
Step 1 Creating a solution
The switch Ajax already has is a layer 2 switch. Since each VLAN will have a different IP subnet, this
switch will not be able to route layer 3 packets between the VLANs created in it. In order to route layer 3
packets, a layer 3 network device must be used.
Ajax also has a Cisco 1841 router loaded with an IOS version which supports 802.1q trunk protocol and
you decided to use it to route layer 3 packets between VLANs.
The idea is to configure R1s fastethernet0/0 to speak 802.1q trunk protocol. This will create an 802.1q
trunk link between SW1 and R1 through which traffic from all VLANs will flow. In order to separate VLAN
traffic into R1, sub-interfaces must be created in R1. Once each VLAN has its own sub-interface, R1 will
see each VLAN as a regular interface, place its network into its routing table as a direct connected route
and will be able to route between them as usual.
When a user device needs to communicate to other user device within the same VLAN, the switch will
forward the frames with no R1s help. When devices under different VLANs must communicate (VLAN 10
sending packets to VLAN 30, for example) the switch will use the trunk link to send the frame to R1. R1
will receive the packets via its sub-interface fastEthernet0/0.10 (sub-interface which represents VLAN 10)
and, after check its routing table, will realize that to reach the destination address, it must forward the
packet via sub-interface fastEthernet0/0.30. Even though fastEthernet0/0.10 and fastEthernet0/0.30 are
part of the same physical interface (fastEthernet0/0), from R1s routing stand point, fa0/0.10 and fa0/0.30
are regular interfaces. This solution is called Router-on-a-stick.
Note: Router-on-a-stick is only possible if the router supports 802.1q trunk protocol.

Step 2 Configuring SW1

You decide to begin the configuration by SW1. You connect the console cable to SW1 console port and
create all 3 VLANs: VLAN10, VLAN20 and VLAN30. Once the VLANs are created, you assign the switch
ports to the correct VLAN. Since port 24 will be the port connected to R1, it must be configured as an
802.1q link. The VLAN mapping to be used in SW1 is shown below:




1, 2, 3, 4, 5


6, 7, 8, 9, 10



Trunk Link


2009 Cisco Learning Institute

CCNA Exploration: LAN Switching and Wireless

Chapter 3 Case Study
10 reference:
The commands areencapsulation
listed below for
R1(config-subif)# ip address
!SW1# vlan database
SW1(vlan)# vlan 10
VLAN10 state active
SW1(vlan)# vlan 20
name VLAN20
20 active
SW1(vlan)# vlan 30
state active
ip name
!SW1(vlan)# exit
APPLY fa0/0.30
encapsulation dot1q 30
ip address
SW1# configure terminal
Note: the number at the end of the encapsulation command represents the VLAN ID and must match the
Enter configuration commands, one per line. End with CNTL/Z.
VLAN ID configured in the switch.
SW1(config)# interface range fastethernet 0/1 - 5
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 10
no shut
Step 3 Wrapping
SW1(config)# interface range fastethernet 0/6 - 10
mode to
Once SW1 and R1
are configured
perform router-on-a-stick, you check the user PCs and devices to
vlan 20 (IP address, default gateway, subnet mask, etc) of the VLAN
ensure they all have proper IP configuration
shut must use R1s sub-interface representing its VLAN as default gateway.
it belongs. All user
SW1(config)# interface range fastethernet 0/11 - 15
After everything is
set, you issue
few pings within the same VLAN and between different VLANs and
access vlan 30
watch all of them flow successfully.
SW1(config)# interface fastethernet 0/24
SW1(config-if)# switchport mode trunk
SW1(config-if)# switchport trunk encapsulation dot1q
SW1(config-if)# no shut
SW1(config-if)# end
Question 1:
What kind of cable must be used to connect SW1 to R1?
Answer: straight-through Ethernet cable.
Once SW1 is configured, it is time to move on to R1.

Step 2 Configuring R1
You connected your laptop to R1 to configure it. As stated before, interface fastEthernet0/0 must be
configured as a trunk link and the cable connected to SW1s fa0/24 port. Also, 3 sub-interfaces must be
created in R1 to separate VLAN traffic. You also define the sub-interfaces encapsulation as 802.1q.
The commands are listed below:
R1(config)# int fa0/0
R1(config)# no ip address
R1(config)# no shut
R1(config)# int fa0/1.10
2009 Cisco Learning Institute