[CCNA] Basic VTP Configuration #1

VTP is a Layer 2 messaging protocol that maintains VLAN configuration consistency by managing the addition, deletion, and renaming of VLANs on a network-wide basis. VTP minimizes misconfigurations and configuration inconsistencies that can result in a number of problems, such as duplicate VLAN names, incorrect VLAN-type specifications, and security violations.

In this basic lab, we will be configure a single VTP Domain over three switches, one (DSW-1) as the VTP Server and the other two (ASW-1,2) as VTP Clients, also we will configure a VTP password for security.

Basic VTP Lab

1. Basic switch configuration

  • DSW-1:
Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname DSW-1
DSW-1(config)#line console 0
DSW-1(config-line)#password cisco
DSW-1(config-line)#login
DSW-1(config-line)#logging synchronous 
DSW-1(config-line)#no exec-timeout 
DSW-1(config-line)#line vty 0 15
DSW-1(config-line)#password cisco
DSW-1(config-line)#no exec-timeout 
DSW-1(config-line)#exit
DSW-1(config)#enable secret cisco
DSW-1(config)#no ip domain-lookup 
DSW-1(config)#
DSW-1(config)#^Z
DSW-1#
%SYS-5-CONFIG_I: Configured from console by console

DSW-1#
  • ASW-1
Switch>enable
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname ASW-1
ASW-1(config)#line console 0
ASW-1(config-line)#password cisco
ASW-1(config-line)#login 
ASW-1(config-line)#logging synchronous 
ASW-1(config-line)#no exec-timeout 
ASW-1(config-line)#line vty 0 15
ASW-1(config-line)#password cisco
ASW-1(config-line)#no exec-timeout 
ASW-1(config-line)#exit
ASW-1(config)#enable secret cisco
ASW-1(config)#no ip domain-lookup 
ASW-1(config)#exit 
ASW-1#
%SYS-5-CONFIG_I: Configured from console by console

ASW-1#
  • ASW-2
Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#host ASW-2
ASW-2(config)#line con 0
ASW-2(config-line)#pass cisco
ASW-2(config-line)#login
ASW-2(config-line)#logging synchronous 
ASW-2(config-line)#no exec-timeout 
ASW-2(config-line)#line vty 0 15
ASW-2(config-line)#pass cisco
ASW-2(config-line)#no exec-timeout 
ASW-2(config-line)#exit
ASW-2(config)#ena secret cisco
ASW-2(config)#no ip domain-lookup 
ASW-2(config)#exit 
ASW-2#
%SYS-5-CONFIG_I: Configured from console by console

ASW-2#

2. Configure the VTP domain on all three switches as CCNA

  • DSW-1
DSW-1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
DSW-1(config)#vtp domain CCNA
Changing VTP domain name from NULL to CCNA
DSW-1(config)#
  • ASW-1
ASW-1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW-1(config)#vtp domain CCNA
Changing VTP domain name from NULL to CCNA
ASW-1(config)#
  • ASW-2
ASW-2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW-2(config)#vtp domain CCNA
Changing VTP domain name from NULL to CCNA
ASW-2(config)#

3. Set the VTP domain password as cisco on all three switches

  • DSW-1
DSW-1(config)#vtp password cisco
Setting device VLAN database password to cisco
DSW-1(config)#
  • ASW-1
ASW-1(config)#vtp password cisco
Setting device VLAN database password to cisco
ASW-1(config)#
  • ASW-2
ASW-2(config)#vtp password cisco
Setting device VLAN database password to cisco
ASW-2(config)#

4. Configure DSW-1 as a VTP Server switch

DSW-1(config)#vtp mode server 
Device mode already VTP SERVER.
DSW-1(config)#

5. Configure ASW-1 and ASW-2 as a VTP Client switch

  • ASW-1
ASW-1(config)#vtp mode client 
Setting device to VTP CLIENT mode.
ASW-1(config)#
  • ASW-2
ASW-2(config)#vtp mode client 
Device mode already VTP CLIENT.
ASW-2(config)#

6. Configure and verify an 802.1q trunk between Gig0/1 on DSW-1 and Gig1/1 on ASW-1

  • DSW-1
DSW-1(config)#interface gigabitEthernet 0/1
DSW-1(config-if)#switchport trunk encapsulation dot1q 
DSW-1(config-if)#switchport mode trunk 

DSW-1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down

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

DSW-1(config-if)#do show int trunk
Port        Mode         Encapsulation  Status        Native vlan
Gig0/1      on           802.1q         trunking      1

Port        Vlans allowed on trunk
Gig0/1      1-1005

Port        Vlans allowed and active in management domain
Gig0/1      1

Port        Vlans in spanning tree forwarding state and not pruned
Gig0/1      none
DSW-1(config-if)#
  • ASW-1
ASW-1(config)#interface gigabitEthernet 1/1
ASW-1(config-if)#switchport mode trunk 
ASW-1(config-if)#do sh int trunk
Port        Mode         Encapsulation  Status        Native vlan
Gig1/1      on           802.1q         trunking      1

Port        Vlans allowed on trunk
Gig1/1      1-1005

Port        Vlans allowed and active in management domain
Gig1/1      1

Port        Vlans in spanning tree forwarding state and not pruned
Gig1/1      1
ASW-1(config-if)#

7. Configure and verify an 802.1q trunk between Gig0/2 on DSW-1 and Gig1/2 on ASW-2

  • DSW-1
DSW-1(config)#interface gigabitEthernet 0/2
DSW-1(config-if)#switchport trunk encapsulation dot1q 
DSW-1(config-if)#do sh int trunk
Port        Mode         Encapsulation  Status        Native vlan
Gig0/1      on           802.1q         trunking      1

Port        Vlans allowed on trunk
Gig0/1      1-1005

Port        Vlans allowed and active in management domain
Gig0/1      1

Port        Vlans in spanning tree forwarding state and not pruned
Gig0/1      1
DSW-1(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
  • ASW-2
ASW-2(config)#interface gigabitEthernet 1/2
ASW-2(config-if)#switchport mode trunk 

ASW-2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/2, changed state to down

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

ASW-2(config-if)#do sh int trunk
Port        Mode         Encapsulation  Status        Native vlan
Gig1/2      on           802.1q         trunking      1

Port        Vlans allowed on trunk
Gig1/2      1-1005

Port        Vlans allowed and active in management domain
Gig1/2      1

Port        Vlans in spanning tree forwarding state and not pruned
Gig1/2      1
ASW-2(config-if)#

8. Configure and verify VLANs 10 and 20 on DSW-1 with the names provided in the table below

  • VLAN 10: Administration
    • ASW-1 : Fa0/1
    • ASW-2 : Fa0/1
  • VLAN 20: Sales
    • ASW-1 : Fa0/2
    • ASW-2 : Fa0/2
DSW-1(config-if)#vlan 10
DSW-1(config-vlan)#name Administration
DSW-1(config-vlan)#vlan 20
DSW-1(config-vlan)#name Sales
DSW-1(config-vlan)#interface vlan 10
DSW-1(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

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

DSW-1(config-if)#ip address 192.168.10.1 255.255.255.0
DSW-1(config-if)#int vlan 20
DSW-1(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up

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

DSW-1(config-if)#ip address 192.168.20.1 255.255.255.0
DSW-1(config-if)#

9. Assign the VLANs to fa0/1 and fa0/2 of ASW-1 and ASW-2 as shown in the table below

  • ASW-1
ASW-1(config-if)#int fa0/1
ASW-1(config-if)#switchport mode access 
ASW-1(config-if)#switchport access vlan 10
ASW-1(config-if)#int fa0/2
ASW-1(config-if)#switchport mode access 
ASW-1(config-if)#switchport access vlan 20
ASW-1(config-if)#
  • ASW-2
ASW-2(config-if)#int fa0/1
ASW-2(config-if)#switchport mode access 
ASW-2(config-if)#switchport access vlan 10
ASW-2(config-if)#int fa0/2
ASW-2(config-if)#switchport mode access 
ASW-2(config-if)#switchport access vlan 20
ASW-2(config-if)#

The last step, is assigning IP address to PC-1, 2, 3, and 4 as shown in the network diagram, and test connectivity via your VLANs by pinging PC-3 from PC-1 and vice versa, PC-4 from PC-2 and vice versa.

Finally, this is some show command about VLANs and VTP:

  • DSW-1
DSW-1#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
10   Administration                   active    
20   Sales                            active    
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active    
DSW-1#show vtp status
VTP Version                     : 2
Configuration Revision          : 4
Maximum VLANs supported locally : 1005
Number of existing VLANs        : 7
VTP Operating Mode              : Server
VTP Domain Name                 : CCNA
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x4D 0x9F 0xCA 0xFE 0x77 0xCB 0x66 0xAD 
Configuration last modified by 0.0.0.0 at 3-1-93 00:17:06
Local updater ID is 192.168.10.1 on interface Vl10 (lowest numbered VLAN interface found)
DSW-1#show vtp password 
VTP Password: cisco
DSW-1#
  • ASW-1
ASW-1#show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    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, Gig1/2
10   Administration                   active    Fa0/1
20   Sales                            active    Fa0/2
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active    
ASW-1#show vtp status
VTP Version                     : 2
Configuration Revision          : 4
Maximum VLANs supported locally : 255
Number of existing VLANs        : 7
VTP Operating Mode              : Server
VTP Domain Name                 : CCNA
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x4D 0x9F 0xCA 0xFE 0x77 0xCB 0x66 0xAD 
Configuration last modified by 0.0.0.0 at 3-1-93 00:17:06
Local updater ID is 0.0.0.0 (no valid interface found)
ASW-1#
  • ASW-2
ASW-2#show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    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, Gig1/1
10   Administration                   active    Fa0/1
20   Sales                            active    Fa0/2
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active    
ASW-2#show vtp status 
VTP Version                     : 2
Configuration Revision          : 4
Maximum VLANs supported locally : 255
Number of existing VLANs        : 7
VTP Operating Mode              : Client
VTP Domain Name                 : CCNA
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x4D 0x9F 0xCA 0xFE 0x77 0xCB 0x66 0xAD 
Configuration last modified by 0.0.0.0 at 3-1-93 00:17:06
ASW-2#

I hope this been informative for you, enjoy !

Advertisements

Tagged: , , ,

Leave a Reply :

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: