You are on page 1of 4

CCNA Exploration: LAN Switching and Wireless Chapter 3 Case Study

Objectives:


Intro:

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.

Topology:

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:

VLAN ID 10 20 30 Trunk Link

Port 1, 2, 3, 4, 5 6, 7, 8, 9, 10 11,12,13,14,15 24

CCNA Exploration: LAN Switching and Wireless Chapter 3 Case Study


The commands are listed below for future reference: SW1# vlan database SW1(vlan) vla 1 nam VLAN1 stat acti # n 0 e 0 e ve SW1(vlan) vla 2 nam VLAN2 stat acti # n 0 e 0 e ve 3 nam VLAN3 stat acti SW1(vlan vl 0 e 0 e ve )# an SW1(vlan ex APPLY completed. Exiting.... SW1# SW1# configure terminal Enter configuration commands, one per line. End with CNTL/Z. 0/ - 5 SW1(config)# interface range 1 fastethernet SW1(config-if)# switchport mode access SW1(config-if)# switchport access vlan 10 SW1(config-if)# no shut SW1(config)# interface range 0/ - 10 6 fastethernet SW1(config-if)# switchport mode access SW1(config-if)# switchport access vlan 20 SW1(config-if)# no shut 0/ SW1(config)# interface range 11 15 fastethernet 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(configif)# 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? 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

CCNA Exploration: LAN Switching and Wireless Chapter 3 Case Study


R1(config-subif)# R1(config-subif)# 255.255.255.0 ! R1(config-subif)# R1(config-subif)# R1(config-subif)# 255.255.255.0 ! R1(config-subif)# R1(config-subif)# R1(config-subif)# encapsulation dot1q 10 ip address 192.168.10.1 int fa0/0.20 encapsulation dot1q 20 ip address 192.168.20.1 int fa0/0.30 encapsulation dot1q 30 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 R1s 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.

You might also like