track 10 ip sla 10 reachability 定义跟中
!
track 11 ip sla 11 reachability
ip sla 10
icmp-echo 192.168.5.254 source-interface FastEthernet0/0
frequency 5
ip sla schedule 10 life forever start-time now
ip sla 11
icmp-echo 192.168.7.254 source-interface FastEthernet0/1
frequency 5 每五秒测试网关是否通
interface FastEthernet0/0
ip address 192.168.5.6 255.255.255.240
ip nat outside
ip virtual-reassembly 接口配置支持虚拟端口
interface FastEthernet0/1
ip address 192.168.7.5 255.255.255.240
ip nat outside
ip virtual-reassembly
interface FastEthernet0/0/0
ip address 192.168.13.1 255.255.255.0
ip nat inside
ip virtual-reassembly
ip policy route-map pbr 内部端口匹配策略
access-list 15 permit 192.168.13.0 0.0.0.255
access-list 10 permit 192.168.13.0 0.0.0.63
access-list 11 permit 192.168.13.64 0.0.0.63
ip nat inside source route-map dxt interface FastEthernet0/0 overload
ip nat inside source route-map lt interface FastEthernet0/1 overload 映射电线和联通线路
route-map lt permit 100
match ip address 15
match interface FastEthernet0/1
route-map pbr permit 10
match ip address 10
set ip next-hop verify-availability 192.168.5.254 1 track 10 匹配跟中
set ip next-hop verify-availability 192.168.7.254 2 track 11
route-map pbr permit 11
match ip address 11
set ip next-hop verify-availability 192.168.7.254 1 track 11
set ip next-hop verify-availability 192.168.5.254 2 track 10
!
route-map dxt permit 100
match ip address 15
match interface FastEthernet0/0
===============================================
转载于:https://blog.51cto.com/wujingfeng/1009714