eth-trunk

  • 2021 年 5 月 21 日
  • 筆記

————恢复内容开始————

1.eth-trunk 是什么

*链路 聚合技术  

2.做什么用的

*作为一种链路捆绑技术,可以把多个独立物理接口绑定在一起,作为一个大带宽的逻辑接口使用

 

3.有什么优点

*增加设备之间的互联带宽

*增加设备之间的可靠性

*对流量负载均衡,提高链路利用率

 

4.配置方式

*静态手动配置    

*动态LACP配置    【老机器可能没有这功能,只能静态配置】

 

5.静态配置案例

 

要求增加一条物理链路,增加互联带宽

 

 

 

*创建VLAN   10   20,配置基础命令将 交换机连接pc的线路配置为access ,并加入对应VLAN  【前面介绍VLAN的随笔里有详细操作流程】

 

 

*创建链路捆绑,静态手动配置

 

s1]interface Eth-Trunk 1     创建链路  1
[s1-Eth-Trunk1]mode  manual  load-balance 链路·捆绑· 负载均衡
[s1-Eth-Trunk1]trunkport GigabitEthernet  0/0/1      加入捆绑链路。。。。
Info: This operation may take a few seconds. Please wait for a moment…done.
[s1-Eth-Trunk1]trunkport GigabitEthernet 0/0/2
Info: This operation may take a few seconds. Please wait for a moment…done.
[s1-Eth-Trunk1]port link-type trunk  
[s1-Eth-Trunk1]port trunk allow-pass  vlan  all

[s2]interface  Eth-Trunk 2    
[s2-Eth-Trunk2]mode  manual load-balance     
[s2-Eth-Trunk2]trunkport GigabitEthernet 0/0/1
Info: This operation may take a few seconds. Please wait for a moment…done.
[s2-Eth-Trunk2]trunkport GigabitEthernet 0/0/2
Info: This operation may take a few seconds. Please wait for a moment…done.
[s2-Eth-Trunk2]port link-type trunk      
[s2-Eth-Trunk2]port trunk allow-pass  vlan  all

 

*验证命令:[s1]display eth-trunk   1 

 

 

6.动态配置案例

 

要求两条链路带宽正常运作,  并能在其中一端口 无法联通正常运作时,第三条链路作为他的备份

 

 

 

 

 

*创建VLAN   10   20,配置基础命令将 交换机连接pc的线路配置为access ,并加入对应VLAN  【前面介绍VLAN的随笔里有详细操作流程】

 

*创建捆绑链路,并动态LACP配置

s1]interface Eth-Trunk 1      创建捆绑链路
[s1-Eth-Trunk1]mode   lacp-static       LACP模式
[s1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1  捆绑加入…….
Info: This operation may take a few seconds. Please wait for a moment…done.
[s1-Eth-Trunk1]trunkport GigabitEthernet 0/0/2
Info: This operation may take a few seconds. Please wait for a moment…done.
[s1-Eth-Trunk1]trunkport GigabitEthernet 0/0/3
Info: This operation may take a few seconds. Please wait for a moment…done.

s2]interface Eth-Trunk 1    
[s2-Eth-Trunk1]mode   lacp-static
[s2-Eth-Trunk1]trunkport GigabitEthernet 0/0/1
Info: This operation may take a few seconds. Please wait for a moment…done.
[s2-Eth-Trunk1]trunkport GigabitEthernet 0/0/2
Info: This operation may take a few seconds. Please wait for a moment…done.
[s2-Eth-Trunk1]trunkport GigabitEthernet 0/0/3
Info: This operation may take a few seconds. Please wait for a moment…done.

 

*要决定哪两根链路启动,哪一根做备份,必需有一方能决定,例如  设置主动端是s2

【s2】lacp   priority  100   LACP 优先级为100

*只有两条链路能连通,一条做备份

*[s2-Eth-Trunk1]max active-linknumber 2   
允许连通链路2根【默认8根】

*确保其中一端口 无法联通正常运作时,第三条链路作为他的备份

[s2-Eth-Trunk1]lacp  preempt  enable    在主动端开启链路抢占 30s

*将捆绑端口配置trunk,并通过所有VLAN
[s2-Eth-Trunk1]port link-type trunk     
[s2-Eth-Trunk1]port trunk allow-pass  vlan all

*验证命令

display eth-trunk   1 
 

 

如何查看
Eth-Trunk1’s state information is:
Local:本地
LAG ID: 1                   WorkingMode: STATIC                               
Preempt Delay Time: 30抢占延迟      Hash arithmetic: According to SIP-XOR-DIP         
System Priority: 100        System ID: 4c1f-ccef-28df                         
Least Active-linknumber: 1  Max Active-linknumber: 2     允许端口数2  【默认8   】                  
Operate status: up          Number Of Up Port In Trunk: 2                     
——————————————————————————–
ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/1   Selected 1GE      32768   2      305     10111100  1     
GigabitEthernet0/0/2   Selected 1GE      32768   3      305     10111100  1     
GigabitEthernet0/0/3   Unselect 1GE      32768   4      305     10100000  1     

Partner: 对方
——————————————————————————–
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
GigabitEthernet0/0/1   32768    4c1f-cc07-0ecb  32768   4      305     10111100
GigabitEthernet0/0/2   32768    4c1f-cc07-0ecb  32768   2      305     10111100
GigabitEthernet0/0/3   32768    4c1f-cc07-0ecb  32768   3      305     10110000
    

 

 

 

 

 

 

 

————恢复内容结束————