华为交换机配置实例.docx_第1页
华为交换机配置实例.docx_第2页
华为交换机配置实例.docx_第3页
华为交换机配置实例.docx_第4页
华为交换机配置实例.docx_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

QinQ二层隧道当需要较多的VLAN时,可以配置QinQ二层隧道功能。通过对VLAN增加外层Tag,使得VLAN的可用数目范围变大,解决VLAN数目资源紧缺的问题。配置QinQ二层隧道,使得报文带有两层Tag传输。在如图1所示的网络中,企业部门1有两个办公地,部门2有三个办公地,两个部门的各办公地分别和网络中的PE1、PE2相连,部门1和部门2可以任意规划自己的VLAN。图1 配置QinQ二层隧道典型组网图 在PE1和PE2上通过如下思路配置QinQ二层隧道功能,使得每个部门的各个办公地网络可以互通,但两个部门之间不能互通。 在PE1上,对于进入端口GE1/0/1和GE1/0/3的用户报文都封装外层VLAN 10,对于进入端口GE1/0/2中用户报文都封装外层VLAN 20。 在PE2上,对于进入端口GE1/0/1和GE1/0/2的用户报文都封装外层VLAN 20。 PE1上的接口GE1/0/4和PE2上的接口GE1/0/3允许VLAN 20的报文通过。部门1和部门2外层VLAN规划如表1所示:配置基于接口的QinQ示例组网需求如图1所示,网络中有两个大企业,企业1有两个办公地,企业2有三个办公地,这两个企业的各办公地的企业网都分别和运营商网络中的SwitchG或SwitchF相连。企业1的网络中使用VLAN1000VLAN1500,企业2的网络中使用VLAN2000VLAN3000。要求企业内部各办公地相同VLAN内用户可以通过运营商的网络互相通信,但两个企业之间互相隔离。图1 配置基于接口的QinQ组网图 配置思路采用如下的思路配置QinQ:1. 在SwitchF上创建VLAN10和VLAN20,在SwitchG上创建VLAN20。2. 在SwitchF上配置接口GE1/0/1、GE2/0/1、GE3/0/1的类型为QinQ。3. 在SwitchG上配置接口GE1/0/1、GE2/0/1的类型为QinQ。4. 配置SwitchF的接口GE4/0/1和SwitchG的接口GE3/0/1以Tag方式加入VLAN20。数据准备为完成此配置例,需准备如下的数据: 在运营商网络中企业1被划分在VLAN10中。 在运营商网络中企业2被划分在VLAN20中。操作步骤1. 创建VLAN # 在SwitchF上创建VLAN10和VLAN20。 system-viewQuidway sysname SwitchFSwitchF vlan batch 10 20# 在SwitchG上创建VLAN20。 system-viewQuidway sysname SwitchGSwitchG vlan 202. 配置接口类型为QinQ # 在SwitchF上配置接口GE1/0/1、GE2/0/1、GE3/0/1类型为QinQ,GE1/0/1、GE3/0/1的外层Tag为VLAN10,GE2/0/1的外层Tag为VLAN20。SwitchF interface gigabitethernet 1/0/1SwitchF-GigabitEthernet1/0/1 port link-type dot1q-tunnelSwitchF-GigabitEthernet1/0/1 port default vlan 10SwitchF-GigabitEthernet1/0/1 quitSwitchF interface gigabitethernet 2/0/1SwitchF-GigabitEthernet2/0/1 port link-type dot1q-tunnelSwitchF-GigabitEthernet2/0/1 port default vlan 20SwitchF-GigabitEthernet2/0/1 quitSwitchF interface gigabitethernet 3/0/1SwitchF-GigabitEthernet3/0/1 port link-type dot1q-tunnelSwitchF-GigabitEthernet3/0/1 port default vlan 10SwitchF-GigabitEthernet3/0/1 quit# 在SwitchG上配置接口GE1/0/1、GE2/0/1类型为QinQ接口,GE1/0/1、GE2/0/1的外层Tag为VLAN20。SwitchG interface gigabitethernet 1/0/1SwitchG-GigabitEthernet1/0/1 port link-type dot1q-tunnelSwitchG-GigabitEthernet1/0/1 port default vlan 20SwitchG-GigabitEthernet1/0/1 quitSwitchG interface gigabitethernet 2/0/1SwitchG-GigabitEthernet2/0/1 port link-type dot1q-tunnelSwitchG-GigabitEthernet2/0/1 port default vlan 20SwitchG-GigabitEthernet2/0/1 quit3. 配置其它接口 # 在SwitchF上配置接口GE4/0/1加入VLAN20。SwitchF interface gigabitethernet 4/0/1SwitchF-GigabitEthernet4/0/1 port link-type trunkSwitchF-GigabitEthernet4/0/1 port trunk allow-pass vlan 20SwitchF-GigabitEthernet4/0/1 quit# 在SwitchG上配置接口GE3/0/1加入VLAN20。SwitchG interface gigabitethernet 3/0/1SwitchG-GigabitEthernet3/0/1 port link-type trunkSwitchG-GigabitEthernet3/0/1 port trunk allow-pass vlan 20SwitchG-GigabitEthernet3/0/1 quit4. 验证配置结果 从企业1任意办公地内任意VLAN的一台主机ping企业1其它工作地同一VLAN内的主机,如果可以ping通则表示企业1内部可以互相通信。从企业2任意办公地内任意VLAN的一台主机ping企业2其它工作地同一VLAN内的主机,如果可以ping通则表示企业2内部可以互相通信。从企业1任意办公地内的任意一台主机ping企业2内的主机,如果不能ping通则表示企业1和企业2是互相隔离的配置灵活QinQ示例组网需求如图1所示,PC上网用户和VoIP用户通过SwitchA和SwitchB接入运营商网络,通过运营商的网络互相通信。要求PC上网用户和VoIP用户分别以VLAN2和VLAN3通过运营商网络。图1 配置灵活QinQ组网图 配置思路采用如下的思路配置灵活QinQ:1. 在SwitchA和SwitchB上创建相关VLAN。2. 在SwitchA和SwitchB上配置接口类型并加入VLAN。3. 在SwitchA和SwitchB的接口上配置灵活QinQ功能。数据准备为完成此配置例,需准备如下的数据: PC上网用户被划分在VLAN100VLAN200中。 VoIP用户被划分在VLAN300VLAN400中。 在公网中PC上网用户被划分到VLAN2中传输。 在公网中VoIP用户被划分到VLAN3中传输。操作步骤1. 创建VLAN # 在SwitchA上创建VLAN2、VLAN3,即叠加后的外层VLAN。 system-viewQuidway sysname SwitchASwitchA vlan batch 2 3# 在SwitchB上创建VLAN2、VLAN3,即叠加后的外层VLAN。 system-viewQuidway sysname SwitchBSwitchB vlan batch 2 32. 在接口上配置灵活QinQ # 配置SwitchA的接口GE1/0/1。SwitchA interface gigabitethernet 1/0/1SwitchA-GigabitEthernet1/0/1 port link-type hybridSwitchA-GigabitEthernet1/0/1 port hybrid untagged vlan 2 3SwitchA-GigabitEthernet1/0/1 port vlan-stacking vlan 100 to 200 stack-vlan 2SwitchA-GigabitEthernet1/0/1 port vlan-stacking vlan 300 to 400 stack-vlan 3SwitchA-GigabitEthernet1/0/1 quit# 配置SwitchB的接口GE1/0/1。SwitchB interface gigabitethernet 1/0/1SwitchB-GigabitEthernet1/0/1 port link-type hybridSwitchB-GigabitEthernet1/0/1 port hybrid untagged vlan 2 3SwitchB-GigabitEthernet1/0/1 port vlan-stacking vlan 100 to 200 stack-vlan 2SwitchB-GigabitEthernet1/0/1 port vlan-stacking vlan 300 to 400 stack-vlan 3SwitchB-GigabitEthernet1/0/1 quit3. 配置其它接口 # 在SwitchA上配置接口GE1/0/2加入VLAN2、VLAN3。SwitchA interface gigabitethernet 1/0/2SwitchA-GigabitEthernet1/0/2 port link-type trunkSwitchA-GigabitEthernet1/0/2 port trunk allow-pass vlan 2 3SwitchA-GigabitEthernet1/0/2 quit# 在SwitchB上配置接口GE1/0/2加入VLAN2、VLAN3。SwitchB interface gigabitethernet 1/0/2SwitchB-GigabitEthernet1/0/2 port link-type trunkSwitchB-GigabitEthernet1/0/2 port trunk allow-pass vlan 2 3SwitchB-GigabitEthernet1/0/2 quit4. 验证配置结果 # 查看SwitchA上各接口的配置信息。 display current-configuration interface gigabitethernet 1/0/1#interface GigabitEthernet1/0/1 port hybrid untagged vlan 2 to 3 port vlan-stacking vlan 100 to 200 stack-vlan 2 port vlan-stacking vlan 300 to 400 stack-vlan 3#return display current-configuration interface gigabitethernet 1/0/2#interface GigabitEthernet1/0/2 port link-type trunk port trunk allow-pass vlan 2 to 3#return# 查看SwitchB上各接口的配置信息。 display current-configuration interface gigabitethernet 1/0/1#interface GigabitEthernet1/0/1 port hybrid untagged vlan 2 to 3 port vlan-stacking vlan 100 to 200 stack-vlan 2 port vlan-stacking vlan 300 to 400 stack-vlan 3#return display current-configuration interface gigabitethernet 1/0/2#interface GigabitEthernet1/0/2 port link-type trunk port trunk allow-pass vlan 2 to 3#return如果SwitchA、SwitchB上配置正确,则: PC上网用户可以通过运营商网络互相通信。 VoIP用户可以通过运营商网络互相通信。配置单层Tag的VLAN Mapping示例组网需求在如图1所示的网络中,VLAN6内的用户需要通过网络中的VLAN10来与VLAN5内的用户通信。图1 配置VLAN Mapping示例组网图 配置思路采用如下的思路配置VLAN Mapping:1. 在SwitchA、SwitchB、SwitchC、SwitchD上创建各自所属的VLAN。2. 配置SwitchA、SwitchB、SwitchC、SwitchD接口加入各自创建的VLAN。3. 在SwitchA的接口GigabitEthernet1/0/1上配置VLAN Mapping。4. 在SwitchB的接口GigabitEthernet2/0/2上配置VLAN Mapping。数据准备为完成此配置例,需准备如下的数据: 在SwitchA上需要创建的VLAN6。 在SwitchB上需要创建的VLAN5。 在SwitchC、SwitchD上需要创建的VLAN10。操作步骤1. 配置VLAN # 在SwitchA创建VLAN6。 system-viewQuidway sysname SwitchASwitchA vlan 6# 在SwitchB创建VLAN5。 system-viewQuidway sysname SwitchBSwitchB vlan 5# 在SwitchC创建VLAN10。 system-viewQuidway sysname SwitchCSwitchC vlan 10# 在SwitchD创建VLAN10。 system-viewQuidway sysname SwitchDSwitchD vlan 102. 配置接口加入VLAN # 在SwitchA上配置接口GigabitEthernet3/0/1、GigabitEthernet3/0/2加入VLAN6。SwitchA interface gigabitethernet 3/0/1SwitchA-GigabitEthernet3/0/1 port link-type trunkSwitchA-GigabitEthernet3/0/1 port trunk allow-pass vlan 6SwitchA-GigabitEthernet3/0/1 quitSwitchA interface gigabitethernet 3/0/2SwitchA-GigabitEthernet3/0/2 port link-type trunkSwitchA-GigabitEthernet3/0/2 port trunk allow-pass vlan 6SwitchA-GigabitEthernet3/0/2 quit# 在SwitchA上配置接口GigabitEthernet1/0/1加入VLAN6。SwitchA interface gigabitethernet 1/0/1SwitchA-GigabitEthernet1/0/1 port link-type trunkSwitchA-GigabitEthernet1/0/1 port trunk allow-pass vlan 6SwitchA-GigabitEthernet1/0/1 quit# 在SwitchB上配置接口GigabitEthernet3/0/1、GigabitEthernet3/0/2加入VLAN5。SwitchB interface gigabitethernet 3/0/1SwitchB-GigabitEthernet3/0/1 port link-type trunkSwitchB-GigabitEthernet3/0/1 port trunk allow-pass vlan 5SwitchB-GigabitEthernet3/0/1 quitSwitchB interface gigabitethernet 3/0/2SwitchB-GigabitEthernet3/0/2 port link-type trunkSwitchB-GigabitEthernet3/0/2 port trunk allow-pass vlan 5SwitchB-GigabitEthernet3/0/2 quit# 在SwitchB上配置接口GigabitEthernet2/0/2加入VLAN5。SwitchB interface gigabitethernet 2/0/2SwitchB-GigabitEthernet2/0/2 port link-type trunkSwitchB-GigabitEthernet2/0/2 port trunk allow-pass vlan 5SwitchB-GigabitEthernet2/0/2 quit# 在SwitchC上配置接口GigabitEthernet1/0/1加入VLAN10。SwitchC interface gigabitethernet 1/0/1SwitchC-GigabitEthernet1/0/1 port link-type trunkSwitchC-GigabitEthernet1/0/1 port trunk allow-pass vlan 10SwitchC-GigabitEthernet1/0/1 quit# 在SwitchD上配置接口GigabitEthernet1/0/1加入VLAN10。SwitchD interface gigabitethernet 1/0/1SwitchD-GigabitEthernet1/0/1 port link-type trunkSwitchD-GigabitEthernet1/0/1 port trunk allow-pass vlan 10SwitchD-GigabitEthernet1/0/1 quit3. 配置VLAN Mapping # 在SwitchA的接口GigabitEthernet1/0/1上配置VLAN Mapping。SwitchA-GigabitEthernet1/0/1 port vlan-mapping

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论