配置Primary VLAN 使其报文携带tag标签通过

配置Primary VLAN 使其报文携带tag标签通过
组网要求:Device B上的vlan 5 和vlan 10 为primary vlan ,其上行端口g1/0/1允许vlan 5 和vlan 10 的报文携带vlan tag 通过;Device B的下行端口g1/0/2允许 Secondary vlan 2 通过,g1/0/3 允许Secondary vlan 3 通过,vlan 2 和vlan 3映射到Primary vlan 5。Device B 的下行端口g1/0/6允许Secondary vlan 6 通过,g1/0/8允许Secondary vlan 8通过, vlan 6 和vlan 8映射到 Primary vlan 10 。从Device A 看,下接的Device B只有 VLAN 5 和VLAN 10。
配置步骤如下:
1.配置DEVICE B,配置vlan 5和vlan 10 为primary vlan.
<DeviceB>sys
[DeviceB]vlan 5
[DeviceB-vlan5]private-vlan primary
[DeviceB-vlan5]quit
[DeviceB]vlan 10
[DeviceB-vlan10]private-vlan primary
[DeviceB-vlan10]quit

2.创建Secondary vlan 2、3、6、8.
[DeviceB]vlan 2 to 3
[DeviceB]vlan 6
[DeviceB-vlan6]quit
[DeviceB]vlan 8
[DeviceB-vlan8]quit

3.配置上行端口g1/0/1在vlam=n 5 和vlan 10中工作在trunk promiscuous 模式。
[DeviceB]int g1/0/1
[DeviceB-giabithethernet1/0/1]port private-vlan 5 10 tr pro
[DeviceB-giabithethernet1/0/1]quit

4.将下行端口g1/0/2加入vlan2,g1/0/3加入vlan 3,并配置他们工作在host 模式。
[DeviceB]int g1/0/2
[DeviceB-giabithethernet1/0/2]port access valn 2
[DeviceB-giabithethernet1/0/2]port private-valn host
[DeviceB-giabithethernet1/0/2]quit
[DeviceB]int g1/0/3
[DeviceB-giabithethernet1/0/3]port access valn 3
[DeviceB-giabithethernet1/0/3]port private-valn host
[DeviceB-giabithethernet1/0/3]quit

5.配置Primary vlan 5 和secondary vlan 2、3间的映射关系。
[DeviceB]vlan 5
[DeviceB-vlan5]private-vlan secondary 2 to 3
[DeviceB-vlan5]quit

  1. 将下行端口g1/0/6加入vlan6,g1/0/8加入vlan 8,并配置他们工作在host 模式。
    [DeviceB]int g1/0/6
    [DeviceB-giabithethernet1/0/6]port access valn 6
    [DeviceB-giabithethernet1/0/6]port private-valn host
    [DeviceB-giabithethernet1/0/6]quit
    [DeviceB]int g1/0/8
    [DeviceB-giabithethernet1/0/8]port access valn 8
    [DeviceB-giabithethernet1/0/8]port private-valn host
    [DeviceB-giabithethernet1/0/8]quit

  2. 配置Primary vlan 10和secondary vlan 6、8间的映射关系。
    [DeviceB]vlan 10
    [DeviceB-vlan10]private-vlan secondary 6 to 8
    [DeviceB-vlan10]quit

8.配置Device A 。创建VLAN 5和 VLAN 10.
[DeviceB]vlan 5
[DeviceB-vlan5]quit
[DeviceB]vlan 10
[DeviceB-vlan10]quit

  1. 配置端口g1/0/1为Hybrid端口,并允许 VLAN 5和 VLAN 10携带 Tag通过.
    [DeviceB]int g1/0/1
    [DeviceB-giabithethernet1/0/1]port link-type hybrid
    [DeviceB-giabithethernet1/0/1]port hybrid valn 5 10 tagged

[DeviceB-giabithethernet1/0/1]quit

10.显示与验证。

转载于:https://blog.51cto.com/14221438/2368328

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值