A、 拓扑图:
B、 配置命令与步骤
一、华为DHCP-interface地址池配置:
[R1]dhcp enable
[R1]int e0/0/1
[R1-Ethernet0/0/1]ip add 192.168.11.1 24
[R1-Ethernet0/0/1]dhcp select interface
[R1-Ethernet0/0/1]dhcp server dns-list 2.2.2.2
[R1-Ethernet0/0/1]dhcp server excluded-ip-address 192.168.11.168
[R1-Ethernet0/0/1]dhcp server lease day 1
二、华为DHCP全局地址池配置(本地):
[R1]ip pool client2
[R1-ip-pool-client2]network 192.168.12.0 mask 24
[R1-ip-pool-client2]dns-list 2.2.2.2
[R1-ip-pool-client2]gateway-list 192.168.12.1
[R1-ip-pool-client2]excluded-ip-address 192.168.12.88
[R1-ip-pool-client2]lease day 1
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip add 192.168.12.1 24
[R1-GigabitEthernet0/0/2]dhcp select global
三、华为DHCP-relay配置:
[R2]dhcp enable
[R2-Ethernet0/0/0]dhcp select relay
[R2-Ethernet0/0/0]dhcp relay server-ip 12.1.1.1
[R1]ip pool client3
[R1-ip-pool-client2]network 172.16.23.0 mask 24
[R1-ip-pool-client2]dns-list 2.2.2.2
[R1-ip-pool-client2]gateway-list 172.16.23.2
[R1-ip-pool-client2]excluded-ip-address 172.16.23.88
[R1-ip-pool-client2]lease day 1
[R1-Ethernet0/0/0]dhcp select global
[R1]ip route-static 172.16.23.0 24 e0/0/0 12.1.1.2