DHCP
实验拓扑
实验需求
- 按照图示为R1配置IP地址
- 配置R1为DHCP服务器,提供服务的地址池为
192.168.1.0/24
网段,网关为192.168.1.254
,DNS服务器地址为202.103.24.68
,202.103.0.117
192.168.1.10-192.168.1.20
为专用地址段,要求不能用于自动分配- PC3和PC4都能获取到
192.168.1.0/24
网段的IP地址
实验步骤:
R1
[R1]int g0/0
[R1-GigabitEthernet0/0]ip add 192.168.1.1 24
[R1-GigabitEthernet0/0]quit
[R1]dhcp enable
[R1]dhcp server ip-pool 2y #创建一个地址池
[R1-dhcp-pool-2y]network 192.168.1.10 ?
INTEGER<1-30> Mask length of the subnet
export-route Export the route
mask Specify a subnet mask
secondary Specify a secondary network
<cr>
[R1-dhcp-pool-2y]network 192.168.1.0 mask 255.255.255.0 #分配地址池
[R1-dhcp-pool-2y]gateway-list 192.168.1.254 #配置下发DNS
[R1-dhcp-pool-2y]dns-list 202.103.24.68 202.103.0.117 #配置下发网关地址
[R1-dhcp-pool-2y]dis this
#
dhcp server ip-pool 2y
gateway-l