三层交换机采用Eth-Trunk方式实现不同网段互联

编程入门 行业动态 更新时间:2024-10-27 06:22:38

三层交换机采用Eth-Trunk方式实现不同<a href=https://www.elefans.com/category/jswz/34/1757254.html style=网段互联"/>

三层交换机采用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方式实现不同网段互联

本文发布于:2023-07-27 22:20:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1231605.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网段   互联   交换机   方式   Trunk

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!