ENSP:不同VLAN间实现链路聚合

ENSP:不同VLAN间实现链路聚合_第1张图片

具体配置命令如下:

因为SW1和SW2的配置命令一样,所以此处只是附上配置SW2的代码
[041740509-sw2]int Eth-Trunk 1
//在交换机上创建vlan接口
[041740509-sw2-Eth-Trunk1]trunkport Ethernet 0/0/1 to 0/0/3
// 并将成员接口加入Eth-Trunk 1
[041740509-sw2-Eth-Trunk1]q
[041740509-sw2]vlan 10     //创建vlan 
[041740509-sw2-vlan10]vlan 20
[041740509-sw2-vlan20]int vlan 10   //为VLAN配置ip 地址
[041740509-sw2-Vlanif10]ip add 192.168.10.30 24
[041740509-sw2-Vlanif10]int vlan 20
[041740509-sw2-Vlanif20]ip add 192.168.20.30 24
[041740509-sw2-Vlanif20]q
[041740509-sw2]int e0/0/4    //进入接口
[041740509-sw2-Ethernet0/0/4]port link-type access   //设置接口模式
[041740509-sw2-Ethernet0/0/4]port default vlan 10  //将接口加入VLAN 10
[041740509-sw2-Ethernet0/0/4]q
[041740509-sw2]int e0/0/5
[041740509-sw2-Ethernet0/0/5]port link-type access  //设置接口模式
[041740509-sw2-Ethernet0/0/5]port default vlan 20  //将接口加入VLAN 20
[041740509-sw2-Ethernet0/0/5]q
[041740509-sw2]int Eth-Trunk 1       //将聚合接口设置为trunk模式
[041740509-sw2-Eth-Trunk1]port link-type trunk
[041740509-sw2-Eth-Trunk1]port trunk allow-pass vlan all 
//设置聚合接口允许通过所有VLAN的数据包通过
[041740509-sw2-Eth-Trunk1]load-balance src-dst-mac
[041740509-sw2-Eth-Trunk1]q
[041740509-sw2]int Eth-Trunk 1
[041740509-sw2-Eth-Trunk1]max active-linknumber 2 
//配置活动接口上限阈值为2
[041740509-sw2-Eth-Trunk1]q
[041740509-sw2]int e0/0/1
[041740509-sw2-Ethernet0/0/1]lacp priority 33 
 //配置系统优先级为33,使其成为LACP 的主动端,即活动接口
[041740509-sw2-Ethernet0/0/1]q
[041740509-sw2]int e0/0/2
[041740509-sw2-Ethernet0/0/2]lacp priority 33
//配置系统优先级为33,使其成为LACP 的主动端,即活动接口,使e0/0/1和e0/0/2成为激活接口,e0/0/3成为备份链路
[041740509-sw2-Ethernet0/0/2]q
[041740509-sw2]q
<041740509-sw2>save

相同VLAN 的主机之间的通信:
ENSP:不同VLAN间实现链路聚合_第2张图片
不同VLAN 的主机之间的通信:
ENSP:不同VLAN间实现链路聚合_第3张图片

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