一、配置 SW1 和 SW2 形成 M-LAG 系统
SW1:
m-lag system-mac 1-1-1
m-lag system-number 1
m-lag system-priority 4096
m-lag keepalive ip destination 1.1.1.2 source 1.1.1.1
interface g1/0/1
port link-mode route
ip address 1.1.1.1 24
m-lag mad exclude interface g1/0/1
interface Bridge-Aggregation 1
link-aggregation mode dynamic
interface range f1/0/53 to f1/0/54
port link-aggregation group 1
interface Bridge-Aggregation 1
SW2:
m-lag system-mac 1-1-1
m-lag system-number 2
m-lag system-priority 4096
m-lag keepalive ip destination 1.1.1.1 source 1.1.1.2
interface g1/0/1
port link-mode route
ip address 1.1.1.2 24
m-lag mad exclude interface g1/0/1
interface Bridge-Aggregation 1
link-aggregation mode dynamic
interface range f1/0/53 to f1/0/54
port link-aggregation group 1
interface Bridge-Aggregation 1
port m-lag peer-link 1
在 SW1 和 SW2 上查看到 M-LAG 系统是否建立
[SW1]display m-lag summary
二、在 SW1 和 SW2 上配置下连 SW3 的接口为 M-LAG 接口,实现跨设备聚合
SW1:
interface Bridge-Aggregation 2
link-aggregation mode dynamic
interface g1/0/2
port link-aggregation group 2
interface Bridge-Aggregation 2
port m-lag group 1
SW2:
interface Bridge-Aggregation 2
link-aggregation mode dynamic
interface g1/0/2
port link-aggregation group 2
interface Bridge-Aggregation 2
port m-lag group 1
SW3:
interface Bridge-Aggregation 1
link-aggregation mode dynamic
interface range g1/0/1 to g1/0/2
port link-aggregation group 1
在 SW1,SW2 和 SW3 上可以查看到跨设备链路聚合状态
[SW1]display link-aggregation summary
三、在 SW1 和 SW2 上为 VLAN 10 和 VLAN 20 创建三层接口,两端配置相同的 MAC 地址和 IP 地址
在 SW1 和 SW2 上创建 VLAN 10 和 VLAN 20,把 SW1、SW2 和 SW3 之间相连的聚合口配置为 Trunk,并允许 VLAN 10 和 VLAN 20 通过
SW1:
Vlan 10
q
Vlan 20
interface vlan 10
mac-address 1-2-1
ip address 192.168.1.254 24
interface vlan 20
mac-address 1-2-2
ip address 192.168.2.254 24
SW2:
Vlan 10
q
Vlan 20
interface vlan 10
mac-address 1-2-1
ip address 192.168.1.254 24
interface vlan 20
mac-address 1-2-2
ip address 192.168.2.254 24