◆◆實(shí)驗(yàn)拓?fù)洹簟?/span>
◆◆實(shí)驗(yàn)需求◆◆
1、C1與C3屬于vlan10,C2與C4屬于vlan20
2、SW1與SW2之間使用LACP模式鏈路捆綁,活動(dòng)接口為2個(gè)
3、SW1與R1之間進(jìn)行鏈路捆綁
4、VLAN 10 與 VLAN 20 通過(guò)DHCP自動(dòng)獲取IP地址
5、在R1上配置單臂路由使全網(wǎng)互通
vlan10 IP:192.168.10.0/24
vlan20 IP:192.168.20.0/24
SW1配置:
[SW1]vlan batch 10 20 //創(chuàng)建vlan
[SW1]inter e0/0/1 //進(jìn)接口
[SW1-Ethernet0/0/1]port hybrid pvid vlan 10 //為進(jìn)來(lái)的數(shù)據(jù)包加vlan10標(biāo)簽
[SW1-Ethernet0/0/1]port hybrid untagged vlan 10 //將接口以u(píng)ntagged方式加入vlan10
[SW1-Ethernet0/0/1]quit
[SW1]inter e0/0/2
[SW1-Ethernet0/0/2]port hybrid pvid vlan 20
[SW1-Ethernet0/0/2]port hybrid untagged vlan 20
[SW1-Ethernet0/0/2]quit
[SW1]lacp priority 100 //配置系統(tǒng)優(yōu)先級(jí)為100
[SW1]inter eth-trunk 1 //進(jìn)入eth-trunk 1
[SW1-Eth-Trunk1]mode lacp-static //設(shè)置為lacp模式
[SW1-Eth-Trunk1]max active-linknumber 2 //設(shè)置活動(dòng)接口為2
[SW1-Eth-Trunk1]port hybrid tagged vlan 10 20 //將接口以tagged方式加入到vlan10和vlan20,設(shè)置中繼
[SW1-Eth-Trunk1]quit
[SW1]interface e0/0/10 //進(jìn)接口
[SW1-Ethernet0/0/10]eth-trunk 1 //將接口加入eth-trunk
[SW1-Ethernet0/0/10]lacp priority 100 //設(shè)置接口優(yōu)先級(jí)為100,默認(rèn)為32768
[SW1-Ethernet0/0/10]inter e0/0/11
[SW1-Ethernet0/0/11]eth-trunk 1
[SW1-Ethernet0/0/11]inter e0/0/12
[SW1-Ethernet0/0/12]eth-trunk 1
[SW1-Ethernet0/0/12]quit
[SW1]interface Eth-Trunk 2 //進(jìn)入eth-trunk 2
[SW1-Eth-Trunk2]trunkport GigabitEthernet 0/0/1 0/0/2 //將接口加入到eth-trunk中
[SW1-Eth-Trunk2]port hybrid tagged vlan 10 20 //將接口以tagged方式加入到vlan10和vlan20
SW2配置:
[SW2]vlan batch 10 20
[SW2]inter e0/0/3
[SW2-Ethernet0/0/3]port hybrid pvid vlan 10
[SW2-Ethernet0/0/3]port hybrid untagged vlan 10
[SW2-Ethernet0/0/3]quit
[SW2]interface e0/0/4
[SW2-Ethernet0/0/4]port hybrid pvid vlan 20
[SW2-Ethernet0/0/4]port hybrid untagged vlan 20
[SW2-Ethernet0/0/4]quit
[SW2]interface Eth-trunk 1
[SW2-Eth-Trunk1]mode lacp-static
[SW2-Eth-Trunk1]max active-linknumber 2
[SW2-Eth-Trunk1]trunkport Ethernet 0/0/10 to 0/0/12
[SW2-Eth-Trunk1]port hybrid tagged vlan 10 20
通過(guò)display eth-trunk 1 查看端口信息,發(fā)現(xiàn)優(yōu)先級(jí)高的e0/0/10,e0/0/11接口被選中為活動(dòng)接口優(yōu)先級(jí)低的未被
◆◆在SW1上關(guān)閉一個(gè)端口SW1◆◆
[SW1]interface e0/0/10
[SW1-Ethernet0/0/10]shutdown
會(huì)發(fā)現(xiàn)0/0/10接口關(guān)閉了以后 0/0/12接口自動(dòng)補(bǔ)上了
R1配置:
[R1]dhcp enable
[R1]interface Eth-Trunk 1 //進(jìn)入eth-trunk 1
[R1-Eth-Trunk1]undo portswitch //轉(zhuǎn)換三層口,默認(rèn)eth-trunk是二層口路由是三層端口要把接口轉(zhuǎn)換成三層接口才可以捆綁
[R1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 0/0/2 //將接口加入eth-trunk
[R1]interface Eth-Trunk 1.10 //進(jìn)入子接口
[R1-Eth-Trunk1.10]dot1q termination vid 10 //封裝dot1q,設(shè)置為vlan10的網(wǎng)關(guān)
[R1-Eth-Trunk1.10]ip address 192.168.10.1 24 //配置接口IP
[R1-Eth-Trunk1.10]arp broadcast enable //開啟ARP廣播
[R1-Eth-Trunk1.10]dhcp select interface //采用接口地址池的DHCP功能
[R1-Eth-Trunk1.10]inter eth-trunk 1.20
[R1-Eth-Trunk1.20]dot ter vid 20
[R1-Eth-Trunk1.20]ip add 192.168.20.1 24
[R1-Eth-Trunk1.20]a b e
[R1-Eth-Trunk1.20]dhcp sel int
用PC自動(dòng)獲取DHCP
C2獲取
C3獲取
C4獲取
C1去測(cè)試,全網(wǎng)互通
審核編輯 :李倩
-
DHCP
+關(guān)注
關(guān)注
0文章
104瀏覽量
19703 -
端口
+關(guān)注
關(guān)注
4文章
964瀏覽量
32057
原文標(biāo)題:實(shí)驗(yàn)干貨】,華為單臂路由、DHCP、LACP模式鏈路捆綁、二層與三層鏈路捆綁!
文章出處:【微信號(hào):通信弱電交流學(xué)習(xí),微信公眾號(hào):通信弱電交流學(xué)習(xí)】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
評(píng)論