Day9 Eth-Trunk
1.技术背景
如果将当前接口板替换为具备更高带宽的接口板,则会浪费现有的设备资源,而且升级代价较大
2.基于原理
把多个独立的物理接口绑定在一起作为一个大带宽的逻辑接口使用
3.实现Eth-Trunk技术的分类
-
基于手工配置 : 静态 ---- 主要应用于不支持 LACP协议的设备
- 加入Eth-Trunk虚拟接口的成员接口,都有进行流量转发,所有成员接口分担所有流量
-
基于LACP协议:动态协商
动态协商的协议 M:N M个参与数据转发的端口 N个备份端口
4.Eth-Trunk配置
4.1 基于LACP负载分担
- 交换机环境
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-PGOwHSU3-1679832370530)(C:\Users\于大鱼\AppData\Roaming\Typora\typora-user-images\image-20230326185105131.png)]
# SW1和SW2
[SW1]interface Eth-Trunk1 # 创建虚拟的Eth-Trunk链路
[SW1-Eth-Trunk1]mode lacp-static # 设置Eth-Trunk协商模式
[SW1-Eth-Trunk1]port link-type trunk # 配置接口的链路类型
[SW1-Eth-Trunk1]port trunk allow-pass vlan 2 to 10
[SW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3 # 添加成员接口 【最后做】
[SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3 # 宏命令
相当于:
interface GigabitEthernet0/0/1
Eth-Trunk1
interface GigabitEthernet0/0/2
eth-trunk 1
interface GigabitEthernet0/0/3
eth-trunk 1
- 路由器环境
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-8ih73IPl-1679832370531)(C:\Users\于大鱼\AppData\Roaming\Typora\typora-user-images\image-20230326193614876.png)]
# R1和R2
[R1]interface Eth-Trunk1 # 创建虚拟的Eth-Trunk链路
[R1-Eth-Trunk1]mode lacp-static # 设置Eth-Trunk协商模式
# Eth-Trunk默认是二层接口,路由器场景需要给Eth-Trunk接口配置IP地址,需要把Eth-Trunk设置为三层接口
[R1-Eth-Trunk1]undo portswitch
[R1-Eth-Trunk1]ip address 192.168.1.2 255.255.255.0
[R1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3 # 添加成员接口 【最后做】
4.2 基于静态手工模式
[SW1-Eth-Trunk1]mode manual load-balance
4.3 Eth-Trunk配置查看
<Huawei>display interface Eth-Trunk
Eth-Trunk1 current state : DOWN # 是否加电
Line protocol current state : DOWN # 是否满足某种协议的运行
Description:
Switch Port, PVID : 1, Hash arithmetic : According to SIP-XOR-DIP,Maximal BW:
3G, Current BW: 0M, The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc95-6f4c
Current system time: 2023-03-26 19:37:53-08:00
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
-----------------------------------------------------
PortName Status Weight
-----------------------------------------------------
GigabitEthernet0/0/1 DOWN 1
GigabitEthernet0/0/2 DOWN 1
GigabitEthernet0/0/3 DOWN 1
-----------------------------------------------------
The Number of Ports in Trunk : 3
The Number of UP Ports in Trunk : 0
The Number of Ports in Trunk : 3
The Number of UP Ports in Trunk : 0