Labb 16: DHCP Relay ISP | Labb 18: DHCP VoIP
I denna laboration ska vi konfigurera en nätverkstopologi som inkluderar tre Layer 3-switchar (MLS1, MLS2 och MLS3) och en DHCP-server. Routing-protokollet EIGRP 100 används för att koppla samman nätverken. Målet är att skapa en fungerande DHCP-konfiguration där VLAN 1 fungerar som default gateway för klienter anslutna till MLS2 och MLS3. För att möjliggöra DHCP-tjänster över flera nätverk används en DHCP Relay-agent, vilket gör det möjligt för klienternas DHCP-förfrågningar att nå servern i ett annat nätverk.
VLAN 1 som default gateway
I detta scenario är VLAN 1 konfigurerad som default gateway för enheterna i MLS2 och MLS3. Trafik som behöver routas utanför det lokala delnätet skickas till respektive switch via VLAN 1. För MLS2 används gateway-adressen 10.10.10.1/24, medan MLS3 använder 10.20.20.1/24.
DHCP Relay server
Eftersom DHCP-servern är placerad i nätverket 10.30.30.0/24, kan klienterna på MLS2 (10.10.10.0/24) och MLS3 (10.20.20.0/24) inte kommunicera direkt med servern. För att lösa detta konfigureras ip helper-address på MLS2 och MLS3 med adressen till DHCP-servern (10.30.30.30). Detta gör att DHCP-förfrågningar från klienterna vidarebefordras till servern och möjliggör korrekt IP-konfiguration över flera nätverk.
Topologi
Konfiguration
MLS1 konfiguration
- MLS1(config)# interface g1/0/3
- MLS1(config-if)# description Connected to LAN 1
- MLS1(config-if)# no switchport
- MLS1(config-if)# ip address 10.30.30.1 255.255.255.0
- MLS1(config-if)# no shutdown
- MLS1(config-if)# exit
- MLS1(config)# interface g1/0/1
- MLS1(config-if)# description Connected to MLS2
- MLS1(config-if)# no switchport
- MLS1(config-if)# ip address 209.65.100.1 255.255.255.252
- MLS1(config-if)# no shutdown
- MLS1(config-if)# exit
- MLS1(config)# interface g1/0/2
- MLS1(config-if)# description Connected to MLS3
- MLS1(config-if)# no switchport
- MLS1(config-if)# ip address 209.65.200.1 255.255.255.252
- MLS1(config-if)# no shutdown
- MLS1(config-if)# exit
- MLS1(config)# ip routing
- MLS1(config)# router eigrp 100
- MLS1(config-router)# no auto-summary
- MLS1(config-router)# network 10.30.30.0 0.0.0.255
- MLS1(config-router)# network 209.65.100.0 0.0.0.3
- MLS1(config-router)# network 209.65.200.0 0.0.0.3
- MLS1(config-router)# end
- MLS1# show running-config
- MLS1# show ip interface
- MLS1# show interface
- MLS1# show ip protocols
- MLS1# show vlan brief
- MLS1# copy running-config startup-config
MLS2 konfigurationer
- MLS2(config)# interface g0/1
- MLS2(config-if)# description Connected to MLS1
- MLS2(config-if)# no switchport
- MLS2(config-if)# ip address 209.65.100.2 255.255.255.252
- MLS2(config-if)# no shut
- MLS2(config-if)# exit
- MLS2(config)# interface vlan 1
- MLS2(config-if)# ip address 10.10.10.1 255.255.255.0
- MLS2(config-if)# no shutdown
- MLS2(config-if)# exit
- MLS2(config)# interface vlan 1
- MLS2(config-if)# ip helper-address 10.30.30.30
- MLS2(config-if)# exit
- MLS2(config)# ip routing
- MLS2(config)# router eigrp 100
- MLS2(config-router)# no auto-summary
- MLS2(config-router)# network 10.10.10.0 0.0.0.255
- MLS2(config-router)# network 209.65.100.0 0.0.0.3
- MLS2(config-router)# end
- MLS2# show running-config
- MLS2# show ip interface
- MLS2# show interface
- MLS2# show ip protocols
- MLS2# show vlan brief
- MLS2# copy running-config startup-config
MLS3 konfigurationer
- MLS3(config)# interface g0/2
- MLS3(config-if)# description Connected to MLS1
- MLS3(config-if)# no switchport
- MLS3(config-if)# ip address 209.65.200.2 255.255.255.252
- MLS3(config-if)# no shutdown
- MLS3(config-if)# exit
- MLS3(config)# interface vlan 1
- MLS3(config-if)# ip address 10.20.20.1 255.255.255.0
- MLS3(config-if)# no shutdown
- MLS3(config-if)# exit
- MLS3(config)# interface vlan 1
- MLS3(config-if)# ip helper-address 10.30.30.30
- MLS3(config-if)# exit
- LS3(config)# ip routing
- MLS3(config)# router eigrp 100
- MLS3(config-router)# no auto-summary
- MLS3(config-router)# network 10.20.20.0 0.0.0.255
- MLS3(config-router)# network 209.65.200.0 0.0.0.3
- MLS3(config-router)# end
- MLS3# show running-config
- MLS3# show ip interface
- MLS3# show interface
- MLS3# show ip protocols
- MLS3# show vlan brief
- MLS3# copy running-config startup-config
DHCP server konfigurationer
- Pool Name: Pool-10.10.10.0
- Default Gateway: 10.10.10.1
- DNS server: 8.8.8.8
- Start IP Address: 10.10.10.100
- Subnet Mask: 255.255.255.0
- Max User: 30
- Pool Name: Pool-10.20.20.0
- Default Gateway: 10.20.20.1
- DNS server: 8.8.8.8
- Start IP Address: 10.20.20.100
- Subnet Mask: 255.255.255.0
- Max User: 30