1. VRRP with RPM and Event-option Configuration 구성도
1) VRRP with RPM and Event-option Configuration 구성도

- RPM(Real-Time Performance Monitoring)은 Cisco의 IP SLA와 비슷한 역할을 수행
- Event-Option은 Cisco의 EEM과 비슷한 역할을 수행
2) 테스트 장비
- Emulator : EVE-NG
- OS : Juniper vMX 18.2R1.9
2. VRRP with RPM and Event-option Configuration
1) VRRP Configuration
더보기
< R1 : 설정 >
set bridge-domains VLAN10 vlan-id 10
set bridge-domains VLAN10 routing-interface irb.10
set interfaces ge-0/0/1 unit 0 family bridge interface-mode trunk
set interfaces ge-0/0/1 unit 0 family bridge vlan-id-list 10
set interfaces irb unit 10 family inet address 10.0.0.2/24 vrrp-group 10 virtual-address 10.0.0.1
set interfaces irb unit 10 family inet address 10.0.0.2/24 vrrp-group 10 priority 120
set interfaces irb unit 10 family inet address 10.0.0.2/24 vrrp-group 10 accept-data
더보기
< R2 : 설정 >
set bridge-domains VLAN10 vlan-id 10
set bridge-domains VLAN10 routing-interface irb.10
set interfaces ge-0/0/1 unit 0 family bridge interface-mode trunk
set interfaces ge-0/0/1 unit 0 family bridge vlan-id-list 10
set interfaces irb unit 10 family inet address 10.0.0.3/24 vrrp-group 10 virtual-address 10.0.0.1
set interfaces irb unit 10 family inet address 10.0.0.3/24 vrrp-group 10 accept-data
더보기
< SW : 설정 >
set bridge-domains VLAN10 vlan-id 10
set interfaces ge-0/0/0 unit 0 family bridge interface-mode trunk
set interfaces ge-0/0/0 unit 0 family bridge vlan-id-list 10
set interfaces ge-0/0/1 unit 0 family bridge interface-mode trunk
set interfaces ge-0/0/1 unit 0 family bridge vlan-id-list 10
set interfaces ge-0/0/2 unit 0 family bridge interface-mode access
set interfaces ge-0/0/2 unit 0 family bridge vlan-id 10
- Juniper Default Priority : 100
- Juniper Default Preempt : Enable
2) Static Route Configuration
< R1 : Static Route 설정 >
set routing-options static route 0.0.0.0/0 next-hop 1.1.3.3
< R2 : Static Route 설정 >
set routing-options static route 0.0.0.0/0 next-hop 1.2.3.3
- 테스트를 위하여 R1, R2는 Defulat Route를 설정
root@R1> show route protocol static table inet.0
inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0 *[Static/5] 00:01:38
> to 1.1.3.3 via ge-0/0/0.0
root@R2> show route protocol static table inet.0
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0 *[Static/5] 00:02:35
> to 1.2.3.3 via ge-0/0/0.0
< PC1 : Ping Test >
VPCS> ping 1.1.1.1 -c 2
84 bytes from 1.1.1.1 icmp_seq=1 ttl=63 time=27.888 ms
84 bytes from 1.1.1.1 icmp_seq=2 ttl=63 time=5.325 ms


- PC1은 외부로 데이터 전송 시, 게이트웨이인 V-MAC을 가지고 있는 Master인 R1까지 전송
3) Next-Hop problem with Route Failure

root@R1> show route protocol static table inet.0
inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0.0.0.0/0 *[Static/5] 00:04:20
> to 1.1.3.3 via ge-0/0/0.0
root@R1> ping 1.1.3.3 count 2
PING 1.1.3.3 (1.1.3.3): 56 data bytes
--- 1.1.3.3 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss


- R1은 Next-Hop까지 통신이 불가능해도 OIF가 Up이므로 라우팅 테이블 변경이 없고 Master로 동작하므로 PC1은 외부와 통신 불가
4) RPM Configuration
< R1 : RPM Prove 설정 >
set services rpm probe OWNER_NAME test TEST_NAME ## OWNER Name(OWNER_NAME), TEST Name(TEST_NAME) 설정
set services rpm probe OWNER_NAME test TEST_NAME probe-type icmp-ping ## Probe Type을 ICMP로 지정(HTTP, UDP, TCP 등 설정 가능)
set services rpm probe OWNER_NAME test TEST_NAME source-address 1.1.3.1 ## Probe에 사용되는 Source-IP를 지정
set services rpm probe OWNER_NAME test TEST_NAME target address 1.1.3.3 ## Probe에 사용되는 Target-IP를 지정
set services rpm probe OWNER_NAME test TEST_NAME probe-count 2 ## Test 내에서 Probe Count를 지정
set services rpm probe OWNER_NAME test TEST_NAME probe-interval 1 ## 패킷 전송 사이의 간격을 s단위로 지정
set services rpm probe OWNER_NAME test TEST_NAME test-interval 3 ## Test 사이의 간격을 s단위로 지정(0으로 설정하며 한 번 반복 후 RPM 테스트가 중단)
set services rpm probe OWNER_NAME test TEST_NAME traps test-failure ## Probe용 SNMP Trap을 생성하도록 Trap bit를 설정하며 구성된 임계값을 충족하거나 초과하면 Trap을 전송
set services rpm probe OWNER_NAME test TEST_NAME traps test-completion


root@R1> show services rpm history-results owner OWNER_NAME
Owner, Test Probe Sent Probe received Round trip time
OWNER_NAME, TEST_NAME Sat Oct 5 00:55:12 2024 Sat Oct 5 00:55:12 2024 3015 usec
OWNER_NAME, TEST_NAME Sat Oct 5 00:55:13 2024 Sat Oct 5 00:55:13 2024 3037 usec
OWNER_NAME, TEST_NAME Sat Oct 5 00:55:16 2024 Sat Oct 5 00:55:16 2024 4181 usec
OWNER_NAME, TEST_NAME Sat Oct 5 00:55:17 2024 Sat Oct 5 00:55:17 2024 4136 usec
OWNER_NAME, TEST_NAME Sat Oct 5 00:55:20 2024 Sat Oct 5 00:55:20 2024 4110 usec
OWNER_NAME, TEST_NAME Sat Oct 5 00:55:21 2024 Sat Oct 5 00:55:22 2024 455597 usec
- 설정한 RPM이 문제없이 동작
root@R1> show services rpm probe-results
Owner: OWNER_NAME, Test: TEST_NAME
Target address: 1.1.3.3, Source address: 1.1.3.1, Probe type: icmp-ping, Icmp-id: 21, Test size: 2 probes
Probe results:
Response received
Sat Oct 5 00:57:59 2024
Sat Oct 5 00:57:59 2024, No hardware timestamps
Rtt: 3112 usec, Round trip jitter: 701 usec, Round trip interarrival jitter: 67108 usec
Results over current test:
Probes sent: 1, Probes received: 1, Loss percentage: 0.000000
Measurement: Round trip time
Samples: 1, Minimum: 3112 usec, Maximum: 3112 usec, Average: 3112 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 3112 usec
Measurement: Positive round trip jitter
Samples: 1, Minimum: 701 usec, Maximum: 701 usec, Average: 701 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 701 usec
Results over last test:
Probes sent: 2, Probes received: 2, Loss percentage: 0.000000
Test completed on Sat Oct 5 00:57:56 2024
Measurement: Round trip time
Samples: 2, Minimum: 2411 usec, Maximum: 5185 usec, Average: 3798 usec, Peak to peak: 2774 usec, Stddev: 1387 usec, Sum: 7596 usec
Measurement: Positive round trip jitter
Samples: 1, Minimum: 1738 usec, Maximum: 1738 usec, Average: 1738 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 1738 usec
Measurement: Negative round trip jitter
Samples: 1, Minimum: 2774 usec, Maximum: 2774 usec, Average: 2774 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 2774 usec
Results over all tests:
Probes sent: 455, Probes received: 119, Loss percentage: 73.846154
Measurement: Round trip time
Samples: 119, Minimum: 2305 usec, Maximum: 509978 usec, Average: 82573 usec, Peak to peak: 507673 usec, Stddev: 146124 usec, Sum: 9826204 usec
Measurement: Positive round trip jitter
Samples: 55, Minimum: 22 usec, Maximum: 506521 usec, Average: 122053 usec, Peak to peak: 506499 usec, Stddev: 165193 usec, Sum: 6712890 usec
Measurement: Negative round trip jitter
Samples: 63, Minimum: 2 usec, Maximum: 505436 usec, Average: 113226 usec, Peak to peak: 505434 usec, Stddev: 161656 usec, Sum: 7133219 usec
- RPM Probe의 Loss Percentage, 송수신 패킷 수, RTT 등 정보 확인 가능
5) Event-Option Configuration
set event-options policy ICMP_FAILURE events PING_TEST_FAILED ## 이벤트 정책(ICMP_FAILURE)을 생성하고 이름(PING_TEST_FAILED)을 지정한다.
set event-options policy ICMP_FAILURE within 60 trigger on 3 ## 60s 내에 3개의 'PING_TEST_FAILED' 이벤트가 발생했을 때 Trigger를 실행
set event-options policy ICMP_FAILURE attributes-match PING_TEST_FAILED.test-owner matches OWNER_NAME
## 이벤트 정책이 관련 RPM Probe에서 생성된 'PING_TEST_FAILED' 이벤트에 의해서만 Trigger 되도록 Attrubute Match 문을 구성
set event-options policy ICMP_FAILURE attributes-match PING_TEST_FAILED.test-name matches TEST_NAME
set event-options policy ICMP_FAILURE then change-configuration commands "set interfaces irb unit 10 family inet address 10.0.0.2/24 vrrp-group 10 priority 50"
## Event가 Trriger된 경우, 실행할 Configuration을 지정
set event-options policy ICMP_FAILURE then change-configuration commit-options log EVENT_POLICY-ICMP_FAILURE-UPDATE
## 설정한 Comment를 달고 Commit
set event-options policy ICMP_FAILURE then change-configuration user-name bsmith
## Configuration 변경 및 Commit 권한이 부여된 사용자 이름을 지정(미지정 시, Root로 진행)
< R1 : Event-Option 설정 / Ping Test Complet >
set event-options policy ICMP_COMPLETE events PING_TEST_COMPLETED
set event-options policy ICMP_COMPLETE within 60 trigger on 3
set event-options policy ICMP_COMPLETE attributes-match PING_TEST_COMPLETED.test-owner matches OWNER_NAME
set event-options policy ICMP_COMPLETE attributes-match PING_TEST_COMPLETED.test-name matches TEST_NAME
set event-options policy ICMP_COMPLETE then change-configuration commands "set interfaces irb unit 10 family inet address 10.0.0.2/24 vrrp-group 10 priority 120"
set event-options policy ICMP_COMPLETE then change-configuration commit-options log EVENT_POLICY-ICMP_COMPLETE-UPDATE
6) RPM and Event-Options Operation Verification after ICMP Failure

root@R1> show services rpm history-results owner OWNER_NAME
Owner, Test Probe Sent Probe received Round trip time
OWNER_NAME, TEST_NAME Sat Oct 5 01:01:28 2024 Sat Oct 5 01:01:29 2024 Request timed out
OWNER_NAME, TEST_NAME Sat Oct 5 01:01:29 2024 Sat Oct 5 01:01:30 2024 Request timed out
OWNER_NAME, TEST_NAME Sat Oct 5 01:01:33 2024 Sat Oct 5 01:01:34 2024 Request timed out
OWNER_NAME, TEST_NAME Sat Oct 5 01:01:34 2024 Sat Oct 5 01:01:35 2024 Request timed out
OWNER_NAME, TEST_NAME Sat Oct 5 01:01:38 2024 Sat Oct 5 01:01:39 2024 Request timed out
OWNER_NAME, TEST_NAME Sat Oct 5 01:01:39 2024 Sat Oct 5 01:01:40 2024 Request timed out
- 설정한 RPM이 Request Time Out이 발생되어 실패
root@R1> show services rpm probe-results
Owner: OWNER_NAME, Test: TEST_NAME
Target address: 1.1.3.3, Source address: 1.1.3.1, Probe type: icmp-ping, Icmp-id: 22, Test size: 2 probes
Probe results:
Request timed out
Sat Oct 5 01:02:29 2024
Sat Oct 5 01:02:30 2024
Results over current test:
Probes sent: 2, Probes received: 0, Loss percentage: 100.000000
Results over last test:
Probes sent: 2, Probes received: 0, Loss percentage: 100.000000
Results over all tests:
Probes sent: 582, Probes received: 219, Loss percentage: 62.371134
Measurement: Round trip time
Samples: 219, Minimum: 2305 usec, Maximum: 509978 usec, Average: 80900 usec, Peak to peak: 507673 usec, Stddev: 139183 usec, Sum: 17716996 usec
Measurement: Positive round trip jitter
Samples: 103, Minimum: 2 usec, Maximum: 506521 usec, Average: 125329 usec, Peak to peak: 506519 usec, Stddev: 159698 usec, Sum: 12908900 usec
Measurement: Negative round trip jitter
Samples: 115, Minimum: 2 usec, Maximum: 505436 usec, Average: 115904 usec, Peak to peak: 505434 usec, Stddev: 154970 usec, Sum: 13328981 usec
- RPM Probe의 현재 Loss Percentage가 100% 발생
root@R1# show interfaces irb unit 10 | display set
set interfaces irb unit 10 family inet address 10.0.0.2/24 vrrp-group 10 virtual-address 10.0.0.1
set interfaces irb unit 10 family inet address 10.0.0.2/24 vrrp-group 10 priority 50
set interfaces irb unit 10 family inet address 10.0.0.2/24 vrrp-group 10 accept-data
- Event-Option에 의해 관리자 개입 없이 VRRP Priority 변경
root@R1> show system commit
0 2024-10-05 00:08:33 UTC by root via junoscript
EVENT_POLICY-ICMP_FAILURE-UPDATE
- Event-Option에 의해 Comment를 달고 Commit
root@R1> show vrrp
Interface State Group VR state VR Mode Timer Type Address
irb.10 up 10 backup Active D 3.013 lcl 10.0.0.2
vip 10.0.0.1
mas 10.0.0.3
root@R2> show vrrp
Interface State Group VR state VR Mode Timer Type Address
irb.10 up 10 master Active A 0.172 lcl 10.0.0.3
vip 10.0.0.1
- R2는 본인보다 Priority가 낮은 VRRP Advertisement를 수신하고 Preempt 옵션이 동작하여 Master로 변경
< PC1 : Ping Test >
VPCS> ping 1.1.1.1 -c 2
84 bytes from 1.1.1.1 icmp_seq=1 ttl=63 time=5.029 ms
84 bytes from 1.1.1.1 icmp_seq=2 ttl=63 time=5.181 ms


- PC1은 외부로 데이터 전송 시, 게이트웨이인 V-MAC을 가지고 있는 Master 장비인 R2로 전송되어 PC1은 외부와 문제없이 통신 가능
7) RPM and Event-Options Operation Verification after ICMP Complete

root@R1> show services rpm history-results owner OWNER_NAME
Owner, Test Probe Sent Probe received Round trip time
OWNER_NAME, TEST_NAME Sat Oct 5 01:08:19 2024 Sat Oct 5 01:08:19 2024 4189 usec
OWNER_NAME, TEST_NAME Sat Oct 5 01:08:20 2024 Sat Oct 5 01:08:20 2024 3959 usec
OWNER_NAME, TEST_NAME Sat Oct 5 01:08:23 2024 Sat Oct 5 01:08:24 2024 336497 usec
OWNER_NAME, TEST_NAME Sat Oct 5 01:08:24 2024 Sat Oct 5 01:08:25 2024 412657 usec
OWNER_NAME, TEST_NAME Sat Oct 5 01:08:28 2024 Sat Oct 5 01:08:28 2024 3046 usec
OWNER_NAME, TEST_NAME Sat Oct 5 01:08:29 2024 Sat Oct 5 01:08:29 2024 3439 usec
- 설정한 RPM이 문제없이 동작
root@R1> show services rpm probe-results
Owner: OWNER_NAME, Test: TEST_NAME
Target address: 1.1.3.3, Source address: 1.1.3.1, Probe type: icmp-ping, Icmp-id: 27, Test size: 2 probes
Probe results:
Response received
Sat Oct 5 01:09:05 2024
Sat Oct 5 01:09:05 2024, No hardware timestamps
Rtt: 4411 usec, Round trip jitter: 446 usec, Round trip interarrival jitter: 114924 usec
Results over current test:
Probes sent: 2, Probes received: 2, Loss percentage: 0.000000
Measurement: Round trip time
Samples: 2, Minimum: 3965 usec, Maximum: 4411 usec, Average: 4188 usec, Peak to peak: 446 usec, Stddev: 223 usec, Sum: 8376 usec
Measurement: Positive round trip jitter
Samples: 1, Minimum: 446 usec, Maximum: 446 usec, Average: 446 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 446 usec
Measurement: Negative round trip jitter
Samples: 1, Minimum: 298377 usec, Maximum: 298377 usec, Average: 298377 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 298377 usec
Results over last test:
Probes sent: 2, Probes received: 2, Loss percentage: 0.000000
Test completed on Sat Oct 5 01:09:05 2024
Measurement: Round trip time
Samples: 2, Minimum: 3965 usec, Maximum: 4411 usec, Average: 4188 usec, Peak to peak: 446 usec, Stddev: 223 usec, Sum: 8376 usec
Measurement: Positive round trip jitter
Samples: 1, Minimum: 446 usec, Maximum: 446 usec, Average: 446 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 446 usec
Measurement: Negative round trip jitter
Samples: 1, Minimum: 298377 usec, Maximum: 298377 usec, Average: 298377 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 298377 usec
Results over all tests:
Probes sent: 744, Probes received: 243, Loss percentage: 67.338710
Measurement: Round trip time
Samples: 243, Minimum: 2305 usec, Maximum: 509978 usec, Average: 81246 usec, Peak to peak: 507673 usec, Stddev: 138724 usec, Sum: 19742854 usec
Measurement: Positive round trip jitter
Samples: 118, Minimum: 2 usec, Maximum: 506521 usec, Average: 121497 usec, Peak to peak: 506519 usec, Stddev: 156620 usec, Sum: 14336593 usec
Measurement: Negative round trip jitter
Samples: 124, Minimum: 2 usec, Maximum: 505436 usec, Average: 118997 usec, Peak to peak: 505434 usec, Stddev: 154415 usec, Sum: 14755623 usec
- RPM Probe의 현재 Loss Percentage가 0% 발생
root@R1# show interfaces irb unit 10 | display set
set interfaces irb unit 10 family inet address 10.0.0.2/24 vrrp-group 10 virtual-address 10.0.0.1
set interfaces irb unit 10 family inet address 10.0.0.2/24 vrrp-group 10 priority 120
set interfaces irb unit 10 family inet address 10.0.0.2/24 vrrp-group 10 accept-data
- Event-Option에 의해 관리자 개입 없이 VRRP Priority 변경
root@R1> show system commit
0 2024-10-05 00:11:25 UTC by root via junoscript
EVENT_POLICY-ICMP_COMPLETE-UPDATE
- Event-Option에 의해 Comment를 달고 Commit
root@R1> show vrrp
Interface State Group VR state VR Mode Timer Type Address
irb.10 up 10 master Active A 0.382 lcl 10.0.0.2
vip 10.0.0.1
root@R2> show vrrp
Interface State Group VR state VR Mode Timer Type Address
irb.10 up 10 backup Active D 3.229 lcl 10.0.0.3
vip 10.0.0.1
mas 10.0.0.2
- R1은 본인보다 Priority가 낮은 VRRP Advertisement를 수신하고 Preempt 옵션이 동작하여 Master로 변경
< PC1 : Ping Test >
VPCS> ping 1.1.1.1 -c 2
84 bytes from 1.1.1.1 icmp_seq=1 ttl=63 time=4.737 ms
84 bytes from 1.1.1.1 icmp_seq=2 ttl=63 time=5.234 ms


- PC1은 외부로 데이터 전송 시, 게이트웨이인 V-MAC을 가지고 있는 Master 장비인 R1으로 전송되어 PC1은 외부와 문제없이 통신 가능
'Network > VRRP' 카테고리의 다른 글
Introduction to HSRP (0) | 2025.03.20 |
---|---|
VRRP Load Balancing Configuration(Juniper vMX) (0) | 2025.03.16 |
VRRP Basic Configuration(Juniper vMX) (0) | 2025.03.14 |
VRRP Route Track 동작 과정 (0) | 2025.03.12 |
VRRP Interface Track 동작 과정 (0) | 2025.03.10 |
VRRP Preempt Hold-Time(Delay) 동작 과정 (0) | 2025.03.06 |
VRRP Preempt 동작 과정 (0) | 2025.03.04 |
VRRP 동작 과정 (0) | 2025.03.02 |