双ISP 接入负载均衡NAT 与IP SLA 链路检测实验配置 CE 路由器为企业边缘路由器,f0/0,f2/0 分别为ISP1,ISP2 接口做负载均衡,loopback0 接口模拟内部主机。内部流量负载均衡到ISP1 与ISP2 两条链路上,为模拟出负载均衡流量,CE 的loopback0、f0/0、f2/0 接口上禁用了快速交换(ip route cache)以及 CEF 并启用了基于 per-packet 的负载均衡(ip load-sharing per-packet)。通过在 CE 路由器上配置IP SLA 来检测ISP 链路的可用性。Internet-server 路由器的loopback0 接口模拟internet 上的某个 server,并且此 server也是双ISP 接入。 CE configu ration CE#sh run Building configuration... Current configuration : 2288 bytes ! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname CE ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 5 ! ! ip cef no ip domain lookup ! ! ip sla monitor 1 type echo protocol ipIcmpEcho 172.16.2.1 source-interface FastEthernet0/0 ip sla monitor schedule 1 life forever start-time now ip sla monitor 2 type echo protocol ipIcmpEcho 172.31.2.1 source-interface FastEthernet2/0 ip sla monitor schedule 2 life forever start-time now ! ! ! ! track 1 rtr 1 reachability #将track 与 ip sla 关联起来,track 根据 ip sla 的返回代码来断定链路 UP/DOWN ! track 2 rtr 2 reachability ! ! ! ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ip load-sharing per-packet ip nat inside ip virtual-reassembly no ip route-cache cef no ip route-cache ! interface FastEthernet0/0 description isp1 ip address 172.16.1.1 255.255.255.0 ip load-sharing per-packet ip nat outside ip virtual-reassembly no ip route-cache cef no ip route-cache duplex auto speed auto ! interface Serial1/0 no ip address shutdown serial restart-delay 0 ! interface Serial1/1 no ip address shutdown serial restart-del...