ip access-list extended lan-erp
permit ip 192.168.1.0 0.0.0.255 host 192.168.5.53 (ERP IP)
ip access-list extended lan-mail
permit ip 192.168.1.0 0.0.0.255 host 192.168.5.50 (mail IP)
定义route-map 的感兴趣流
ip sla monitor 1
type echo protocol ipIcmpEcho 192.168.3.2
ip sla monitor schedule 1 life forever start-time now
ip sla monitor 2
type echo protocol ipIcmpEcho 192.168.2.2
ip sla monitor schedule 2 life forever start-time now
route-map test permit 10
match ip address lan-erp
set ip next-hop verify-availability 192.168.3.2 1 track 123
set ip next-hop verify-availability 192.168.2.2 2 track 124
!
route-map test permit 20
match ip address lan-mail
set ip next-hop verify-availability 192.168.2.2 1 track 124
set ip next-hop verify-availability 192.168.3.2 2 track 123
启用routermap 对数据进行分流。
R2:
ip access-list extended erp-lan
permit ip host 192.168.5.53 192.168.1.0 0.0.0.255
ip access-list extended mail-lan
permit ip host 192.168.5.50 192.168.1.0 0.0.0.255
定义route-map 的感兴趣流
ip sla monitor 1
type echo protocol ipIcmpEcho 192.168.3.1
ip sla monitor schedule 1 life forever start-time now
ip sla monitor 2
type echo protocol ipIcmpEcho 192.168.2.1
ip sla monitor schedule 2 life forever start-time now
route-map test permit 10
match ip address mail-erp
set ip next-hop verify-availability 192.168.3.1 1 track 123
set ip next-hop verify-availability 192.168.4.1 2 track 124
!
route-map test permit 20
match ip address erp-mail
set ip next-hop verify-availability 192.168.4.1 1 track 124
set ip next-hop verify-availability 192.168.3.1 2 track 123