地址池下放(全局下放):
#
dhcp enable
ip pool zhangsan //创建地址池
gateway-list 192.168.5.1 //地址池的网关地址
network 192.168.5.0 mask 255.255.255.128 //地址池下放的网段 0---127
static-bind ip-address 192.168.5.100 mac-address 5489-98CF-1276
excluded-ip-address 192.168.5.245 192.168.5.254
lease day 1 hour 12 //设置地址租期为一天12小时
dns-list 192.168.5.1
interface GigabitEthernet0/0/2
ip address 192.168.5.1 255.255.255.0
dhcp select global //下放方式是全局下放
DHCP中继下放地址:
R1(中继设备):
dhcp enable
interface Ethernet0/0/0
ip address 192.168.1.1 255.255.255.0
dhcp select relay //选择下放方式是中继
dhcp relay server-ip 12.1.1.2 //地址下放服务器地址是12.1.1.2
interface Ethernet0/0/1
ip address 12.1.1.1 255.255.255.0
ip route-static 1.1.1.1 32 12.1.1.2
R2(服务器):
dhcp enable
ip pool dhcp
gateway-list 192.168.1.1
network 192.168.1.0 mask 255.255.255.0
interface Ethernet0/0/0
ip address 12.1.1.2 255.255.255.0
dhcp select global //选择下放方式是全局
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
ip route-static 192.168.1.0 255.255.255.0 12.1.1.1
//注意先要把网络路由打通
标签:1.1,ip,192.168,255.255,地址,dhcp,address,DHCP,下放 From: https://blog.51cto.com/u_16238127/7521716