拓圖
要求:
- 為 office100 和 office200 分別配置地址池
AR1接口配置
interface GigabitEthernet0/0/0ip address 192.168.100.1 255.255.255.0
#
interface GigabitEthernet0/0/1ip address 192.168.200.1 255.255.255.0
AR1路由器上創建office100地址池
[AR1]dhcp enable # 全局開啟DHCP服務
[AR1]ip pool office100 # 創建office100地址池(名稱隨意)
[AR1-ip-pool-office100]network 192.168.100.0 mask 24 # 指定地址池所在網段
[AR1-ip-pool-office100]gateway-list 192.168.100.1 # 指定該網段的網關
[AR1-ip-pool-office100]dns-list 8.8.8.8 # 指定DNS服務器
[AR1-ip-pool-office100]dns-list 114.114.114.114 # 指定第二個DNS服務器
[AR1-ip-pool-office100]lease day 0 hour 8 minute 0 # 地址租約,允許客戶端使用8小時
[AR1-ip-pool-office100]excluded-ip-address 192.168.100.2 192.168.100.10 # 指定排除的地址范圍(不能包括網關地址)
[AR1-ip-pool-office100]quit
AR1路由器上,配置接口從地址池獲取地址
[AR1]interface GigabitEthernet 0/0/0
[AR1-GigabitEthernet0/0/0]dhcp select global
[AR1-GigabitEthernet0/0/0]quit
至此office100地址池配置完成,下面開始配置office200地址池
AR1上創建office200地址池,并配置接口從地址池獲取地址
[AR1]ip pool office200
[AR1-ip-pool-office200]network 192.168.200.0 mask 24
[AR1-ip-pool-office200]gateway-list 192.168.200.1
[AR1-ip-pool-office200]dns-list 8.8.8.8
[AR1-ip-pool-office200]dns-list 223.5.5.5
[AR1-ip-pool-office200]lease day 0 hour 8 minute 0
[AR1-ip-pool-office200]excluded-ip-address 192.168.200.2 192.168.200.10
[AR1-ip-pool-office200]quit
[AR1]interface GigabitEthernet 0/0/1
[AR1-GigabitEthernet0/0/1]dhcp select global
[AR1-GigabitEthernet0/0/1]quit
至此DHCP全部配置完成,下面查看pc自動獲取IP情況
查看地址池租約使用情況