例:SRXシリーズファイアウォール用のTWAMPクライアントとサーバーの設定
この例では、TWAMP(Two-Way Active Measurement Protocol)クライアントとTWAMPサーバーを設定する方法を示します。
この例は、当社のコンテンツテストチームが検証し、更新しました。
要件
この例では、以下のハードウェアおよびソフトウェアコンポーネントを使用しています。
-
SRXシリーズファイアウォール。
-
Junos OSリリース18.1R1以降のリリース。
-
Junos OSリリース22.2R1のvMXを使用して更新および再検証しました。
-
TWAMP クライアントと TWAMP サーバーの設定を開始する前に、このタスクが設定プロセス全体にどのように適合するかについては、「 双方向アクティブ測定プロトコルを理解する 」を読んでください。
概要
TWAMP は、TWAMP プロトコルをサポートするネットワーク内の任意の 2 つのデバイス間のネットワーク パフォーマンスを測定するためのオープン プロトコルです。TWAMP は、TWAMP-Control プロトコルと TWAMP-Test プロトコルで構成されています。TWAMP-Control プロトコルは、制御クライアント間のテスト セッションの開始と停止に使用されます。セッション送信者とセッションリフレクタ間でテストパケットを交換するために使用されるTWAMP-Testプロトコル。
図1は、監視セッションの開始とパケットの交換を担当する以下のエンティティで構成されるTWAMPアーキテクチャを示しています。
-
制御クライアントは、すべての要求されたテスト セッションを開始セッション メッセージで開始し、TWAMP サーバーが確認します。必要に応じて、制御クライアントがメッセージを送信して、すべてのテスト セッションを停止します。
-
セッション送信者とセッション リフレクターは、アクティブ セッションごとに TWAMP-Test プロトコルに従ってテスト パケットを交換します。TWAMP-Test パケットを受信すると、セッション リフレクターは測定パケットを反映し、TWAMP でパケット統計を収集しません。
の設定
TWAMPサーバーは、1つ以上のTWAMPセッションを管理し、セッションごとのポートを設定できるエンドシステムです。TWAMPサーバーはTCPポートをリッスンします。セッション リフレクターと TWAMP サーバーは、IP サービス品質保証契約操作で TWAMP レスポンダーを構成します。
Junos OSリリース18.1R1では、制御クライアントとセッション送信者の両方が同一デバイスに存在します。クライアント設計では、TWAMPサーバーとセッションリフレクターを同一システム上に配置することは必須ではありません。そのため、ジュニパーのTWAMPクライアントは、サードパーティサーバーの実装と連携することもできます。
SRXシリーズファイアウォールのTWAMPクライアントの設定
CLIクイックコンフィグレーション
この例を迅速に設定するには、以下のコマンドをコピーしてテキストファイルに貼り付け、改行を削除し、ネットワーク設定に一致させる必要がある詳細情報を変更し、コマンドを [edit] 階層レベルでCLIにコピーアンドペーストして、設定モードから commit を入力します。
set system host-name R1 set services rpm twamp client control-connection c1 target-address 10.0.12.2 set services rpm twamp client control-connection c1 test-session t1 target-address 10.0.12.2 set services rpm twamp client control-connection c1 test-session t1 probe-count 2000 set security policies default-policy permit-all set security zones security-zone trust host-inbound-traffic system-services all set security zones security-zone trust host-inbound-traffic protocols all set security zones security-zone trust interfaces ge-0/0/0.0 set interfaces ge-0/0/0 unit 0 description "To Server R2" set interfaces ge-0/0/0 unit 0 family inet address 10.0.12.1/24 set interfaces lo0 unit 0 family inet address 192.168.0.1/32
ステップバイステップの手順
次の例では、設定階層のさまざまなレベルに移動する必要があります。
TWAMP クライアントを設定するには、次の手順に従います。
-
クライアントデバイスのホスト名をR1として設定します。
[edit system] user@R1# set host-name R1
-
デバイスR1インターフェイスを設定します。
[edit interfaces] user@R1# set ge-0/0/0 unit 0 description "To Server R2" user@R1# set ge-0/0/0 unit 0 family inet address 10.0.12.1/24 user@R1# set lo0 unit 0 family inet address 192.168.0.1/32
-
トラフィックフローとシステムサービスをデバイスR1で実行できるようにし、デフォルトでそうでない場合はドロップされます。
[edit security zones] user@R1# set security-zone trust host-inbound-traffic system-services all user@R1# set security-zone trust host-inbound-traffic protocols all user@R1# set security-zone trust interfaces ge-0/0/0.0
-
デバイスR1からデバイスR2への制御セッションを設定します。
[edit services] user@R1# set rpm twamp client control-connection c1 target-address 10.0.12.2
-
プローブ結果を収集するために、デバイスR1からデバイスR2へのテストセッションを設定します。
[edit services] user@R1# set rpm twamp client control-connection c1 test-session t1 target-address 10.0.12.2 user@R1# set rpm twamp client control-connection c1 test-session t1 probe-count 2000
結果
デバイスR1の設定モードから、 show | no-more コマンドを入力して設定を確認します。出力に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
[edit]
user@R1# show | no-more
system {
host-name R1;
}
services {
rpm {
twamp {
client {
control-connection c1 {
target-address 10.0.12.2;
test-session t1 {
target-address 10.0.12.2;
probe-count 2000;
}
}
}
}
}
}
security {
policies {
default-policy {
permit-all;
}
}
zones {
security-zone trust {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
interfaces {
ge-0/0/0.0;
}
}
}
}
interfaces {
ge-0/0/0 {
unit 0 {
description "To Server R2";
family inet {
address 10.0.12.1/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.1/32;
}
}
}
}
SRXシリーズファイアウォール用のTWAMPサーバーの設定
CLIクイックコンフィグレーション
この例を迅速に設定するには、以下のコマンドをコピーしてテキストファイルに貼り付け、改行を削除し、ネットワーク設定に一致させる必要がある詳細情報を変更し、コマンドを [edit] 階層レベルでCLIにコピーアンドペーストして、設定モードから commit を入力します。
set system host-name R2 set services rpm twamp server authentication-mode none set services rpm twamp server client-list client1 address 10.0.12.1/24 set security policies default-policy permit-all set security zones security-zone trust host-inbound-traffic system-services all set security zones security-zone trust host-inbound-traffic protocols all set security zones security-zone trust interfaces ge-0/0/0.0 set interfaces ge-0/0/0 unit 0 description "To Client R1" set interfaces ge-0/0/0 unit 0 family inet address 10.0.12.2/24 set interfaces lo0 unit 0 family inet address 192.168.0.2/32
ステップバイステップの手順
次の例では、設定階層のさまざまなレベルに移動する必要があります。
TWAMPサーバーを設定するには:
-
サーバーデバイスホスト名をR2として設定します。
[edit system] user@R2# set host-name R2
-
デバイスR2インターフェイスを設定します。
[edit interfaces] user@R2# set ge-0/0/0 unit 0 description "To Client R1" user@R2# set ge-0/0/0 unit 0 family inet address 10.0.12.2/24 user@R2# set lo0 unit 0 family inet address 192.168.0.2/32
-
トラフィックフローとシステムサービスをデバイスR2で実行できるようにし、デフォルトでそうでない場合はドロップされます。
[edit security zones] user@R2# set security-zone trust host-inbound-traffic system-services all user@R2# set security-zone trust host-inbound-traffic protocols all user@R2# set security-zone trust interfaces ge-0/0/0.0
-
デバイスR2でデバイスR1と接続するようにクライアント属性を設定します。
[edit services] user@R2# set rpm twamp server authentication-mode none user@R2# set rpm twamp server client-list client1 address 10.0.12.1/24
結果
R2の設定モードから、 show | no-more コマンドを入力して設定を確認します。出力に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
[edit]
user@R2# show | no-more
system {
host-name R2;
}
services {
rpm {
twamp {
server {
authentication-mode none;
client-list client1 {
address {
10.0.12.1/24;
}
}
}
}
}
}
security {
policies {
default-policy {
permit-all;
}
}
zones {
security-zone trust {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
interfaces {
ge-0/0/0.0;
}
}
}
}
interfaces {
ge-0/0/0 {
unit 0 {
description "To Client R1";
family inet {
address 10.0.12.2/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.2/32;
}
}
}
}
検証
設定が正常に機能していることを確認します。
TWAMP クライアント セッションの検証
目的
デバイスR1でTWAMPクライアントセッションが確立されていることを確認します。
アクション
動作モードから、 show services rpm twamp client session コマンドを入力します。
user@R1>show services rpm twamp client session Connection Session Sender Sender Reflector Reflector Name Name address port address port c1 t1 10.0.12.1 10010 10.0.12.2 10010
意味
デバイスR1に設定された制御およびテストセッション(それぞれc1およびt1)が確立されます。
TWAMP サーバー セッションの検証
目的
デバイスR2でTWAMPサーバーセッションが確立されていることを確認します。
アクション
動作モードから、 show services rpm twamp server session コマンドを入力します。
user@R2>show services rpm twamp server session
Session Connection Sender Sender Reflector Reflector Session Auth
ID ID address port address port state mode
11 2 10.0.12.1 10010 10.0.12.2 10010 Active Unauthenticated
意味
デバイスR2でのサーバーセッションは、送信者デバイスR1とリフレクタとしてデバイスR2でアクティブです。
テストセッション結果の確認
目的
デバイスR1でTWAMPテストセッションを確認します。
アクション
動作モードから、 show services rpm twamp client probe-results コマンドを入力します。
user@R1> show services rpm twamp client probe-results
Owner: c1, Test: t1
server-address: 10.0.12.2, server-port: 862, Client address: 10.0.12.1, Client port: 60732
TWAMP-Server-Status: Connected, Number-Of-Retries-With-TWAMP-Server: 38
Reflector address: 10.0.12.2, Reflector port: 10011, Sender address: 10.0.12.1, sender-port: 10011
Test size: 2000 probes
Probe results:
Response received
Probe sent time: Fri Nov 25 03:18:34 2022
Probe rcvd/timeout time: Fri Nov 25 03:18:34 2022
Rtt: 718 usec, Ingress time: 134 usec, Egress time: 584 usec, Egress jitter: 48 usec, Ingress jitter: 15 usec,
Round trip jitter: 63 usec
Egress interarrival jitter: 58 usec, Ingress interarrival jitter: 40 usec, Round trip interarrival jitter: 80 usec
...(output truncated for brevity)...
意味
TWAMPテストセッションのプローブ結果が生成されます。これは、クライアントサーバー接続が正常に確立されていることを示します。