![]() 《交換機的通道技術》
交換機通道技術是將交換機的多個端口捆綁使用,也叫端口的聚合。其作用是
提高網(wǎng)絡帶寬,增加了可靠性。 配置二層通道時,首先要把捆綁的端口劃分到指定的VLAN或trunk。 配置三層通道時,用no switchport關閉二層端口,設置通道IP地址。 組成通道的端口稱為成員(<8),所有成員的參數(shù)應該一致,如工作模式、封裝 的協(xié)議、端口類型、端口花費、優(yōu)先級等,并使用第一個端口的參數(shù)。 端口協(xié)商方式: 手動方式:端口成員兩端模式mode為on。 自動方式: PAgP(Port Aggregation Protocol)Cisco設備專用聚合協(xié)議。auto模式在協(xié) 商中只收不發(fā),desirable模式收發(fā)協(xié)商的數(shù)據(jù)包。 LACP(Link aggregation Control Protocol)通用聚合協(xié)議802.3ad。active 相當于PAgP的auto,而passive相當于PAgP的desirable。 定義PAgP 地址的學習方法:
switch(config-if)#pagp learn-method {aggregation-port|physical-port} aggregation-port:使用邏輯端口(通道號)。 physical-port:使用物理端口,需要啟動源MAC負載平衡方式。 定義PAgP 端口的優(yōu)先級:
switch(config-if)#pagp port-priority <number> number:取值0~255。 定義LACP 端口的優(yōu)先級: switch(config-if)#lacp port-priority <number> number:取值0~65536。 定義LACP 系統(tǒng)的優(yōu)先級: switch(config)#lacp system-priority <number> number:取值0~32768。 建立通道及協(xié)商模式命令
switch(config-if-range)#channel-protocol {pagp|lacp} switch(config-if-range)#channel-group <number> mode < {auto|desirable|on}|{active|passive}> 顯示通道信息命令:
switch#show etherchannel [<n>] {detail|summary} 其中 detail表示詳細的,summary表示綜合的。 通道端口間的負載平衡
scr-mac:源MAC地址相同的數(shù)據(jù)幀使用同一個端口轉(zhuǎn)發(fā)。 dst-mac:目的MAC地址相同的數(shù)據(jù)幀使用同一個端口轉(zhuǎn)發(fā)。 命令格式: switch(config)#port-channel load-balance {scr-mac|dst-mac} 例題:交換機間的端口聚合
switchA#conf t
switchA(config)#int range f0/3 -6 switchA(config-if-range)#switchport mode access switchA(config-if-range)#switchport access vlan 2 switchA(config-if-range)#channel-protocol pagp switchA(config-if-range)#channel-group 2 mode desirable Creating a port-channel interface Port-channel 2 switchA(config-if-range)#no shutdown switchA(config-if-range)#exit switchA(config)#exit switchA# switchB#conf t
switchB(config)#int range f0/3 -6 switchB(config-if-range)#switchport mode access switchB(config-if-range)#switchport access vlan 2 switchB(config-if-range)#channel-protocol pagp switchB(config-if-range)#channel-group 2 mode auto Creating a port-channel interface Port-channel 2 switchB(config-if-range)#no shutdown switchB(config-if-range)#exit switchB(config)#exit switchB# |
|
來自: ALinux > 《網(wǎng)絡》