单臂路由和三层交换技术

本文详细介绍了华为路由器的hybrid接口特性和单臂路由技术。hybrid接口结合了access和trunk接口的功能,用于数据出口和入口的处理。在单臂路由中,通过配置交换机的链路类型和子接口,实现不同VLAN间的通信,通过LACP静态模式配置链路聚合,确保网络冗余和负载均衡。
摘要由CSDN通过智能技术生成

一、hybrid
华为路由器特有的接口
hybrid接口时多功能的,具备access和trunk接口功能
数据出口时:先查untag表,有标时,托标;无标时,查tag表,有则放行,无则丢弃
数据入口时:先查有无标签,有标时,查tag表,有则放行,无责丢弃。无标时,打上PVID放行
命令
port link-type hybrid 进入hybrid接口模式
port hybrid pvid vlan id 添加vlan id
port hybrid untagged vlan id 打标
port hybrid tagged vlan id 脱标

二、单臂路由
单臂路由–实现不同ⅥAN之间的通信

路由器的物理接口可以分化为多个逻辑子接口,每个子接口对应一个vlan网段的网关

原理:路由器重新封装MAC地址,转换vlan标签

1、配置交换机的链路类型,连接路由器的接口为 trunk,连接主机的为 access

2、配置vlan标签的封装结构和子接口地址

配置命令

SW1上配置:
配置access
[SW1]int e0/0/5
[SW1-Ethernet0/0/5]p l a ----这里用的缩写(port link-type access)

配置链路聚合:
[SW1]lacp priority 1000 --------------------配置系统LACP优先级(两边有一边配置即可)
[SW1]int eth-trunk 1 -----------------进入eth-trunk 视图
[SW1-Eth-Trunk1]bpdu enable ----------------配置接口上发送BPDU报文到CPU处理,防止产生环路
[SW1-Eth-Trunk1]mode lacp-static ------------eth-trunk为静态LACP模式
[SW1-Eth-Trunk1]q
[SW1]int e0/0/1 ------------在加入eth-trunk前接口模式要是默认模式(hybrid),配置完成后可在eth-trunk模式中改类型
[SW1-Ethernet0/0/1]eth-trunk 1 -----------当前接口加入eth-trunk 1
[SW1-Ethernet0/0/1]int e0/0/2
[SW1-Ethernet0/0/2]eth-trunk 1
[SW1-Ethernet0/0/2]int e0/0/3
[SW1-Ethernet0/0/3]eth-trunk 1
[SW1-Ethernet0/0/3]int e0/0/4
[SW1-Ethernet0/0/4]eth-trunk 1
[SW1-Ethernet0/0/4]q

[SW1]int Eth-Trunk 1
[SW1-Eth-Trunk1]max active-linknumber 3 -------同时处于活动状态的数量,最多8个,例如用四条线路做聚合,配置了这条命令后,三个处于活动状态,另一个处于备用状态。

交换机SW2与SW1配置相同(不用再配优先级了)
批量向eth-trunk增加接口
[SW2]int Eth-Trunk 1
[SW2-Eth-Trunk1]trunkport Ethernet 0/0/1 to 0/0/4

查看eth-trunk 1信息
[SW1]dis eth-trunk 1


补充:如果链路接口之前是其他类型如何改成hybrid
在undo port trunk allow-pass vlan all之后要将端口加入vlan1,不然会报错

错误提示如下:
不打undo port trunk allow-pass vlan all提示

在undo port trunk allow-pass vlan all没有将端口加入vlan1,报错
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值