• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

S5500,有VLAN映射功能吗,如何配置

2021-11-26提问
  • 0关注
  • 1收藏,1095浏览
粉丝:0人 关注:0人

问题描述:

VLAN303,304,305,306,映射为VLAN302

最佳答案

粉丝:249人 关注:0人

您好,参考

1.4  VLAN映射典型配置举例

1.4.1  1:1和N:1 VLAN映射配置举例

1. 组网需求

l              为了节省VLAN资源,用户希望从园区交换机Switch C发出的相同业务报文可共用一个VLAN,即:PC业务通过VLAN 501发送;VoD业务通过VLAN 502发送;VoIP业务通过VLAN 503发送。

l              不同家庭的相同业务报文之间要进行隔离,以免产生混淆。

2. 组网图

图1-7 1:1和N:1 VLAN映射配置组网图

 

3. 配置步骤

(1)        配置Switch A

# 创建CVLAN和SVLAN。

<SwitchA> system-view

[SwitchA] vlan 2 to 3

[SwitchA] vlan 101 to 102

[SwitchA] vlan 201 to 202

[SwitchA] vlan 301 to 302

# 配置上行策略p1和p2:将不同用户的不同业务CVLAN映射到不同的SVLAN上。

[SwitchA] traffic classifier c1

[SwitchA-classifier-c1] if-match customer-vlan-id 1

[SwitchA-classifier-c1] traffic classifier c2

[SwitchA-classifier-c2] if-match customer-vlan-id 2

[SwitchA-classifier-c2] traffic classifier c3

[SwitchA-classifier-c3] if-match customer-vlan-id 3

[SwitchA-classifier-c3] quit

[SwitchA] traffic behavior b1

[SwitchA-behavior-b1] remark service-vlan-id 101

[SwitchA-behavior-b1] traffic behavior b2

[SwitchA-behavior-b2] remark service-vlan-id 201

[SwitchA-behavior-b2] traffic behavior b3

[SwitchA-behavior-b3] remark service-vlan-id 301

[SwitchA-behavior-b3] traffic behavior b4

[SwitchA-behavior-b4] remark service-vlan-id 102

[SwitchA-behavior-b4] traffic behavior b5

[SwitchA-behavior-b5] remark service-vlan-id 202

[SwitchA-behavior-b5] traffic behavior b6

[SwitchA-behavior-b6] remark service-vlan-id 302

[SwitchA-behavior-b6] quit

[SwitchA] qos policy p1

[SwitchA-policy-p1] classifier c1 behavior b1

[SwitchA-policy-p1] classifier c2 behavior b2

[SwitchA-policy-p1] classifier c3 behavior b3

[SwitchA-policy-p1] quit

[SwitchA] qos policy p2

[SwitchA-policy-p2] classifier c1 behavior b4

[SwitchA-policy-p2] classifier c2 behavior b5

[SwitchA-policy-p2] classifier c3 behavior b6

[SwitchA-policy-p2] quit

# 配置下行策略p11和p22:将SVLAN映射回原来的CVLAN上。

[SwitchA] traffic classifier c11

[SwitchA-classifier-c11] if-match service-vlan-id 101

[SwitchA-classifier-c11] traffic classifier c22

[SwitchA-classifier-c22] if-match service-vlan-id 201

[SwitchA-classifier-c22] traffic classifier c33

[SwitchA-classifier-c33] if-match service-vlan-id 301

[SwitchA-classifier-c33] traffic classifier c44

[SwitchA-classifier-c44] if-match service-vlan-id 102

[SwitchA-classifier-c44] traffic classifier c55

[SwitchA-classifier-c55] if-match service-vlan-id 202

[SwitchA-classifier-c55] traffic classifier c66

[SwitchA-classifier-c66] if-match service-vlan-id 302

[SwitchA-classifier-c66] quit

[SwitchA] traffic behavior b11

[SwitchA-behavior-b11] remark customer-vlan-id 1

[SwitchA-behavior-b11] traffic behavior b22

[SwitchA-behavior-b22] remark customer-vlan-id 2

[SwitchA-behavior-b22] traffic behavior b33

[SwitchA-behavior-b33] remark customer-vlan-id 3

[SwitchA-behavior-b33] quit

[SwitchA] qos policy p11

[SwitchA-policy-p11] classifier c11 behavior b11

[SwitchA-policy-p11] classifier c22 behavior b22

[SwitchA-policy-p11] classifier c33 behavior b33

[SwitchA-policy-p11] quit

[SwitchA] qos policy p22

[SwitchA-policy-p22] classifier c44 behavior b11

[SwitchA-policy-p22] classifier c55 behavior b22

[SwitchA-policy-p22] classifier c66 behavior b33

[SwitchA-policy-p22] quit

# 配置下行端口GigabitEthernet1/0/1为Trunk端口且允许CVLAN和SVLAN通过,使能该端口的基本QinQ功能,在该端口的入方向上应用上行策略p1,并在该端口的出方向上应用下行策略p11。

[SwitchA] interface gigabitethernet 1/0/1

[SwitchA-GigabitEthernet1/0/1] port link-type trunk

[SwitchA-GigabitEthernet1/0/1] port trunk permit vlan 1 2 3 101 201 301

[SwitchA-GigabitEthernet1/0/1] qinq enable

[SwitchA-GigabitEthernet1/0/1] qos apply policy p1 inbound

[SwitchA-GigabitEthernet1/0/1] qos apply policy p11 outbound

[SwitchA-GigabitEthernet1/0/1] quit

# 配置下行端口GigabitEthernet1/0/2为Trunk端口且允许CVLAN和SVLAN通过,使能该端口的基本QinQ功能,在该端口的入方向上应用上行策略p2,并在该端口的出方向上应用下行策略p22。

[SwitchA] interface gigabitethernet 1/0/2

[SwitchA-GigabitEthernet1/0/2] port link-type trunk

[SwitchA-GigabitEthernet1/0/2] port trunk permit vlan 1 2 3 102 202 302

[SwitchA-GigabitEthernet1/0/2] qinq enable

[SwitchA-GigabitEthernet1/0/2] qos apply policy p2 inbound

[SwitchA-GigabitEthernet1/0/2] qos apply policy p22 outbound

[SwitchA-GigabitEthernet1/0/2] quit

# 配置上行端口GigabitEthernet1/0/3为Trunk端口且允许SVLAN通过。

[SwitchA] interface ethernet 1/0/3

[SwitchA-GigabitEthernet1/0/3] port link-type trunk

[SwitchA-GigabitEthernet1/0/3] port trunk permit vlan 101 201 301 102 202 302

如果PC(发送不带VLAN Tag的报文)直接连接在楼道交换机上,则需把楼道交换机连接PC的端口配置成Access端口或者Trunk端口:

l          当配置成Access端口时,要把端口加入到SVLAN;

l          当配置成Trunk端口时,要把端口的缺省VLAN配置成SVLAN。

 

(2)        配置Switch B

Switch B的配置与Switch A相似,配置过程略。

(3)        配置Switch C

# 使能DHCP Snooping功能。

<SwitchC> system-view

[SwitchC] dhcp-snooping

# 创建CVLAN和SVLAN,并在这些VLAN上分别使能ARP Detection功能。

[SwitchC] vlan 101

[SwitchC-vlan101] arp detection enable

[SwitchC-vlan101] vlan 201

[SwitchC-vlan201] arp detection enable

[SwitchC-vlan201] vlan 301

[SwitchC-vlan301] arp detection enable

[SwitchC-vlan301] vlan 102

[SwitchC-vlan102] arp detection enable

[SwitchC-vlan102] vlan 202

[SwitchC-vlan202] arp detection enable

[SwitchC-vlan202] vlan 302

[SwitchC-vlan302] arp detection enable

[SwitchC-vlan302] vlan 103

[SwitchC-vlan103] arp detection enable

[SwitchC-vlan103] vlan 203

[SwitchC-vlan203] arp detection enable

[SwitchC-vlan203] vlan 303

[SwitchC-vlan303] arp detection enable

[SwitchC-vlan303] vlan 104

[SwitchC-vlan104] arp detection enable

[SwitchC-vlan104] vlan 204

[SwitchC-vlan204] arp detection enable

[SwitchC-vlan204] vlan 304

[SwitchC-vlan304] arp detection enable

[SwitchC-vlan304] vlan 501

[SwitchC-vlan501] arp detection enable

[SwitchC-vlan501] vlan 502

[SwitchC-vlan502] arp detection enable

[SwitchC-vlan502] vlan 503

[SwitchC-vlan503] arp detection enable

[SwitchC-vlan503] quit

# 配置上行策略p1和p2:将不同用户的相同业务VLAN(CVLAN)映射到同一个VLAN(SVLAN)上。

[SwitchC] traffic classifier c1

[SwitchC-classifier-c1] if-match customer-vlan-id 101 to 102

[SwitchC-classifier-c1] traffic classifier c2

[SwitchC-classifier-c2] if-match customer-vlan-id 201 to 202

[SwitchC-classifier-c2] traffic classifier c3

[SwitchC-classifier-c3] if-match customer-vlan-id 301 to 302

[SwitchC-classifier-c3] traffic classifier c4

[SwitchC-classifier-c4] if-match customer-vlan-id 103 to 104

[SwitchC-classifier-c4] traffic classifier c5

[SwitchC-classifier-c5] if-match customer-vlan-id 203 to 204

[SwitchC-classifier-c5] traffic classifier c6

[SwitchC-classifier-c6] if-match customer-vlan-id 303 to 304

[SwitchC-classifier-c6] quit

[SwitchC] traffic behavior b1

[SwitchC-behavior-b1] remark service-vlan-id 501

[SwitchC-behavior-b1] traffic behavior b2

[SwitchC-behavior-b2] remark service-vlan-id 502

[SwitchC-behavior-b2] traffic behavior b3

[SwitchC-behavior-b3] remark service-vlan-id 503

[SwitchC-behavior-b3] quit

[SwitchC] qos policy p1

[SwitchC-policy-p1] classifier c1 behavior b1 mode dot1q-tag-manipulation

[SwitchC-policy-p1] classifier c2 behavior b2 mode dot1q-tag-manipulation

[SwitchC-policy-p1] classifier c3 behavior b3 mode dot1q-tag-manipulation

[SwitchC-policy-p1] quit

[SwitchC] qos policy p2

[SwitchC-policy-p2] classifier c4 behavior b1 mode dot1q-tag-manipulation

[SwitchC-policy-p2] classifier c5 behavior b2 mode dot1q-tag-manipulation

[SwitchC-policy-p2] classifier c6 behavior b3 mode dot1q-tag-manipulation

[SwitchC-policy-p2] quit

# 配置下行端口GigabitEthernet1/0/1为Trunk端口且允许CVLAN和SVLAN通过,使能该端口的用户侧QinQ功能,并在该端口的入方向上应用上行策略p1。

[SwitchC] interface gigabitethernet 1/0/1

[SwitchC-GigabitEthernet1/0/1] port link-type trunk

[SwitchC-GigabitEthernet1/0/1] port trunk permit vlan 101 201 301 102 202 302 501 502 503

[SwitchC-GigabitEthernet1/0/1] qinq enable downlink

[SwitchC-GigabitEthernet1/0/1] qos apply policy p1 inbound

[SwitchC-GigabitEthernet1/0/1] quit

# 配置下行端口GigabitEthernet1/0/2为Trunk端口且允许CVLAN和SVLAN通过,使能该端口的用户侧QinQ功能,并在该端口的入方向上应用上行策略p2。

[SwitchC] interface gigabitethernet 1/0/2

[SwitchC-GigabitEthernet1/0/2] port link-type trunk

[SwitchC-GigabitEthernet1/0/2] port trunk permit vlan 103 203 303 104 204 304 501 502 503

[SwitchC-GigabitEthernet1/0/2] qinq enable downlink

[SwitchC-GigabitEthernet1/0/2] qos apply policy p2 inbound

[SwitchC-GigabitEthernet1/0/2] quit

# 配置上行端口GigabitEthernet1/0/3为Trunk端口且允许SVLAN通过,配置该端口为DHCP Snooping信任端口及ARP信任端口,并使能该端口的网络侧QinQ功能。

[SwitchC] interface gigabitethernet 1/0/3

[SwitchC-GigabitEthernet1/0/3] port link-type trunk

[SwitchC-GigabitEthernet1/0/3] port trunk permit vlan 501 502 503

[SwitchC-GigabitEthernet1/0/3] dhcp-snooping trust

[SwitchC-GigabitEthernet1/0/3] arp detection trust

[SwitchC-GigabitEthernet1/0/3] qinq enable uplink

(4)        配置Switch D

# 使能DHCP Snooping功能。

<SwitchD> system-view

[SwitchD] dhcp-snooping

# 配置端口GigabitEthernet1/0/1为Trunk端口且允许SVLAN通过。

[SwitchD] interface gigabitethernet 1/0/1

[SwitchD-GigabitEthernet1/0/1] port link-type trunk

[SwitchD-GigabitEthernet1/0/1] port trunk permit vlan 501 502 503

暂无评论

1 个回答
粉丝:3人 关注:0人

https://www.h3c.com/cn/d_201101/707259_30005_0.htm

参考官网配置

暂无评论

编辑答案

你正在编辑答案

如果你要对问题或其他回答进行点评或询问,请使用评论功能。

分享扩散:

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作

举报

×

侵犯我的权益 >
对根叔社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明