网络-----trunk GVRP


在这里插入图片描述

ACCESS端口

Untagged端口,即接入端口

Access端口只能属于1个VLAN,它发送的帧一般不带有VLAN标签,用于连接计算机的端口

Trunk端口

Tag Aware端口,即干道接口

可以允许多个VLAN通过,它发出的帧一般是带有VLAN标签的,用于交换机之间连接的端口
在这里插入图片描述3~ 2 ~ 1 ~
记好了吗?来测试一下:

autodesireabletrunkacces
trunk
desireable
trunk
acces

在这里插入图片描述

trunk配置命令

静态

interface G 0/0/24 进入接口
port link-type trunk 改端口类型为trunk
port trunk allow-pass vlan 2 3 允许vlan2 3 通过

动态

dynamic trunk protocol

修改native vlan
port trunk pvid vlan vlan-id

802.1q

一个公司的IT部门希望能够只使用一个实体企业网上端以提供个别独立的逻辑网上端,其他每个部门能够分配到一个独特的VLAN网上。企业网上中的Edge switch用来替所有从设备仪器中送抵各个部门的数据帧,插入适合的VLAN标记。当帧在网上中被交换时VLAN标签会在被送回部门底下的设备时被移除。用这种方法信息在被传到其它部门时就不会外泄或被嗅探。
在这里插入图片描述

native VLAN

所有的帧在trunk中都是打上标记的,也就是tag,不同点在于,如果帧在进入trunk以前已经打上标记了,比如vlan2的标记,并且trunk又允许vlan2通过的话,该vlan 2的帧就通过,反之丢弃。 另外如果帧在进入trunk时是没有标记的,那么trunk就会给他打上nativevlan的标记,该帧在trunk中就以native vlan的身份传输,native vlan 是用于trunk链路的, 在access链路没有native vlan的概念。
在这里插入图片描述

GVRP

解释:

GVRP VLAN 通用属性注册协议的应用,提供 802.1Q兼容的VLAN裁剪VLAN pruning功能和在802.1Q干线端口trunk port上建立动态VLAN。

GVRP 交换机之间能够相互交换 VLAN 配置信息,裁剪不必要的广播和未知单播流量以及在通过 802.1Q 干线连接的交换机上动态创建和管理 VLAN。

换句话说,GVRP 支持设备之间 VLAN 信息的传播服务。在 GVRP 中,能够手工配置一台交换机的 VLAN 信息,该网络中的其它所有交换机能够动态了解那些 VLAN 的情况。终端节点可以接入任何交换机并且连接到所需的 VLAN 上。

模式:

Normal模式:能收能发(听谁的)
Fixed模式:能发不收(听我的)
Forbidden模式: 跟外界通信只通过vlan1

命令:

开启交换机GVRP功能:gvrp

在trunk接口配置gvrp
interface G0/0/1
gvrp
gvrp registration ?
fixed Registration type fixed
forbidden Registration type forbidden
normal Registration type normal

查看命令
display gvrp status 查看GVRP中活动接口的信息。
display vlan
display vlan summary

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
华为交换机的eth-trunk配置步骤如下: 1. 创建eth-trunk交换机上进入系统视图,使用以下命令创建eth-trunk: ``` [Switch] interface eth-trunk <trunk-id> [Switch-Eth-Trunk-<trunk-id>] quit ``` 其中,`<trunk-id>`为eth-trunk的编号,可以自定义。 2. 配置接口 将需要绑定到eth-trunk的接口配置trunk端口,使用以下命令: ``` [Switch]interface <interface-type><interface-number> [Switch-<interface-type><interface-number>]port link-type trunk [Switch-<interface-type><interface-number>]port trunk allow-pass vlan <vlan-id> [Switch-<interface-type><interface-number>]quit ``` 其中,`<interface-type>`为接口类型,如`GigabitEthernet`、`10GE`等;`<interface-number>`为接口编号;`<vlan-id>`为允许通过的VLAN编号。 3. 将接口加入eth-trunk 使用以下命令将接口加入eth-trunk: ``` [Switch]interface <interface-type><interface-number> [Switch-<interface-type><interface-number>]eth-trunk <trunk-id> [Switch-<interface-type><interface-number>]quit ``` 其中,`<interface-type>`、`<interface-number>`与前面相同,`<trunk-id>`为eth-trunk的编号。 4. 配置eth-trunk属性 使用以下命令可以配置eth-trunk的属性: ``` [Switch]interface eth-trunk <trunk-id> [Switch-Eth-Trunk-<trunk-id>]trunkport interface <interface-type><interface-number> weight <weight> [Switch-Eth-Trunk-<trunk-id>]trunkport interface <interface-type><interface-number> priority <priority> [Switch-Eth-Trunk-<trunk-id>]mode lacp|manual [Switch-Eth-Trunk-<trunk-id>]load-balance packet|destination-ip|source-ip|destination-port|source-port [Switch-Eth-Trunk-<trunk-id>]quit ``` 其中,`<weight>`为接口权重,`<priority>`为接口优先级,`lacp`表示使用LACP协议,`manual`表示手动聚合,`load-balance`为负载均衡方式。 5. 查看eth-trunk状态 使用以下命令可以查看eth-trunk的状态: ``` [Switch]display interface eth-trunk <trunk-id> ``` 其中,`<trunk-id>`为eth-trunk的编号。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值