您好,登錄后才能下訂單哦!
配置兩個地址池:192.168.1.0/24和192.168.2.0/24
配置兩個VLAN:10和20
將四臺主機分別加入VLAN
自動獲取IP地址,確保全網(wǎng)互通。
步驟:
[DHCP]DHCP enable
打開DHCP功能
[DHCP]vlan batch 10 20
[DHCP]ip pool vlan10
[DHCP]gateway-list 192.168.1.254
[DHCP]network 192.168.1.0 mask 255.255.255.0
[DHCP]lease day 3
[DHCP]dns-list 8.8.8.8/
[DHCP]ip pool VLAN 20
[DHCP]gateway-list 192.168.2.254
[DHCP]network 192.168.2.0 mask 255.255.255.0
[DHCP]lease day 3
[DHCP]dns-list 8.8.8.8/
在服務器上創(chuàng)建VLAN10;20;IP地址池VLAN 10和IP地址池 VLAN 20.
[DHCP]interface vlanif10
[DHCP]ip address 192.168.1.254 255.255.255.0
[DHCP]dhcp select global
[DHCP] interface vlanif20
[DHCP]ip address 192.168.2.254 255.255.255.0
[DHCP]dhcp select global
給VLAN10,VLAN20配置IP/
[DHCP]interface gi0/0/1
[DHCP]port link-type trunk
[DHCP]port trunk allow-pass all
[DHCP]interface gi0/0/2
[DHCP]port link-type trunk
[DHCP]port trunk allow-pass all
給DHCP服務器1口和2口配置trunk鏈路
[SW1]vlan batch 10 20
[SW1]interface gi0/1
[SW1]port link-type access
[SW1]port default vlan 10
[SW1]interface gi0/2
[SW1]port link-type access
[SW1]port default vlan 10
[SW1]interface gi0/3
[SW1]port link-type trunk
[SW1]port trunk allow-pass all
在交換機一上把端口1;2加入VLAN 10;端口3設置成trunk鏈路
[SW1]DHCP enable
打開DHCP功能。///
交換機二也做相同操作;
驗證測試保存
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。