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

3.6.1 Packet Tracer - Implement VLANs and Trunking Answers

Topology

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
20 Accounts
30 HR
40 Voice
99 Management
100 Native
SWA(config)# vlan 10
SWA(config-vlan)# name Admin
SWA(config-vlan)# vlan 20
SWA(config-vlan)# name Accounts
SWA(config-vlan)# vlan 30
SWA(config-vlan)# name HR
SWA(config-vlan)# vlan 40
SWA(config-vlan)# name Voice
SWA(config-vlan)# vlan 99
SWA(config-vlan)# name Management
SWA(config-vlan)# vlan 100
SWA(config-vlan)# name Native
SWB(config)# vlan 10
SWB(config-vlan)# name Admin
SWB(config-vlan)# vlan 20
SWB(config-vlan)# name Accounts
SWB(config-vlan)# vlan 30
SWB(config-vlan)# name HR
SWB(config-vlan)# vlan 40
SWB(config-vlan)# name Voice
SWB(config-vlan)# vlan 99
SWB(config-vlan)# name Management
SWB(config-vlan)# vlan 100
SWB(config-vlan)# name Native
SWC(config)# vlan 10
SWC(config-vlan)# name Admin
SWC(config-vlan)# vlan 20
SWC(config-vlan)# name Accounts
SWC(config-vlan)# vlan 30
SWC(config-vlan)# name HR
SWC(config-vlan)# vlan 40
SWC(config-vlan)# name Voice
SWC(config-vlan)# vlan 99
SWC(config-vlan)# name Management
SWC(config-vlan)# vlan 100
SWC(config-vlan)# 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.

SWB(config)# interface fastethernet 0/1
SWB(config-if)# switchport mode access
SWB(config-if)# switchport access vlan 10
SWB(config-if)# interface fastethernet 0/2
SWB(config-if)# switchport mode access
SWB(config-if)# switchport access vlan 20
SWB(config-if)# interface fastethernet 0/3
SWB(config-if)# switchport mode access
SWB(config-if)# switchport access vlan 30
SWC(config)# interface fastethernet 0/1
SWC(config-if)# switchport mode access
SWC(config-if)# switchport access vlan 10
SWC(config-if)# interface fastethernet 0/2
SWC(config-if)# switchport mode access
SWC(config-if)# switchport access vlan 20
SWC(config-if)# interface fastethernet 0/3
SWC(config-if)# switchport mode access
SWC(config-if)# switchport access vlan 30
SWC(config-if)# interface fastethernet 0/4
SWC(config-if)# switchport mode access
SWC(config-if)# switchport access vlan 10
Step 2: Configure the Voice VLAN port

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

SWC(config)# interface fastethernet 0/4
SWC(config-if)# mls qos trust cos
SWC(config-if)# 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.

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

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

SWA# ping 192.168.99.253

Part 3: Configure Static Trunking

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

SWA(config)# interface gigabitethernet 0/1
SWA(config-if)# switchport mode trunk
SWB(config)# interface gigabitethernet 0/1
SWB(config-if)# switchport mode trunk

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

SWA(config)# interface gigabitethernet 0/1
SWA(config-if)# switchport nonegotiate
SWB(config)# interface gigabitethernet 0/1
SWB(config-if)# switchport nonegotiate

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

SWA(config)# interface gigabitethernet 0/1
SWA(config-if)# switchport trunk native vlan 100
SWB(config)# interface gigabitethernet 0/1
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.

SWA(config)# interface gigabitethernet 0/2
SWA(config-if)# switchport mode dynamic desirable

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

SWA(config)# interface gigabitethernet 0/2
SWA(config-if)# switchport trunk native vlan 100
SWC(config)# interface gigabitethernet 0/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: copy this whole file and paste it into the SWA terminal (start at the SWA> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- SWA has no PCs: G0/1 is a static trunk to SWB, G0/2 a DTP trunk to SWC.
! ==============================================================

enable
configure terminal

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

!--- Create the VLANs from the VLAN Table. Names must match exactly.
vlan 10
 name Admin
 exit
vlan 20
 name Accounts
 exit
vlan 30
 name HR
 exit
vlan 40
 name Voice
 exit
vlan 99
 name Management
 exit
vlan 100
 name Native
 exit

! --------------------------------------------------------------
!--- Part 2: Assign Ports to VLANs.
! --------------------------------------------------------------

!--- Step 3: management SVI on VLAN 99.
interface vlan 99
 ip address 192.168.99.252 255.255.255.0
 no shutdown
 exit

! --------------------------------------------------------------
!--- Part 3: Configure Static Trunking.
! --------------------------------------------------------------

!--- a, b and c. G0/1 to SWB: static trunk, DTP disabled, native VLAN 100.
interface gigabitethernet 0/1
 switchport mode trunk
 switchport nonegotiate
 switchport trunk native vlan 100
 exit

! --------------------------------------------------------------
!--- Part 4: Configure Dynamic Trunking.
! --------------------------------------------------------------

!--- a and b. G0/2 to SWC: dynamic desirable (negotiates with SWC's default dynamic auto), native VLAN 100.
interface gigabitethernet 0/2
 switchport mode dynamic desirable
 switchport trunk native vlan 100
 exit

end

! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config


! ==============================================================
!--- Verification:
!---   show interfaces trunk  -> Gig0/1 on and Gig0/2 desirable, both trunking with native VLAN 100
!---   ping 192.168.99.253 and ping 192.168.99.254 -> SWB and SWC reachable over the trunks
! ==============================================================

SWITCH SWB

! ==============================================================
!--- 3.6.1 Packet Tracer - Implement VLANs and Trunking
!--- ANSWER SCRIPT FOR SWITCH SWB
!--- Usage: copy this whole file and paste it into the SWB terminal (start at the SWB> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- PC1, PC2 and PC3 connect to F0/1 - F0/3; G0/1 is the static trunk to SWA.
! ==============================================================

enable
configure terminal

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

!--- Create the VLANs from the VLAN Table. Names must match exactly.
vlan 10
 name Admin
 exit
vlan 20
 name Accounts
 exit
vlan 30
 name HR
 exit
vlan 40
 name Voice
 exit
vlan 99
 name Management
 exit
vlan 100
 name Native
 exit

! --------------------------------------------------------------
!--- Part 2: Assign Ports to VLANs.
! --------------------------------------------------------------

!--- Step 1: assign the access ports according to the Addressing Table.
interface fastethernet 0/1
 switchport mode access
 switchport access vlan 10
 exit
interface fastethernet 0/2
 switchport mode access
 switchport access vlan 20
 exit
interface fastethernet 0/3
 switchport mode access
 switchport access vlan 30
 exit

!--- Step 3: management SVI on VLAN 99.
interface vlan 99
 ip address 192.168.99.253 255.255.255.0
 no shutdown
 exit

! --------------------------------------------------------------
!--- Part 3: Configure Static Trunking.
! --------------------------------------------------------------

!--- a, b and c. G0/1 to SWA: static trunk, DTP disabled, native VLAN 100 (matches SWA).
interface gigabitethernet 0/1
 switchport mode trunk
 switchport nonegotiate
 switchport trunk native vlan 100
 exit

end

! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config


! ==============================================================
!--- Verification:
!---   show vlan brief        -> Fa0/1 VLAN 10, Fa0/2 VLAN 20, Fa0/3 VLAN 30
!---   show interfaces trunk  -> Gig0/1 on, trunking, native VLAN 100
! ==============================================================

SWITCH SWC

! ==============================================================
!--- 3.6.1 Packet Tracer - Implement VLANs and Trunking
!--- ANSWER SCRIPT FOR SWITCH SWC
!--- Usage: copy this whole file and paste it into the SWC terminal (start at the SWC> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
!--- PC4 - PC6 connect to F0/1 - F0/3; PC7 connects through an IP phone on F0/4; G0/2 is the trunk to SWA.
! ==============================================================

enable
configure terminal

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

!--- Create the VLANs from the VLAN Table. Names must match exactly.
vlan 10
 name Admin
 exit
vlan 20
 name Accounts
 exit
vlan 30
 name HR
 exit
vlan 40
 name Voice
 exit
vlan 99
 name Management
 exit
vlan 100
 name Native
 exit

! --------------------------------------------------------------
!--- Part 2: Assign Ports to VLANs.
! --------------------------------------------------------------

!--- Step 1: assign the access ports according to the Addressing Table.
interface fastethernet 0/1
 switchport mode access
 switchport access vlan 10
 exit
interface fastethernet 0/2
 switchport mode access
 switchport access vlan 20
 exit
interface fastethernet 0/3
 switchport mode access
 switchport access vlan 30
 exit
interface fastethernet 0/4
 switchport mode access
 switchport access vlan 10
 exit

!--- Step 2: voice VLAN 40 on F0/4 (IP phone) and trust the CoS values marked by the phone.
interface fastethernet 0/4
 mls qos trust cos
 switchport voice vlan 40
 exit

!--- Step 3: management SVI on VLAN 99.
interface vlan 99
 ip address 192.168.99.254 255.255.255.0
 no shutdown
 exit

! --------------------------------------------------------------
!--- Part 4: Configure Dynamic Trunking.
! --------------------------------------------------------------

!--- b. G0/2 to SWA: native VLAN 100 to match SWA (trunk mode as in the lab answer key).
interface gigabitethernet 0/2
 switchport mode trunk
 switchport trunk native vlan 100
 exit

end

! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config


! ==============================================================
!--- Verification:
!---   show vlan brief                                  -> Fa0/1, Fa0/4 VLAN 10, Fa0/2 VLAN 20, Fa0/3 VLAN 30
!---   show interfaces fastethernet 0/4 switchport      -> Access VLAN 10, Voice VLAN 40
!---   show interfaces trunk                            -> Gig0/2 trunking, native VLAN 100
!--- From PC1 ping PC4 (VLAN 10 across SWA) -> successful
! ==============================================================

Download Packet Tracer (.pka) file:

Subscribe
Notify of
guest

4 Corrections & Clarifications