环境:AR3为PC1的网关,AR4为DHCP服务器,与客户端地址不在同一个网段。
AR3的配置:
sysname AR3
#
dhcp enable
#
interface GigabitEthernet0/0/0
ip address 192.168.10.254 255.255.255.0
dhcp select relay
dhcp relay server-ip 192.168.100.2
#
interface GigabitEthernet0/0/1
ip address 192.168.100.1 255.255.255.252
AR4的配置:
sysname AR4
#
dhcp enable
#
ip pool x
gateway-list 192.168.10.254
network 192.168.10.0 mask 255.255.255.0
dns-list 114.114.114.114
#
interface GigabitEthernet0/0/0
ip address 192.168.100.2 255.255.255.252
dhcp select global
#
ip route-static 192.168.10.0 255.255.255.0 192.168.100.1
#
DHCP中继的报文是通过单播发送的,服务器是通过路由器的端口
a安大佬牛逼