示例:在 MX、M、T 和 PTX 系列路由器上配置实时性能监控
配置由探测名称和 probe1
测试名称 test1
标识的 RPM 实例:
[edit services rpm] probe probe1{ test test1 { dscp-code-points 001111; probe-interval 1; probe-type icmp-ping; target address 172.17.20.182; test-interval 20; thresholds rtt 10; traps rtt-exceeded; } } probe-server { tcp { destination-interface lt-0/0/0.0 port 50000; } udp { destination-interface lt-0/0/0.0 port 50001; } } probe-limit 200;
配置数据包分类,使用 lt-
接口将探测数据包发送到逻辑隧道输入接口。通过将数据包发送至逻辑隧道接口,可以为探测数据包配置常规分类器和多域分类器、防火墙过滤器以及标头重写。要使用现有隧道框架, dlci
必须配置 and encapsulation
语句。
[edit services rpm] probe p1 { test t1 { probe-type icmp-ping; target address 10.8.4.1; probe-count 10; probe-interval 10; test-interval 10; source-address 10.8.4.2; dscp-code-points ef; data-size 100; destination-interface lt-0/0/0.0; } } [edit interfaces] lt-0/0/0 { unit 0 { encapsulation frame-relay; dlci 10; peer-unit 1; family inet; } unit 1 { encapsulation frame-relay; dlci 10; peer-unit 0; family inet; } } [edit class-of-service] interfaces { lt-0/0/0 { unit 1 { classifiers { dscp default; } } } }
在接收 RPM 探测的接口上配置输入过滤器。此过滤器支持对收到的 RPM 数据包进行优先级划分,使它们与同一接口上收到的常规数据包分离。
[edit firewall] filter recos { term recos { from { source-address { 10.8.4.1/32; } destination-address { 10.8.4.2/32; } } then { loss-priority high; forwarding-class network-control; } } } [edit interfaces] fe-5/0/0 { unit 0 { family inet { filter { input recos; } address 10.8.4.2/24; } } }
配置 RPM 实例并为自适应服务接口上的扩展提供商软件包启用 RPM:
[edit services rpm] probe probe1{ test test1 { data-size 1024; data-fill 0; destination-interface ms-1/2/0.10; dscp-code-points 001111; probe-count 10; probe-interval 1; probe-type icmp-ping; target address 172.17.20.182; test-interval 20; thresholds rtt 10; traps rtt-exceeded; } } [edit interfaces] ms-1/2/0 { unit 0 { family inet; } unit 10 { rpm client; family inet { address 192.0.2.1/32; } } [edit chassis] fpc 1 { pic 2 { adaptive-services { service-package { extension-provider { control-cores 1; data-cores 1; object-cache-size 512; policy-db-size 64; package jservices-rpm; syslog { daemon any; } } } } } }
配置启用 TWAMP 所需的最小语句:
[edit services] rpm { twamp { server { authentication-mode none; port 10000; # Twamp server's listening port client-list LIST-1 { # LIST-1 is the name of the client-list. Multiple lists can be configured. address { 198.51.100.2/30; # IP address of the control client. } } } } [edit interfaces sp-5/0/0] unit 0 { family inet; } unit 10 { rpm { twamp-server; # You must configure a separate logical interface on the service PIC interface for the TWAMP server. } family inet { address 203.0.113.50/32; # This address must be a host address with a 32-bit mask. } } [edit chassis] fpc 5 { pic 0 { adaptive-services { service-package layer-2; # Configure the service PIC to run in Layer 2 mode. } } }
配置其他 TWAMP 设置:
[edit services] rpm { twamp { server { maximum-sessions 5; maximum-sessions-per-connection 2; maximum-connections 3; maximum-connections-per-client 1; port 10000; server-inactivity-timeout ; client-list LIST-1 { address { 198.51.100.2/30; } } } } }