3.6.1 Packet Tracer – Implement VLANs and Trunking (Instructions Answer)

3.6.1 Packet Tracer - Implement VLANs and Trunking (Instructor Version)

Addressing Table

Device Interface IP Address Subnet Mask Switchport VLAN
PC1 NIC 192.168.10.10 255.255.255.0 SWB F0/1 VLAN 10
PC2 NIC 192.168.20.20 255.255.255.0 SWB F0/2 VLAN 20
PC3 NIC 192.168.30.30 255.255.255.0 SWB F0/3 VLAN 30
PC4 NIC 192.168.10.11 255.255.255.0 SWC F0/1 VLAN 10
PC5 NIC 192.168.20.21 255.255.255.0 SWC F0/2 VLAN 20
PC6 NIC 192.168.30.31 255.255.255.0 SWC F0/3 VLAN 30
PC7 NIC 192.168.10.12 255.255.255.0 SWC F0/4 VLAN 10
VLAN 40 (Voice)
SWA SVI 192.168.99.252 255.255.255.0 N/A VLAN 99
SWB SVI 192.168.99.253 255.255.255.0 N/A VLAN 99
SWC SVI 192.168.99.254 255.255.255.0 N/A VLAN 99

Objectives

  • Part 1: Configure VLANs
  • Part 2: Assign Ports to VLANs
  • Part 3: Configure Static Trunking
  • Part 4: Configure Dynamic Trunking

Background

You are working in a company that is getting ready to deploy a set of new 2960 switches in a branch office.

You are working in the lab to test out the VLAN and trunking configurations that are planned. Configure and test the VLANs and trunks.

Instructions

Part 1: Configure VLANs

Configure VLANs on all three switches. Refer to the VLAN Table. Note that the VLAN names must match the values in the table exactly.
VLAN Table

VLAN Number VLAN Name
10 Admin
VLAN Number VLAN Name
20 Accounts
30 HR
40 Voice
99 Management
100 Native

Switch A / Switch B / Switch C

enable
configure terminal
vlan 10
name Admin
vlan 20
name Accounts
vlan 30
name HR
vlan 40
name Voice
vlan 99
name Management
vlan 100
name Native

Part 2: Assign Ports to VLANs

Step 1: Assign access ports to VLANs

On SWB and SWC, assign ports to the VLANs. Refer to the Addressing Table.
Switch B

interface f0/1
switchport mode access
switchport access vlan 10
interface f0/2
switchport mode access
switchport access vlan 20
interface f0/3
switchport mode access
switchport access vlan 30

Switch C

interface f0/1
switchport mode access
switchport access vlan 10
interface f0/2
switchport mode access
switchport access vlan 20
interface f0/3
switchport mode access
switchport access vlan 30
interface f0/4
switchport mode access
switchport access vlan 10
Step 2: Configure the Voice VLAN port

Configure the appropriate port on switch SWC for voice VLAN functionality.
Switch C

interface f0/4
mls qos trust cos
switchport voice vlan 40
Step 3: Configure the virtual management interfaces

a. Create the virtual management interfaces, on all three switches.

b. Address the virtual management interfaces according to the Addressing Table.

c. The switches should not be able to ping each other.

SWA(config)#interface vlan 99
SWA(config-if)#ip address 192.168.99.252 255.255.255.0
SWA(config-if)#no shutdown

SWB(config)#interface vlan 99
SWB(config-if)#ip address 192.168.99.253 255.255.255.0
SWB(config-if)#no shutdown

SWC(config)#interface vlan 99
SWC(config-if)#ip address 192.168.99.254 255.255.255.0
SWC(config-if)#no shutdown

Part 3: Configure Static Trunking

a. Configure the link between SWA and SWB as a static trunk. Disable dynamic trunking on this port.

b. Disable DTP on the switch port on both ends of the trunk link.

c. Configure the trunk with the native VLAN and eliminate native VLAN conflicts if any.

SWA(config)#interface g0/1
SWA(config-if)#switchport mode trunk
SWA(config-if)#switchport nonegotiate
SWA(config-if)#switchport trunk native vlan 100
SWB(config)#interface g0/1
SWB(config-if)#switchport mode trunk
SWB(config-if)#switchport nonegotiate
SWB(config-if)#switchport trunk native vlan 100

Part 4: Configure Dynamic Trunking

a. Assume that the trunk port on SWC is set to the default DTP mode for 2960 switches. Configure G0/2 on SWA so that it successfully negotiates trunking with SWC.

b. Configure the trunk with the native VLAN and eliminate native VLAN conflicts if any.

SWA(config)#interface g0/2
SWA(config-if)#switchport mode dynamic desirable
SWC(config)#interface g0/2
SWC(config-if)#switchport mode trunk
SWC(config-if)#switchport trunk native vlan 100

Device Configs - Final

Switch SWA
! ==============================================================
!--- 3.6.1 Packet Tracer - Implement VLANs and Trunking
!--- ANSWER SCRIPT FOR SWITCH SWA
!--- Usage: from the console (or a Telnet/SSH session, if already reachable) on SWA, enter privileged EXEC mode with "enable", then paste this whole file. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- SWA is the distribution switch with no directly-connected PCs - only uplinks to SWB (G0/1, static trunk) and SWC (G0/2, dynamically-negotiated trunk). This script builds all six VLANs, brings up the VLAN 99 management SVI, and configures both trunk links.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 1: Configure VLANs
! --------------------------------------------------------------

!--- Create all six VLANs used across the topology, with the exact names the grader checks (VLAN 100 is the dedicated native VLAN - no host traffic is ever assigned to it).
vlan 10
 name Admin
vlan 20
 name Accounts
vlan 30
 name HR
vlan 40
 name Voice
vlan 99
 name Management
vlan 100
 name Native

! --------------------------------------------------------------
!--- Part 2, Step 3: Configure the virtual management interface
! --------------------------------------------------------------

!--- The VLAN 99 SVI is SWA's management address. SVIs come up administratively down by default, so "no shutdown" is required here even though the source answer key omits it on all three switches - without it the switch stays unreachable at 192.168.99.252, which contradicts the lab's own Part 2 Step 3(c) expectation that reachability between switches is being tested.
interface Vlan99
 ip address 192.168.99.252 255.255.255.0
 no shutdown

! --------------------------------------------------------------
!--- Part 3: Configure Static Trunking (link to SWB)
! --------------------------------------------------------------

!--- G0/1 is hard-set to trunk and DTP is switched off with "nonegotiate" (SWB's G0/1 matches exactly), so neither side ever sends or listens for DTP frames on this link. Native VLAN 100 must match SWB's setting or you get a native VLAN mismatch warning.
interface GigabitEthernet0/1
 switchport mode trunk
 switchport nonegotiate
 switchport trunk native vlan 100

! --------------------------------------------------------------
!--- Part 4: Configure Dynamic Trunking (link to SWC)
! --------------------------------------------------------------

!--- G0/2 is set to "dynamic desirable" so SWA actively sends DTP frames and negotiates a trunk regardless of SWC's DTP state; paired with SWC's G0/2 below, the link comes up as a trunk. Native VLAN 100 is set here too, for the same native-VLAN-conflict reason as Part 3.
interface GigabitEthernet0/2
 switchport mode dynamic desirable
 switchport trunk native vlan 100

! --------------------------------------------------------------
!--- Additional hardening (per the lab's own answer key, SWA only - not requested by any numbered Part/Step)
! --------------------------------------------------------------

!--- VLAN 1 is the default VLAN every unconfigured port would fall back into; disabling its SVI here follows the answer key exactly. Note: SWB and SWC's answer keys do NOT include this - see the discrepancy summary.
interface Vlan1
 no ip address
 shutdown

end

! --------------------------------------------------------------
!--- Operational habit (not explicitly required by this lab): save to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config

! ==============================================================
!--- Verification (from SWA and its neighbors):
!---   SWA# show vlan brief       -> VLANs 10/20/30/40/99/100 all present with the correct names
!---   SWA# show interfaces trunk -> G0/1 and G0/2 both trunking, native VLAN 100 on both
!---   SWA# ping 192.168.99.253   -> success once SWB's trunk is also configured (SWA-SWB link)
!---   SWA# ping 192.168.99.254   -> success once SWC's trunk is also configured (SWA-SWC link)
! ==============================================================

Switch SWB
! ==============================================================
!--- 3.6.1 Packet Tracer - Implement VLANs and Trunking
!--- ANSWER SCRIPT FOR SWITCH SWB
!--- Usage: from the console (or a Telnet/SSH session, if already reachable) on SWB, enter privileged EXEC mode with "enable", then paste this whole file. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- SWB connects PC1/PC2/PC3 as access ports (VLANs 10/20/30) and uplinks to SWA over G0/1 as a static trunk. This script builds all six VLANs, assigns the access ports, brings up the VLAN 99 management SVI, and configures the trunk.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 1: Configure VLANs
! --------------------------------------------------------------

!--- Same six VLANs as every switch in the topology, with the exact names the grader checks.
vlan 10
 name Admin
vlan 20
 name Accounts
vlan 30
 name HR
vlan 40
 name Voice
vlan 99
 name Management
vlan 100
 name Native

! --------------------------------------------------------------
!--- Part 2, Step 1: Assign access ports to VLANs
! --------------------------------------------------------------

!--- F0/1-3 face PC1/PC2/PC3 per the Addressing Table.
interface FastEthernet0/1
 switchport mode access
 switchport access vlan 10

interface FastEthernet0/2
 switchport mode access
 switchport access vlan 20

interface FastEthernet0/3
 switchport mode access
 switchport access vlan 30

! --------------------------------------------------------------
!--- Part 2, Step 3: Configure the virtual management interface
! --------------------------------------------------------------

!--- Same fix as SWA: the source answer key omits "no shutdown" on the VLAN 99 SVI, but it's required for the SVI to come up (SVIs are administratively down by default) and the lab's own Part 2 Step 3 commands include it.
interface Vlan99
 ip address 192.168.99.253 255.255.255.0
 no shutdown

! --------------------------------------------------------------
!--- Part 3: Configure Static Trunking (link to SWA)
! --------------------------------------------------------------

!--- Mirrors SWA's G0/1 exactly: hard-set trunk, DTP off, native VLAN 100 - both ends must match or the link native-VLAN-mismatches.
interface GigabitEthernet0/1
 switchport mode trunk
 switchport nonegotiate
 switchport trunk native vlan 100

end

! --------------------------------------------------------------
!--- Operational habit (not explicitly required by this lab): save to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config

! ==============================================================
!--- Verification (from SWB and its neighbors):
!---   SWB# show vlan brief       -> VLAN 10 shows Fa0/1, VLAN 20 shows Fa0/2, VLAN 30 shows Fa0/3
!---   SWB# show interfaces trunk -> G0/1 trunking, native VLAN 100, DTP off (nonegotiate)
!---   SWB# ping 192.168.99.252   -> success once SWA's trunk is also configured
!---   From PC1, ping PC2 or PC3  -> fails (different VLANs, no inter-VLAN routing configured in this lab)
!---   From PC1, ping PC4 (VLAN 10, on SWC) -> success once the SWA<->SWC trunk (Part 4) is also up
! ==============================================================

Switch SWC
! ==============================================================
!--- 3.6.1 Packet Tracer - Implement VLANs and Trunking
!--- ANSWER SCRIPT FOR SWITCH SWC
!--- Usage: from the console (or a Telnet/SSH session, if already reachable) on SWC, enter privileged EXEC mode with "enable", then paste this whole file. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- SWC connects PC4/PC5/PC6/PC7 as access ports (VLANs 10/20/30, plus a voice VLAN on the PC7 port) and uplinks to SWA over G0/2 as a dynamically-negotiated trunk. This script builds all six VLANs, assigns the access + voice ports, brings up the VLAN 99 management SVI, and configures the trunk.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 1: Configure VLANs
! --------------------------------------------------------------

!--- Same six VLANs as every switch in the topology, with the exact names the grader checks.
vlan 10
 name Admin
vlan 20
 name Accounts
vlan 30
 name HR
vlan 40
 name Voice
vlan 99
 name Management
vlan 100
 name Native

! --------------------------------------------------------------
!--- Part 2, Step 1: Assign access ports to VLANs
! --------------------------------------------------------------

!--- F0/1-4 face PC4/PC5/PC6/PC7 per the Addressing Table; F0/4 (PC7) starts as a plain VLAN 10 access port and gets its voice VLAN added in Step 2 below.
interface FastEthernet0/1
 switchport mode access
 switchport access vlan 10

interface FastEthernet0/2
 switchport mode access
 switchport access vlan 20

interface FastEthernet0/3
 switchport mode access
 switchport access vlan 30

interface FastEthernet0/4
 switchport mode access
 switchport access vlan 10

! --------------------------------------------------------------
!--- Part 2, Step 2: Configure the voice VLAN port
! --------------------------------------------------------------

!--- PC7 sits behind an IP phone: data traffic stays on VLAN 10 (already set above), voice traffic is tagged into VLAN 40. "mls qos trust cos" trusts the CoS marking coming from the phone instead of re-classifying it.
interface FastEthernet0/4
 mls qos trust cos
 switchport voice vlan 40

! --------------------------------------------------------------
!--- Part 2, Step 3: Configure the virtual management interface
! --------------------------------------------------------------

!--- Same fix as SWA/SWB: added "no shutdown", missing from the source answer key, required for the SVI to actually come up.
interface Vlan99
 ip address 192.168.99.254 255.255.255.0
 no shutdown

! --------------------------------------------------------------
!--- Part 4: Configure Dynamic Trunking (link to SWA)
! --------------------------------------------------------------

!--- Both the lab's worked example and its answer key hard-set this port to a static trunk, rather than truly leaving it at the factory-default "dynamic auto" the narrative describes - followed here to match the graded config exactly. Paired with SWA's "dynamic desirable" on the other end, DTP still brings the link up as a trunk either way. Native VLAN 100 must match SWA's setting.
interface GigabitEthernet0/2
 switchport mode trunk
 switchport trunk native vlan 100

end

! --------------------------------------------------------------
!--- Operational habit (not explicitly required by this lab): save to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config

! ==============================================================
!--- Verification (from SWC and its neighbors):
!---   SWC# show vlan brief       -> VLAN 10 shows Fa0/1 & Fa0/4, VLAN 20 shows Fa0/2, VLAN 30 shows Fa0/3
!---   SWC# show interfaces trunk -> G0/2 trunking, native VLAN 100
!---   SWC# show interfaces fa0/4 switchport -> Voice VLAN 40 active, Access Mode VLAN 10
!---   SWC# ping 192.168.99.252   -> success once SWA's trunk is also configured
!---   From PC4, ping PC1 (VLAN 10, on SWB) -> success once the SWA<->SWB trunk (Part 3) is also up
! ==============================================================

Download Packet Tracer (.pka) file:

Subscribe
Notify of
guest

4 Corrections & Clarifications