實驗?zāi)康模?br/>1.DHCP自動分配地址
2.Vlan間通信
實驗步驟:
海鹽網(wǎng)站制作公司哪家好,找成都創(chuàng)新互聯(lián)!從網(wǎng)頁設(shè)計、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、響應(yīng)式網(wǎng)站建設(shè)等網(wǎng)站項目制作,到程序開發(fā),運營維護(hù)。成都創(chuàng)新互聯(lián)從2013年開始到現(xiàn)在10年的時間,我們擁有了豐富的建站經(jīng)驗和運維經(jīng)驗,來保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選成都創(chuàng)新互聯(lián)。
- 在兩臺二層交換機上創(chuàng)建vlan【sw1?vlan10 sw2?vlan20】并將三個端口加入相應(yīng)的vlan中
[sw1]vlan 10
[sw1-vlan10]q
[sw1-GigabitEthernet0/0/1]undo sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[sw1-Ethernet0/0/1]port link-type acc//選擇access模式
[sw1-Ethernet0/0/1]port def vlan 10 //加入vlan10
其他端口同理【sw2上只是把vlan10換成vlan20】 - 配置三層交換機:
創(chuàng)建vlan10、2
將vlan10/20加入端口【access模式】
配置vlanIP:
[dhcp-Vlanif10]undo sh
Info: Interface Vlanif10 is not shutdown.
[dhcp-Vlanif10]
[dhcp-Vlanif10]
[dhcp-Vlanif10]ip add 192.168.10.254 255.255.255.0
[dhcp-Vlanif20]ip add 192.168.20.254 255.255.255.0
創(chuàng)建地址池:
[dhcp]ip pool vlan-10
Info:It's successful to create an IP address pool.
[dhcp-ip-pool-vlan-10]network 192.168.10.0 mask 255.255.255.0
[dhcp-ip-pool-vlan-10]gateway-list 192.168.10.254
[dhcp]ip pool vlan-20
Info:It's successful to create an IP address pool.
[dhcp-ip-pool-vlan-20]network 192.168.20.0 mask 255.255.255.0
[dhcp-ip-pool-vlan-20]gateway-list 192.168.20.254
開啟DHCP功能,端口開啟DHCP全局:
[dhcp]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[dhcp-Vlanif10]dhcp select global
[dhcp-Vlanif20]dhcp select global
配置完成
3.驗證、測試、保存
實驗拓?fù)鋱D:
網(wǎng)頁名稱:第十一期小型企業(yè)自動分配IP地址和不同網(wǎng)段通信
網(wǎng)頁路徑:
http://weahome.cn/article/gccjip.html