interface vlan1 ip address 192.168.0.1 255.255.255.0 ip policy route-map tracking ! route-map tracking permit 10 match ip address 1 set default interface Dialer1 Dialer0 ! route-map tracking permit 20 match ip address 2 set default interface Dialer0 Dialer1 ! access-list 1 permit 192.168.0.101 access-list 2 deny 192.168.0.101 access-list 2 permit 192.168.0.0 0.0.0.255
interface vlan1 ip address 192.168.0.1 255.255.255.0 ip policy route-map tracking ! track 123 rtr 1 reachability ! track 124 rtr 2 reachability ! ip sla 1 icmp-echo 195.5.5.208 source-interface Dialer1 timeout 2000 threshold 2 frequency 3 ip sla schedule 1 life forever start-time now ip sla 2 icmp-echo 193.34.140.1 source-interface Dialer0 timeout 2000 threshold 2 frequency 3 ip sla schedule 2 life forever start-time now ! route-map tracking permit 100 match ip address 1 set ip next-hop verify-availability 195.5.5.208 10 track 123 set ip next-hop verify-availability 193.34.140.1 20 track 124 ! route-map tracking permit 120 match ip address 2 set ip next-hop verify-availability 193.34.140.1 10 track 124 set ip next-hop verify-availability 195.5.5.208 20 track 123 ! route-map tracking permit 200 set ip next-hop verify-availability 195.5.5.208 10 track 123 set ip next-hop verify-availability 193.34.140.1 20 track 124 ! access-list 1 permit 192.168.0.101 access-list 2 deny 192.168.0.101 access-list 2 permit 192.168.0.0 0.0.0.255
#sh ip int br | i ^ Dialer Dialer0 193.34.141.151 YES IPCP up up Dialer1 unassigned YES IPCP up up
#sh route-map tracking route-map tracking, permit, sequence 100 Match clauses: ip address (access-lists): 1 Set clauses: ip next-hop verify-availability 195.5.5.208 10 track 123 [down] ip next-hop verify-availability 193.34.140.1 20 track 124 [up] Policy routing matches: 711 packets, 95929 bytes route-map tracking, permit, sequence 120 Match clauses: ip address (access-lists): 2 Set clauses: ip next-hop verify-availability 193.34.140.1 10 track 124 [up] ip next-hop verify-availability 195.5.5.208 20 track 123 [down] Policy routing matches: 216 packets, 14100 bytes route-map tracking, permit, sequence 200 Match clauses: Set clauses: ip next-hop verify-availability 195.5.5.208 10 track 123 [down] ip next-hop verify-availability 193.34.140.1 20 track 124 [up] Policy routing matches: 0 packets, 0 bytes
Source: https://habr.com/ru/post/81424/
All Articles