电脑装配网

链路聚合配置有什么用(交换机链路聚合配置详解)

 人阅读 | 作者奔跑的小羊 | 时间:2023-03-31 16:53

1、链路聚合——将多个物理端口捆绑为一个逻辑端口,对逻辑端口进行配置,从而达到增加链路带宽和链路备份的目的。链路聚合一般用在核心交换机上,物理端口最好是2的倍数来做捆绑。

2、链路聚合的模式有两种,手工负载分担和LACP,手工负载分担模式下所有活动线路的端口都参与数据的转发和分担流量,LACP模式支持链路备份。

3、做链路聚合的端口速率、接口数量、双工方式、端口模式(truck or access)必须一样。

4、做链路聚合的端口下不能有任何配置,对逻辑端口Eth-Trunk进行配置。

5、下面一起看看详细配置吧,准备两台5700交换机,如图:

一、SW1配置:

[SW1]int Eth-Trunk 1

[SW1-Eth-Trunk1]int g0/0/23

 

[SW1-GigabitEthernet0/0/23]eth-trunk 1

[SW1-GigabitEthernet0/0/23]int g0/0/24

 

[SW1-GigabitEthernet0/0/24]eth-trunk 1

[SW1-GigabitEthernet0/0/24]q

[SW1]

[SW1]int et

[SW1]int Eth-Trunk 1

[SW1-Eth-Trunk1]port li

[SW1-Eth-Trunk1]port link-type tru

[SW1-Eth-Trunk1]port link-type trunk

 

[SW1-Eth-Trunk1]port trunk allow-pass vlan all

[SW1-Eth-Trunk1]disp th

#

interface Eth-Trunk1

port link-type trunk

port trunk allow-pass vlan 2 to 4094

#

[SW1]disp stp brief

 

MSTID Port Role STP State Protection

0 Eth-Trunk1 ROOT FORWARDING NONE

[SW2]disp int 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: 2

--------------------------------------------------------------------------------

PortName Status Weight

GigabitEthernet0/0/23 Up 1

GigabitEthernet0/0/24 Up 1

[SW1]disp int 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-cc7c-16ef

Current system time: 2020-09-03 22:31:07-08:00

Input bandwidth utilization : 0%

Output bandwidth utilization : 0%

-----------------------------------------------------

PortName Status Weight

-----------------------------------------------------

GigabitEthernet0/0/23 UP 1

GigabitEthernet0/0/24 UP 1

-----------------------------------------------------

The Number of Ports in Trunk : 2

The Number of UP Ports in Trunk : 2

二、SW2配置:

[SW2]int Eth-Trunk 1

[SW2-Eth-Trunk1]int g0/0/23

 

[SW2-GigabitEthernet0/0/23]eth-trunk 1

[SW2-GigabitEthernet0/0/23]int g0/0/24

 

[SW2-GigabitEthernet0/0/24]eth-trunk 1

[SW2-GigabitEthernet0/0/24]q

[SW2]

[SW2]int et

[SSW2]int Eth-Trunk 1

[SW2-Eth-Trunk1]port li

[SW2-Eth-Trunk1]port link-type tru

[SW2-Eth-Trunk1]port link-type trunk

 

[SW2-Eth-Trunk1]port trunk allow-pass vlan all

[SW2-Eth-Trunk1]disp th

#

interface Eth-Trunk1

port link-type trunk

port trunk allow-pass vlan 2 to 4094

#

[SW2]disp stp brief

MSTID Port Role STP State Protection

0 Eth-Trunk1 DESI FORWARDING NONE

[SW2]disp int 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: 2

--------------------------------------------------------------------------------

PortName Status Weight

GigabitEthernet0/0/23 Up 1

GigabitEthernet0/0/24 Up 1

[SW2]disp int 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-cc2e-653e

Current system time: 2020-09-03 22:32:12-08:00

Input bandwidth utilization : 0%

Output bandwidth utilization : 0%

-----------------------------------------------------

PortName Status Weight

-----------------------------------------------------

GigabitEthernet0/0/23 UP 1

GigabitEthernet0/0/24 UP 1

-----------------------------------------------------

The Number of Ports in Trunk : 2

The Number of UP Ports in Trunk : 2


文章标签:

本文链接:『转载请注明出处』