双isp接入负载均衡加备份

上传人:kms****20 文档编号:40948729 上传时间:2018-05-27 格式:DOC 页数:13 大小:41.50KB
返回 下载 相关 举报
双isp接入负载均衡加备份_第1页
第1页 / 共13页
双isp接入负载均衡加备份_第2页
第2页 / 共13页
双isp接入负载均衡加备份_第3页
第3页 / 共13页
双isp接入负载均衡加备份_第4页
第4页 / 共13页
双isp接入负载均衡加备份_第5页
第5页 / 共13页
点击查看更多>>
资源描述

《双isp接入负载均衡加备份》由会员分享,可在线阅读,更多相关《双isp接入负载均衡加备份(13页珍藏版)》请在金锄头文库上搜索。

1、双双 ISPISP 接入负载均衡加备份接入负载均衡加备份双 ISP 接入负载均衡加备份 一 . 拓朴图(在底下)二 实现目标:内网 172.16.10.0/24 中的奇数地址(172.16.10.3/5/7/9)走ISP1,如果 NAT 与 R1 间的链路 down 掉,则走 ISP2内网 172.16.10.0/24 中的偶数地址(172.16.10.2/4/6/8)走ISP2,如果 NAT 与 R2 间的链路 down 掉,则走 ISP1三 配置及注释:1NAT 的配置:NAT#show runBuilding configuration.Current configuration : 1

2、696 bytes!version 12.3service timestamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname NAT!boot-start-markerboot-end-marker!no aaa new-modelip subnet-zero!no ip domain lookup!ip cef!interface FastEthernet0/0no ip addressshutdownduplex half!interface S

3、erial1/0ip address 192.168.1.1 255.255.255.0ip nat outsideserial restart-delay 0!interface Serial1/1ip address 192.168.2.1 255.255.255.0ip nat outsideserial restart-delay 0!interface Serial1/2ip address 172.16.10.1 255.255.255.0ip nat insideip policy route-map load /应用“load“的策略路由serial restart-delay

4、 0!interface Serial1/3no ip addressshutdownserial restart-delay 0!ip nat pool R1 192.168.1.10 192.168.1.20 prefix-length 24 /配置 R1 的 NAT 地址池ip nat pool R2 192.168.2.10 192.168.2.20 prefix-length 24 /配置 R2 的 NAT 地址池ip nat inside source route-map ISP1 pool R1 overload /符合策略路由“ISP1“的使用 R1 定义的地址池ip nat

5、inside source route-map ISP2 pool R2 overload /符合策略路由“ISP2“的使用 R2 定义的地址池ip classlessno ip http serverno ip http secure-server!ip access-list standard even /定义标准访问列表“even“permit 172.16.10.0 0.0.0.254 /允许 172.16.10.0 中偶数的地址access-list 1 permit 172.16.10.0 0.0.0.255 /允许 NAT 转换的地址范围!route-map load permi

6、t 10 /定义策略路由,用于实现负载分担和备份match ip address even /匹配访问列表“even“的,也就是偶数的地址set ip next-hop 192.168.2.2 /设置下一跳为 192.168.2.2,也就是 R2 的接口地址 set ip default next-hop 192.168.1.2 /如果 NAT 和 R2 之间的链路 down 掉了,就使用默认的下一跳,也就是 R1!route-map load permit 20 /不满足“load“系列号 10 的,就匹配20set ip next-hop 192.168.1.2 /不匹配偶数的,也就是奇数

7、的地址则下一跳为 R1set ip default next-hop 192.168.2.2 /如果 NAT 和 R1 之间的链路 down 掉了,就使用默认的下一跳,也就是 R2!route-map ISP2 permit 10 /用于 ISP2 的策略路由 match ip address 1 /匹配访问列表 1match interface Serial1/1 /同时匹配出口为 s1/1,也就是和 R2相连的接口! route-map ISP1 permit 10 /用于 ISP1 的策略路由 match ip address 1 /匹配访问列表 1match interface Ser

8、ial1/0 /同时匹配出口为 s1/1,也就是和 R2相连的接口/一个访问列表只能匹配一个地址池,因此,我们必须用不同的出接口来区分。如果是 h3c 设备就无此问题!gatekeepershutdown!line con 0exec-timeout 0 0logging synchronousstopbits 1line aux 0stopbits 1line vty 0 4password ciscologin !End/基于不同的源地址网段做负载均衡比较简单.2R2、R3 的配置:R2 上只需配置一条静态路由 ip route 192.168.2.0 255.255.255.0 10.1

9、0.10.2R3 上只需配置一条静态路由 ip route 192.168.1.0 255.255.255.0 10.10.10.13PC 上的配置:在路由器的接口上配置一个奇数和偶数的地址来模拟四负载均衡测试:1在 NAT 上打开 debug ip nat 来观察 NAT 转换所使用的地址池,在 PC 上直接 ping 10.10.10.1(PC 上的主地址为 172.16.10.2,为偶数) ,接着用扩展 ping,使用 172.16.10.3(奇数地址)作为源地址 ping 10.10.10.1。PC 的输出信息如下:PC#ping 10.10.10.1Type escape seque

10、nce to abort.Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 108/155/228 msPC# PC#PC#PC#ping Protocol ip: Target IP address: 10.10.10.1Repeat count 5: Datagram size 100: Timeout in seconds 2: Extended commands n: ySource

11、 address or interface: 172.16.10.3Type of service 0: Set DF bit in IP header? no: Validate reply data? no: Data pattern 0xABCD: Loose, Strict, Record, Timestamp, Verbosenone: Sweep range of sizes n: Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:Pack

12、et sent with a source address of 172.16.10.3 !Success rate is 100 percent (5/5), round-trip min/avg/max = 64/104/196 msNAT 的输出信息如下:NAT#debug ip natIP NAT debugging is onNAT#*Jun 23 10:58:34.675: NAT: s=172.16.10.2-192.168.2.10, d=10.10.10.1 177 /第一次 ping(偶数地址)的输出,使用的*Jun 23 10:58:34.827: NAT*: s=10.

13、10.10.1, d=192.168.2.10-172.16.10.2 177 是 ISP2 地址池*Jun 23 10:58:34.911: NAT*: s=172.16.10.2-192.168.2.10, d=10.10.10.1 178*Jun 23 10:58:34.987: NAT*: s=10.10.10.1, d=192.168.2.10-172.16.10.2 178*Jun 23 10:58:35.083: NAT*: s=172.16.10.2-192.168.2.10, d=10.10.10.1 179*Jun 23 10:58:35.159: NAT*: s=10.1

14、0.10.1, d=192.168.2.10-172.16.10.2 179*Jun 23 10:58:35.175: NAT*: s=172.16.10.2-192.168.2.10, d=10.10.10.1 180*Jun 23 10:58:35.271: NAT*: s=10.10.10.1, d=192.168.2.10-172.16.10.2 180*Jun 23 10:58:35.299: NAT*: s=172.16.10.2-192.168.2.10, d=10.10.10.1 181NAT#*Jun 23 10:58:35.395: NAT*: s=10.10.10.1,

15、d=192.168.2.10-172.16.10.2 181NAT#*Jun 23 10:58:52.571: NAT: s=172.16.10.3-192.168.1.11, d=10.10.10.1 182 /第一次 ping(偶数地址)的输出,使用的*Jun 23 10:58:52.623: NAT*: s=10.10.10.1, d=192.168.1.11-172.16.10.3 182 是 ISP1 地址池*Jun 23 10:58:52.743: NAT*: s=172.16.10.3-192.168.1.11, d=10.10.10.1 183*Jun 23 10:58:52.

16、787: NAT*: s=10.10.10.1, d=192.168.1.11-172.16.10.3 183*Jun 23 10:58:52.851: NAT*: s=172.16.10.3-192.168.1.11, d=10.10.10.1 184*Jun 23 10:58:52.895: NAT*: s=10.10.10.1, d=192.168.1.11-172.16.10.3 184*Jun 23 10:58:52.931: NAT*: s=172.16.10.3-192.168.1.11, d=10.10.10.1 185*Jun 23 10:58:52.991: NAT*: s=10.10.10.1, d=192.168.1.11-172.16.10.3 185*Jun 23 10:58:53.023: NAT

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 科普知识

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号