1、SW1与SW2通过接口F0/11-12建立动态链路聚合,SW1为主动,SW2为被动。思科的配置命令
时间: 2024-11-12 08:44:39 浏览: 55
在Cisco设备上,要实现SW1和SW2之间的动态链路聚合(LAG),通常会使用MLACP (Multi-link Active-Active Cisco Protocol)协议,因为它是Cisco支持的LACP标准。假设它们都配置了VLAN和IP地址,并且SW1为主动模式,SW2为被动模式,可以按照以下步骤配置:
1. **SW1**(主动端)配置:
```bash
interface FastEthernet0/11
channel-group 1 mode active # 指定接口加入聚合组,active表示主动模式
switchport port-channel lacp
interface FastEthernet0/12
channel-group 1 mode on # 只需加入聚合组,无需指定模式,on表示默认被动模式
interface Port-Channel1
switchport mode trunk # 设置聚合口为Trunk模式
spanning-tree portfast edge # 为了快速切换
ip address <IP> <subnet>/<mask> # 配置IP地址
```
2. **SW2**(被动端)配置:
```bash
interface FastEthernet0/11
channel-group 1 mode passive # 被动端只做成员,不需要mode active
interface FastEthernet0/12
channel-group 1 mode on
interface Port-Channel1
switchport mode trunk
spanning-tree portfast trunk # 在被动端,仅允许从主节点收到的配置
```
确保两个设备上的LACP优先级设置一致,以便正确选举主动节点。
阅读全文
相关推荐


















