思科Cisco、华为Huawei交换机链路聚合
思科、华为交换机链路聚合(LACP)配置实例
H3C命令中,红色部分非常重要,如果没有这条命令,将导致网络不正常,丢包,或者网络不通。
Switch(config)# interface range fastethernet0/23 -24 //如果是千兆口为gigabitethernet 23 口和24口
Switch(config-if-range)#switchport trunk encapsulation dot1q 加入trunk前封装成dot1q
Switch(config-if-range)# switchport mode trunk
Switch(config-if-range)# switchport access vlan 1 //如果是VLAN1,这一步可以省略,系统默认为VLAN1
Switch(config-if-range)# channel-group 1 mode on //无条件启用PAgP
Sw1(configure)#ip route 0.0.0.0 0.0.0.0 192.168.10.253 配置默认路由
思科:3560G
华为:S5300
思科G0/25---华为G0/0/1
思科G0/27---华为G0/0/2
华为交换机配置链路聚合有两种模式,分别是manual和lacp-static,如果不做配置,交换机默认是manual,所以一定要手动将模式改为lacp-static,这点很重要,否则无法跟思科交换机成功协商LACP。
华为交换机
#interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
mode lacp-static //修改链路聚合模式
max active-linknumber 2 //设置最大活动链接数为2
bpdu enable //开启BPDU
#lacp priority 100
#interface GigabitEthernet0/0/1
eth-trunk 1
undo ntdp enable
undo ndp enable
(在配置端口前,一定要将端口原有配置清空,全部undo掉,否则无法应用eth-trunk命令。如果之前端口配置过trunk口,可以使用undo port link-type清除trunk状态)
#interface GigabitEthernet0/0/2
eth-trunk 1
undo ntdp enable
undo ndp enable
思科交换机
interface port-channel1
switchport trunk encapsulation dot1q
switchport mode trunk
interface g0/25
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode active
interface g0/27
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode active
评论专区
不错的帖子,值得收藏!http://y5ztb.xmona.com.cn/