π― Obiettivi
πΊοΈ Topologia
π Guida
Lab β DHCP Server & Relay
R1 Γ¨ il DHCP server per LAN-A (192.168.1.0/24) e LAN-B (192.168.2.0/24). R2 connette LAN-B e agisce da relay agent. I PC devono ottenere IP automaticamente via DHCP.
0%
DHCP Server (R1) + Relay (R2)
π₯οΈ LAN-A
192.168.1.0/24
PC1, PC2
192.168.1.0/24
PC1, PC2
βGi0/0β
R1
DHCP Server
DHCP Server
βGi0/1(.1|.2)β
R2
Relay Agent
Relay Agent
βGi0/0β
π§ LAN-B
192.168.2.0/24
PC3
192.168.2.0/24
PC3
IP pre-configurati:
R1 Gi0/0: 192.168.1.1/24, Gi0/1: 10.0.0.1/30
R2 Gi0/1: 10.0.0.2/30, Gi0/0: 192.168.2.1/24
Route statiche giΓ configurate (R1βR2)
PC1, PC2: LAN-A (DHCP) | PC3: LAN-B (DHCP via relay)
R1 Gi0/0: 192.168.1.1/24, Gi0/1: 10.0.0.1/30
R2 Gi0/1: 10.0.0.2/30, Gi0/0: 192.168.2.1/24
Route statiche giΓ configurate (R1βR2)
PC1, PC2: LAN-A (DHCP) | PC3: LAN-B (DHCP via relay)
1R1: Escludi gli IP statici
ip dhcp excluded-address 192.168.1.1 192.168.1.10
ip dhcp excluded-address 192.168.2.1 192.168.2.10
ip dhcp excluded-address 192.168.2.1 192.168.2.10
2R1: Pool LAN-A
ip dhcp pool LAN-A
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8
3R1: Pool LAN-B
ip dhcp pool LAN-B
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
dns-server 8.8.8.8
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
dns-server 8.8.8.8
4R2: Relay Agent
int Gi0/0
ip helper-address 10.0.0.1
Inoltra il broadcast DHCP da LAN-B a R1
ip helper-address 10.0.0.1
Inoltra il broadcast DHCP da LAN-B a R1
5PC: Richiedi IP
Da PC1/PC2/PC3: dhcp request
Su R1: show ip dhcp binding
Su R1: show ip dhcp binding
π‘ PC3 Γ¨ su LAN-B β il broadcast DHCP non raggiunge R1 senza il relay agent (ip helper-address) su R2!
R1 β Console
R1
R2
PC1
PC2
PC3
R1>