0% found this document useful (0 votes)
133 views9 pages

VTP Server:: Switch (Config) #Int Range g0/1-2 Switch (Config-If-Range) #Switchport Mode Trunk

The document discusses VLAN trunking protocol (VTP) and how to configure VLANs and trunk ports on switches in different VTP modes such as server, client, and transparent. It also discusses configuring Layer 3 switching by creating VLAN interfaces and assigning IP addresses. Spanning tree protocol configuration is covered including viewing STP information and configuring the root bridge.

Uploaded by

Sara Vanan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views9 pages

VTP Server:: Switch (Config) #Int Range g0/1-2 Switch (Config-If-Range) #Switchport Mode Trunk

The document discusses VLAN trunking protocol (VTP) and how to configure VLANs and trunk ports on switches in different VTP modes such as server, client, and transparent. It also discusses configuring Layer 3 switching by creating VLAN interfaces and assigning IP addresses. Spanning tree protocol configuration is covered including viewing STP information and configuring the root bridge.

Uploaded by

Sara Vanan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

VTP:

VTP server:

Switch#
Switch#CONF T
Switch(config)#vlan 10
Switch(config-vlan)#name sales
Switch(config-vlan)#vlan 20
Switch(config-vlan)#name marketing
Switch(config-vlan)#vlan 30
Switch(config-vlan)#name production
Switch(config-vlan)#ex
Switch(config)#vtp mode server
Device mode already VTP SERVER.
Switch(config)#vtp domain cisco
Changing VTP domain name from NULL to cisco
Switch(config)#vtp password 12345
Setting device VLAN database password to 12345
Switch(config)#

Switch(config)#int range g0/1-2


Switch(config-if-range)#switchport mode trunk
SW1 - Client 1

Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#
Switch(config)#vtp mode client
Setting device to VTP CLIENT mode.
Switch(config)#vtp domain cisco
Changing VTP domain name from NULL to cisco
Switch(config)#vtp password 12345
Setting device VLAN database password to 12345
Switch(config)#

Switch(config)#int range g0/1-2


Switch(config-if-range)#switchport mode trunk

***** Repeat for SW Client T and Client 2 ***************

Extended VLANS can be connected only with transparent mode

SW3T#
SW3T(config)#
SW3T(config)#int range g0/1-2
SW3T(config-if-range)#switchport mode trunk
SW3T(config-if-range)#ex
SW3T(config)#
SW3T(config)#vtp mode transparent
Setting device to VTP TRANSPARENT mode.
SW3T(config)#vlan 40
SW3T(config-vlan)#name finance
SW3T(config-vlan)#ex
SW3T(config)#sh vlan

SW4 - Client 2

SW4C2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW4C2(config)#
SW4C2(config)#int range g0/1-2
SW4C2(config-if-range)#switchport mode trunk
SW4C2(config-if-range)#ex
SW4C2(config)#vtp mode client
Setting device to VTP CLIENT mode.
SW4C2(config)#vtp domain cisco
Domain name already set to cisco.
SW4C2(config)#vtp password 12345
Setting device VLAN database password to 12345
SW4C2(config)#

LAYER 3 SWITCHING:

L3SW#conf t
Enter configuration commands, one per line. End with CNTL/Z.
L3SW (config)#int g0/1
L3SW (config-if)#switchport mode trunk (This doesn’t work in L3 switch)
Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to
"trunk" mode.
L3SW (config-if)#switchport mode dynamic desirable
L3SW#
L3SW(config)#vlan 10
L3SW(config-vlan)#name sales
L3SW(config-vlan)#vlan 20
L3SW(config-vlan)#name marketing
L3SW(config-vlan)#vlan 30
L3SW(config-vlan)#name production
L3SW(config-vlan)#int vlan 10 (Creating and virtual interface vlan 10)
L3SW(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

L3SW(config-if)#
L3SW(config-if)#ip address 192.168.1.254 255.255.255.0
L3SW(config-if)#int vlan 20 (Creating and interface vlan 10)
L3SW(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

L3SW(config-if)#
L3SW(config-if)#ip address 192.168.2.254 255.255.255.0
L3SW(config-if)#int vlan 30 (Creating and interface vlan 10)
L3SW(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up

L3SW(config-if)#
L3SW(config-if)#ip address 192.168.3.254 255.255.255.0
L3SW(config-if)#ex
L3SW(config)#
L3SW(config)#ip routing (Enables routing functions)
L3SW(config)#

****************************************************************

L3SW(config)#do show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP


D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, Vlan10


C 192.168.2.0/24 is directly connected, Vlan20
C 192.168.3.0/24 is directly connected, Vlan30

Switch(config-if)#no switchport
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to
down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to


up

Switch(config-if)#ip add
Switch(config-if)#ip address 111.111.111.1 255.255.255.252
Switch(config-if)#

Switch(config)#ip route 0.0.0.0 0.0.0.0 g0/2


SPANNING TREE:

Switch#sh spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0002.4AA3.10C4
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0002.4AA3.10C4
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Gi0/1 Desg FWD 4 128.25 P2p
Gi0/2 Desg FWD 4 128.26 P2p

Switch#
Switch#

Switch#sh spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0002.4AA3.10C4
Cost 4
Port 26(GigabitEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0060.5CE9.901C
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Gi0/2 Root FWD 4 128.26 P2p
Gi0/1 Desg FWD 4 128.25 P2p

Switch#

Switch#sh spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0002.4AA3.10C4
Cost 8
Port 26(GigabitEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0030.F275.5199
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Gi0/1 Altn BLK 4 128.25 P2p
Gi0/2 Root FWD 4 128.26 P2p

Switch#

Switch(config)#int range g0/1-2


Switch(config-if-range)#switchport mode trunk

( do for all switches)


SW2(config)#spanning-tree vlan 10 root primary

SW3(config)#spanning-tree vlan 20 root primary

SW5(config)#spanning-tree vlan 30 root primary

Works for load balancing.

Failure domain is reduced.

Back up

SW3(config)#spanning-tree vlan 20 root secondary


Switch(config-if)#spanning-tree portfast ( avoid stp)
%Warning: portfast should only be enabled on ports connected to a single
host. Connecting hubs, concentrators, switches, bridges, etc... to this
interface when portfast is enabled, can cause temporary bridging loops.
Use with CAUTION

%Portfast has been configured on FastEthernet0/1 but will only


have effect when the interface is in a non-trunking mode.
Switch(config-if)#spanning-tree bpduguard enable (disables the STP packets to flow)
Switch(config-if)#

You might also like