思科如何配置IP SLA路由联动(3)
R871(config)#track 65 rtr 65 reachability
3)定义icmp失效时效
scheduler max-task-time 5000
4)定义需要指定源路由的ip地址
access-list 68 permit 192.168.68.0 0.0.0.255
5)配置路由策略
route-map test permit 10
match ip address 68
set ip next-hop verify-availability 192.168.65.2 10 track 65
set ip next-hop verify-availability 192.168.64.2 64 track 64
exit
6)接口应用路由策略
interface FastEthernet4
ip address 192.168.66.2 255.255.255.0
ip policy route-map test
exit
7)缺省路由应用track
ip route 0.0.0.0 0.0.0.0 192.168.64.2 10 track 64
ip route 0.0.0.0 0.0.0.0 192.168.65.2 100 track 65
R871#sh run
Building configuration…
Current configuration : 2905 bytes
Last configuration change at 16:06:20 bjt Wed Nov 11 2009
NVRAM config last updated at 10:37:12 bjt Wed Nov 11 2009
version 12.4
no service pad
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
service sequence-numbers
hostname R871
boot-start-marker
boot system flash:/c870-advsecurityk9-mz.124-15.T9.bin
boot-end-marker
logging buffered 4096
no logging console
enable secret 5 class="con">
思科如何配置IP SLA路由联动(3)
no aaa new-model
clock timezone bjt 8
dot11 syslog
ip cef
no ip domain lookup
archive
log config
hidekeys
interface FastEthernet0
interface FastEthernet1
shutdown
interface FastEthernet2
switchport access vlan 5
interface FastEthernet3
switchport access vlan 5
interface Dot11Radio0
no ip address
shutdown
speed basic-1.0 basic-2.0 basic-5.5 6.0 9.0 basic-11.0 12.0 18.0 24.0 36.0 48.0 54.0
station-role root
interface Vlan1
ip address 192.168.64.254 255.255.255.0
interface Vlan5
ip address 192.168.65.254 255.255.255.0
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.64.2 10 track 64
ip route 0.0.0.0 0.0.0.0 192.168.65.2 100 track 65
ip route 192.168.67.0 255.255.255.0 192.168.66.254
ip route 192.168.68.0 255.255.255.0 192.168.66.254
ip route 193.168.1.254 255.255.255.255 192.168.66.254
ip route 193.168.2.254 255.255.255.255 192.168.66.254
ip http server
no ip http secure-server
ip sla 64
icmp-echo 192.168.64.2
ip sla schedule 64 life forever start-time now
配置SAA检查连通性。并跟踪这结果。很精巧的实现思路。
ip sla 65
icmp-echo 192.168.65.2
ip sla schedule 65 life forever start-time now
配置SAA检查连通性。并跟踪这结果。很精巧的实现思路。
track 64 rtr 64 reachability
track 65 rtr 65 reachability
定义访问控制列表,permit选项为需要重定向的数据包
access-list 168 deny ip 192.168.68.0 0.0.0.255 192.168.64.0 0.0.0.255
access-list 168 deny ip 192.168.68.0 0.0.0.255 192.168.65.0 0.0.0.255
access-list 168 permit ip 192.168.68.0 0.0.0.255 any
定义策略路由
route-map test permit 10
match ip address 168
set ip next-hop verify-availability 192.168.65.2 10 track 65
set ip next-hop verify-availability 192.168.64.2 64 track 64
应用策略路由