zoukankan      html  css  js  c++  java
  • 华为S5700系列交换机AR配置静态IP双链路负载分担

    适用于:有多个以太WAN口的机型。

    业务需求:

    运营商1分配的接口IP为100.100.1.2,子网掩码为255.255.255.252,网关IP为100.100.1.1。

    运营商2分配的接口IP为200.200.1.2,子网掩码为255.255.255.248,网关IP为200.200.1.1。

    实现通过静态IP双上行接入Internet,链路1和链路2的出口路由采用等价默认路由进行负载分担。

    拓扑简图:

     

    组网规划:

    GE1连接运营商1,GE0连接运营商2。

    LAN口连接内网。

    内网用户获取IP的方式:DHCP(动态获取IP)。

     

    操作步骤:

    一、WAN侧配置

    1. 配置静态IP接口

    <AR> system-view                                                                                      //先从用户视图切换到系统视图再进行配置
    [AR] interface gigabitethernet 0/0/1                                                             //对GE1口配置运营商1分配的IP和子网掩码
    [AR-GigabitEthernet0/0/1] ip address 100.100.1.2 255.255.255.252   
    [AR-GigabitEthernet0/0/1] quit
    [AR] interface gigabitethernet 0/0/0                                                             //对GE0口配置运营商2分配的IP和子网掩码
    [AR-GigabitEthernet0/0/0] ip address 200.200.1.2 255.255.255.248
    [AR-GigabitEthernet0/0/0] quit

    2. 配置等价默认路由(基于源IP地址进行负载分担)

    [AR] ip route-static 0.0.0.0 0.0.0.0 100.100.1.1                                               //配置运营商1分配的网关IP
    [AR] ip route-static 0.0.0.0 0.0.0.0 200.200.1.1                                               //配置运营商2分配的网关IP
    [AR] ip load-balance hash src-ip

    3. 配置NAT功能

    [AR] acl number 3000
    [AR-acl-adv-3000] rule permit ip
    [AR-acl-adv-3000] quit
    [AR] interface gigabitethernet 0/0/1
    [AR-GigabitEthernet0/0/1] nat outbound 3000
    [AR-GigabitEthernet0/0/1] quit
    [AR] interface gigabitethernet 0/0/0
    [AR-GigabitEthernet0/0/0] nat outbound 3000
    [AR-GigabitEthernet0/0/0] quit

    AR配置静态IP双链路上行备份示例

    适用于:有多个以太WAN口的机型。

    业务需求:

    运营商1分配的接口IP为100.100.1.2,子网掩码为255.255.255.252,网关IP为100.100.1.1。

    运营商2分配的接口IP为200.200.1.2,子网掩码为255.255.255.248,网关IP为200.200.1.1。

    实现通过静态IP双上行接入Internet,链路1和链路2采用主备的形式,主备链路可以通过配置静态路由的优先级区分出来。

    拓扑简图:

     

    组网规划:

    GE1连接运营商1做为主链路,GE0连接运营商2并做为备链路。

    LAN口连接内网。

    内网用户获取IP的方式:DHCP(动态获取IP)。

    操作步骤:

    一、WAN侧配置

    1. 配置静态IP接口

    <AR> system-view                                                                                      //先从用户视图切换到系统视图再进行配置
    [AR] interface gigabitethernet 0/0/1                                                             //对GE1口配置运营商1分配的IP和子网掩码
    [AR-GigabitEthernet0/0/1] ip address 100.100.1.2 255.255.255.252   
    [AR-GigabitEthernet0/0/1] quit
    [AR] interface gigabitethernet 0/0/0                                                             //对GE0口配置运营商2分配的IP和子网掩码
    [AR-GigabitEthernet0/0/0] ip address 200.200.1.2 255.255.255.248
    [AR-GigabitEthernet0/0/0] quit

    2. 配置默认路由(通过路由的优先级来指定链路2为备份链路)

    说明:通过preference参数指定优先级。缺省值是60,数值越小,优先级越高。

    [AR] ip route-static 0.0.0.0 0.0.0.0 100.100.1.1                                                //配置运营商1分配的网关IP
    [AR] ip route-static 0.0.0.0 0.0.0.0 200.200.1.1 preference 100                         //配置运营商2分配的网关IP,并比链路1的优先级数值大

    3. 配置NAT功能

    [AR] acl number 3000
    [AR-acl-adv-3000] rule permit ip
    [AR-acl-adv-3000] quit
    [AR] interface gigabitethernet 0/0/1
    [AR-GigabitEthernet0/0/1] nat outbound 3000
    [AR-GigabitEthernet0/0/1] quit
    [AR] interface gigabitethernet 0/0/0
    [AR-GigabitEthernet0/0/0] nat outbound 3000
    [AR-GigabitEthernet0/0/0] quit

    配置NQA实例

    配置ICMP测试示例

    组网图形

    ICMP测试组网图 

    组网需求

    如图一所示,SwitchA作为NQA客户端,测试SwitchB是否可达。

    配置思路

    采用如下思路进行配置:

    1.      使用NQA ICMP测试功能,测试报文在本端(SwitchA)和指定的目的端(SwitchB)之间是否可达。

    2.      使用NQA ICMP测试功能,测试报文在本端(SwitchA)和指定的目的端(SwitchB)之间的往返时间。

    操作步骤

    1.      配置SwitchA的IP地址

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan 100
    [SwitchA-vlan100] quit
    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] port link-type hybrid
    [SwitchA-GigabitEthernet0/0/1] port hybrid pvid vlan 100
    [SwitchA-GigabitEthernet0/0/1] port hybrid untagged vlan 100
    [SwitchA-GigabitEthernet0/0/1] quit
    [SwitchA] interface vlanif 100
    [SwitchA-Vlanif100] ip address 10.1.1.1 24
    [SwitchA-Vlanif100] quit

    13.  配置SwitchB的IP地址

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchB
    [SwitchB] vlan 100
    [SwitchB-vlan100] quit
    [SwitchB] interface gigabitethernet 0/0/1
    [SwitchB-GigabitEthernet0/0/1] port link-type hybrid
    [SwitchB-GigabitEthernet0/0/1] port hybrid pvid vlan 100
    [SwitchB-GigabitEthernet0/0/1] port hybrid untagged vlan 100
    [SwitchB-GigabitEthernet0/0/1] quit
    [SwitchB] interface vlanif 100
    [SwitchB-Vlanif100] ip address 10.1.1.2 24
    [SwitchB-Vlanif100] quit

    25.  使能NQA客户端,配置ICMP类型的NQA测试例

    [SwitchA] nqa test-instance admin icmp
    [SwitchA-nqa-admin-icmp] test-type icmp
    [SwitchA-nqa-admin-icmp] destination-address ipv4 10.1.1.2

    28.  启动测试

    [SwitchA-nqa-admin-icmp] start now

    29.  验证测试结果

    [SwitchA-nqa-admin-icmp] display nqa results test-instance admin icmp
    
    
    NQA entry(admin, icmp) :testflag is inactive ,testtype is icmp
    
    1 . Test 1 result   The test is finished
    
    Send operation times: 3              Receive response times: 3
    
    Completion:success                   RTD OverThresholds number: 0
    
    Attempts number:1                    Drop operation number:0
    
    Disconnect operation number:0        Operation timeout number:0
    
    System busy operation number:0       Connection fail number:0
    
    Operation sequence errors number:0   RTT Status errors number:0
    
    Destination ip address:10.1.1.2
    
    Min/Max/Average Completion Time: 3/125/44
    
    Sum/Square-Sum  Completion Time: 132/15650
    
    Last Good Probe Time: 2014-11-28 13:55:52.5
    
    Lost packet ratio: 0 %

    配置文件

    • SwitchA的配置文件
      • #
        sysname SwitchA
        #
        vlan batch 100
        #
        interface Vlanif100
        ip address 10.1.1.1 255.255.255.0
        #
        interface GigabitEthernet0/0/1
        port link-type hybrid
        port hybrid pvid vlan 100
        port hybrid untagged vlan 100
        #
        nqa test-instance admin icmp
        test-type icmp
        destination-address ipv4 10.1.1.2
        #
        return
    • SwitchB的配置文件
      • #
        sysname SwitchB
        #
        vlan batch 100
        #
        interface Vlanif100
        ip address 10.1.1.2 255.255.255.0
        #
        interface GigabitEthernet0/0/1
        port link-type hybrid
        port hybrid pvid vlan 100
        port hybrid untagged vlan 100
        #
        return
  • 相关阅读:
    Codeforces 115A- Party(DFS)
    【剑指offer】Q19:二叉树的镜像
    Codeforces Round #244 (Div. 2)D (后缀自己主动机)
    iWatch报错: Authorization request cancled
    [HDU 1421]搬寝室(富有新意的DP)
    hdu 2883 kebab(时间区间压缩 &amp;&amp; dinic)
    bzoj-3524 Couriers
    设计模式
    HDU 5063 Operation the Sequence(暴力)
    报错OPTION SQL_SELECT_LIMIT=
  • 原文地址:https://www.cnblogs.com/chuyiwang/p/9991719.html
Copyright © 2011-2022 走看看