Your SlideShare is downloading. ×
Configuring VLANS and Trunking
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Configuring VLANS and Trunking

156
views

Published on

Published in: Technology, Business

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
156
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Lab 7 Name: Configuring VLANS and Trunking Aim This lab we will create VLANS on separate switches and then create ‘trunks’ connections between switches. Equipment Procedure  Each group of students will configure a switch and then the switches will be connected in groups of two (or three if there is an odd number).  Reload the switch and perform a basic switch configuration, including the hostname, passwords etc. Note: Give each switch a different name i.e. SwitchA, SwitchB …  Now configure the IP address for VLAN 1 to be 192.168.1.2 on SwitchA, 192.168.1.3 on SwitchB … , and set the default gateway to be 192.168.1.1 on all switches.  Configure 2 workstations and connect them to port Fa0/1 and Fa0/4  As we will be joining the switches you will need to ensure that the workstations on each switch have different IP addresses.  Just in case you skipped the line above - Make sure that you do not have any conflicting workstation ip addresses on any workstation.  All ports are in VLAN 1 by default. Confirm that all ports are in VLAN 1 with the command: SwitchA# show vlan Are all ports in VLAN 1? ____________________________________  Test for connectivity using the ping command? If there are any connection failures troubleshoot to find the problems.
  • 2. Do not go past this point until you have connectivity to each workstation on the switch.  Now Create and name two VLANs Note that we do NOT enter config mode (i.e. do not enter config t) Switch# vlan database Switch(vlan)# vlan 2 name Admin Switch(vlan)# vlan 3 name Sales Switch(vlan)# exit We will now put ports Fa0/5 – 8 on the Admin VLAN (VLAN 2) Remember that ports that connect to hosts are set to be access ports, which can only forward frames tagged for the VLAN associated with the port. It may be worth while checking out the optional range command format below before typing the individual port configurations. Switch # config t Switch(config)# int fa 0/5 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 2 Switch(config-if)# int fa 0/6 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 2 … or – using the range command Switch # config t Switch(config)# int range fa 0/5 - 8 Note: MUST have spaces either side of the - sign Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 2 Switch(config-if)# end (end - does the same as ctrl z and exit)  Now verify that these ports are on VLAN 2 Switch# show vlan What does the display show now ? ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________  Now repeat this process and add three ports to the Sales VLAN (VLAN 3) Switch #config t Switch(config)# int range fa 0/9 - 12 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 3 Switch(config-if)# end
  • 3.  Now verify that these three ports are in VLAN 3 with the command: Switch# show vlan  Try qualifying the show vlan command with a specific vlan number Switch# show vlan <vlan number>  Verify the connectivity between workstations that are on the same VLAN. With one PC connected to port Fa 0/1 and the other to Fa 0/4 ping from one PC to the other. Was the ping successful? __________  Move the PC from port Fa0/4 (on VLAN 1) to port Fa0/8 (on VLAN 2) so that we can verify the connectivity between workstations on different VLANs.  Watch what happens to the port lights when you move a host from one port to another. Explain what is happening _________________________________________________________________________ _________________________________________________________________________  Ping between each PC. Was the ping successful? __________ Why? ____________________________________________________________________  Ping from each PC to the switch. Which PC/s were successful? _________________________________________________ Why? ____________________________________________________________________  Now move the PC from port Fa0/1 (on VLAN 1) to port Fa0/5 (on VLAN 2) and ping between each PC. Was the ping successful? __________
  • 4. Configuring Trunk Ports When switches are connected together the ports need to be set as trunk ports as they must carry VLAN traffic for all VLANs. Do not remove the previous switch configuration.  Start by connecting the switches together using crossover cables, connecting using ports 2 and 12 on each switch. Other ports can be used as well as long as they are correctly configured. Note: The reason multiple trunks are often used in real world networks is to increase the bandwidth of the link.  With ports Fa0/22 and Fa0/24 connected, and without trunking configured - ping between the host on port Fa0/1 on SwitchA and the host on port Fa0/1 on SwitchB Was the ping successful? __________  Now ping between the host on port Fa0/5 on SwitchA and the host on port Fa0/5 on SwitchB Was the ping successful? __________ If not why? _________________________________________________________________________ _________________________________________________________________________  Now you must configure ports Fa0/22 and Fa0/24 on each switch to be ‘trunk’ ports (remember, you configured the ports to which hosts are connected as ‘access’ ports). Switch(config)# interface fastethernet 0/22 Switch(config-if)# switchport mode trunk Switch(config)# interface fastethernet 0/24 Switch(config-if)# switchport mode trunk Switch(config-if)# end Repeat for all switches
  • 5.  Note: On the Cisco 2950 switch this will complete the trunk port configuration since there is only one trunking protocol – 802.1Q (as ISL is obsolete and is not provided in later model switches). For an older model switch with ISL and 802.1Q we need to specify which protocol we want to run, so add the command below for each port. Different_Switch(config-if)# switchport trunk encapsulation dot1q  Now verify the configuration of the trunk ports. Switch# show interface fastethernet 0/22 switchport  What type of trunking encapsulation is shown on the output results? __________________________________________________________________________  On the text “Trunking VLANs Enable” from the output, what does the word “ALL” mean? __________________________________________________________________________  Test the VLANS and the trunk  Ping from the host in SwitchA port Fa0/1 to the host in SwitchB port Fa0/1. Was the ping successful? __________  Ping from the host in SwitchA port Fa0/5 to the SwitchB port Fa0/5 Was the ping successful? __________  Ping from the host in SwitchA port Fa0/9 to the SwitchB port Fa0/9 Was the ping successful? __________  Check if you can ping between hosts on different VLANs? Could you successfully ping between VLANS? __________ Why? ____________________________________________________________________