RPM配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
解决场景:
Juniper多链路出口,路由主备,链路故障后,自动切换,同时不影响多链路的Dnat
关键词解释:
Successive-Loss 连续丢包数
Total-Loss 总丢包数

联通链路rpm
set services rpm probe RpmProbeCU test cu-gateway target address 114.114.114.114 \\探测的目的地址
set services rpm probe RpmProbeCU test cu-gateway probe-count 4 \\发送4个探测包
set services rpm probe RpmProbeCU test cu-gateway probe-interval 5 \\4个探测包的间隔为5秒钟
set services rpm probe RpmProbeCU test cu-gateway test-interval 5 \\完成4个探测包后,距离下次探测的间隔时间
set services rpm probe RpmProbeCU test cu-gateway source-address 10.1.1.2 \\已10.1.1.2为源进行探测
set services rpm probe RpmProbeCU test cu-gateway thresholds successive-loss 3 \\连续丢包数为3个
set services rpm probe RpmProbeCU test cu-gateway thresholds total-loss 3 \\总丢包数为3个
电信链路rpm
set services rpm probe RpmProbeCT test ct-gateway target address 114.114.114.114
set services rpm probe RpmProbeCT test ct-gateway probe-count 4
set services rpm probe RpmProbeCT test ct-gateway probe-interval 5
set services rpm probe RpmProbeCT test ct-gateway test-interval 5
set services rpm probe RpmProbeCT test ct-gateway source-address 20.1.1.2
set services rpm probe RpmProbeCT test ct-gateway thresholds successive-loss 3
set services rpm probe RpmProbeCT test ct-gateway thresholds total-loss 3

rpm监测切换策略
链路故障后,被选中的路由优先级会被系统重置为1,切换时间大概20秒;当链路故障恢复后,会重新切回原来的路由
set services ip-monitoring policy RpmPolicyCU match rpm-probe RpmProbeCU \\如果满足rpm probe监测条件,则执行以下路由,
set services ip-monitoring policy RpmPolicyCU then preferred-route route 0.0.0.0/0 next-hop 20.1.1.1
set services ip-monitoring policy RpmPolicyCT match rpm-probe RpmProbeCT
set services ip-monitoring policy RpmPolicyCT then preferred-route route 0.0.0.0/0 next-hop 10.1.1.1