当前位置:   article > 正文

华为路由器负载均衡_华为AR路由器配置双出口静态IP双链路负载 | 铭泰网络

华为路由器双wan口负载均衡

适用于:有多个以太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接口

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

1

2

3

4

5

6

7

8

9

10

11

12

13system-view                                                                                     //先从用户视图切换到系统视图再进行配置

[AR]interfacegigabitethernet0/0/1                                                            //对GE1口配置运营商1分配的IP和子网掩码

[AR-GigabitEthernet0/0/1]ipaddress 100.100.1.2255.255.255.252

[AR-GigabitEthernet0/0/1]quit

[AR]interfacegigabitethernet0/0/0                                                            //对GE0口配置运营商2分配的IP和子网掩码

[AR-GigabitEthernet0/0/0]ipaddress 200.200.1.2255.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

1

2

3

4

5[AR]iproute-static0.0.0.00.0.0.0 100.100.1.1                                               //配置运营商1分配的网关IP

[AR]iproute-static0.0.0.00.0.0.0 200.200.1.1                                              //配置运营商2分配的网关IP

[AR] ipload-balancehashsrc-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

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17[AR]aclnumber3000

[AR-acl-adv-3000]rulepermitip

[AR-acl-adv-3000]quit

[AR]interfacegigabitethernet0/0/1

[AR-GigabitEthernet0/0/1]natoutbound3000

[AR-GigabitEthernet0/0/1]quit

[AR]interfacegigabitethernet0/0/0

[AR-GigabitEthernet0/0/0]natoutbound3000

[AR-GigabitEthernet0/0/0]quit

二、LAN侧配置

配置接口IP和DHCP服务器(为PC分配IP)

说明:LAN口是二层接口不能直接配置IP,由于它默认属于VLAN 1,需要为其创建VLANIF1接口再配置IP。

[AR] dhcp enable                                                                                            //打开DHCP总开关

[AR] interface vlanif 1                                                                                     //创建VLANIF1接口,并配置IP和子网掩码

[AR-Vlanif1] ip address 192.168.1.1 255.255.255.0

[AR-Vlanif1] dhcp select interface                                                                  //启用接口地址池方式的DHCP服务器功能

[AR-Vlanif1] dhcp server dns-list 114.114.114.114                                        //配置DNS服务器为公共的DNS(114.114.114.114)

[AR-Vlanif1] return

1

2

3

4

5

6

7

8

9

10

11[AR]dhcpenable                                                                                          //打开DHCP总开关

[AR]interfacevlanif1                                                                                    //创建VLANIF1接口,并配置IP和子网掩码

[AR-Vlanif1]ipaddress 192.168.1.1255.255.255.0

[AR-Vlanif1]dhcpselectinterface                                                                //启用接口地址池方式的DHCP服务器功能

[AR-Vlanif1]dhcpserverdns-list 114.114.114.114                                        //配置DNS服务器为公共的DNS(114.114.114.114)

[AR-Vlanif1]return

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/525605
推荐阅读
相关标签
  

闽ICP备14008679号