VLAN100,200,300这3个通过技术手段都变成VLAN400访问,华三交换机怎么配置麻烦具体点
(0)
最佳答案
您好,请知:
配置vlan映射就好,以下是配置案例,请参考:
· 在某小区,服务提供商为每个家庭都提供了PC、VoD和VoIP这三种数据服务,每个家庭都通过各自的家庭网关接入楼道交换机,并通过DHCP方式自动获取IP地址。
· 服务提供商希望实现以下网络规划:在家庭网关上,分别将PC、VoD和VoIP业务依次划分到VLAN 1~3;在楼道交换机上,为了隔离不同家庭的同类业务,将每个家庭的每种业务都划分到不同的VLAN;而在园区交换机上,为了节省VLAN资源,将所有家庭的同类业务都划分到相同的VLAN,即分别将PC、VoD和VoIP业务依次划分到VLAN 501~503。
图1-11 1:1和N:1 VLAN映射配置组网图
(1) 配置Switch A
# 配置下行端口GigabitEthernet1/0/1和GigabitEthernet1/0/2为Trunk端口且允许原始VLAN及转换后VLAN通过,同时在端口上配置1:1 VLAN映射。
<SwitchA> system-view
[SwitchA] vlan 2 to 3
[SwitchA] vlan 101 to 102
[SwitchA] vlan 201 to 202
[SwitchA] vlan 301 to 302
[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] vlan mapping 1 translated-vlan 101
[SwitchA-GigabitEthernet1/0/1] vlan mapping 2 translated-vlan 201
[SwitchA-GigabitEthernet1/0/1] vlan mapping 3 translated-vlan 301
[SwitchA-GigabitEthernet1/0/1] quit
[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] vlan mapping 1 translated-vlan 102
[SwitchA-GigabitEthernet1/0/2] vlan mapping 2 translated-vlan 202
[SwitchA-GigabitEthernet1/0/2] vlan mapping 3 translated-vlan 302
[SwitchA-GigabitEthernet1/0/2] quit
# 配置上行端口GigabitEthernet1/0/3为Trunk端口,且允许转换后VLAN通过。
[SwitchA] interface gigabitethernet 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
[SwitchA-GigabitEthernet1/0/3] quit
(2) 配置Switch B
Switch B的配置与Switch A相似,配置过程略。
(3) 配置Switch C
# 使能DHCP Snooping功能。
<SwitchC> system-view
[SwitchC] dhcp snooping enable
# 创建原始VLAN和转换后VLAN,并在这些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
# 配置下行端口GigabitEthernet1/0/1和GigabitEthernet1/0/2为Trunk端口且允许原始VLAN及转换后VLAN通过,同时在端口上配置N:1 VLAN映射,并启用DHCP Snooping表项记录功能。
[SwitchC] interface gigabitethernet 1/0/1
[SwitchC-GigabitEthernet1/0/1] port link-type trunk
[SwitchC-GigabitEthernet1/0/1] port trunk permit vlan 101 102 201 202 301 302 501 to 503
[SwitchC-GigabitEthernet1/0/1] vlan mapping uni range 101 to 102 translated-vlan 501
[SwitchC-GigabitEthernet1/0/1] vlan mapping uni range 201 to 202 translated-vlan 502
[SwitchC-GigabitEthernet1/0/1] vlan mapping uni range 301 to 302 translated-vlan 503
[SwitchC-GigabitEthernet1/0/1] dhcp snooping binding record
[SwitchC-GigabitEthernet1/0/1] quit
[SwitchC] interface gigabitethernet 1/0/2
[SwitchC-GigabitEthernet1/0/2] port link-type trunk
[SwitchC-GigabitEthernet1/0/2] port trunk permit vlan 103 104 203 204 303 304 501 to 503
[SwitchC-GigabitEthernet1/0/2] vlan mapping uni range 103 to 104 translated-vlan 501
[SwitchC-GigabitEthernet1/0/2] vlan mapping uni range 203 to 204 translated-vlan 502
[SwitchC-GigabitEthernet1/0/2] vlan mapping uni range 303 to 304 translated-vlan 503
[SwitchC-GigabitEthernet1/0/2] dhcp snooping binding record
[SwitchC-GigabitEthernet1/0/2] quit
# 在上行端口GigabitEthernet1/0/3上配置网络侧N:1 VLAN映射。
[SwitchC] interface gigabitethernet 1/0/3
[SwitchC-GigabitEthernet1/0/3] vlan mapping nni
# 配置端口GigabitEthernet1/0/3为Trunk端口且允许转换后VLAN通过,并配置该端口为DHCP Snooping信任端口和ARP信任端口。
[SwitchC-GigabitEthernet1/0/3] port link-type trunk
[SwitchC-GigabitEthernet1/0/3] port trunk permit vlan 501 to 503
[SwitchC-GigabitEthernet1/0/3] dhcp snooping trust
[SwitchC-GigabitEthernet1/0/3] arp detection trust
[SwitchC-GigabitEthernet1/0/3] quit
(4) 配置Switch D
# 配置端口GigabitEthernet1/0/1为Trunk端口且允许转换后VLAN通过。
<SwitchD> system-view
[SwitchD] vlan 501 to 503
[SwitchD] interface gigabitethernet 1/0/1
[SwitchD-GigabitEthernet1/0/1] port link-type trunk
[SwitchD-GigabitEthernet1/0/1] port trunk permit vlan 501 to 503
[SwitchD-GigabitEthernet1/0/1] quit
(1) 查看Switch A上的VLAN映射配置信息
[SwitchA] display vlan mapping
Interface GigabitEthernet1/0/1:
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
1 N/A 101 N/A
2 N/A 201 N/A
3 N/A 301 N/A
Interface GigabitEthernet1/0/2:
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
1 N/A 102 N/A
2 N/A 202 N/A
3 N/A 302 N/A
(2) 查看Switch B上的VLAN映射配置信息
Switch B上的VLAN映射配置信息与Switch A相似,显示信息略。
(3) 查看Switch C上的VLAN映射配置信息
[SwitchC] display vlan mapping
Interface GigabitEthernet1/0/1:
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
101-102 N/A 501 N/A
201-202 N/A 502 N/A
301-302 N/A 503 N/A
Interface GigabitEthernet1/0/2:
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
103-104 N/A 501 N/A
203-204 N/A 502 N/A
303-304 N/A 503 N/A
以上信息表明,Switch A和Switch B上的1:1 VLAN映射,以及Switch C上的N:1 VLAN映射配置成功。
· VPN A中的Site 1和Site 2是某公司的两个分支机构,且分别利用VLAN 5和VLAN 6承载业务。由于分处不同地域,这两个分支机构采用了不同的SP所提供的VPN接入服务,SP 1和SP 2分别将VLAN 100和VLAN 200分配给这两个分支机构使用。
· 该公司希望其下属的这两个分支机构可以跨越SP 1和SP 2的网络实现互通。
图1-12 1:2和2:2 VLAN映射配置组网图
(1) 配置PE 1
# 在下行端口GigabitEthernet1/0/1上配置1:2 VLAN映射,为VLAN 5的报文添加VLAN 100的外层VLAN Tag。
<PE1> system-view
[PE1] interface gigabitethernet 1/0/1
[PE1-GigabitEthernet1/0/1] vlan mapping nest single 5 nested-vlan 100
# 配置GigabitEthernet1/0/1为Hybrid端口且允许VLAN 100的报文不携带VLAN Tag通过。
[PE1-GigabitEthernet1/0/1] port link-type hybrid
[PE1-GigabitEthernet1/0/1] port hybrid vlan 100 untagged
[PE1-GigabitEthernet1/0/1] quit
# 配置上行端口GigabitEthernet1/0/2为Trunk端口且允许VLAN 100通过。
[PE1] interface gigabitethernet 1/0/2
[PE1-GigabitEthernet1/0/2] port link-type trunk
[PE1-GigabitEthernet1/0/2] port trunk permit vlan 100
[PE1-GigabitEthernet1/0/2] quit
(2) 配置PE 2
# 配置端口GigabitEthernet1/0/1为Trunk端口且允许VLAN 100通过。
<PE2> system-view
[PE2] interface gigabitethernet 1/0/1
[PE2-GigabitEthernet1/0/1] port link-type trunk
[PE2-GigabitEthernet1/0/1] port trunk permit vlan 100
[PE2-GigabitEthernet1/0/1] quit
# 配置端口GigabitEthernet1/0/2为Trunk端口且允许VLAN 100通过。
[PE2] interface gigabitethernet 1/0/2
[PE2-GigabitEthernet1/0/2] port link-type trunk
[PE2-GigabitEthernet1/0/2] port trunk permit vlan 100
[PE2-GigabitEthernet1/0/2] quit
(3) 配置PE 3
# 配置端口GigabitEthernet1/0/1为Trunk端口且允许VLAN 100和200通过。
<PE3> system-view
[PE3] interface gigabitethernet 1/0/1
[PE3-GigabitEthernet1/0/1] port link-type trunk
[PE3-GigabitEthernet1/0/1] port trunk permit vlan 100 200
# 在端口GigabitEthernet1/0/1上配置2:2 VLAN映射,将外层VLAN为100、内层VLAN为5的报文的VLAN ID转换为外层VLAN为200、内层VLAN为6。
[PE3-GigabitEthernet1/0/1] vlan mapping tunnel 100 5 translated-vlan 200 6
[PE3-GigabitEthernet1/0/1] quit
# 配置端口GigabitEthernet1/0/2为Trunk端口且允许VLAN 200通过。
[PE3] interface gigabitethernet 1/0/2
[PE3-GigabitEthernet1/0/2] port link-type trunk
[PE3-GigabitEthernet1/0/2] port trunk permit vlan 200
[PE3-GigabitEthernet1/0/2] quit
(4) 配置PE 4
# 配置上行端口GigabitEthernet1/0/1为Trunk端口且允许VLAN 200通过。
<PE4> system-view
[PE4] interface gigabitethernet 1/0/1
[PE4-GigabitEthernet1/0/1] port link-type trunk
[PE4-GigabitEthernet1/0/1] port trunk permit vlan 200
[PE4-GigabitEthernet1/0/1] quit
# 配置下行端口GigabitEthernet1/0/2为Hybrid端口且允许VLAN 200的报文不携带VLAN Tag通过。
[PE4] interface gigabitethernet 1/0/2
[PE4-GigabitEthernet1/0/2] port link-type hybrid
[PE4-GigabitEthernet1/0/2] port hybrid vlan 200 untagged
# 在端口GigabitEthernet1/0/2上配置1:2 VLAN映射,为VLAN 6的报文添加VLAN 200的外层VLAN Tag。
[PE4-GigabitEthernet1/0/2] vlan mapping nest single 6 nested-vlan 200
[PE4-GigabitEthernet1/0/2] quit
(1) 查看PE 1上的VLAN映射配置信息
[PE1] display vlan mapping
Interface GigabitEthernet1/0/1:
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
5 N/A 100 5
(2) 查看PE 3上的VLAN映射配置信息
[PE3] display vlan mapping
Interface GigabitEthernet1/0/1:
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
100 5 200 6
(3) 查看PE 4上的VLAN映射配置信息
[PE4] display vlan mapping
Interface GigabitEthernet1/0/2:
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
6 N/A 200 6
以上信息表明,PE 1和PE 4上的1:2 VLAN映射,以及PE 3上的2:2 VLAN映射配置成功。
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论