Lab 1 VLAN, Trunk and VTP
Lab 1 VLAN, Trunk and VTP
Lab 1 VLAN, Trunk and VTP
Topology:
Sw1:
Switch> enable
Switch# configure terminal
Switch(config)#hostname SW1
SW1(config)# no ip domain lookup
SW1(config)#enable secret class
SW1(config)#line console 0
SW1(config-line)#password cisco
SW1(config-line)#login
SW1(config-line)#logging synchronous
1
SW1(config-line)#exit
SW1(config)#line vty 0 15
SW1(config-line)#password cisco
SW1(config-line)#login
SW1(config-line)# logging synchronous
SW1(config-line)# exec-timeout 0 0
SW1(config-line)#exit
SW1(config)#banner login #Welcome to CISCO network#
SW1(config)#exit
SW1#copy running-config startup-config
Switch> enable
Switch# configure terminal
Switch(config)#hostname SW2
SW2(config)# no ip domain lookup
SW2(config)#enable secret class
SW2(config)#line console 0
SW2(config-line)#password cisco
SW2(config-line)#login
SW2(config-line)#logging synchronous
SW2(config-line)#exit
SW2(config)#line vty 0 15
SW2(config-line)#password cisco
SW2(config-line)#login
SW2(config-line)# logging synchronous
SW2(config-line)# exec-timeout 0 0
SW2(config-line)#exit
SW2(config)#banner login #Welcome to CISCO network#
SW2(config)#exit
SW2#copy running-config startup-config
SW1(config)# Vlan 10
SW1(config-vlan)#name Staff
SW1(config-vlan)#exit
SW1(config)# Vlan 20
SW1(config-vlan)#name Students
SW1(config-vlan)#exit
SW1(config)# Vlan 30
SW1(config-vlan)#name Management
SW1(config-vlan)#exit
SW1(config)# Vlan 100
SW1(config-vlan)#name Native
SW1(config-vlan)#exit
2
Step 5: Configure VTP on SW1
3
As we can see both side have same Native VLAN.
As you can see we have only VLAN 100 because we added it manually.
This way we configured that new VLANS can only be added on SW1 because he is Server.
SW2# show vlan brief
4
What is SW2 VTP operating mode?
Step 11: Configure DTP on ports facing PC1 – PC6 to access mode and assign them to VLAN 10
Access — Puts the port into permanent nontrunking mode and negotiates to convert the link into a
nontrunk link. Port facing PC
Trunk — Puts the port into permanent trunking mode and negotiates to convert the link into a trunk
link. The port becomes a trunk port even if the neighboring port does not agree to the change. Port
facing other switch.
Dynamic Auto — Makes the Ethernet port willing to convert the link to a trunk link. The port becomes
a trunk port if the neighboring port is set to trunk or dynamic desirable mode. This is the default mode
for some switchports.
Dynamic Desirable — Makes the port actively attempt to convert the link to a trunk link. The port
becomes a trunk port if the neighboring Ethernet port is set to trunk, dynamic desirable or dynamic auto
mode.
No-negotiate — Disables DTP. The port will not send out DTP frames or be affected by any incoming
DTP frames. If you want to set a trunk between two switches when DTP is disabled, you must manually
configure trunking using the (switchport mode trunk) command on both sides.
Because we are connecting to PC on other side of port we need to configure ports as access ports.
Also we need to tell switches that those ports are in VLAN 20.
5
SW2(config)#interface fastEthernet 0/2
SW2(config-if)#switchport mode access
SW2(config)#description Connects to PC2
Sw2(config-if)#switchport access vlan 10
SW2(config-if)#exit
SW2(config)#interface fastEthernet 0/4
SW2(config-if)#switchport mode access
SW2(config)#description Connects to PC4
Sw2(config-if)#switchport access vlan 20
SW2(config-if)#exit
SW2(config)#interface fastEthernet 0/6
SW2(config-if)#switchport mode access
SW2(config)#description Connects to PC6
Sw2(config-if)#switchport access vlan 30
SW2(config-if)#exit
Verification:
SW2# show vlan brief
SW2#show interfaces fastEthernet 0/1 switchport – This port is Trunk port facing SW1
Name: Fa0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 100 (Native)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
6
Operational private-vlan: none
Trunking VLANs Enabled: All
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
SW2#show interfaces fastEthernet 0/2 switchport - This is acess port facing PCB
Name: Fa0/2
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 10 (Staff)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: All
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
Go to File >> Save as >> name file your First Name_Last Name_Lab_1_VLAN_Final and save.
7
John_Doe_Lab_1_VLAN_Final.pkt
SW1 SW2
SW1#show run SW2#show running-config
Building configuration... Building configuration...