您好,登錄后才能下訂單哦!
華為創(chuàng)建于全局的DHCP設(shè)置
實(shí)驗(yàn)拓?fù)洌?br/>
實(shí)驗(yàn)?zāi)康模号渲肈HCP,pc1和pc2自動(dòng)分配網(wǎng)絡(luò)參數(shù)
實(shí)驗(yàn)需求:兩臺(tái)PC機(jī),一臺(tái)二層交換機(jī),一臺(tái)路由器
實(shí)驗(yàn)步驟:
1、確??蛻舳伺c服務(wù)器之間的鏈路是互通的;
SW :創(chuàng)建 VLAN 10 將端口放入VLAN 10 ;
<Huawei>system-view
[Huawei]sysname sw
[sw]vlan 10
[sw-vlan10]exit
[sw-vlan10]q
[sw]port-group group-member gi0/0/1 gi0/0/2 gi0/0/3
[sw-port-group]
Jan 8 2018 17:35:46-08:00 sw DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 6, the ch
ange loop count is 0, and the maximum number of records is 4095.
[sw-port-group]port link-type access
[sw-GigabitEthernet0/0/1]port link-type access
[sw-GigabitEthernet0/0/2]port link-type access
[sw-GigabitEthernet0/0/3]port link-type access
[sw-port-group]port default vlan 10
[sw-GigabitEthernet0/0/1]port default vlan 10(將接口劃入對(duì)應(yīng)所在VLAN)
[sw-GigabitEthernet0/0/2]port default vlan 10
[sw-GigabitEthernet0/0/3]port default vlan 10
[sw-port-group]
[sw]
Gateway:在 Router 上為 VLAN 10 配置一個(gè) 網(wǎng)關(guān)IP 地址;
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname gateway
[gateway]vlan 10 (創(chuàng)建VLAN 10)
[Huawei-vlan10]quit
[gateway]interface Vlanif 10
[gateway-Vlanif10]undo shutdown (開啟svi接口)
Info: Interface Vlanif10 is not shutdown.
[gateway-Vlanif10]ip address 192.168.10.254 255.255.255.0(設(shè)置網(wǎng)關(guān)IP地址)
[gateway-Vlanif10]quit
[gateway]
2、配置 DHCP 客戶端;
進(jìn)入 PC ,選擇“自動(dòng)獲取”,點(diǎn)“應(yīng)用
3、配置 DHCP 服務(wù)器;
#創(chuàng)建 IP 地址池;
ip pool VLAN-10
network 192.168.10.0 mask 255.255.255.0
gateway-list 192.168.10.254
dns-list 8.8.8.8
lease day 3
開啟 DHCP 服務(wù) ;
dhcp enable
interface gi0/0/0
dhcp select global // 表示的是當(dāng)端口上收到 DHCP 報(bào)文以后
直接去 DHCP 服務(wù)器在全局配置的IP
地址池中選擇一個(gè)可用的IP地址;
[gateway]ip pool vlan-10(創(chuàng)建IP地址池)
Info: It's successful to create an IP address pool.
[gateway-ip-pool-vlan-10]network 192.168.10.0 mask 255.255.255.0
[gateway-ip-pool-vlan-10]gateway-list 192.168.10.254(設(shè)置默認(rèn)網(wǎng)關(guān))
[gateway-ip-pool-vlan-10]dns-list 8.8.8.8(設(shè)置dns默認(rèn)地址)
[gateway-ip-pool-vlan-10]lease day 3(設(shè)置有效使用時(shí)長)
[gateway-ip-pool-vlan-10]q
[gateway]dhcp enable (開啟DHCP)
Info: The operation may take a few seconds. Please wait for a moment.done.
[gateway]interface GigabitEthernet 0/0/0
[gateway-GigabitEthernet0/0/0]dhcp select global
(開啟在全局配置中尋找可用ip地址)
[gateway-GigabitEthernet0/0/0]
4.驗(yàn)證與測(cè)試
實(shí)驗(yàn)總結(jié):
DHCP配置思路:
1.確保DHCP客戶端與服務(wù)器之間的 DHCP 報(bào)文互通;
2.配置 DHCP 客戶端
將PC配置為“自動(dòng)獲取IP地址”
3.配置 DHCP 服務(wù)器
移除掉不能自動(dòng)分配出去的 IP 地址/段;
創(chuàng)建 IP 地址池
可用IP地址空間
默認(rèn)網(wǎng)關(guān)
DNS服務(wù)器
4.開啟 DHCP 服務(wù);
驗(yàn)證、測(cè)試、保存
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。