ensp华为交换机链路聚合

#作业五#

实验一:手工模式聚合链路

实验环境

实验思路

######1. 设置手工模式聚合链路###### ######2. 查看接口######

具体实施

设置手工动模式聚合链路
##### SW1: ##### [SW1]int Eth-Trunk 1 // [SW1-Eth-Trunk1]mode manual load-balance //设置模式(手动模式为默认模式) [SW1-Eth-Trunk1]trunkport Ethernet 0/0/1 to 0/0/4 或者分别进入不同端口,确认后输入eth-trunk 1//将4个接口加入聚合链路1
SW2:
[SW2]int Eth-Trunk 2
[SW2-Eth-Trunk2]mode manual load-balance
[SW2-Eth-Trunk2]trunkport  Ethernet 0/0/1 to 0/0/4 
查看接口
SW1:
[SW1]dis eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP 
Least Active-linknumber: 1  Max Bandwidth-affected-linknumber: 8  
Operate status: up  Number Of Up Port In Trunk: 4 
  --------------------------------------------------------------------------------
PortName  Status  Weight 
Ethernet0/0/1 Up  1  
Ethernet0/0/2 Up  1  
Ethernet0/0/3 Up  1  
Ethernet0/0/4 Up  1  
SW2:
[SW2]dis eth-trunk 2
Eth-Trunk2's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP 
Least Active-linknumber: 1  Max Bandwidth-affected-linknumber: 8  
Operate status: up  Number Of Up Port In Trunk: 4 
  --------------------------------------------------------------------------------
PortName  Status  Weight 
Ethernet0/0/1 Up  1  
Ethernet0/0/2 Up  1  
Ethernet0/0/3 Up  1  
Ethernet0/0/4 Up  1 

实验二:LACP模式聚合链路

实验环境

实验思路

######1. 将各个接口退出手动聚合链路### ######2. 设置LACP模式聚合链路### ######3. 比较优先级确认主动端### ######4. 设置活跃接口数目### ######5. 设置e0/0/1和e0/0/3为活跃接口### ######6. 查看接口###

具体实施

将各个接口退出手工聚合链路
##### SW1: ##### [SW1]int e0/0/1 [SW1-Ethernet0/0/1]undo eth-trunk [SW1]int e0/0/2 [SW1-Ethernet0/0/2]undo eth-trunk [SW1]int e0/0/3 [SW1-Ethernet0/0/3]undo eth-trunk [SW1]int e0/0/4 [SW1-Ethernet0/0/4]undo eth-trunk ##### SW2: ##### [SW2]int e0/0/1 [SW2-Ethernet0/0/1]undo eth-trunk [SW2]int e0/0/2 [SW2-Ethernet0/0/2]undo eth-trunk [SW2]int e0/0/3 [SW2-Ethernet0/0/3]undo eth-trunk [SW2]int e0/0/4 [SW2-Ethernet0/0/4]undo eth-trunk
设置LACP模式聚合链路
##### SW1: ##### [SW1]int Eth-Trunk 1 [SW1-Eth-Trunk1]mode lacp-static [SW1-Eth-Trunk1]trunkport Ethernet 0/0/1 to 0/0/4 ##### SW2: ##### [SW2]int Eth-Trunk 2 [SW2-Eth-Trunk2]mode lacp-static [SW2-Eth-Trunk2]trunkport Ethernet 0/0/1 to 0/0/4
比较优先级确认主动端
**设置主动端需要比较优先级,因SW1与SW2的优先级都是默认的32768,故需要对比MAC地址大小。**
SW1:
[SW1]dis int Ethernet 0/0/1
Ethernet0/0/1 current state : UP
Line protocol current state : UP
Description:
Switch Port, TPID : 8100(Hex), The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-ccdc-53b6
Last physical up time   : 2021-03-11 16:06:29 UTC-08:00
Last physical down time : 2021-03-11 15:25:17 UTC-08:00
Current system time: 2021-03-11 16:25:10-08:00
Hardware address is 4c1f-ccdc-53b6
Last 300 seconds input rate 0 bytes/sec, 0 packets/sec
Last 300 seconds output rate 0 bytes/sec, 0 packets/sec
Input: 6541 bytes, 54 packets
Output: 11522 bytes, 93 packets
Input:
  Unicast: 0 packets, Multicast: 54 packets
  Broadcast: 0 packets
Output:
  Unicast: 0 packets, Multicast: 93 packets
  Broadcast: 0 packets
Input bandwidth utilization  :0%
Output bandwidth utilization :0%
SW2:
[SW2]dis int Ethernet 0/0/1
Ethernet0/0/1 current state : UP
Line protocol current state : UP
Description:
Switch Port, TPID : 8100(Hex), The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc88-04f1
Last physical up time   : 2021-03-11 16:13:20 UTC-08:00
Last physical down time : 2021-03-11 15:25:18 UTC-08:00
Current system time: 2021-03-11 16:22:26-08:00
Hardware address is 4c1f-cc88-04f1
Last 300 seconds input rate 0 bytes/sec, 0 packets/sec
Last 300 seconds output rate 0 bytes/sec, 0 packets/sec
Input: 2718 bytes, 22 packets
Output: 2227 bytes, 18 packets
Input:
  Unicast: 0 packets, Multicast: 22 packets
  Broadcast: 0 packets
Output:
  Unicast: 0 packets, Multicast: 18 packets
  Broadcast: 0 packets
Input bandwidth utilization  :0%
Output bandwidth utilization :0%

由结果可看出SW1的MAC地址是4c1f-ccdc-53b6,SW2的MAC地址是4c1f-cc88-04f1,通过比较可知SW2的MAC地址较小,故SW2的优先级更高,应设为主动端。

设置活跃接口数目
##### SW1: ##### [SW1]int Eth-Trunk 1 [SW1-Eth-Trunk1]max active-linknumber 2 //最好两边设备都设置 ##### SW2: ##### [SW2]int Eth-Trunk 2 [SW2-Eth-Trunk2]max active-linknumber 2
设置e0/0/1和e0/0/3为活跃接口
**设置活跃接口需要比较优先级,因此时优先级均为默认值,接口依照接口号设置接口e0/0/1与e0/0/2为活跃接口。若要将接口e0/0/3设为活跃接口则需要修改优先级。**
SW2:
[SW2]int e0/0/3
[SW2-Ethernet0/0/3]lacp priority 100   //更改e0/0/3的优先级为100
[SW2-Ethernet0/0/3]q
[SW2]int Eth-Trunk 2
[SW2-Eth-Trunk2]lacp preempt enable     //开启抢占
[SW2-Eth-Trunk2]lacp preempt delay 10  //设置抢占延迟为10s
SW1:
[SW1]int Eth-Trunk 1
[SW1-Eth-Trunk1]lacp preempt enable   //两边设备都设置
[SW1-Eth-Trunk1]lacp preempt delay 10
查看接口
##### SW1: ##### [SW1]dis eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 WorkingMode: STATIC Preempt Delay Time: 10 Hash arithmetic: According to SIP-XOR-DIP System Priority: 32768 System ID: 4c1f-ccdc-53b6 Least Active-linknumber: 1 Max Active-linknumber: 2 Operate status: up Number Of Up Port In Trunk: 2 -------------------------------------------------------------------------------- ActorPortName Status PortType PortPri PortNo PortKey PortState Weight Ethernet0/0/1 Selected 100M 32768 2 289 10111100 1 Ethernet0/0/2 Unselect 100M 32768 3 289 10100000 1 Ethernet0/0/3 Selected 100M 32768 4 289 10111100 1 Ethernet0/0/4 Unselect 100M 32768 5 289 10100000 1
Partner:
--------------------------------------------------------------------------------
ActorPortName  SysPri   SystemIDPortPri PortNo PortKey PortState
Ethernet0/0/1  327684c1f-cc88-04f1  32768   2  545 10111100
Ethernet0/0/2  327684c1f-cc88-04f1  32768   3  545 10100000
Ethernet0/0/3  327684c1f-cc88-04f1  100 4  545 10111100
Ethernet0/0/4  327684c1f-cc88-04f1  32768   5  545 10100000
SW2:
[SW2]dis eth-trunk 2
Eth-Trunk2's state information is:
Local:
LAG ID: 2   WorkingMode: STATIC   
Preempt Delay Time: 10  Hash arithmetic: According to SIP-XOR-DIP 
System Priority: 32768  System ID: 4c1f-cc88-04f1 
Least Active-linknumber: 1  Max Active-linknumber: 2  
Operate status: up  Number Of Up Port In Trunk: 2 
   --------------------------------------------------------------------------------
ActorPortName  Status   PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/1  Selected 100M 32768   2  545 10111100  1 
Ethernet0/0/2  Unselect 100M 32768   3  545 10100000  1 
Ethernet0/0/3  Selected 100M 100 4  545 10111100  1 
Ethernet0/0/4  Unselect 100M 32768   5  545 10100000  1 

Partner:
--------------------------------------------------------------------------------
ActorPortName  SysPri   SystemIDPortPri PortNo PortKey PortState
Ethernet0/0/1  327684c1f-ccdc-53b6  32768   2  289 10111100
Ethernet0/0/2  327684c1f-ccdc-53b6  32768   3  289 10100000
Ethernet0/0/3  327684c1f-ccdc-53b6  32768   4  289 10111100
Ethernet0/0/4  327684c1f-ccdc-53b6  32768   5  289 10100000

实验总结

289 10111100 Ethernet0/0/2 327684c1f-ccdc-53b6 32768 3 289 10100000 Ethernet0/0/3 327684c1f-ccdc-53b6 32768 4 289 10111100 Ethernet0/0/4 327684c1f-ccdc-53b6 32768 5 289 10100000

实验总结

**链路聚合能够提高链路带宽,在流量大的地方都可以使用,来进行负载分担。链路聚合发生两台设备之间,接口属于同一设备,且加入同一链路聚合接口。链路聚合分为两种模式,手工模式和LACP模式。手工模式下所有活动接口都参与数据的转发。只需要将各个接口加入聚合链路,操作简单但无法及时判断异常位置。而LACP模式支持链路备份,当有一条活跃的链路出现异常时可以启用备用链路。配置LACP模式比手工模式复杂,在将接口加入聚合链路后还要依据优先级确定主动端,若优先级相同则看MAC地址。选好主动端后设置活跃接口也同理,先看优先级再看端口号,需要特定活跃接口则需要设置优先级。**
  • 2
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值