π― Obiettivi
πΊοΈ Topologia
π Guida
Lab β Inter-VLAN Routing
1 router (R1) + 1 switch (SW1) con VLAN 10, 20, 99. Router-on-a-stick: configura trunk, sotto-interfacce dot1Q, IP gateway. PC di VLAN diverse devono comunicare.
0%
Router-on-a-Stick
R1
Gi0/0 (trunk)
Gi0/0 (trunk)
β trunk 802.1Q β
SW1
SW1 porte pre-configurate:
Fa0/1 = trunk verso R1
Fa0/2 = VLAN 10 (access) β PC1: 192.168.10.10
Fa0/3 = VLAN 20 (access) β PC2: 192.168.20.10
Fa0/4 = VLAN 99 (access) β PC3: 192.168.99.10
R1 sotto-interfacce da configurare:
Gi0/0.10 β encap dot1Q 10, IP 192.168.10.1/24
Gi0/0.20 β encap dot1Q 20, IP 192.168.20.1/24
Gi0/0.99 β encap dot1Q 99, IP 192.168.99.1/24
Fa0/1 = trunk verso R1
Fa0/2 = VLAN 10 (access) β PC1: 192.168.10.10
Fa0/3 = VLAN 20 (access) β PC2: 192.168.20.10
Fa0/4 = VLAN 99 (access) β PC3: 192.168.99.10
R1 sotto-interfacce da configurare:
Gi0/0.10 β encap dot1Q 10, IP 192.168.10.1/24
Gi0/0.20 β encap dot1Q 20, IP 192.168.20.1/24
Gi0/0.99 β encap dot1Q 99, IP 192.168.99.1/24
1SW1: Crea le VLAN
vlan 10 β name Vendite
vlan 20 β name IT
vlan 99 β name Management
vlan 20 β name IT
vlan 99 β name Management
2SW1: Trunk verso R1
int fa0/1 β switchport mode trunk
switchport trunk allowed vlan 10,20,99
switchport trunk allowed vlan 10,20,99
3R1: Interfaccia fisica up
int Gi0/0 β no shutdown
β οΈ Niente IP sull'interfaccia fisica!
β οΈ Niente IP sull'interfaccia fisica!
4R1: Sotto-interfacce
int Gi0/0.10 β encapsulation dot1Q 10 β ip address 192.168.10.1 255.255.255.0
Ripeti per .20 e .99
Ripeti per .20 e .99
5Verifica e test
show vlans su R1 (vede le sub-if)
show vlan brief su SW1
Da PC1: ping 192.168.20.10 (cross-VLAN!)
show vlan brief su SW1
Da PC1: ping 192.168.20.10 (cross-VLAN!)
π‘ L'interfaccia fisica Gi0/0 deve essere up (no shutdown) ma NON ha un IP. Gli IP stanno solo sulle sotto-interfacce!
R1 β Console
R1
SW1
PC1
PC2
PC3
R1>