Vai al contenuto

Realizzazione di reti VLAN in Packet Tracer

Configurazione di base

  • Vlan ID 2 "Server", rete IP 192.168.2.0/24
  • Vlan ID 3 "Client", rete IP 192.168.3.0/24

Soluzione (.pkt)

Rete locale composta da due VLAN

Configurazione degli switch

Switch sw1

sw1# configure terminal

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

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

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 gi0/1
sw1(config-if)# switchport mode trunk 
sw1(config-if)# switchport trunk allowed vlan 2,3
sw1(config-if)# end

sw1# show vlan brief 

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

sw1# show interfaces trunk

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

Port        Vlans allowed on trunk
Gig0/1      2-3
...

sw1# copy running-config startup-config

Switch sw2

La configurazione dello switch sw2 รจ identica a quella dello switch sw1.