思科路由器 DHCP配置

wKiom1TBBwiim3oJAACF3Rqqb_c916.jpg

R1配置DHCP服务,另PC0和PC1能通过DHCP获取IP

R1配置:

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 192.168.1.1 255.255.255.0

Router(config-if)#no shutdown 

Router(config-if)#exit

Router(config)#ip dhcp excluded-address 192.168.1.1   --------排除IP不被DHCP分配

Router(config)#ip dhcp pool LAN-POOL-1   --------新建DHCP地址池

Router(dhcp-config)#network 192.168.1.0 255.255.255.0    --------设置DHCP地址池

Router(dhcp-config)#default-router 192.168.1.1    ---------设置网关

Router(dhcp-config)#dns-server 192.168.1.1     ----------设置DNS服务器


DHCP验证:

PC1

wKioL1TBCJOizqEeAADmdyy6rBg001.jpg


PC2

wKiom1TBB8yy9ie_AADsMiVuBCI917.jpg


R1

wKioL1TBCLLwHT93AAB3bZv7MRc638.jpg



你可能感兴趣的:(DHCP)