You are on page 1of 4

CCNA Exploration: LAN Switching and Wireless 

Chapter 3 Case Study

Objectives:

• Consolidate the VLAN concept and configuration


• Introduce the router-on-a-stick concept and configuration

Intro:

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.

Topology:

© 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 R1’s 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 R1’s 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 R1’s 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:

VLAN ID Port

10 1, 2, 3, 4, 5

20 6, 7, 8, 9, 10

30 11,12,13,14,15

Trunk Link 24

© 2009 Cisco Learning Institute


 
 
CCNA Exploration: LAN Switching and Wireless 
Chapter 3 Case Study

The commands are listed below for future reference:

SW1# vlan database


SW1(vlan)# vlan 10 name VLAN10 state active
SW1(vlan)# vlan 20 name VLAN20 state active
SW1(vlan)# vlan 30 name VLAN30 state active
SW1(vlan)# exit
APPLY completed.
Exiting....
SW1#
SW1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)# interface range fastethernet 0/1 - 5
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 10
SW1(config-if)# no shut
SW1(config)# interface range fastethernet 0/6 - 10
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 20
SW1(config-if)# no shut
SW1(config)# interface range fastethernet 0/11 - 15
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 30
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 SW1’s 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


 
 
CCNA Exploration: LAN Switching and Wireless 
Chapter 3 Case Study

R1(config-subif)# encapsulation dot1q 10


R1(config-subif)# ip address 192.168.10.1 255.255.255.0
!
R1(config-subif)# int fa0/0.20
R1(config-subif)# encapsulation dot1q 20
R1(config-subif)# ip address 192.168.20.1 255.255.255.0
!
R1(config-subif)# int fa0/0.30
R1(config-subif)# encapsulation dot1q 30
R1(config-subif)# ip address 192.168.30.1 255.255.255.0

Note: the number at the end of the encapsulation command represents the VLAN ID and must match the
VLAN ID configured in the switch.

Step 3 – Wrapping up

Once SW1 and R1 are configured to perform router-on-a-stick, you check the user PCs and devices to
ensure they all have proper IP configuration (IP address, default gateway, subnet mask, etc) of the VLAN
it belongs. All user devices must use R1’s sub-interface representing its VLAN as default gateway.

After everything is set, you issue a few pings within the same VLAN and between different VLANs and
watch all of them flow successfully.

© 2009 Cisco Learning Institute


 
 

You might also like