一、组网需求
开启FortiGate的DHCP服务器功能,内网电脑可通过自动获取地址的方式上网。内网用户网段为192.168.1.0/24,网关为192.168.1.99。为mac地址为68:F7:28:AF:4B:2A的主机保留ip地址 192.168.1.110.
二、组网拓扑
三、配置要点
1、基本上网配置
2、配置DHCP服务器
四、操作步骤
1、基本上网配置
2、配置DHCP服务
参照上一节 《DHCP服务器配置》
3、配置保留IP
FortiGate# config system dhcp server
FortiGate(server) # edit 1 //DHCP基础配置
FortiGate(1)#set dns-service default
FortiGate(1)#set default-gateway 192.168.1.99
FortiGate(1)#set netmask 255.255.255.0
FortiGate(1)#set interface internal
FortiGate(1) # config ip-range
FortiGate(ip-range) #edit 1
FortiGate(1)set start-ip 192.168.1.110
FortiGate(1)set end-ip 192.168.1.210
FortiGate(1) # next
FortiGate(ip-range) # end // DHCP基础配置
FortiGate(1)#config reserved-address //配置保留IP
FortiGate(reserved-address)#edit 1 // 条目,1,2,3 ,仅做为标识作用,可以写多个条目。
FortiGate(1) # set ip 192.168.1.110 // 为指定MAC地址分配该IP地址
FortiGate(1) # set mac 68:F7:28:AF:4B:2A // 指定MAC地址
FortiGate(1) # next
FortiGate(reserved-address) # end
FortiGate(1) # next
FortiGate(server) #end
五、验证效果
将电脑配置为自动获取IP地址模式,mac地址为68:F7:28:AF:4B:2A的主机会获取192.168.1.110。
1)查看pc终端获取到的IP地址
2)查看防火墙上dhcp地址池分配情况