Ethernet interface and link configuration

insert image description here

Basic Ethernet Switch Configuration

[S1]display interface GigabitEthernet 0/0/9
[S1]display interface GigabitEthernet 0/0/10  ###查看接口详细信息
[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/9]undo negotiation auto  ###关闭以太网接口自协商模式
S1-GigabitEthernet0/0/9]speed 100  ###设置接口速率为100Mbit/S
[S1-GigabitEthernet0/0/9]duplex full  ###指定接口在非自协商模式下的双工模式为全双工模式
[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/10]undo negotiation auto  ###关闭以太网接口自协商模式
[S1-GigabitEthernet0/0/10]speed 100  ###设置接口速率为100Mbit/S
[S1-GigabitEthernet0/0/10]duplex full  ###指定接口在非自协商模式下的双工模式为全双工模式

In the same way, configure the speed of the G0/0/9 and G0/0/10 interfaces of S2 to be 100 Mbit/s, and the working mode to be full-duplex.

Configuring Link Aggregation in Manual Mode

Create Eth-Trunk 1 on S1 and S2, and then add G0/0/9 and G0/0/10 interfaces to Eth-Trunk 1

[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]quit
[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/9]eth-trunk 1  ###将当前接口加入到指定Eth-Trunk中
[S1-GigabitEthernet0/0/9]quit
[S1-GigabitEthernet0/0/9]interface GigabitEthernet 0/0/10
[S1-GigabitEthernet0/0/10]eth-trunk 1  ###将当前接口加入到指定Eth-Trunk中
[S1]display eth-trunk 1  ###查看Eth-Trunk配置

Configure S2 in the same way

Configuring Link Aggregation in Static LACP Mode

Delete the configuration under the G0/0/9 and G0/0/10 interfaces on S1 and S2

undo eth-trunk  

Create Eth-Trunk 1 and configure the Eth-Trunk in static LACP mode. Then add G0/0/9 and G0/0/10 interfaces to Eth-Trunk 1.

[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]mode lacp-static  ###设置聚合类型为lacp模式
[S1-Eth-Trunk1]quit       
[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/9]eth-trunk 1
[S1-GigabitEthernet0/0/9]quit
[S1]interface GigabitEthernet 0/0/10
[S1-GigabitEthernet0/0/10]eth-trunk 1
[S1]display eth-trun  ###查看交换机S1上的Eth-Trunk的信息

Configure S2 in the same way

Configure the system priority of LACP on S1 to be 100, making it the active end of LACP

[S1]lacp priority 10  ###配置LACP的系统优先级为100
配置接口的优先级确定活动链路。
[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/9]lacp  priority 100  ###配置LACP的接口优先级为100
[S1-GigabitEthernet0/0/9]quit
[S1]interface GigabitEthernet 0/0/10
[S1-GigabitEthernet0/0/10]lacp  priority 100  ###配置LACP的接口优先级为100
S1]display eth-trun  ###查看交换机S1上的Eth-Trunk的信息

Configure the largest active link and set the preemption mode

S1-Eth-Trunk1]max active-linknumber 1  ### 设置链路上限阈值为1
[S1-Eth-Trunk1]lacp preempt enable  ###开启抢占,默认关闭
[S1-Eth-Trunk1]lacp  preempt delay 10  ###设置强占延时时间为10S

Guess you like

Origin blog.csdn.net/cy6661/article/details/116137553