网段互联"/>
三层交换机采用Eth-Trunk方式实现不同网段互联
拓扑图:
SW1配置:
[SW1] vlan batch 10 20
[SW1]int g0/0/4
[SW1-GigabitEthernet0/0/4] port link-type access
[SW1-GigabitEthernet0/0/4] port default vlan 10
[SW1]int Eth-Trunk 1
[SW1-Eth-Trunk1] port link-type trunk
[SW1-Eth-Trunk1] port trunk access allow vlan 1
[SW1-Eth-Trunk1] mode lacp-static
[SW1-Eth-Trunk1] load-balance dst-ip
[SW1-Eth-Trunk1] max active-linknumber 2
[SW1-Eth-Trunk1] trunkport g0/0/1
[SW1-Eth-Trunk1] trunkport g0/0/2
[SW1-Eth-Trunk1] trunkport g0/0/3
[SW1]int Vlanif 1
[SW1-Vlanif1] ip address 192.168.1.1 255.255.255.0
[SW1]int Vlanif 10
[SW1-Vlanif10] ip address 10.1.1.254 255.255.255.0
[SW1] ip route-static 20.1.1.0 24 192.168.1.2
SW2配置:
[SW2] vlan batch 10 20
[SW2]int g0/0/4
[SW2-GigabitEthernet0/0/4] port link-type access
[SW2-GigabitEthernet0/0/4] port default vlan 20
[SW2]int Eth-Trunk 1
[SW2-Eth-Trunk1] port link-type trunk
[SW2-Eth-Trunk1] port trunk access allow vlan 1
[SW2-Eth-Trunk1] mode lacp-static
[SW2-Eth-Trunk1] load-balance dst-ip
[SW2-Eth-Trunk1] max active-linknumber 2
[SW2-Eth-Trunk1] trunkport g0/0/1
[SW2-Eth-Trunk1] trunkport g0/0/2
[SW2-Eth-Trunk1] trunkport g0/0/3
[SW2]int Vlanif 1
[SW2-Vlanif1] ip address 192.168.1.2 255.255.255.0
[SW2]int Vlanif 20
[SW2-Vlanif20] ip address 20.1.1.254 255.255.255.0
[SW2] ip route-static 10.1.1.0 24 192.168.1.2
PC 配置:
pc5 ping pc6:
Eth-Trunk相关命令:
1.创建链路聚合组:
[Huawei] interface eth-trunk trunk-id
配置链路聚合模式
[Huawei-Eth-Trunk1] mode {lacp | manual load-balance }
将接口加入链路聚合组中(以太网接口视图)
[Huawei-GigabitEthernet0/0/1] eth-trunk trunk-id
将接口加入链路聚合组中(Eth-Trunk视图)
[Huawei-Eth-Trunk1] trunkport interface-type { interface-number}
使能允许不同速率端口加入同一Eth-Trunk接口的功能
[Huawei-Eth-Trunk1] mixed-rate link enable
配置系统LACP优先级
[Huawei] lacp priority priority
配置接口LACP优先级
[Huawei-GigabitEthernet0/0/1] lacp priority priority
配置最大活动接口数
[Huawei-Eth-Trunk1] max active-linknumber {number}
配置最小活动接口数
[Huawei-Eth-Trunk1] least active-linknumber {number}
查看链路聚合信息
[SWA]display interface eth-trunk 1
更多推荐
三层交换机采用Eth-Trunk方式实现不同网段互联
发布评论