Vai al contenuto

Configurazione del protocollo VTP

Caratteristiche generali

  • Vlan ID 2 "Server", rete IP 192.168.2.0/24
  • Vlan ID 3 "Client", rete IP 192.168.3.0/24
  • Vlan ID 4 "Stampanti", rete IP 192.168.4.0/24
  • Configurazione VTP (versione 2)
    • Switch sw0: VTP server
    • Switch sw1 e sw2: VTP client
    • Dominio VTP: azienda
    • Password VTP: 123456

Soluzione (.pkt)

Configurazione del protocollo VTP

Configurazione degli switch

sw0# configure terminal 

sw0(config)# vlan 2
sw0(config-vlan)# name Server
sw0(config-vlan)# exit

sw0(config)# vlan 3
sw0(config-vlan)# name Client
sw0(config-vlan)# exit

sw0(config)# vlan 4
sw0(config-vlan)# name Stampanti
sw0(config-vlan)# exit

sw0(config)# interface range gi0/1-2
sw0(config-if-range)# switchport mode trunk
sw0(config-if-range)# end

sw0# show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
...
2    Server                           active    
3    Client                           active    
4    Stampanti                        active    
...

sw0# show interfaces trunk

Port        Mode         Encapsulation  Status        Native vlan
Gig0/1      on           802.1q         trunking      1
Gig0/2      on           802.1q         trunking      1

Port        Vlans allowed on trunk
Gig0/1      1-1005
Gig0/2      1-1005

Port        Vlans allowed and active in management domain
Gig0/1      1,2,3,4
Gig0/2      1,2,3,4
...

! Configurazione VTP

sw0(config)# vtp mode server 
sw0(config)# vtp domain azienda
sw0(config)# vtp password 123456
sw0(config)# vtp version 2

sw0# show vtp status 

VTP Version capable             : 1 to 2
VTP version running             : 2
VTP Domain Name                 : azienda
VTP Pruning Mode                : Disabled
VTP Traps Generation            : Disabled
Device ID                       : 0060.3EBB.A100
Configuration last modified by 0.0.0.0 at 3-1-93 00:05:55
Local updater ID is 0.0.0.0 (no valid interface found)

Feature VLAN : 
--------------
VTP Operating Mode                : Server
Maximum VLANs supported locally   : 255
Number of existing VLANs          : 8
Configuration Revision            : 7
MD5 digest                        : 0xF3 0xF8 0xB6 0xA8 0x2E 0x1F 0x46 0x8F 
                                    0x3D 0x03 0x5E 0x01 0x5D 0x83 0xB6 0x39 

sw1# configure terminal 

sw1(config)# vtp mode client 
sw1(config)# vtp domain azienda
sw1(config)# vtp password 123456
sw1(config)# vtp version 2

sw1(config)# interface fa0/1
sw1(config-if)# switchport mode access
sw1(config-if)# switchport access vlan 2
sw1(config-if)# exit

sw1(config)# interface fa0/2
sw1(config-if)# switchport mode access
sw1(config-if)# switchport access vlan 3
sw1(config-if)# exit

sw1(config)# interface fa0/3
sw1(config-if)# switchport mode access
sw1(config-if)# switchport access vlan 4
sw1(config)# end

! L'interfaccia gi0/1 di default è dinamica (auto), diventa
! automaticamente trunk se collegata a un'altra porta trunk

sw1# show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
...
2    Server                           active    Fa0/1
3    Client                           active    Fa0/2
4    Stampanti                        active    Fa0/3
...

sw1# show interfaces trunk 

Port        Mode         Encapsulation  Status        Native vlan
Gig0/1      auto         n-802.1q       trunking      1

Port        Vlans allowed on trunk
Gig0/1      1-1005

Port        Vlans allowed and active in management domain
Gig0/1      1,2,3,4

Port        Vlans in spanning tree forwarding state and not pruned
Gig0/1      1,2,3,4

sw1# show vtp status

VTP Version capable             : 1 to 2
VTP version running             : 2
VTP Domain Name                 : azienda
VTP Pruning Mode                : Disabled
VTP Traps Generation            : Disabled
Device ID                       : 000A.41B0.8E00
Configuration last modified by 0.0.0.0 at 3-1-93 00:05:55

Feature VLAN : 
--------------
VTP Operating Mode                : Client
Maximum VLANs supported locally   : 255
Number of existing VLANs          : 8
Configuration Revision            : 7
...

La configurazione dello switch sw2 è identica a quella dello switch sw1.