您好,登錄后才能下訂單哦!
一、接口地址池方式配置
1.配置DHCP服務為AR1
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.1.1 255.255.255.0
[Huawei-GigabitEthernet0/0/0]undo shutdown
[Huawei-GigabitEthernet0/0/0]dhcp select interface
[Huawei-GigabitEthernet0/0/0]dhcp server dns-list 192.168.20.50
[Huawei-GigabitEthernet0/0/0]dhcp server excluded-ip-address 192.168.1.1
[Huawei-GigabitEthernet0/0/0]dhcp server lease day 1
[Huawei]display ip pool
-----------------------------------------------------------------------
Pool-name : GigabitEthernet0/0/0
Pool-No : 0
Position : Interface Status : Unlocked
Gateway-0 : 192.168.1.1
Mask : 255.255.255.0
××× instance : --
IP address Statistic
Total :253
Used :0 Idle :253
Expired :0 Conflict :0 Disable :0
二、全局地址池方式配置
原理:全局方式下,設置多個全局地址池,并存在定義的地址池網段與端口IP是同一網段的對應關系,即多個不同網段地池對應各自的端口,最終實現不同網段客戶端自動獲取相應地址
配置DHCP服務為AR1
[Huawei]dhcp enable
[Huawei]ip pool jszx
[Huawei-ip-pool-jszx]network 192.168.1.0 mask 24
[Huawei-ip-pool-jszx]gateway-list 192.168.1.1
[Huawei-ip-pool-jszx]lease day 1
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select global
[Huawei]display ip pool
Pool-name : jszx
Pool-No : 0
Position : Local Status : Unlocked
Gateway-0 : 192.168.1.1
Mask : 255.255.255.0
××× instance : --
IP address Statistic
Total :253
Used :0 Idle :253
Expired :0 Conflict :0 Disable
三、附加升級試驗
依照"二"的全局配置過程,需要幾個網段就定義幾個地址池
1.在"二"的基礎上再添中JYD地址池,拓撲如下:
配置AR1添加JYD地址池
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.100.1 255.255.255.0
[Huawei]ip pool JYD
[Huawei-ip-pool-jszx]network 192.168.100.0 mask 24
[Huawei-ip-pool-jszx]gateway-list 192.168.100.1
[Huawei-ip-pool-jszx]lease day 1
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/0]dhcp select global
[Huawei]display ip pool
PC5獲得地址
PC1獲得地址
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。