1 实验拓扑
2 路由器配置
#R1配置
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn
[Huawei]sysname R1
[R1]int GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 255.255.255.0
[R1-GigabitEthernet0/0/0]qu
[R1]int GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.1.1.2 255.255.255.0
[R1-GigabitEthernet0/0/1]qu
[R1]int GigabitEthernet 0/0/2
[R1-GigabitEthernet0/0/2]ip address 172.16.1.2 255.255.255.0
[R1-GigabitEthernet0/0/2]qu
#配置访问策略,并绑定接口
R1]acl number 3006
[R1-acl-adv-3006]rule 6 permit ip source 192.168.1.0 0.0.0.255
[R1-acl-adv-3006]quit
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]nat outbound 3006
[R1-GigabitEthernet0/0/1]qu
[R1]interface GigabitEthernet 0/0/2
[R1-GigabitEthernet0/0/2]nat outbound 3006
[R1-GigabitEthernet0/0/2]qu
#配置两条等价默认路由,通过等价路由来实现负载分担,基于源IP地址方式进行负载分担
[R1]ip route-static 0.0.0.0 0 10.1.1.1
[R1]ip route-static 0.0.0.0 0 172.16.1.1
[R1load-balance src-ip
<R1>save
#ISP1
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn
[Huawei]sysname ISP1
[ISP1]int GigabitEthernet 0/0/0
[ISP1-GigabitEthernet0/0/0]ip add 10.1.1.1 255.255.255.0
[ISP1-GigabitEthernet0/0/0]qu
[ISP1]qu
<ISP1>save
#ISP2
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname ISP2
[ISP2]int GigabitEthernet 0/0/0
[ISP2-GigabitEthernet0/0/0]ip add 172.16.1.2 255.255.255.0
[ISP2-GigabitEthernet0/0/0]qu
[ISP2]qu
<ISP2>save
# pc1 配置
#pc2配置
3 验证查看
#R1查看配置的静态路由表信息
<R1>display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : StaticDestinations : 1 Routes : 2 Configured Routes : 2Static routing table status : <Active>Destinations : 1 Routes : 2Destination/Mask Proto Pre Cost Flags NextHop Interface0.0.0.0/0 Static 60 0 RD 10.1.1.1 GigabitEthernet
0/0/1Static 60 0 RD 172.16.1.1 GigabitEthernet
0/0/2Static routing table status : <Inactive>Destinations : 0 Routes : 0
#pc1 ping ISP1和ISP2