S5700的Eth-Trunk端口匯聚
鏈路匯聚和端口匯聚,就是端口聚合,交換機(jī)的堆疊是堆疊和端口聚合無(wú)關(guān)。
端口聚合概念:(包括二層端口聚合和三層端口聚合)
1.端口聚合IEEE標(biāo)準(zhǔn)是將最多16條鏈路聚合成一個(gè)邏輯的鏈路。其中只有8條可以使用,
其余8條作為備份。
2.做聚合的端口配置,物理介質(zhì)性質(zhì)(雙工模式,接口帶寬等等)必須一樣
3.端口聚合可以提高帶寬,但是不是物理上的提高,而是基于負(fù)載均衡的提高
4.做端口聚合的端口只能以2的倍數(shù)個(gè)鏈路做聚合,即只能2、4、6、8條鏈路做聚合,
不能是奇數(shù)鏈路做聚合
Eth-Trunk簡(jiǎn)單端口匯聚:(本地負(fù)載均衡)
SW1:
[SW1]interface Eth-Trunk 1 #建立匯聚端口1
[SW1-Eth-Trunk1]port link-type access #更改端口為訪問端口,如果下面是兩臺(tái)交換機(jī),則需要更改為port link-type trunk模式。
[SW1-Eth-Trunk1]mode manual load-balance #添加手動(dòng)本地負(fù)載模式
[SW1-Eth-Trunk1]quit
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]eth-trunk1 #將端口0/0/1加入eth-trunk1
[SW1]interface GigabitEthernet 0/0/2
[SW1-GigabitEthernet0/0/2]eth-trunk1 #將端口0/0/2加入eth-trunk1
[SW1]interface vlan 1
[SW1-Vlanif1]ip address 192.168.1.254255.255.255.0
[SW1-Vlanif1]quit
SW2:
[SW2]interface vlan 1
[SW2-Vlanif1]ip add
[SW2-Vlanif1]ip address 192.168.1.1255.255.255.0
[SW2-Vlanif1]quit
通過抓包驗(yàn)證時(shí)如果斷開GigabitEthernet 0/0/1接口下連線的情況下,會(huì)自動(dòng)切換到GigabitEthernet 0/0/2端口下進(jìn)行通信。
刪除端口下trunk的正確方法:
(因?yàn)槎丝谀J(rèn)是在vlan1的,如果刪除了全部,端口就沒有默認(rèn)vlan1的配置了,需要重新加回來,才可以繼續(xù)下一步的刪除。)
[SWH1]interfaceGigabitEthernet 0/0/2
[SWH1-GigabitEthernet0/0/2]undoport trunk allow-pass vlan all
[SWH1-GigabitEthernet0/0/2]porttrunk allow-pass vlan 1
[SWH1-GigabitEthernet0/0/2]undoport link-type
[SWH1-GigabitEthernet0/0/2]quit
Eth-Trunk不同或者相同的vlan間互通:
準(zhǔn)備:
192.168.10.23/24
192.168.20.99/24
192.168.30.45/24 Gateway:192.168.X.1/24
這三臺(tái)電腦都為測(cè)試使用,其實(shí)直接用交換進(jìn)行ping也可以進(jìn)行測(cè)試,純屬個(gè)人習(xí)慣。
VLAN: 10 20 30
Vlanif10:192.168.10.254/24
Vlanif20:192.168.20.254/24
Vlanif30:192.168.30.254/24
配置:
SWH1:
[SWH1]vlan batch 10 20 30
[SWH1]interface vlan 10
[SWH1-Vlanif10]ip address192.168.10.254 24
[SWH1-Vlanif10]ip address 192.168.20.254 24
[SWH1-Vlanif10]ip address 192.168.30.254 24
[SWH1-Vlanif10]quit
[SWH1]interface Eth-Trunk 1
[SWH1-Eth-Trunk1]port link-type trunk
[SWH1-Eth-Trunk1]port trunk allow-pass vlanall
[SWH1-Eth-Trunk1]mode manual load-balance
[SWH1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1
[SWH1-Eth-Trunk1]trunkport GigabitEthernet 0/0/4
[SWH1]interface vlan 20
[SWH1-Vlanif20]ip address 192.168.20.254 24
[SWH1]interface Eth-Trunk 2
[SWH1-Eth-Trunk2]port link-type trunk
[SWH1-Eth-Trunk2]port trunk allow-pass vlanall
[SWH1-Eth-Trunk2]mode manual load-balance
[SWH1-Eth-Trunk2]trunkport GigabitEthernet 0/0/2
[SWH1-Eth-Trunk2]trunkport GigabitEthernet 0/0/5
[SWH1]interface vlan 30
[SWH1-Vlanif30]ip address 192.168.30.254 24
[SWH1]interface Eth-Trunk 3
[SWH1-Eth-Trunk3]port link-type trunk
[SWH1-Eth-Trunk3]port trunk allow-pass vlanall
[SWH1-Eth-Trunk3]mode manual load-balance
[SWH1-Eth-Trunk3]trunkport GigabitEthernet 0/0/3
[SWH1-Eth-Trunk3]trunkport GigabitEthernet 0/0/6
[SWH1]interface GigabitEthernet 0/0/24
[SWH1-GigabitEthernet0/0/24]port link-type access
[SWH1-GigabitEthernet0/0/24]port default vlan 10
[SWH1-GigabitEthernet0/0/24]quit
SWH4:
[SWH4]vlan batch 10 20 30
[SWH4]interface Ethernet 0/0/22
[SWH4-Ethernet0/0/22]port link-type access
[SWH4-Ethernet0/0/22]port default vlan 20
[SWH4-Ethernet0/0/22]quit
[SWH4]interface vlan 20
[SWH4-Vlanif20]ip address192.168.20.1 255.255.255.0
[SWH4-Vlanif20]quit
[SWH4]interface Eth-Trunk 2
[SWH4-Eth-Trunk2]trunkport GigabitEthernet0/0/1
[SWH4-Eth-Trunk2]trunkport GigabitEthernet0/0/2
[SWH4-Eth-Trunk2]port link-type trunk
[SWH4-Eth-Trunk2]port trunk allow-pass vlanall
[SWH4-Eth-Trunk2]mode manual load-balance
[SWH4-Eth-Trunk2]quit
[SWH4]iproute-static 192.168.10.0 24 192.168.20.254
[SWH4]iproute-static 192.168.30.0 24 192.168.20.254
SWH5:
跟SWH4的配置是一樣的,就是最后的靜態(tài)路由改變了。
[SWH5]vlan batch 10 20 30
[SWH5]interface Eth-Trunk 3
[SWH5-Eth-Trunk3]trunkport GigabitEthernet0/0/1
[SWH5-Eth-Trunk3]trunkport GigabitEthernet0/0/2
[SWH5-Eth-Trunk3]port link-type trunk
[SWH5-Eth-Trunk3]port trunk allow-pass vlanall
[SWH5-Eth-Trunk3]mode manual load-balance
[SWH5-Eth-Trunk3]quit
[SWH5]interface vlan 30
[SWH5-Vlanif30]ip address 192.168.30.1 255.255.255.0
[SWH5-Vlanif30]quit
[SWH5]ip route-static192.168.10.0 24 192.168.30.254
[SWH5]ip route-static 192.168.20.0 24192.168.30.254
SWH3:
跟SWH4的配置是一樣的,就是最后的靜態(tài)路由改變了。
[SWH3]vlan batch 10 20 30
[SWH3]interface Eth-Trunk 1
[SWH3-Eth-Trunk1]trunkport GigabitEthernet0/0/1
[SWH3-Eth-Trunk1]trunkport GigabitEthernet0/0/2
[SWH3-Eth-Trunk1]port link-type trunk
[SWH3-Eth-Trunk1]port trunk allow-pass vlanall
[SWH3-Eth-Trunk1]mode manual load-balance
[SWH3-Eth-Trunk1]quit
[SWH3]interface vlan 10
[SWH3-Vlanif10]ip address 192.168.10.1 255.255.255.0
[SWH5-Vlanif10]quit
[SWH3]ip route-static192.168.30.0 24 192.168.10.254
[SWH3]ip route-static 192.168.20.0 24192.168.10.254
檢測(cè)都可以ping通,且抓包可以實(shí)現(xiàn)自動(dòng)切換。
注意:在本地配置Eth-Trunk的時(shí)候,在對(duì)端也要進(jìn)行Eth-Trunk的配置,且加上路由就可以實(shí)現(xiàn)不同網(wǎng)段間的互通。
聯(lián)系客服