Lab 6 Handout
Lab 6 Handout
Taxila
Computer Networks LAB
Remarks: ……………………………………………
2. Resources Required
• Computer
• Packet Tracer (version 5 or higher)
3. Introduction
This lab introduces Cisco IOS (Internetwork Operating System) which is the proprietary CLI
(command line interface) based software empowering nearly all the Cisco devices. IOS is a
package of routing, switching, internetworking and telecommunications functions tightly
integrated with a multitasking operating system.
A broadcast domain is a logical division of a computer network, in which all nodes can reach
each other by broadcast at the data link layer. A simple LAN is a single broadcast domain. To
reduce the numbers of devices in a broadcast domain, we have to divide broadcast domain.
VLAN serve for this purpose. The whole idea of VLAN technology is to divide LAN into
logical, instead of physical, segments. VLANs are created at the Data Link layer so switches
apply them to a network. Computers in different VLANs can’t communicate with each other so
Inter-VLAN routing is required for this purpose.
4. Procedure
4.1 Configuring Static VLANs
1. Open Packet Tracer 5 and setup a network similar to the following network. Use
Cisco 2950T switch.
When managing a switch, the Management Domain is always VLAN 1. The Network
Administrator's workstation must have access to a port in the VLAN 1 Management Domain. All
ports are assigned to VLAN 1 by default.
Switch_A#show version
c. Does this switch have standard edition or Enterprise edition software? ___________________
Switch_A#show vlan
Switch_A#vlan database
Switch_A(vlan)#vlan 2 name VLAN2
Switch_A(vlan)#vlan 3 name VLAN3
Switch_A(vlan)#exit
Another (newer) way of doing the same is by entering the following commands:
Switch_A(config)#vlan 2
Switch_A(config-vlan)#name VLAN2
Switch_A(config-vlan)#vlan 3
Switch_A(config-vlan)# name VLAN3
Switch_A#show vlan
Switch_A#configure terminal
Switch_A(config)#interface fastethernet 0/2
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 2
Switch_A(config-if)#end
Switch_A#show vlan
Switch_A#configure terminal
Switch_A(config)#interface fastethernet 0/3
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 3
Switch_A(config-if)#end
Switch_A#show vlan
Switch_A#show vlan id 2
b. Does this command supply any more information than the show VLAN command?
__________
b. Does this command supply any more information than the show VLAN command?
__________
Note:
This configuration is much secure as VLANs can’t communicate with each other but if it is a
requirement, we can enable Inter-VLAN routing which is discussed in next section.
1. Open Packet Tracer 5 and setup a network similar to the following network. Use
Cisco 2950T switch & Cisco 2621XM router.
2. Double click the switch and goto CLI tab. Follow the steps below to complete the
lab. You can do the same using a PC if you use a console (one side is RS 232,
other is RJ45—blue colored in Packet Tracer) cable for connection between
PC and Switch. Goto PC’s desktop then Terminal (equivalent of HyperTerminal),
accept the default settings and login to the Switch.
This part also involves a router (Layer 3 device) but no major configurations are being done on
it. It also uses trunk link whose main purpose is multiplexing.
Switch_A#vlan database
Switch_A(vlan)#vlan 10 name Sales
Switch_A(vlan)#vlan 20 name Support
Switch_A(vlan)#exit
Another (newer) way of doing the same is by entering the following commands:
Switch_A(config)#vlan 10
Switch_A(config-vlan)#name Sales
Switch_A(config-vlan)#vlan 20
Switch_A(config-vlan)# name Support
Switch_A#configure terminal
Switch_A(config)#interface fastethernet 0/5
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 10
Switch_A(config-if)#interface fastethernet 0/6
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 10
Switch_A(config-if)#interface fastethernet 0/7
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 10
Switch_A(config-if)#interface fastethernet 0/8
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 10
Switch_A(config-if)#end
Computer Networks Lab Page 7
Step 6 Assign ports to VLAN 20
Enter the following commands to add ports 0/9 to 0/12 to VLAN 20:
Switch_A#configure terminal
Switch_A(config)#interface fastethernet 0/9
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 20
Switch_A(config-if)#interface fastethernet 0/10
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 20
Switch_A(config-if)#interface fastethernet 0/11
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 20
Switch_A(config-if)#interface fastethernet0/12
Switch_A(config-if)#switchport mode access
Switch_A(config-if)#switchport access vlan 20
Switch_A(config-if)#end
Switch_A#show vlan
Switch_A(config)#interface fastethernet0/1
Switch_A(config-if)#switchport mode trunk
Switch_A(config-if)#end
Hostname is Router_A
Ping from the host in Switch_A port 0/5 to the switch IP 192.168.1.2.