3.4.6 Packet Tracer - Configure VLANs and Trunking - Physical Mode Answers

Packet Tracer Packet Tracer Labs Original source

3.4.6 Packet Tracer - Configure VLANs and Trunking - Physical Mode Answers

Topology

Addressing Table

Device Interface IP Address Subnet Mask Default Gateway
S1 VLAN 1 192.168.1.11 255.255.255.0 N/A
S2 VLAN 1 192.168.1.12 255.255.255.0 N/A
PC-A NIC 192.168.10.3 255.255.255.0 192.168.10.1
PC-B NIC 192.168.10.4 255.255.255.0 192.168.10.1

Objectives

Background / Scenario

Modern switches use virtual local-area networks (VLANs) to improve network performance by separating large Layer 2 broadcast domains into smaller ones. VLANs can also be used as a security measure by controlling which hosts can communicate. In general, VLANs make it easier to design a network to support the goals of an organization.

VLAN trunks are used to span VLANs across multiple devices. Trunks allow the traffic from multiple VLANs to travel over a single link, while keeping the VLAN identification and segmentation intact.

In this Packet Tracer Physical Mode (PTPM) activity, you will create VLANs on both switches in the topology, assign VLANs to switch access ports, and verify that VLANs are working as expected. You will then create a VLAN trunk between the two switches to allow hosts in the same VLAN to communicate through the trunk, regardless of which switch to which the host is attached.

Instructions

Part 1: Build the Network and Configure Basic Device Settings

In Part 1, you will set up the network topology and configure basic settings on the PC hosts and switches.

Step 1: Build the network as shown in the topology.

Attach the devices as shown in the topology diagram, and cable as necessary.

a. Click and drag both switch S1 and S2 to the Rack.

Note: This activity will open with 37% completion because the switch ports are all shut down. When you install the switches in the rack, the ports will automatically be activated. After about a minute, the score will drop to 1%. Later in the activity, you will shut down unused ports.

b. Click and drag both PC-A and PC-B to the Table and use the power button to turn them on.

c. Provide network connectivity by connecting Copper Straight-through cables, as shown in the topology.

d. Connect a Console Cable from device PC-A to S1 and from device PC-B to S2.

Step 2: Configure basic settings for each switch.

a. From the Desktop Tab on each PC, use the Terminal to console into each switch and enable privileged EXEC mode.

Copy

Switch> enable

b. Enter configuration mode.

Copy

Switch# configure terminal

c. Assign a device name to each switch.

Copy

Switch(config)# hostname S1

Copy

Switch(config)# hostname S2

d. Assign class as the privileged EXEC encrypted password.

Copy

S1(config)# enable secret class

Copy

S2(config)# enable secret class

e. Assign cisco as the console password and enable login.

Copy

S1(config)# line console 0

S1(config-line)# password cisco

S1(config-line)# login

Copy

S2(config)# line console 0

S2(config-line)# password cisco

S2(config-line)# login

f. Assign cisco as the vty password and enable login.

Copy

S1(config)# line vty 0 4

S1(config-line)# password cisco

S1(config-line)# login

Copy

S2(config)# line vty 0 4

S2(config-line)# password cisco

S2(config-line)# login

g. Encrypt the plaintext passwords.

Copy

S1(config)# service password-encryption

Copy

S2(config)# service password-encryption

h. Create a banner that warns anyone accessing the device that unauthorized access is prohibited.

Copy

S1(config)# banner motd $ Authorized Users Only! $

Copy

S2(config)# banner motd $ Authorized Users Only! $

i. Configure the IP address listed in the Addressing Table for VLAN 1 on the switch.

Note: The VLAN 1 address is not graded because you will remove it later in the activity. However, you will need VLAN 1 to test connectivity later in this Part.

Copy

S1(config)# interface vlan 1

S1(config-if)# ip address 192.168.1.11 255.255.255.0

S1(config-if)# no shutdown

Copy

S2(config)# interface vlan 1

S2(config-if)# ip address 192.168.1.12 255.255.255.0

S2(config-if)# no shutdown

j. Shut down all interfaces that will not be used.

Copy

S1(config)# interface range fastethernet 0/2 - 5, fastethernet 0/7 - 24, gigabitethernet 0/1 - 2

S1(config-if-range)# shutdown

Copy

S2(config)# interface range fastethernet 0/2 - 17, fastethernet 0/19 - 24, gigabitethernet 0/1 - 2

S2(config-if-range)# shutdown

k. Set the clock on each switch.

Note: The clock setting cannot be graded in Packet Tracer.

Copy

S1# clock set 15:30:00 19 August 2021

Copy

S2# clock set 15:30:00 19 August 2021

l. Save the running configuration to the startup configuration file.

Copy

S1# copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Copy

S2# copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]
Step 3: Configure PC hosts.

From the Desktop tab on each PC, click IP Configuration and enter the addressing information as displayed in the Addressing Table.

Step 4: Test connectivity.

Test network connectivity by attempting to ping between each of the cabled devices.

Can PC-A ping PC-B? Yes

Can PC-A ping S1? No

Can PC-B ping S2? No

Can S1 ping S2? Yes

If you answered no to any of the above questions, why were the pings unsuccessful?
Pings were unsuccessful when trying to ping a device on a different subnet. For those pings to be successful, a default gateway must exist to route traffic from one subnet to another.

Part 2: Create VLANs and Assign Switch Ports

In Part 2, you will create Management, Operations, Parking_Lot, and Native VLANs on both switches. You will then assign the VLANs to the appropriate interface. The show vlan command is used to verify your configuration settings.

Step 1: Create VLANs on the switches.

From the Desktop Tab on each PC, use Terminal to continue configuring both network switches.

a. Create the VLANs on S1.

Copy

S1(config)# vlan 10

S1(config-vlan)# name Operations

S1(config-vlan)# vlan 20

S1(config-vlan)# name Parking_Lot

S1(config-vlan)# vlan 99

S1(config-vlan)# name Management

S1(config-vlan)# vlan 1000

S1(config-vlan)# name Native

b. Create the same VLANs on S2.

Copy

S2(config)# vlan 10

S2(config-vlan)# name Operations

S2(config-vlan)# vlan 20

S2(config-vlan)# name Parking_Lot

S2(config-vlan)# vlan 99

S2(config-vlan)# name Management

S2(config-vlan)# vlan 1000

S2(config-vlan)# name Native

c. Issue the show vlan brief command to view the list of VLANs on S1.

Copy

S1# show vlan brief



VLAN Name                             Status    Ports 

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8 

                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12 

                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16 

                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20 

                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24 

                                                Gi0/1, Gi0/2

10   Operations                       active

20   Parking_Lot                      active

99   Management                       active

1000 Native                           active

1002 fddi-default                     active 

1003 token-ring-default               active 

1004 fddinet-default                  active 

1005 trnet-default                    active

What is the default VLAN?
VLAN 1

What ports are assigned to the default VLAN?
All switch ports are assigned to VLAN 1 by default.

Step 2: Assign VLANs to the correct switch interfaces.

a. Assign VLANs to the interfaces on S1.

  1. Assign PC-A to the Operations VLAN.

    Copy

    S1(config)# interface fastethernet 0/6
    
    S1(config-if)# switchport mode access
    
    S1(config-if)# switchport access vlan 10
    
  2. From VLAN 1, remove the management IP address and configure it on VLAN 99.

    Copy

    S1(config)# interface vlan 1
    
    S1(config-if)# no ip address
    
    S1(config-if)# interface vlan 99
    
    S1(config-if)# ip address 192.168.1.11 255.255.255.0
    

b. Issue the show vlan brief command and verify that the VLANs are assigned to the correct interfaces.

Copy

S1# show vlan brief



VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                                Fa0/5, Fa0/7, Fa0/8, Fa0/9

                                                Fa0/10, Fa0/11, Fa0/12, Fa0/13

                                                Fa0/14, Fa0/15, Fa0/16, Fa0/17

                                                Fa0/18, Fa0/19, Fa0/20, Fa0/21

                                                Fa0/22, Fa0/23, Fa0/24, Gi0/1

                                                Gi0/2

10   Operations                       active    Fa0/6

20   Parking_Lot                      active

99   Management                       active

1000 Native                           active

1002 fddi-default                     active

1003 token-ring-default               active

1004 fddinet-default                  active

1005 trnet-default                    active

c. Issue the show ip interface brief command.

Copy

S1# show ip interface brief

Interface              IP-Address      OK? Method Status                Protocol

Vlan1                  unassigned      YES unset  up                    up

Vlan99                 192.168.1.11    YES manual up                    down

FastEthernet0/1        unassigned      YES unset  up                    up

FastEthernet0/2        unassigned      YES unset  administratively down down

FastEthernet0/3        unassigned      YES unset  administratively down down

FastEthernet0/4        unassigned      YES unset  administratively down down

FastEthernet0/5        unassigned      YES unset  administratively down down

FastEthernet0/6        unassigned      YES unset  up                    up

FastEthernet0/7        unassigned      YES unset  administratively down down

<output omitted>

What is the status of VLAN 99? Explain.
The status of VLAN 99 is up/down, up because the VLAN exists in the database but down because the VLAN has not been assigned to an active port yet.

d. Assign PC-B to the Operations VLAN on S2.

Copy

S2(config)# interface fastethernet 0/18

S2(config-if)# switchport mode access

S2(config-if)# switchport access vlan 10

e. From VLAN 1, remove the management IP address and configure it on VLAN 99 according to the Addressing Table.

Copy

S2(config)# interface vlan 1

S2(config-if)# no ip address

S2(config-if)# interface vlan 99

S2(config-if)# ip address 192.168.1.12 255.255.255.0

f. Use the show vlan brief command to verify that the VLANs are assigned to the correct interfaces.

Copy

S2# show vlan brief



VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8

                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12

                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16

                                                Fa0/17, Fa0/19, Fa0/20, Fa0/21

                                                Fa0/22, Fa0/23, Fa0/24, Gi0/1

                                                Gi0/2

10   Operations                       active    Fa0/18

20   Parking_Lot                      active

99   Management                       active

1000 Native                           active

1002 fddi-default                     active

1003 token-ring-default               active

1004 fddinet-default                  active

1005 trnet-default                    active

Is S1 able to ping S2? Explain.
No. The IP addresses for the switches now reside in VLAN 99. VLAN 99 traffic will not be sent over interface F0/1.

Is PC-A able to ping PC-B? Explain.
No. Interface F0/1 is not assigned to VLAN 10, so VLAN 10 traffic will not be sent over it.

Part 3: Maintain VLAN Port Assignments and the VLAN Database

In Part 3, you will change port VLAN assignments and remove VLANs from the VLAN database.

Step 1: Assign a VLAN to multiple interfaces.

From the Desktop Tab on each PC, use Terminal to continue configuring both network switches.

a. On S1, assign interfaces F0/11 - 24 to VLAN 99.

Copy

S1(config)# interface range fastethernet 0/11 - 24

S1(config-if-range)# switchport mode access

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

b. Issue the show vlan brief command to verify VLAN assignments.

Copy

S1# show vlan brief



VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                                Fa0/5, Fa0/7, Fa0/8, Fa0/9

                                                Fa0/10, Gi0/1, Gi0/2

10   Operations                       active    Fa0/6

20   Parking_Lot                      active

99   Management                       active    Fa0/11, Fa0/12, Fa0/13, Fa0/14

                                                Fa0/15, Fa0/16, Fa0/17, Fa0/18

                                                Fa0/19, Fa0/20, Fa0/21, Fa0/22

                                                Fa0/23, Fa0/24

1000 Native                           active

1002 fddi-default                     active

1003 token-ring-default               active

1004 fddinet-default                  active

1005 trnet-default                    active

c. Reassign F0/11 and F0/21 to VLAN 10.

Copy

S1(config)# interface range fastethernet 0/11, fastethernet 0/21

S1(config-if-range)# switchport access vlan 10

d. Verify that VLAN assignments are correct.

Copy

S1# show vlan brief



VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                                Fa0/5, Fa0/7, Fa0/8, Fa0/9

                                                Fa0/10, Gi0/1, Gi0/2

10   Operations                       active    Fa0/6, Fa0/11, Fa0/21

20   Parking_Lot                      active

99   Management                       active    Fa0/12, Fa0/13, Fa0/14, Fa0/15

                                                Fa0/16, Fa0/17, Fa0/18, Fa0/19

                                                Fa0/20, Fa0/22, Fa0/23, Fa0/24

1000 Native                           active

1002 fddi-default                     active

1003 token-ring-default               active

1004 fddinet-default                  active

1005 trnet-default                    active
Step 2: Remove a VLAN assignment from an interface.

a. Use the no switchport access vlan command to remove the VLAN 99 assignment to F0/24.

Copy

S1(config)# interface fastethernet 0/24

S1(config-if)# no switchport access vlan

b. Verify that the VLAN change was made.

Copy

S1# show vlan brief



VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                                Fa0/5, Fa0/7, Fa0/8, Fa0/9

                                                Fa0/10, Fa0/24, Gi0/1, Gi0/2

10   Operations                       active    Fa0/6, Fa0/11, Fa0/21

20   Parking_Lot                      active

99   Management                       active    Fa0/12, Fa0/13, Fa0/14, Fa0/15

                                                Fa0/16, Fa0/17, Fa0/18, Fa0/19

                                                Fa0/20, Fa0/22, Fa0/23

1000 Native                           active

1002 fddi-default                     active

1003 token-ring-default               active

1004 fddinet-default                  active

1005 trnet-default                    active

Which VLAN is F0/24 now associated with?
VLAN 1, the default VLAN.

Step 3: Remove a VLAN ID from the VLAN database.

a. Add VLAN 30 to interface F0/24 without issuing the global VLAN command.

Copy

S1(config)# interface fastethernet 0/24

S1(config-if)# switchport access vlan 30

% Access VLAN does not exist. Creating vlan 30

Note: Current switch technology no longer requires that the vlan command be issued to add a VLAN to the database. By assigning an unknown VLAN to a port, the VLAN will be created and added to the VLAN database.

b. Verify that the new VLAN is displayed in the VLAN table.

Copy

S1# show vlan brief



VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                                Fa0/5, Fa0/7, Fa0/8, Fa0/9

                                                Fa0/10, Gi0/1, Gi0/2

10   Operations                       active    Fa0/6, Fa0/11, Fa0/21

20   Parking_Lot                      active

30   VLAN0030                         active    Fa0/24

99   Management                       active    Fa0/12, Fa0/13, Fa0/14, Fa0/15

                                                Fa0/16, Fa0/17, Fa0/18, Fa0/19

                                                Fa0/20, Fa0/22, Fa0/23

1000 Native                           active

1002 fddi-default                     active

1003 token-ring-default               active

1004 fddinet-default                  active

1005 trnet-default                    active

What is the default name of VLAN 30?
VLAN0030

c. Use the no vlan 30 command to remove VLAN 30 from the VLAN database.

Copy

S1(config)# no vlan 30

d. Issue the show vlan brief command. F0/24 was assigned to VLAN 30.

Copy

S1# show vlan brief



VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                                Fa0/5, Fa0/7, Fa0/8, Fa0/9

                                                Fa0/10, Gi0/1, Gi0/2

10   Operations                       active    Fa0/6, Fa0/11, Fa0/21

20   Parking_Lot                      active

99   Management                       active    Fa0/12, Fa0/13, Fa0/14, Fa0/15

                                                Fa0/16, Fa0/17, Fa0/18, Fa0/19

                                                Fa0/20, Fa0/22, Fa0/23

1000 Native                           active

1002 fddi-default                     active

1003 token-ring-default               active

1004 fddinet-default                  active

1005 trnet-default                    active

After deleting VLAN 30 from the VLAN database, why is F0/24 no longer displayed in the output of the show vlan brief command? What VLAN is port F0/24 now assigned to? What happens to the traffic destined to the host that is attached to F0/24?
When you delete a VLAN, any ports assigned to that VLAN become inactive. Port F0/24 is still associated to VLAN 30 but is no longer shown in the output. VLAN 30 is now inactive because it does not exist in the VLAN database. Any port associated with VLAN 30 will not transfer any traffic.

e. On interface F0/24, issue the no switchport access vlan command.

Copy

S1(config)# interface fastethernet 0/24

S1(config-if)# no switchport access vlan

f. Issue the show vlan brief command to determine the VLAN assignment for F0/24.

Copy

S1# show vlan brief



VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4

                                                Fa0/5, Fa0/7, Fa0/8, Fa0/9

                                                Fa0/10, Fa0/24, Gi0/1, Gi0/2

10   Operations                       active    Fa0/6, Fa0/11, Fa0/21

20   Parking_Lot                      active

99   Management                       active    Fa0/12, Fa0/13, Fa0/14, Fa0/15

                                                Fa0/16, Fa0/17, Fa0/18, Fa0/19

                                                Fa0/20, Fa0/22, Fa0/23

1000 Native                           active

1002 fddi-default                     active

1003 token-ring-default               active

1004 fddinet-default                  active

1005 trnet-default                    active

To which VLAN is F0/24 assigned?
The default VLAN, VLAN 1

Note: Before removing a VLAN from the database, it is recommended that you reassign all the ports assigned to that VLAN.

Why should you reassign a port to another VLAN before removing the VLAN from the VLAN database?
The interfaces assigned to a VLAN that is removed from the VLAN database become inactive and are unavailable for use until they are reassigned to another VLAN. This can be a tricky thing to troubleshoot as trunked interfaces do not show up in the port list as well (Part 4 contains more information about trunked interfaces).

Part 4: Configure an 802.1Q Trunk Between the Switches

In Part 4, you will configure interface F0/1 to use the Dynamic Trunking Protocol (DTP) to allow it to negotiate the trunk mode. After this has been accomplished and verified, you will disable DTP on interface F0/1 and manually configure it as a trunk.

Step 1: Use DTP to initiate trunking on F0/1.

The default DTP mode of a 2960 switch port is dynamic auto. This allows the interface to convert the link to a trunk if the neighboring interface is set to trunk or dynamic desirable mode.

a. On S1, set F0/1 to negotiate trunk mode.

Copy

S1(config)# interface fastethernet 0/1

S1(config-if)# switchport mode dynamic desirable

Sep 19 02:51:47.257: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Sep 19 02:51:47.291: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up

You should also receive link status messages on S2.

Copy

S2#

Sep 19 02:42:19.424: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up

Sep 19 02:42:21.454: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up

Sep 19 02:42:22.419: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

b. On S1 and S2, issue the show vlan brief command. Interface F0/1 is no longer assigned to VLAN 1. Trunked interfaces are not listed in the VLAN table.

Copy

S1# show vlan brief



VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/2, Fa0/3, Fa0/4, Fa0/5

                                                Fa0/7, Fa0/8, Fa0/9, Fa0/10

                                                Fa0/24, Gi0/1, Gi0/2

10   Operations                       active    Fa0/6, Fa0/11, Fa0/21

20   Parking_Lot                      active

99   Management                       active    Fa0/12, Fa0/13, Fa0/14, Fa0/15

                                                Fa0/16, Fa0/17, Fa0/18, Fa0/19

                                                Fa0/20, Fa0/22, Fa0/23

1000 Native                           active

1002 fddi-default                     active

1003 token-ring-default               active

1004 fddinet-default                  active

1005 trnet-default                    active

Copy

S2# show vlan brief

c. Issue the show interfaces trunk command to view trunked interfaces. Notice that the mode on S1 is set to desirable, and the mode on S2 is set to auto.

Copy

S1# show interfaces trunk

Port        Mode             Encapsulation  Status        Native vlan

Fa0/1       desirable        n-802.1q       trunking      1



Port        Vlans allowed on trunk

Fa0/1       1-1005



Port        Vlans allowed and active in management domain

Fa0/1       1,10,20,99,1000



Port        Vlans in spanning tree forwarding state and not pruned

Fa0/1       1,10,20,99,1000

Copy

S2# show interfaces trunk

Port        Mode             Encapsulation  Status        Native vlan

Fa0/1       auto             n-802.1q       trunking      1



Port        Vlans allowed on trunk

Fa0/1       1-1005



Port        Vlans allowed and active in management domain

Fa0/1       1,10,20,99,1000



Port        Vlans in spanning tree forwarding state and not pruned

Fa0/1       1,10,20,99,1000

Note: By default, all VLANs are allowed on a trunk. The switchport trunk command allows you to control what VLANs have access to the trunk. For this activity, keep the default settings. This allows all VLANs to traverse F0/1.

d. Verify that VLAN traffic is traveling over trunk interface F0/1.

Can S1 ping S2? Yes

Can PC-A ping PC-B? Yes

Can PC-A ping S1? No

Can PC-B ping S2? No

If you answered no to any of the above questions, explain below.
The switches are in VLAN 99 and the PCs are in VLAN 10; therefore, the pings between VLANs were unsuccessful.

Step 2: Manually configure trunk interface F0/1.

The switchport mode trunk command is used to manually configure a port as a trunk. This command should be issued on both ends of the link.

a. On interface F0/1, change the switchport mode to force trunking. Make sure to do this on both switches.

Copy

S1(config)# interface fastethernet 0/1

S1(config-if)# switchport mode trunk

Copy

S2(config)# interface fastethernet 0/1

S2(config-if)# switchport mode trunk

b. Issue the show interfaces trunk command to view the trunk mode. Notice that the mode changed from desirable to on.

Copy

S1# show interfaces trunk

Port        Mode             Encapsulation  Status        Native vlan

Fa0/1       on               802.1q         trunking      1



Port        Vlans allowed on trunk

Fa0/1       1-1005



Port        Vlans allowed and active in management domain

Fa0/1       1,10,20,99,1000



Port        Vlans in spanning tree forwarding state and not pruned

Fa0/1       1,10,20,99,1000

c. Modify the trunk configuration on both switches by changing the native VLAN from VLAN 1 to VLAN 1000.

Copy

S1(config)# interface fastethernet 0/1

S1(config-if)# switchport trunk native vlan 1000

Copy

S2(config)# interface fastethernet 0/1

S2(config-if)# switchport trunk native vlan 1000

d. Issue the show interfaces trunk command to view the trunk. Notice the Native VLAN information is updated.

Copy

S2# show interfaces trunk

Port        Mode             Encapsulation  Status        Native vlan

Fa0/1       on               802.1q         trunking      1000



Port        Vlans allowed on trunk

Fa0/1       1-1005



Port        Vlans allowed and active in management domain

Fa0/1       1,10,20,99,1000



Port        Vlans in spanning tree forwarding state and not pruned

Fa0/1       1,10,20,99,1000

Why might you want to manually configure an interface to trunk mode instead of using DTP?
Not all equipment uses DTP. DTP is Cisco proprietary and using the switchport mode trunk command ensures that the port will become a trunk no matter what type of equipment is connected to the other end of the link.

Why might you want to change the native VLAN on a trunk?
Using VLAN 1, the default VLAN, as the native VLAN is a security risk. All the different control protocols that are exchanged between switches are exchanged via the native VLAN 1 untagged, and that information could be exposed if default settings are used on ports that users connect to.

Reflection Questions

  1. What is needed to allow hosts on VLAN 10 to communicate to hosts on VLAN 99?
    Answers will vary, but a Layer 3 device (a router or a Layer 3 switch) is needed to route traffic between VLANs (inter-VLAN routing).

  2. What are some primary benefits that an organization can receive through effective use of VLANs?
    Answers will vary, but VLAN benefits include: better security, cost savings (efficient use of bandwidth and uplinks), higher performance (smaller broadcast domains), broadcast storm mitigation, improved IT staff efficiency, simpler project and application management.

Device Configs - Final

SWITCH S1

Copy

! ==============================================================

!--- 3.4.6 Packet Tracer - Configure VLANs and Trunking - Physical Mode

!--- ANSWER SCRIPT FOR SWITCH S1

!--- Usage: install the switches in the Rack first, console into S1 from PC-A (Desktop > Terminal) and paste this whole file at the Switch> prompt. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.

! ==============================================================



enable

configure terminal



! --------------------------------------------------------------

!--- Part 1: Build the Network and Configure Basic Device Settings.

! --------------------------------------------------------------



!--- c. Assign the device name.

hostname S1



!--- d. Assign class as the privileged EXEC encrypted password.

enable secret class



!--- e. Assign cisco as the console password and enable login.

line console 0

 password cisco

 login

 exit



!--- f. Assign cisco as the vty password and enable login.

line vty 0 4

 password cisco

 login

 exit



!--- g. Encrypt the plaintext passwords.

service password-encryption



!--- h. Banner that warns that unauthorized access is prohibited.

banner motd $ Authorized Users Only! $



!--- i. Temporary VLAN 1 address for the Part 1 connectivity test (not graded; moved to VLAN 99 in Part 2).

interface vlan 1

 ip address 192.168.1.11 255.255.255.0

 no shutdown

 exit



!--- j. Shut down all interfaces that will not be used (F0/1 to the other switch and F0/6 to PC-A stay up).

interface range fastethernet 0/2 - 5, fastethernet 0/7 - 24, gigabitethernet 0/1 - 2

 shutdown

 exit



! --------------------------------------------------------------

!--- Part 2: Create VLANs and Assign Switch Ports.

! --------------------------------------------------------------



!--- Create the VLANs. Names are case-sensitive.

vlan 10

 name Operations

 exit

vlan 20

 name Parking_Lot

 exit

vlan 99

 name Management

 exit

vlan 1000

 name Native

 exit



!--- Assign PC-A (F0/6) to the Operations VLAN.

interface fastethernet 0/6

 switchport mode access

 switchport access vlan 10

 exit



!--- Remove the management IP address from VLAN 1 and configure it on VLAN 99.

interface vlan 1

 no ip address

 exit

interface vlan 99

 ip address 192.168.1.11 255.255.255.0

 exit



! --------------------------------------------------------------

!--- Part 3: Maintain VLAN Port Assignments and the VLAN Database.

! --------------------------------------------------------------



!--- Step 1a: assign F0/11 - 24 to VLAN 99.

interface range fastethernet 0/11 - 24

 switchport mode access

 switchport access vlan 99

 exit



!--- Step 1c: reassign F0/11 and F0/21 to VLAN 10.

interface range fastethernet 0/11, fastethernet 0/21

 switchport access vlan 10

 exit



!--- Step 2a: remove the VLAN 99 assignment from F0/24 (it returns to VLAN 1).

!--- Step 3 (create VLAN 30 on F0/24, delete it, return F0/24 to VLAN 1) ends in this same state, so it is not repeated here.

interface fastethernet 0/24

 no switchport access vlan

 exit



! --------------------------------------------------------------

!--- Part 4: Configure an 802.1Q Trunk Between the Switches.

! --------------------------------------------------------------



!--- Step 2a and 2c: force F0/1 to trunk (final state; the DTP 'dynamic desirable' test in Step 1 is replaced by this) and set native VLAN 1000 on both ends.

interface fastethernet 0/1

 switchport mode trunk

 switchport trunk native vlan 1000

 exit



end



! --------------------------------------------------------------

!--- Part 1, Step 2k: Set the clock (privileged EXEC; not graded in Packet Tracer).

! --------------------------------------------------------------

clock set 15:30:00 19 August 2021



! --------------------------------------------------------------

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

! --------------------------------------------------------------

copy running-config startup-config





! ==============================================================

!--- Verification:

!---   show vlan brief        -> VLANs 10, 20, 99, 1000 and the port assignments

!---   show interfaces trunk  -> Fa0/1 mode on, native VLAN 1000

!---   ping 192.168.1.12      -> reach the other switch over the trunk (VLAN 99)

!--- Note: the PCs (VLAN 10) cannot ping the switches (VLAN 99) - no Layer 3 device routes between the VLANs.

! ==============================================================

SWITCH S2

Copy

! ==============================================================

!--- 3.4.6 Packet Tracer - Configure VLANs and Trunking - Physical Mode

!--- ANSWER SCRIPT FOR SWITCH S2

!--- Usage: install the switches in the Rack first, console into S2 from PC-B (Desktop > Terminal) and paste this whole file at the Switch> prompt. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.

! ==============================================================



enable

configure terminal



! --------------------------------------------------------------

!--- Part 1: Build the Network and Configure Basic Device Settings.

! --------------------------------------------------------------



!--- c. Assign the device name.

hostname S2



!--- d. Assign class as the privileged EXEC encrypted password.

enable secret class



!--- e. Assign cisco as the console password and enable login.

line console 0

 password cisco

 login

 exit



!--- f. Assign cisco as the vty password and enable login.

line vty 0 4

 password cisco

 login

 exit



!--- g. Encrypt the plaintext passwords.

service password-encryption



!--- h. Banner that warns that unauthorized access is prohibited.

banner motd $ Authorized Users Only! $



!--- i. Temporary VLAN 1 address for the Part 1 connectivity test (not graded; moved to VLAN 99 in Part 2).

interface vlan 1

 ip address 192.168.1.12 255.255.255.0

 no shutdown

 exit



!--- j. Shut down all interfaces that will not be used (F0/1 to the other switch and F0/18 to PC-B stay up).

interface range fastethernet 0/2 - 17, fastethernet 0/19 - 24, gigabitethernet 0/1 - 2

 shutdown

 exit



! --------------------------------------------------------------

!--- Part 2: Create VLANs and Assign Switch Ports.

! --------------------------------------------------------------



!--- Create the VLANs. Names are case-sensitive.

vlan 10

 name Operations

 exit

vlan 20

 name Parking_Lot

 exit

vlan 99

 name Management

 exit

vlan 1000

 name Native

 exit



!--- Assign PC-B (F0/18) to the Operations VLAN.

interface fastethernet 0/18

 switchport mode access

 switchport access vlan 10

 exit



!--- Remove the management IP address from VLAN 1 and configure it on VLAN 99.

interface vlan 1

 no ip address

 exit

interface vlan 99

 ip address 192.168.1.12 255.255.255.0

 exit



! --------------------------------------------------------------

!--- Part 4: Configure an 802.1Q Trunk Between the Switches.

! --------------------------------------------------------------



!--- Step 2a and 2c: force F0/1 to trunk (final state; the DTP 'dynamic desirable' test in Step 1 is replaced by this) and set native VLAN 1000 on both ends.

interface fastethernet 0/1

 switchport mode trunk

 switchport trunk native vlan 1000

 exit



end



! --------------------------------------------------------------

!--- Part 1, Step 2k: Set the clock (privileged EXEC; not graded in Packet Tracer).

! --------------------------------------------------------------

clock set 15:30:00 19 August 2021



! --------------------------------------------------------------

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

! --------------------------------------------------------------

copy running-config startup-config





! ==============================================================

!--- Verification:

!---   show vlan brief        -> VLANs 10, 20, 99, 1000 and the port assignments

!---   show interfaces trunk  -> Fa0/1 mode on, native VLAN 1000

!---   ping 192.168.1.11      -> reach the other switch over the trunk (VLAN 99)

!--- Note: the PCs (VLAN 10) cannot ping the switches (VLAN 99) - no Layer 3 device routes between the VLANs.

! ==============================================================

PC-A

PC-APC

IP Address192.168.10.3

Subnet Mask255.255.255.0

Default Gateway192.168.10.1

Command Promptipconfig 192.168.10.3 255.255.255.0 192.168.10.1

PC-B

PC-BPC

IP Address192.168.10.4

Subnet Mask255.255.255.0

Default Gateway192.168.10.1

Command Promptipconfig 192.168.10.4 255.255.255.0 192.168.10.1

Download Packet Tracer (.pka) file:

Icon

3.4.6 Packet Tracer - Configure VLANs and Trunking - Physical Mode .pka

1 file(s) 616.65 KB

Download

Previous Lab
3.4.5 Packet Tracer – Configure Trunks

Next Lab
3.5.5 Packet Tracer – Configure DTP

← All Packet Tracer articles Home