所选语种没有对应资源,请选择:

本站点使用Cookies,继续浏览表示您同意我们使用Cookies。Cookies和隐私政策>

提示

尊敬的用户,您的IE浏览器版本过低,为获取更好的浏览体验,请升级您的IE浏览器。

升级

S7700, S9700 V200R010C00 配置指南-以太网交换

本文档针对设备的以太网业务,主要包括链路聚合配置、VLAN配置、Voice VLAN配置、VLAN mapping配置、QinQ配置、GVRP配置、MAC表配置、STP/RSTP/MSTP配置和SEP配置等。

评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
配置基于流策略的VLAN Mapping示例(2 to 2)

配置基于流策略的VLAN Mapping示例(2 to 2)

组网需求

图11-9所示,企业A和企业B各自规划自己的私网VLAN ID,但是由于用户报文中的VLAN ID与ISP网络分配的VLAN ID不一致,将导致用户报文被丢弃,从而导致用户通信中断。可以在用户侧部署VLAN Mapping功能,实现企业A与企业B通过运营商网络互相通信。

图11-9  配置双层Tag的VLAN Mapping功能组网图

配置思路

采用如下的思路配置基于流的替换双层Tag的VLAN Mapping功能:

  1. SwitchA、SwitchB、SwitchC、SwitchD上创建各自所属的外层VLAN。

  2. SwitchA和SwitchB上创建各自的类、流行为、流策略。

  3. 配置SwitchA、SwitchB、SwitchC、SwitchD接口加入各自创建的VLAN。

  4. 配置SwitchA上接口GE1/0/1为基于流的替换双层Tag的VLAN Mapping功能。

  5. 配置SwitchB上接口GE1/0/2为基于流的替换双层Tag的VLAN Mapping功能。

操作步骤

  1. 配置VLAN

    # 在SwitchA创建VLAN100和VLAN300。

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 100 300

    # 在SwitchB创建VLAN200和VLAN300。

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchB
    [SwitchB] vlan batch 200 300

    # 在SwitchC创建VLAN300。

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchC
    [SwitchC] vlan batch 300

    # 在SwitchD创建VLAN300。

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchD
    [SwitchD] vlan batch 300

  2. 配置接口加入VLAN

    # 在SwitchA上配置接口GigabitEthernet1/0/1加入VLAN100和VLAN300。

    [SwitchA] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] port link-type trunk
    [SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 300
    [SwitchA-GigabitEthernet1/0/1] quit

    # 在SwitchB上配置接口GigabitEthernet1/0/2加入VLAN200和VLAN300。

    [SwitchB] interface gigabitethernet 1/0/2
    [SwitchB-GigabitEthernet1/0/2] port link-type trunk
    [SwitchB-GigabitEthernet1/0/2] port trunk allow-pass vlan 200 300
    [SwitchB-GigabitEthernet1/0/2] quit

    # 在SwitchC上配置接口GigabitEthernet1/0/1加入VLAN300。

    [SwitchC] interface gigabitethernet 1/0/1
    [SwitchC-GigabitEthernet1/0/1] port link-type trunk
    [SwitchC-GigabitEthernet1/0/1] port trunk allow-pass vlan 300
    [SwitchC-GigabitEthernet1/0/1] quit

    # 在SwitchD上配置接口GigabitEthernet1/0/2加入VLAN300。

    [SwitchD] interface gigabitethernet 1/0/2
    [SwitchD-GigabitEthernet1/0/2] port link-type trunk
    [SwitchD-GigabitEthernet1/0/2] port trunk allow-pass vlan 300
    [SwitchD-GigabitEthernet1/0/2] quit

  3. 配置类、流行为、流策略

    # 在SwitchA上配置入方向的类、流行为、流策略。

    [SwitchA] traffic classifier name1 operator and
    [SwitchA-classifier-name1] if-match vlan-id 300
    [SwitchA-classifier-name1] if-match cvlan-id 30
    [SwitchA-classifier-name1] quit
    [SwitchA] traffic behavior name1
    [SwitchA-behavior-name1] remark vlan-id 100
    [SwitchA-behavior-name1] remark cvlan-id 10
    [SwitchA-behavior-name1] quit
    [SwitchA] traffic policy name1
    [SwitchA-trafficpolicy-name1] classifier name1 behavior name1
    [SwitchA-trafficpolicy-name1] quit

    # 在SwitchA上配置出方向的类、流行为、流策略。

    [SwitchA] traffic classifier name2 operator and
    [SwitchA-classifier-name2] if-match vlan-id 100
    [SwitchA-classifier-name2] if-match cvlan-id 10
    [SwitchA-classifier-name2] quit
    [SwitchA] traffic behavior name2
    [SwitchA-behavior-name2] remark vlan-id 300
    [SwitchA-behavior-name2] remark cvlan-id 30
    [SwitchA-behavior-name2] quit
    [SwitchA] traffic policy name2
    [SwitchA-trafficpolicy-name2] classifier name2 behavior name2
    [SwitchA-trafficpolicy-name2] quit

    # 在SwitchB上配置入方向的类、流行为、流策略。

    [SwitchB] traffic classifier name1 operator and
    [SwitchB-classifier-name1] if-match vlan-id 300
    [SwitchB-classifier-name1] if-match cvlan-id 30
    [SwitchB-classifier-name1] quit
    [SwitchB] traffic behavior name1
    [SwitchB-behavior-name1] remark vlan-id 200
    [SwitchB-behavior-name1] remark cvlan-id 20
    [SwitchB-behavior-name1] quit
    [SwitchB] traffic policy name1
    [SwitchB-trafficpolicy-name1] classifier name1 behavior name1
    [SwitchB-trafficpolicy-name1] quit

    # 在SwitchB上配置出方向的类、流行为、流策略。

    [SwitchB] traffic classifier name2 operator and
    [SwitchB-classifier-name2] if-match vlan-id 200
    [SwitchB-classifier-name2] if-match cvlan-id 20
    [SwitchB-classifier-name2] quit
    [SwitchB] traffic behavior name2
    [SwitchB-behavior-name2] remark vlan-id 300
    [SwitchB-behavior-name2] remark cvlan-id 30
    [SwitchB-behavior-name2] quit
    [SwitchB] traffic policy name2
    [SwitchB-trafficpolicy-name2] classifier name2 behavior name2
    [SwitchB-trafficpolicy-name2] quit

  4. 配置基于流的替换双层Tag的VLAN Mapping功能

    # 在SwitchA的接口GigabitEthernet1/0/1上配置基于流的替换双层Tag的VLAN Mapping功能。

    [SwitchA] interface GigabitEthernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] traffic-policy name1 inbound
    [SwitchA-GigabitEthernet1/0/1] traffic-policy name2 outbound
    

    # 在SwitchB的接口GigabitEthernet1/0/2上配置基于流的替换双层Tag的VLAN Mapping功能。

    [SwitchB] interface GigabitEthernet 1/0/2
    [SwitchB-GigabitEthernet1/0/2] traffic-policy name1 inbound
    [SwitchB-GigabitEthernet1/0/2] traffic-policy name2 outbound
    

  5. 验证配置结果

    企业A内用户与企业B内用户可以互相访问。

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    vlan batch 100 300
    #
    traffic classifier name1 operator and precedence 5
     if-match vlan-id 300
     if-match cvlan-id 30
    traffic classifier name2 operator and precedence 10
     if-match vlan-id 100
     if-match cvlan-id 10
    #
    traffic behavior name1
     permit
     remark vlan-id 100
     remark cvlan-id 10
    traffic behavior name2
     permit
     remark vlan-id 300
     remark cvlan-id 30
    #
    traffic policy name1 match-order config
     classifier name1 behavior name1
    traffic policy name2 match-order config
     classifier name2 behavior name2
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 100 300
     traffic-policy name1 inbound
     traffic-policy name2 outbound
    #
    return 
  • SwitchB的配置文件

    #
    sysname SwitchB
    #
    vlan batch 200 300
    #
    traffic classifier name1 operator and precedence 5
     if-match vlan-id 300
     if-match cvlan-id 30
    traffic classifier name2 operator and precedence 10
     if-match vlan-id 200
     if-match cvlan-id 20
    #
    traffic behavior name1
     permit
     remark vlan-id 200
     remark cvlan-id 20
    traffic behavior name2
     permit
     remark vlan-id 300
     remark cvlan-id 30
    #
    traffic policy name1 match-order config
     classifier name1 behavior name1
    traffic policy name2 match-order config
     classifier name2 behavior name2
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 200 300
     traffic-policy name1 inbound
     traffic-policy name2 outbound
    #
    return 
  • SwitchC的配置文件

    #
    sysname SwitchC
    #
    vlan batch 300
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    return 
  • SwitchD的配置文件

    #
    sysname SwitchD
    #
    vlan batch 300
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 300
    #
    return 
翻译
下载文档
更新时间:2019-12-27

文档编号:EDOC1000141467

浏览量:84154

下载量:1000

平均得分:
本文档适用于这些产品

相关版本

相关文档

Share
上一页 下一页