Sie sind auf Seite 1von 9

Lab 1 VLAN, Trunk and VTP

Topology:

Device Interface IP Address Subnet Mask Switch int VLAN


PC1 Fa0 192.168.1.1 255.255.255.0 Fa0/2 10
PC2 Fa0 192.168.1.2 255.255.255.0 Fa0/2 10
PC3 Fa0 192.168.20.1 255.255.255.0 Fa0/3 20
PC4 Fa0 192.168.20.2 255.255.255.0 Fa0/4 20
PC5 Fa0 192.168.30.1 255.255.255.0 Fa0/5 30
PC6 Fa0 192.168.30.2 255.255.255.0 Fa0/6 30

VLAN ID VLAN Name


VLAN 10 10 Staff
VLAN 20 20 Students
VLAN 30 30 Management
VLAN 100 100 Native

Step 1: Basic Configuration of Sw1 and Sw2

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

Step 2: Configure SW2

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

Step 3: Assign appropriate IP addresses on all PCs

Step 4: Create VLANs according to topology on SW1

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

Sw1(config)# vtp mode server


Sw1(config)# vtp domain aibt.com
Sw1(config)# vtp password aibt

Step 6: Configure Native VLAN on Sw2

SW1(config)# Vlan 100


SW1(config-vlan)#name Native
SW1(config-vlan)#exit

Step 7: Configure Trunking on SW1

SW1(config)# interface fastEthernet 0/1


SW1(config-if)#switchport mode trunk
Sw1(config-if)#switchport trunk native vlan 100

Note that console will return error.

This happened because on SW2 Native VLAN is VLAN 1

Step 8: Configure Trunking on SW2

SW2(config)# interface fastEthernet 0/1


SW2(config-if)#switchport mode trunk
Sw2(config-if)#switchport trunk native vlan 100

Now all should work fine so let’s check:

SW1# show interfaces trunk

What is Native VLAN for FA0/1?

SW2# show interfaces trunk

3
As we can see both side have same Native VLAN.

Step 9: Check VLANs on SW2

SW2# show vlan brief

As you can see we have only VLAN 100 because we added it manually.

Step 10: Configure VTP on SW2 in client mode.

Sw2(config)# vtp mode client


Sw2(config)# vtp domain aibt.com
Sw2(config)# vtp password aibt

This way we configured that new VLANS can only be added on SW1 because he is Server.
SW2# show vlan brief

Try to add VLAN 200 on SW2.


What was the console output?

SW2#show vtp status

4
What is SW2 VTP operating mode?

What is SW1 VTP operating mode?

Step 11: Configure DTP on ports facing PC1 – PC6 to access mode and assign them to VLAN 10

As we mentioned DTP (Dynamic Trunking Protocol) can have several modes:

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.

SW1(config)#interface fastEthernet 0/2


SW1(config)#description Connects to PC1
SW1(config-if)#switchport mode access
Sw1(config-if)#switchport access vlan 10
SW1(config-if)#exit
SW1(config)#interface fastEthernet 0/3
SW1(config)#description Connects to PC3
SW1(config-if)#switchport mode access
Sw1(config-if)#switchport access vlan 20
SW1(config-if)#exit
SW1(config)#interface fastEthernet 0/5
SW1(config)#description Connects to PC5
SW1(config-if)#switchport mode access
Sw1(config-if)#switchport access vlan 30
SW1(config-if)#exit

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

Step 12: Test connectivity between PCs in same VLAN

Ping PCB2 IP address from PC1


Ping PCB4 IP address from PC3
Ping PCB5 IP address from PC6

Are pings successful ?

Step 13: Save SW1 and SW2 Confoguration

SW1# copy running-config startup-config


SW2# copy running-config startup-config

Step 14: Save Packet Tracer Activity File

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

Keep this file!!!!

Final Solution for each Router:

SW1 SW2
SW1#show run SW2#show running-config
Building configuration... Building configuration...

Current configuration : 1579 bytes Current configuration : 1579 bytes


! !
version 12.2 version 12.2
no service timestamps log datetime msec no service timestamps log datetime msec
no service timestamps debug datetime no service timestamps debug datetime msec
msec no service password-encryption
no service password-encryption !
! hostname SW2
hostname SW1 !
! enable secret 5
enable secret 5 $1$mERr$9cTjUIEqNGurQiFU.ZeCi1
$1$mERr$9cTjUIEqNGurQiFU.ZeCi1 !
! !
! !
! no ip domain-lookup
no ip domain-lookup !
! !
! spanning-tree mode pvst
spanning-tree mode pvst spanning-tree extend system-id
spanning-tree extend system-id !
! interface FastEthernet0/1
interface FastEthernet0/1 switchport trunk native vlan 100
switchport trunk native vlan 100 switchport mode trunk
switchport mode trunk !
! interface FastEthernet0/2
interface FastEthernet0/2 description Connects to PC2
description Connects to PC1 switchport access vlan 10
switchport access vlan 10 switchport mode access
switchport mode access !
! interface FastEthernet0/3
interface FastEthernet0/3 !
description Connects to PC3 interface FastEthernet0/4
switchport access vlan 20 description Connects to PC4
switchport mode access switchport access vlan 20
! switchport mode access
interface FastEthernet0/4 !
! interface FastEthernet0/5
interface FastEthernet0/5 !
description Connects to PC5 interface FastEthernet0/6
switchport access vlan 30 description Connects to PC6
switchport mode access switchport access vlan 30
! switchport mode access
interface FastEthernet0/6 !
! interface FastEthernet0/7
interface FastEthernet0/7 !
! interface FastEthernet0/8
interface FastEthernet0/8 !
! interface FastEthernet0/9
interface FastEthernet0/9 !
! interface FastEthernet0/10
interface FastEthernet0/10 !
! interface FastEthernet0/11
interface FastEthernet0/11 !
! interface FastEthernet0/12
interface FastEthernet0/12 !
! interface FastEthernet0/13
8
interface FastEthernet0/13 !
! interface FastEthernet0/14
interface FastEthernet0/14 !
! interface FastEthernet0/15
interface FastEthernet0/15 !
! interface FastEthernet0/16
interface FastEthernet0/16 !
! interface FastEthernet0/17
interface FastEthernet0/17 !
! interface FastEthernet0/18
interface FastEthernet0/18 !
! interface FastEthernet0/19
interface FastEthernet0/19 !
! interface FastEthernet0/20
interface FastEthernet0/20 !
! interface FastEthernet0/21
interface FastEthernet0/21 !
! interface FastEthernet0/22
interface FastEthernet0/22 !
! interface FastEthernet0/23
interface FastEthernet0/23 !
! interface FastEthernet0/24
interface FastEthernet0/24 !
! interface GigabitEthernet0/1
interface GigabitEthernet0/1 !
! interface GigabitEthernet0/2
interface GigabitEthernet0/2 !
! interface Vlan1
interface Vlan1 no ip address
no ip address shutdown
shutdown !
! banner motd ^CWelcome to CISCO
banner motd ^CWelcome to CISCO network^C
network^C !
! !
! !
! line con 0
line con 0 password cisco
password cisco logging synchronous
logging synchronous login
login !
! line vty 0 15
line vty 0 15 exec-timeout 0 0
exec-timeout 0 0 password cisco
password cisco logging synchronous
logging synchronous login
login !
! !
! !
! !
! end
end

Das könnte Ihnen auch gefallen