Sie sind auf Seite 1von 8

Lab ID: 9.9K615A128.SWP.

SWITCH Lab: VLAN Configuration


Objective
Configure virtual LANs (VLANs), and assign switchports to VLANs.

Lab Topology
For this lab, your network design will include two PC workstations, P1PC1 and P2PC2, and four switches,
P1ASW1, P1DSW1, P2ASW2, and P2DSW2. P1ASW1 and P2ASW2 are Access layer switches. P1DSW1
and P2DSW2 are Distribution layer switches. The Access and Distribution layers are two of the three layers
in the Cisco three-layer hierarchical network model, which also includes the Core layer. The topology
diagram below represents the NetMap in the Simulator.

1 Boson NetSim Lab Manual


Command Summary
Command Description
configure terminal enters global configuration mode from privileged EXEC mode
enable enters privileged EXEC mode
end ends and exits configuration mode
exit exits one level in the menu structure
interface range fastethernet slot/ configures a range of interfaces
starting-port - ending-port
interface type number changes from global configuration mode to interface
configuration mode
ip address ip-address subnet-mask assigns an IP address to an interface
name vlan-name names a VLAN
ping ip-address sends an Internet Control Message Protocol (ICMP) echo
request to the specified address
show interfaces [type number] shows the switchport configuration
switchport
show running-config displays the active configuration file
shutdown; no shutdown disables an interface; enables an interface
switchport access vlan vlan-id assigns the default VLAN for a port
vlan vlan-id creates a VLAN

Lab Tasks
The console password in this lab has been set to cisco for all four switches.
1. On each Access layer switch, create a VLAN named VLAN 99.

2. On each Access layer switch, assign to VLAN 99 the ports that connect to the PCs.

3. On each Access layer switch, verify that the assigned interfaces belong to VLAN 99.

4. From P1PC1, attempt to ping P1ASW1 (172.16.1.10). This ping should fail. Why? _____________
______________________________________________________________________________

5. On each Access layer switch, disable the VLAN 1 interface. Why is it necessary to disable the VLAN
1 interface on each Access layer switch? _____________________________________________
______________________________________________________________________________

6. On each Access layer switch, create a VLAN 99 interface and assign the appropriate IP address to
each interface.

7. From P1PC1, attempt to ping VLAN 99 on P1ASW1 (172.16.99.10). This ping should succeed.
Why? _________________________________________________________________________

2 Boson NetSim Lab Manual


8. From P1PC1, attempt to ping P2PC2 (172.16.2.2). This ping should fail. Why? ________________
______________________________________________________________________________

9. On each Access layer switch, configure each of the ports that connect to the Distribution layer
switches to belong to VLAN 99.

10. On each Distribution layer switch, configure each of the ports that connects to the Access layer
switches to belong to VLAN 99. Notice that you did not create VLAN 99 on the Distribution layer
switches; the switches created it automatically.

11. On each Distribution layer switch, configure each of the ports that connect to the other Distribution
layer switch to belong to VLAN 99.

12. From P1PC1, attempt to ping P2PC2 (172.16.2.2). Why does the ping succeed now when it failed
earlier? ________________________________________________________________________
______________________________________________________________________________

13. What should you do to allow P1PC1 and P2PC2 to successfully ping the Distribution layer switches?
______________________________________________________________________________

14. On each Distribution layer switch, disable VLAN 1 and configure a VLAN 99 interface with the
appropriate IP address for each interface. Enable the VLAN 99 interface.

15. From P1PC1, attempt to ping the VLAN 99 interface on P1DSW1 (172.16.99.100). Does the ping
succeed? ______________________________________________________________________

3 Boson NetSim Lab Manual


Lab Solutions
The console password in this lab has been set to cisco for all four switches.
1. You should issue the following commands to create and name VLAN 99 on the Access layer
switches:

P1ASW1(config)#vlan 99
VLAN 99 added:
Name:VLAN0099
P1ASW1(config-vlan)#name VLAN99

P2ASW2(config)#vlan 99
VLAN 99 added:
Name:VLAN0099
P2ASW2(config-vlan)#name VLAN99

2. You should issue the following commands to assign to VLAN 99 the ports that connect to the PCs:

P1ASW1(config)#interface fastethernet 0/5


P1ASW1(config-if)#switchport access vlan 99

P2ASW2(config)#interface fastethernet 0/5


P2ASW2(config-if)#switchport access vlan 99

3. You should issue the following command on P1ASW1 and P2ASW2 to verify that the assigned
interfaces belong to VLAN 99. The following is sample output from P1ASW1:

P1ASW1#show interfaces fastethernet 0/5 switchport

Name: Fa0/5
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 99 (VLAN99)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001

Protected: false

Appliance trust: none

4. A ping from P1PC1 to P1ASW1 (172.16.1.10) should fail because P1PC1 is in VLAN 99 and
P1ASW1 is in VLAN 1.

4 Boson NetSim Lab Manual


5. You should issue the following commands on P1ASW1 and P2ASW2 to disable the VLAN 1
interface:

P1ASW1(config)#interface vlan 1
P1ASW1(config-if)#shutdown

P2ASW2(config)#interface vlan 1
P2ASW2(config-if)#shutdown

It is necessary to shut down the VLAN 1 interface on each Access layer switch because the VLAN 1
IP addresses will overlap with the IP addresses you will assign to VLAN 99 in the next step.

6. You should issue the following commands on P1ASW1 and P2ASW2 to create the VLAN 99
interface and to assign the appropriate IP addresses to the interfaces:

P1ASW1(config)#interface vlan 99
P1ASW1(config-if)#ip address 172.16.99.10 255.255.0.0

P2ASW2(config)#interface vlan 99
P2ASW2(config-if)#ip address 172.16.99.20 255.255.0.0

7. A ping from P1PC1 to P1ASW1 (172.16.99.10) should succeed because the Access layer switches
and the PCs all have interfaces associated with VLAN 99.

8. A ping from P1PC1 to P2PC2 (172.16.2.2) should fail because the interfaces between the Access
layer switches and the Distribution layer switches do not belong to VLAN 99 and because they are
not trunks.

9. You should issue the following commands on P1ASW1 and P2ASW2 to configure the appropriate
ports to belong to VLAN 99:

P1ASW1(config)#interface range fastethernet 0/1 - 4


P1ASW1(config-if-range)#switchport access vlan 99

P2ASW2(config)#interface range fastethernet 0/1 - 4


P2ASW2(config-if-range)#switchport access vlan 99

10. You should issue the following commands on P1DSW1 and P2DSW2 to configure the appropriate
interfaces to belong to VLAN 99:

P1DSW1(config)#interface range fastethernet 0/1 - 4


P1DSW1(config-if-range)#switchport access vlan 99

P2DSW2(config)#interface range fastethernet 0/1 - 4


P2DSW2(config-if-range)#switchport access vlan 99

Because the switches create VLAN 99, you should see the following output:

%Access VLAN does not exist. Creating vlan 99

5 Boson NetSim Lab Manual


11. You should issue the following commands on P1DSW1 and P2DSW2 to configure the appropriate
ports to belong to VLAN 99:

P1DSW1(config)#interface range fastethernet 0/11 - 12


P1DSW1(config-if-range)#switchport access vlan 99

P2DSW2(config)#interface range fastethernet 0/11 - 12


P2DSW2(config-if-range)#switchport access vlan 99

12. After the network converges, you should ping from P1PC1 to P2PC2 (172.16.2.2). The ping should
succeed because the Distribution layer switches and the PCs all have interfaces associated with
VLAN 99.

13. To allow P1PC1 and P2PC2 to successfully ping P1DSW1 and P2DSW2, you should create
VLAN 99 interfaces on the Distribution layer switches and assign the interfaces the appropriate IP
addresses.

14. You should issue the following commands on P1DSW1 and P2DSW2 to disable the VLAN 1
interface and to configure an IP address for the VLAN 99 interface:

P1DSW1(config)#interface vlan 1
P1DSW1(config-if)#shutdown
P1DSW1(config-if)#interface vlan 99
P1DSW1(config-if)#ip address 172.16.99.100 255.255.0.0

P2DSW2(config)#interface vlan 1
P2DSW2(config-if)#shutdown
P2DSW2(config-if)#interface vlan 99
P2DSW2(config-if)#ip address 172.16.99.200 255.255.0.0

15. A ping from P1PC1 to P1DSW1 (172.16.99.100) should succeed because the Distribution layer
switches and the PCs all have interfaces associated with VLAN 99.

6 Boson NetSim Lab Manual


Sample Configuration Scripts
P1ASW1 P1ASW1 (continued)
P1ASW1#show running-config interface FastEthernet0/5
Building configuration... description student P1PC1 to P1ASW1
Current configuration : 1576 bytes switchport mode access
! switchport access vlan 99
Version 12.3 speed 10
service timestamps debug uptime duplex half
service timestamps log uptime !
no service password-encryption interface FastEthernet0/6
! !
hostname P1ASW1 interface FastEthernet0/7
! !
ip subnet-zero interface FastEthernet0/8
! !
ip cef interface FastEthernet0/9
no ip domain-lookup !
spanning-tree mode pvst interface FastEthernet0/10
spanning-tree extend system-id !
! interface FastEthernet0/11
interface FastEthernet0/1 !
description P1ASW1 to P1DSW1 interface FastEthernet0/12
switchport mode access !
switchport access vlan 99 interface Vlan 1
speed 100 ip address 172.16.1.10 255.255.0.0
duplex full no ip route-cache
! shutdown
interface FastEthernet0/2 !
description P1ASW1 to P1DSW1 interface Vlan0099
switchport mode access ip address 172.16.99.10 255.255.0.0
switchport access vlan 99 no ip route-cache
speed 100 !
duplex full vlan 99 name VLAN99
! !
interface FastEthernet0/3 ip classless
description P1ASW1 to P2DSW2 no ip http server
switchport mode access !
switchport access vlan 99 line con 0
speed 100 login
duplex full password cisco
! line aux 0
interface FastEthernet0/4 line vty 0 15
description P1ASW1 to P2DSW2 login
switchport mode access password cisco
switchport access vlan 99 !
speed 100 no scheduler allocate
duplex full end
!

7 Boson NetSim Lab Manual


P1DSW1 P1DSW1 (continued)
P1DSW1#show running-config interface FastEthernet0/7
Building configuration... !
Current configuration : 1749 bytes interface FastEthernet0/8
! !
Version 12.3 interface FastEthernet0/9
service timestamps debug uptime !
service timestamps log uptime interface FastEthernet0/10
no service password-encryption !
! interface FastEthernet0/11
hostname P1DSW1 description P1DSW1 to P2DSW2
! switchport mode access
ip subnet-zero switchport access vlan 99
! speed 100
ip cef duplex full
no ip domain-lookup !
spanning-tree mode pvst interface FastEthernet0/12
spanning-tree extend system-id description P1DSW1 to P2DSW2
! switchport mode access
interface FastEthernet0/1 switchport access vlan 99
description P1DSW1 to P1ASW1 speed 100
switchport mode access duplex full
switchport access vlan 99 !
speed 100 interface GigabitEthernet0/1
duplex full !
! interface GigabitEthernet0/2
interface FastEthernet0/2 !
description P1DSW1 to P1ASW1 interface Vlan 1
switchport mode access ip address 172.16.1.100 255.255.0.0
switchport access vlan 99 no ip route-cache
speed 100 shutdown
duplex full !
! interface Vlan0099
interface FastEthernet0/3 ip address 172.16.99.100 255.255.0.0
description P1DSW1 to P2ASW2 no ip route-cache
switchport mode access !
switchport access vlan 99 vlan 99 name VLAN0099
speed 100 !
duplex full ip classless
! no ip http server
interface FastEthernet0/4 !
description P1DSW1 to P2ASW2 line con 0
switchport mode access login
switchport access vlan 99 password cisco
speed 100 line aux 0
duplex full line vty 0 4
! login
interface FastEthernet0/5 password cisco
! !
interface FastEthernet0/6 no scheduler allocate
! end

Copyright © 1996–2015 Boson Software, LLC. All rights reserved. NetSim software and documentation are protected by copyright law.

8 Boson NetSim Lab Manual

Das könnte Ihnen auch gefallen