1. Static Route with RPM and Event-option Configuration 구성도
1) Static Route 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. Static Route with RPM and Event-option Configuration
1) Interface IP Address Configuration
더보기
< R1 : Interface IP 설정 >
set interfaces ge-0/0/0 unit 0 family inet address 1.1.3.1/24
set interfaces ge-0/0/1 unit 0 family inet address 1.1.2.1/24
set interfaces lo0 unit 0 family inet address 1.1.1.1/32
더보기
< R2 : Interface IP 설정 >
set interfaces ge-0/0/0 unit 0 family inet address 1.1.2.2/24
set interfaces ge-0/0/1 unit 0 family inet address 1.2.3.2/24
set interfaces lo0 unit 0 family inet address 2.2.2.2/32
더보기
< R3 : Interface IP 설정 >
set interfaces ge-0/0/0 unit 0 family inet address 1.2.3.3/24
set interfaces ge-0/0/1 unit 0 family inet address 1.1.3.3/24
set interfaces lo0 unit 0 family inet address 3.3.3.3/32
2) Static Route Configuration
< R1 : Static Route 설정 >
set routing-options static route 3.3.3.3/32 qualified-next-hop 1.1.2.2 metric 10
set routing-options static route 3.3.3.3/32 qualified-next-hop 1.1.3.3 metric 20
root@R1> show route protocol static table inet.0
inet.0: 6 destinations, 7 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
3.3.3.3/32 *[Static/5] 00:01:28, metric 10
> to 1.1.2.2 via ge-0/0/1.0
[Static/5] 00:01:28, metric 20
> to 1.1.3.3 via ge-0/0/0.0
root@R1> show route forwarding-table matching 3.3.3.3 table default
Routing table: default.inet
Internet:
Enabled protocols: Bridging,
Destination Type RtRef Next hop Type Index NhRef Netif
3.3.3.3/32 user 0 1.1.2.2 ucst 585 3 ge-0/0/1.0
- R1는 Metric 값에 의해 3.3.3.3/32 네트워크로 가기 Entry 중에 Next-Hop이 1.1.2.2인 Entry를 사용
< R2 : Static Route 설정 >
set routing-options static route 3.3.3.3/32 next-hop 1.2.3.3
< R3 : Static Route 설정 >
set routing-options static route 1.1.2.0/24 qualified-next-hop 1.2.3.2 metric 10
set routing-options static route 1.1.2.0/24 qualified-next-hop 1.1.3.1 metric 20
root@R3> show route protocol static table inet.0
inet.0: 6 destinations, 7 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.2.0/24 *[Static/5] 00:00:21, metric 10
> to 1.2.3.2 via ge-0/0/0.0
[Static/5] 00:00:21, metric 20
> to 1.1.3.1 via ge-0/0/1.0
- R3는 Metric 값에 의해 1.1.1.1/32 네트워크로 가기 위해 Next-Hop이 1.2.3.2인 Entry를 사용
root@R1> ping 3.3.3.3 count 2
PING 3.3.3.3 (3.3.3.3): 56 data bytes
64 bytes from 3.3.3.3: icmp_seq=0 ttl=63 time=7.951 ms
64 bytes from 3.3.3.3: icmp_seq=1 ttl=63 time=4.830 ms
--- 3.3.3.3 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.830/6.390/7.951/1.561 ms
3) Static Route problem with Route Failure
root@R1> show route protocol static table inet.0
inet.0: 6 destinations, 7 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
3.3.3.3/32 *[Static/5] 00:38:18, metric 10
> to 1.1.2.2 via ge-0/0/1.0
[Static/5] 00:38:18, metric 20
> to 1.1.3.3 via ge-0/0/0.0
root@R1> show route forwarding-table matching 3.3.3.3/32 table default
Routing table: default.inet
Internet:
Enabled protocols: Bridging,
Destination Type RtRef Next hop Type Index NhRef Netif
3.3.3.3/32 user 0 1.1.2.2 ucst 585 3 ge-0/0/1.0
- R2↔R3 구간에 장애가 발생되어도 R1은 3.3.3.3/32 네트워크로 향하는 Entry들의 Next-Hop이 유효하므로 Table 변경 없이 유지
root@R1> ping 3.3.3.3 count 2
PING 3.3.3.3 (3.3.3.3): 56 data bytes
--- 3.3.3.3 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
- R1은 Table에 변경이 없으므로 R2로 ICMP Request 전송하여 통신 불가
4) RPM Configuration
< R1 : Static Route 설정>
set routing-options static route 1.2.3.0/24 next-hop 1.1.2.2
- RPM Probe를 사용하여 ICMP Request 패킷을 전송하기 위해 Static Route를 추가
< 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.2.1 ## Probe에 사용되는 Source-IP를 지정
set services rpm probe OWNER_NAME test TEST_NAME target address 1.2.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 Sep 28 16:16:56 2024 Sat Sep 28 16:16:56 2024 5823 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:16:57 2024 Sat Sep 28 16:16:57 2024 4523 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:17:00 2024 Sat Sep 28 16:17:00 2024 218644 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:17:01 2024 Sat Sep 28 16:17:01 2024 234506 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:17:04 2024 Sat Sep 28 16:17:04 2024 5827 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:17:05 2024 Sat Sep 28 16:17:05 2024 6729 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:17:08 2024 Sat Sep 28 16:17:08 2024 104526 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:17:09 2024 Sat Sep 28 16:17:09 2024 5729 usec
- 설정한 RPM이 문제없이 동작
root@R1> show services rpm probe-results
Owner: OWNER_NAME, Test: TEST_NAME
Target address: 1.2.3.3, Source address: 1.1.2.1, Probe type: icmp-ping,
Icmp-id: 11, Test size: 2 probes
Probe results:
Response received
Sat Sep 28 16:18:51 2024
Sat Sep 28 16:18:51 2024, No hardware timestamps
Rtt: 5552 usec, Round trip jitter: -300715 usec,
Round trip interarrival jitter: 139933 usec
Results over current test:
Probes sent: 1, Probes received: 1, Loss percentage: 0.000000
Measurement: Round trip time
Samples: 1, Minimum: 5552 usec, Maximum: 5552 usec, Average: 5552 usec,
Peak to peak: 0 usec, Stddev: 0 usec, Sum: 5552 usec
Measurement: Negative round trip jitter
Samples: 1, Minimum: 300715 usec, Maximum: 300715 usec,
Average: 300715 usec, Peak to peak: 0 usec, Stddev: 0 usec,
Sum: 300715 usec
Results over last test:
Probes sent: 2, Probes received: 2, Loss percentage: 0.000000
Test completed on Sat Sep 28 16:18:48 2024
Measurement: Round trip time
Samples: 2, Minimum: 10974 usec, Maximum: 306267 usec,
Average: 158621 usec, Peak to peak: 295293 usec, Stddev: 147646 usec,
Sum: 317241 usec
Measurement: Positive round trip jitter
Samples: 2, Minimum: 5426 usec, Maximum: 295293 usec,
Average: 150360 usec, Peak to peak: 289867 usec, Stddev: 144934 usec,
Sum: 300719 usec
Results over all tests:
Probes sent: 75, Probes received: 63, Loss percentage: 16.000000
Measurement: Round trip time
Samples: 63, Minimum: 4458 usec, Maximum: 620265 usec,
Average: 85961 usec, Peak to peak: 615807 usec, Stddev: 146041 usec,
Sum: 5415565 usec
Measurement: Positive round trip jitter
Samples: 34, Minimum: 27 usec, Maximum: 613474 usec,
Average: 125990 usec, Peak to peak: 613447 usec, Stddev: 165586 usec,
Sum: 4283666 usec
Measurement: Negative round trip jitter
Samples: 28, Minimum: 191 usec, Maximum: 595184 usec,
Average: 153063 usec, Peak to peak: 594993 usec, Stddev: 173130 usec,
Sum: 4285751 usec
- RPM Probe의 Loss Percentage, 송수신 패킷 수, RTT 등 정보 확인 가능
5) Event-Option Configuration
< R1 : Event-Option 설정 / Ping Test Failure >
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 "delete routing-options static route 3.3.3.3/32 qualified-next-hop 1.1.2.2"
## 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 routing-options static route 3.3.3.3/32 qualified-next-hop 1.1.2.2 metric 10"
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 Sep 28 16:30:33 2024 Sat Sep 28 16:30:33 2024 5500 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:30:36 2024 Sat Sep 28 16:30:36 2024 6115 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:30:37 2024 Sat Sep 28 16:30:37 2024 137226 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:30:40 2024 Sat Sep 28 16:30:40 2024 46570 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:30:41 2024 Sat Sep 28 16:30:41 2024 5949 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:30:44 2024 Sat Sep 28 16:30:45 2024 Request timed out
OWNER_NAME, TEST_NAME Sat Sep 28 16:30:45 2024 Sat Sep 28 16:30:46 2024 Request timed out
OWNER_NAME, TEST_NAME Sat Sep 28 16:30:49 2024 Sat Sep 28 16:30:50 2024 Request timed out
OWNER_NAME, TEST_NAME Sat Sep 28 16:30:50 2024 Sat Sep 28 16:30:51 2024 Request timed out
- 설정한 RPM이 Request Time Out이 발생되어 실패
root@R1> show services rpm probe-results
Owner: OWNER_NAME, Test: TEST_NAME
Target address: 1.2.3.3, Source address: 1.1.2.1, Probe type: icmp-ping,
Icmp-id: 12, Test size: 2 probes
Probe results:
Request timed out
Sat Sep 28 16:31:26 2024
Sat Sep 28 16:31:27 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: 60, Probes received: 30, Loss percentage: 50.000000
Measurement: Round trip time
Samples: 30, Minimum: 4445 usec, Maximum: 408077 usec,
Average: 73627 usec, Peak to peak: 403632 usec, Stddev: 122100 usec,
Sum: 2208800 usec
Measurement: Positive round trip jitter
Samples: 13, Minimum: 130 usec, Maximum: 395132 usec,
Average: 115842 usec, Peak to peak: 395002 usec, Stddev: 135414 usec,
Sum: 1505946 usec
Measurement: Negative round trip jitter
Samples: 16, Minimum: 57 usec, Maximum: 401717 usec,
Average: 94193 usec, Peak to peak: 401660 usec, Stddev: 123930 usec,
Sum: 1507088 usec
- RPM Probe의 현재 Loss Percentage가 100% 발생
root@R1# show routing-options | display set
set routing-options static route 3.3.3.3/32 qualified-next-hop 1.1.3.3 metric 20
set routing-options static route 1.2.3.0/24 next-hop 1.1.2.2
- Event-Option에 의해 관리자 개입 없이 Next-Hop이 1.1.2.2인 구성 제거
root@R1> show system commit
0 2024-09-28 16:30:57 UTC by root via junoscript
EVENT_POLICY-ICMP_FAILURE-UPDATE
1 2024-09-28 16:30:35 UTC by root via cli
2 2024-09-28 16:25:45 UTC by root via cli
- Event-Option에 의해 Comment를 달고 Commit
root@R1> show route protocol static table inet.0
inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.2.3.0/24 *[Static/5] 00:03:20
> to 1.1.2.2 via ge-0/0/1.0
3.3.3.3/32 *[Static/5] 00:03:20, metric 20
> to 1.1.3.3 via ge-0/0/0.0
root@R1> show route forwarding-table matching 3.3.3.3 table default
Routing table: default.inet
Internet:
Enabled protocols: Bridging,
Destination Type RtRef Next hop Type Index NhRef Netif
3.3.3.3/32 user 0 1.1.3.3 ucst 585 3 ge-0/0/0.0
root@R1> ping 3.3.3.3 count 2
PING 3.3.3.3 (3.3.3.3): 56 data bytes
64 bytes from 3.3.3.3: icmp_seq=0 ttl=64 time=4.033 ms
64 bytes from 3.3.3.3: icmp_seq=1 ttl=64 time=3.487 ms
--- 3.3.3.3 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 3.487/3.760/4.033/0.273 ms
- R1은 3.3.3.3/32 네트워크로 가는 경로 중, Next-Hop이 1.1.2.2인 Entry가 제거되어 문제없이 통신 가능
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 Sep 28 16:34:25 2024 Sat Sep 28 16:34:26 2024 Request timed out
OWNER_NAME, TEST_NAME Sat Sep 28 16:34:26 2024 Sat Sep 28 16:34:27 2024 Request timed out
OWNER_NAME, TEST_NAME Sat Sep 28 16:34:30 2024 Sat Sep 28 16:34:30 2024 39636 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:34:31 2024 Sat Sep 28 16:34:31 2024 5398 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:34:34 2024 Sat Sep 28 16:34:34 2024 21961 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:34:35 2024 Sat Sep 28 16:34:35 2024 129035 usec
OWNER_NAME, TEST_NAME Sat Sep 28 16:34:38 2024 Sat Sep 28 16:34:38 2024 5893 usec
- 설정한 RPM이 문제없이 동작
root@R1> show services rpm probe-results
Owner: OWNER_NAME, Test: TEST_NAME
Target address: 1.2.3.3, Source address: 1.1.2.1, Probe type: icmp-ping,
Icmp-id: 14, Test size: 2 probes
Probe results:
Response received
Sat Sep 28 16:35:04 2024
Sat Sep 28 16:35:04 2024, No hardware timestamps
Rtt: 5224 usec, Round trip jitter: -1030 usec,
Round trip interarrival jitter: 108631 usec
Results over current test:
Probes sent: 2, Probes received: 2, Loss percentage: 0.000000
Measurement: Round trip time
Samples: 2, Minimum: 5224 usec, Maximum: 6254 usec, Average: 5739 usec,
Peak to peak: 1030 usec, Stddev: 515 usec, Sum: 11478 usec
Measurement: Positive round trip jitter
Samples: 1, Minimum: 231 usec, Maximum: 231 usec, Average: 231 usec,
Peak to peak: 0 usec, Stddev: 0 usec, Sum: 231 usec
Measurement: Negative round trip jitter
Samples: 1, Minimum: 1030 usec, Maximum: 1030 usec, Average: 1030 usec,
Peak to peak: 0 usec, Stddev: 0 usec, Sum: 1030 usec
Results over last test:
Probes sent: 2, Probes received: 2, Loss percentage: 0.000000
Test completed on Sat Sep 28 16:35:04 2024
Measurement: Round trip time
Samples: 2, Minimum: 5224 usec, Maximum: 6254 usec, Average: 5739 usec,
Peak to peak: 1030 usec, Stddev: 515 usec, Sum: 11478 usec
Measurement: Positive round trip jitter
Samples: 1, Minimum: 231 usec, Maximum: 231 usec, Average: 231 usec,
Peak to peak: 0 usec, Stddev: 0 usec, Sum: 231 usec
Measurement: Negative round trip jitter
Samples: 1, Minimum: 1030 usec, Maximum: 1030 usec, Average: 1030 usec,
Peak to peak: 0 usec, Stddev: 0 usec, Sum: 1030 usec
- RPM Probe의 현재 Loss Percentage가 0% 발생
root@R1# show routing-options | display set
set routing-options static route 3.3.3.3/32 qualified-next-hop 1.1.3.3 metric 20
set routing-options static route 3.3.3.3/32 qualified-next-hop 1.1.2.2 metric 10
set routing-options static route 1.2.3.0/24 next-hop 1.1.2.2
- Event-Option에 의해 관리자 개입 없이 Next-Hop이 1.1.2.2인 구성 추가
root@R1> show system commit
0 2024-09-28 16:34:40 UTC by root via junoscript
EVENT_POLICY-ICMP_COMPLETE-UPDATE
1 2024-09-28 16:30:57 UTC by root via junoscript
EVENT_POLICY-ICMP_FAILURE-UPDATE
2 2024-09-28 16:30:35 UTC by root via cli
3 2024-09-28 16:25:45 UTC by root via cli
- Event-Option에 의해 Comment를 달고 Commit
root@R1> show route protocol static table inet.0
inet.0: 7 destinations, 8 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.2.3.0/24 *[Static/5] 00:06:20
> to 1.1.2.2 via ge-0/0/1.0
3.3.3.3/32 *[Static/5] 00:01:23, metric 10
> to 1.1.2.2 via ge-0/0/1.0
[Static/5] 00:06:20, metric 20
> to 1.1.3.3 via ge-0/0/0.0
root@R1> show route forwarding-table matching 3.3.3.3 table default
Routing table: default.inet
Internet:
Enabled protocols: Bridging,
Destination Type RtRef Next hop Type Index NhRef Netif
3.3.3.3/32 user 0 1.1.2.2 ucst 586 4 ge-0/0/1.0
root@R1> ping 3.3.3.3 count 2
PING 3.3.3.3 (3.3.3.3): 56 data bytes
64 bytes from 3.3.3.3: icmp_seq=0 ttl=63 time=7.043 ms
64 bytes from 3.3.3.3: icmp_seq=1 ttl=63 time=6.249 ms
--- 3.3.3.3 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 6.249/6.646/7.043/0.397 ms
- R1은 3.3.3.3/32 네트워크로 가는 경로 중, Next-Hop이 1.1.2.2인 Entry를 사용하여 통신
'Network > Switching, Routing Basic' 카테고리의 다른 글
Control Plane vs Data Plane (0) | 2025.02.24 |
---|---|
Table 생성 과정 (0) | 2025.02.22 |
Static Route Resolve Configuration(Juniper vMX) (0) | 2025.02.18 |
Static Route no-install Configuration(Juniper vMX) (0) | 2025.02.16 |
Static Route Reject and Discard Configuration(Juniper vMX) (0) | 2025.02.14 |
Static Route Metric and 'qualified-next-hop' Configuration(Juniper vMX) (0) | 2025.02.12 |
Static Route Preference and 'qualified-next-hop' Configuration(Juniper vMX) (0) | 2025.02.10 |
Static Route Basic Configuration(Juniper vMX) (0) | 2025.02.08 |