#作业五#

  • 实验一:手工模式聚合链路
  • 实验环境
  • 实验思路
  • 1.设置手工模式聚合链路
  • 2.查看接口
  • 具体实施
  • 实验二:LACP模式聚合链路
  • 实验环境
  • 实验思路
  • 1.将各个接口退出手工聚合链路
  • 2.设置LACP模式聚合链路
  • 3.比较优先级确认主动端
  • 4.设置活跃接口数目
  • 5.设置e0/0/1和e0/0/3为活跃接口
  • 6.查看接口
  • 具体实施
  • 实验总结

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

实验环境

ensp vlan聚合 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模式聚合链路

实验环境

ensp vlan聚合 ensp聚合链路命令_链路

实验思路

######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


实验总结