链路聚合

注意事项

  1. 只能删除不包含任何成员接口的聚合端口。

  2. 二层聚合口成员必须为二层口,三层聚合口成员必须为三层口。

  3. 最多可以加入8个成员端口。

  4. 加入到聚合口的接口必须是hybrid接口类型。

  5. 不能嵌套使用聚合。

  6. 另一个Eth-Trunk口,必须先把该以太接口从当前所属的Eth-Trunk口中删除。

  7. 一个Eth-Trunk口的成员口类型必须相同。例如,一个快速以太口(FE口)和一个千兆以太口(GE口)不能加入同一个Eth-Trunk。

  8. 位于不同接口板(LPU)上的以太口可以加入同一个Eth-Trunk口。如果一个对端接口直接和本端Eth-Trunk口的一个成员口相连,该对端接口也必须加入一个Eth-Trunk口。否则两端无法通信。

  9. 如果成员口的速率不同,速率较低的接口可能会拥塞,报文可能会被丢弃。

  10. 接口加入Eth-Trunk口后,Eth-Trunk口学习MAC地址,成员口不再学习。

手工负载分担方式

手工负载分担方式下全部活动接口都参与数据转发,分担负载流量,某条链路故障,剩余链路自动进行负载分担。

华为设备系统默认使用手工负载分担方式(mode manual load-balance)。

二层链路聚合
链路聚合_第1张图片
TIM截图20181119153531.jpg

在S1上面配置DHCP

[S1]dhcp enable
[S1]interface Vlanif 1
[S1-Vlanif1]ip address 192.168.100.1 24
[S1-Vlanif1]dhcp select interface
[S1-Vlanif1]dhcp server dns-list 192.168.100.100
[S1-Vlanif1]dhcp server excluded-ip-address 192.168.100.100 192.168.100.254

pc1 获取到的ip地址为192.168.100.99

PC>ipconfig

Link local IPv6 address...........: fe80::5689:98ff:fe35:2667
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.100.99
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.100.1
Physical address..................: 54-89-98-35-26-67
DNS server........................: 192.168.100.100

配置链路聚合
在S1配置

[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]qu
[S1]interface GigabitEthernet 0/0/1
[S1-GigabitEthernet0/0/1]eth-trunk 1
[S1-GigabitEthernet0/0/1]qu
[S1]interface GigabitEthernet 0/0/2
[S1-GigabitEthernet0/0/2]eth-trunk 1
[S1-GigabitEthernet0/0/2]qu
[S1]display interface Eth-Trunk 1
Eth-Trunk1 current state : UP
Line protocol current state : UP
Description:
Switch Port, PVID :    1, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW:
 2G, Current BW: 2G, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc6b-54ea
Current system time: 2018-11-19 15:46:11-08:00
    Input bandwidth utilization  :    0%
    Output bandwidth utilization :    0%
-----------------------------------------------------
PortName                      Status      Weight
-----------------------------------------------------
GigabitEthernet0/0/1          UP          1
GigabitEthernet0/0/2          UP          1
-----------------------------------------------------
The Number of Ports in Trunk : 2
The Number of UP Ports in Trunk : 2

在S2配置

[R2]interface Eth-Trunk 1
[R2-Eth-Trunk1]qu
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]et 
[R2-GigabitEthernet0/0/1]eth-trunk 1
[R2-GigabitEthernet0/0/1]qu  
[R2]interface GigabitEthernet 0/0/2
[R2-GigabitEthernet0/0/2]eth-trunk 1
[R2-GigabitEthernet0/0/2]qu
[R2]display interface Eth-Trunk 1
Eth-Trunk1 current state : UP
Line protocol current state : UP
Description:
Switch Port, PVID :    1, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW:
 2G, Current BW: 2G, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc2a-6cd0
Current system time: 2018-11-19 15:55:46-08:00
    Input bandwidth utilization  :    0%
    Output bandwidth utilization :    0%
-----------------------------------------------------
PortName                      Status      Weight
-----------------------------------------------------
GigabitEthernet0/0/1          UP          1
GigabitEthernet0/0/2          UP          1
-----------------------------------------------------
The Number of Ports in Trunk : 2
The Number of UP Ports in Trunk : 2
三层链路聚合
链路聚合_第2张图片
TIM截图20181119162347.jpg

在R1上配置

[R1]interface Eth-Trunk 1
[R1-Eth-Trunk1]undo portswitch
[R1-Eth-Trunk1]ip address 192.168.100.1 24
[R1-Eth-Trunk1]qu
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]eth-trunk 1
[R1-GigabitEthernet0/0/0]qu
[R1]interface GigabitEthernet 0/0/1 
[R1-GigabitEthernet0/0/1]eth-trunk 1
[R1-GigabitEthernet0/0/1]qu
[R1]display interface Eth-Trunk 1
Eth-Trunk1 current state : UP
Line protocol current state : UP
Last line protocol up time : 2018-11-19 16:29:06 UTC-08:00
Description:HUAWEI, AR Series, Eth-Trunk1 Interface
Route Port,Hash arithmetic : According to SIP-XOR-DIP,Maximal BW: 2G, Current BW
: 2G, The Maximum Transmit Unit is 1500
Internet Address is 192.168.100.1/24
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc48-7d06
Current system time: 2018-11-19 16:29:29-08:00
Input: 0 packets, 0 bytes
  Unicast:                  0,  Multicast:                0
  Broadcast:                0,  Discard:                  0
  Total Error:              0

Output: 1 packets, 60 bytes
  Unicast:                  0,  Multicast:                0
  Broadcast:                1,  Discard:                  0
  Total Error:              0

    Input bandwidth utilization  :    0%
    Output bandwidth utilization :    0%
-----------------------------------------------------
PortName                      Status      Weight
-----------------------------------------------------
GigabitEthernet0/0/0          UP          1
GigabitEthernet0/0/1          UP          1
-----------------------------------------------------
The Number of Ports in Trunk : 2
The Number of UP Ports in Trunk : 2

在R2上配置

[R2]interface Eth-Trunk 1
[R2-Eth-Trunk1]undo portswitch 
[R2-Eth-Trunk1]ip address 192.168.100.2 24
[R2-Eth-Trunk1]qu
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]eth-trunk 1
[R2-GigabitEthernet0/0/0]qu
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]eth-trunk 1
[R2-GigabitEthernet0/0/1]qu
[R2]display interface Eth-Trunk 1
Eth-Trunk1 current state : UP
Line protocol current state : DOWN
Description:HUAWEI, AR Series, Eth-Trunk1 Interface
Route Port,Hash arithmetic : According to SIP-XOR-DIP,Maximal BW: 2G, Current BW
: 2G, The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fcfb-0258
Current system time: 2018-11-19 16:32:06-08:00
Input: 0 packets, 0 bytes
  Unicast:                  0,  Multicast:                0
  Broadcast:                0,  Discard:                  0
  Total Error:              0

Output: 0 packets, 0 bytes
  Unicast:                  0,  Multicast:                0
  Broadcast:                0,  Discard:                  0
  Total Error:              0

    Input bandwidth utilization  :    0%
    Output bandwidth utilization :    0%
-----------------------------------------------------
PortName                      Status      Weight
-----------------------------------------------------
GigabitEthernet0/0/0          UP          1
GigabitEthernet0/0/1          UP          1
-----------------------------------------------------
The Number of Ports in Trunk : 2
The Number of UP Ports in Trunk : 2

LACP 模式

lacp模式支持链路备份

二层链路聚合

在SW3上配置

[SW3]interface Eth-Trunk 1
[SW3-Eth-Trunk1]mode lacp-static 
[SW3-Eth-Trunk1]qu
[SW3-GigabitEthernet0/0/1]eth-trunk 1
[SW3-GigabitEthernet0/0/1]qu
[SW3]interface GigabitEthernet 0/0/1
[SW3-GigabitEthernet0/0/1]eth-trunk 1
[SW3-GigabitEthernet0/0/1]qu
[SW3]interface GigabitEthernet 0/0/2
[SW3-GigabitEthernet0/0/2]eth-trunk 1
[SW3-GigabitEthernet0/0/2]qu
[SW3]interface GigabitEthernet 0/0/3
[SW3-GigabitEthernet0/0/3]eth-trunk 1
[SW3-GigabitEthernet0/0/3]qu
[SW3]display interface Eth-Trunk 1
Eth-Trunk1 current state : DOWN
Line protocol current state : DOWN
Description:
Switch Port, PVID :    1, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW:
 3G, Current BW: 0M, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc7e-07a4
Current system time: 2018-11-19 17:19:02-08:00
    Input bandwidth utilization  :    0%
    Output bandwidth utilization :    0%
-----------------------------------------------------
PortName                      Status      Weight
-----------------------------------------------------
GigabitEthernet0/0/1          DOWN        1
GigabitEthernet0/0/2          DOWN        1
GigabitEthernet0/0/3          DOWN        1
-----------------------------------------------------
The Number of Ports in Trunk : 3
The Number of UP Ports in Trunk : 0

在SW4上面配置

[SW4]interface Eth-Trunk 1
[SW4-Eth-Trunk1]mode lacp-static 
[SW4-Eth-Trunk1]qu
[SW4]interface GigabitEthernet 0/0/1
[SW4-GigabitEthernet0/0/1]eth-trunk 1
[SW4-GigabitEthernet0/0/1]qu
[SW4]interface GigabitEthernet 0/0/2
[SW4-GigabitEthernet0/0/2]eth-trunk 1
[SW4-GigabitEthernet0/0/2]qu
[SW4]interface GigabitEthernet 0/0/3
[SW4-GigabitEthernet0/0/3]eth-trunk 1
[SW4-GigabitEthernet0/0/3]qu
[SW4]display interface Eth-Trunk 1
Eth-Trunk1 current state : UP
Line protocol current state : UP
Description:
Switch Port, PVID :    1, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW:
 3G, Current BW: 3G, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc0a-74cd
Current system time: 2018-11-19 17:20:57-08:00
    Input bandwidth utilization  :    0%
    Output bandwidth utilization :    0%
-----------------------------------------------------
PortName                      Status      Weight
-----------------------------------------------------
GigabitEthernet0/0/1          UP          1
GigabitEthernet0/0/2          UP          1
GigabitEthernet0/0/3          UP          1
-----------------------------------------------------
The Number of Ports in Trunk : 3
The Number of UP Ports in Trunk : 3

设置优先级,配置期望的活动链路数量

[SW3]lacp priority 100   #设置系统lacp权重
[SW3]interface Eth-Trunk 1
[SW3-Eth-Trunk1]max active-linknumber 2   #设置期望的活动链路
[SW3-Eth-Trunk1]qu
[SW3]interface GigabitEthernet 0/0/1
[SW3-GigabitEthernet0/0/1]lacp priority 100  #设置端口的lacp优先级
[SW3-GigabitEthernet0/0/1]qu
[SW3]interface GigabitEthernet 0/0/2
[SW3-GigabitEthernet0/0/2]lacp priority 100  #设置端口的lacp优先级
[SW3-GigabitEthernet0/0/2]qu
[SW3]display interface Eth-Trunk 1
Eth-Trunk1 current state : UP
Line protocol current state : UP
Description:
Switch Port, PVID :    1, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW:
 3G, Current BW: 2G, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc7e-07a4
Current system time: 2018-11-19 17:35:30-08:00
    Input bandwidth utilization  :    0%
    Output bandwidth utilization :    0%
-----------------------------------------------------
PortName                      Status      Weight
-----------------------------------------------------
GigabitEthernet0/0/1          UP          1
GigabitEthernet0/0/2          UP          1
GigabitEthernet0/0/3          DOWN        1
-----------------------------------------------------
The Number of Ports in Trunk : 3
The Number of UP Ports in Trunk : 2

三层链路聚合
链路聚合_第3张图片
TIM截图20181120103907.jpg

在R3上面配置

[R3]interface Eth-Trunk 1
[R3-Eth-Trunk1]undo portswitch
[R3-Eth-Trunk1]ip address 192.168.100.1 24
[R3-Eth-Trunk1]mode lacp-static
[R3-Eth-Trunk1]max active-linknumber 1
[R3-Eth-Trunk1]qu
[R3]lacp priority 100
[R3]interface GigabitEthernet 0/0/0 
[R3-GigabitEthernet0/0/0]eth-trunk 1
[R3-GigabitEthernet0/0/0]lacp priority 100
[R3-GigabitEthernet0/0/0]qu
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]eth-trunk 1
[R3-GigabitEthernet0/0/1]lacp priority 100
[R3-GigabitEthernet0/0/1]qu

在R4上面配置

[R4]interface Eth-Trunk 1
[R4-Eth-Trunk1]undo portswitch
[R4-Eth-Trunk1]ip address 192.168.100.4 24
[R4-Eth-Trunk1]mode lacp-static
[R4-Eth-Trunk1]qu
[R4]interface GigabitEthernet 0/0/0 
[R4-GigabitEthernet0/0/0]eth-trunk 1
[R4-GigabitEthernet0/0/0]qu
[R4]interface GigabitEthernet 0/0/1
[R4-GigabitEthernet0/0/1]eth-trunk 1
[R4-GigabitEthernet0/0/1]qu

你可能感兴趣的:(链路聚合)