PC端配置:主机1配置ip地址、掩码、网关;
主机2配置为DHCP。
路由器配置:
路由器(下):
system-view
sysname r1
interface gi0/0
ip address 192.168.1.254 24
quit
interface gi0/1
ip address 192.168.100.254 24
interface gi0/0
dhcp select relay
dhcp relay server-address 192.168.100.10
dhcp enable
路由器(下):
system-view
sysname dhcpserver
interface gi0/0
ip address 192.168.100.10 24
quit
ip route-static 0.0.0.0 0.0.0.0 192.168.100.254
dhcp enable
dhcp server ip-pool 1
nerwork 192.168.1.0 mask 255.255.255.0
gateway-list 192.168.1.254