request packet-capture start
Syntax
request packet-capture start
<bidirectional bidirectional
> <capture-file capture-file
> <count count
> <destination-port destination-port
> <destination-prefix destination-prefix
> <interface interface
> <maximum-capture-size maximum-capture-size
> <protocol protocol-number
> <size size
> <source-port source-port
> <source-prefix source-prefix
>
Description
動作モードからパケット情報をキャプチャします。設定をコミットすることなく、実稼働システムへの影響を最小限に抑えながら、動作モードからパケット キャプチャを実行できます。要件に基づいてトラフィックのタイプをトレースするパケット フィルタを定義できます。
一度に要求できるパケット キャプチャは 1 つだけです。また、別のパケット キャプチャ要求を出す前に各パケット キャプチャ要求を停止する必要があります。各パケット キャプチャ要求に対して、出力を表示するには、それぞれの show コマンドを指定する必要があります。
シャーシ クラスタ モードでは、プライマリ ノードから動作モード パケット キャプチャを要求する必要があります。セカンダリ ノードから実行した場合、動作モードパケット キャプチャは機能しません。
Options
双 方向 | 双方向の情報を収集できます。 |
キャプチャファイル | キャプチャ ファイルの名前。サフィックス '.pcap' を追加することで Wireshark をサポートできる pcap ファイルを生成します。 |
カウント | キャプチャするパケット数。
|
宛先ポート | TCP/UDP 宛先ポート。 |
宛先プレフィックス | パケットをフィルタリングする宛先 IPv4/IPv6 アドレス プレフィックス。 |
インターフェイス | 論理インターフェイスの名前。 |
最大キャプチャサイズ | パケット キャプチャの最大サイズ。キャプチャ サイズが指定されたキャプチャ サイズを超える場合、パケットは切り捨てられます。
|
プロトコル番号 | 数値プロトコル値。
|
サイズ | パケット キャプチャ ファイルの最大サイズ。
|
送信元ポート | TCP/UDP 送信元ポート。 |
送信元プレフィックス | パケットをフィルタリングする IPv4/IPv6 アドレス プレフィックスの送信元。 |
Required Privilege Level
ビュー
Output Fields
表 1 は、コマンドの出力フィールドを request packet-capture start
リストします。出力フィールドは、表示される概算順にリストされます。
フィールド名 |
フィールドの説明 |
---|---|
|
パケット キャプチャ セッションのステータス:
|
|
キャプチャされたパケット数。 |
|
パケット キャプチャ ファイルの名前、場所、サイズ、キャプチャの長さ。 |
|
設定されたフィルターのタイプに対応する 10 進数の値。この値をバイナリ形式または 16 進形式に変換します。
たとえば、フラグ値がバイナリ 72 = 0x48
これは、フィルタが有効で、フィルタ 送信元ポートでのみ設定されていることを意味します。 |
|
ソース IPv4/IPv6 アドレス。 |
|
宛先 IPv4/IPv6 アドレス。 |
|
論理インターフェイスの名前。 |
|
双方向キーワード設定のステータス:
|
|
数値プロトコル値。 |
|
キャプチャ ファイルの数。 |
|
最大パケット キャプチャ サイズ。 |
|
インターフェイスのインデックス値。 |
Sample Output
- Packet capture using protocol, destination port, destination prefix, and bidirectional options
- Packet capture using interface
- Packet capture using source prefix
- Packet capture using source port
- Packet capture using protocol
Packet capture using protocol, destination port, destination prefix, and bidirectional options
root@host> request packet-capture start protocol 17 destination-port 53 destination-prefix 203.0.113.0 bidirectional {primary:node1} root@host> show packet-capture status packet capture is running: 1 counter of packet capture: 100 packet capture capture-file name: /var/log/packet-capture.pcap size: 52428800 rotate: 0 snap_len: 1514 bidirectional: 1 Flag: 86 Protocol: udp Source: 0.0.0.0 0.0.0.0 (port 0~65535) Destination: 203.0.113.0 255.255.255.255 (port 53~53) Interface: None ifl: 0 Flag: 77 Protocol: udp Source: 203.0.113.0 255.255.255.255 (port 53~53) Destination: 0.0.0.0 0.0.0.0 (port 0~65535) Interface: None ifl: 0
Packet capture using interface
user@host> request packet-capture start capture-file cli-e2e interface xe-1/0/2.0 user@host> show packet-capture status packet capture is running: 1 counter of packet capture: 100 packet capture capture-file name: /var/log/cli-e2e.pcap size: 52428800 rotate: 0 snap_len: 1514 bidirectional: 0 Flag: 2112 Source: 0.0.0.0 0.0.0.0 (port 0~65535) Destination: 0.0.0.0 0.0.0.0 (port 0~65535) Interface: xe-1/0/2.0 ifl: 68
Packet capture using source prefix
user@host> request packet-capture start capture-file cli-e2e source-prefix 192.0.2.0 user@host> show packet-capture status packet capture is running: 1 counter of packet capture: 100 packet capture capture-file name: /var/log/cli-e2e.pcap size: 52428800 rotate: 0 snap_len: 1514 bidirectional: 0 Flag: 65 Source: 192.0.2.0.2 255.255.255.255 (port 0~65535) Destination: 0.0.0.0 0.0.0.0 (port 0~65535) Interface: None ifl: 0
Packet capture using source port
user@host> request packet-capture start capture-file cli-e2e count 100 source-port telnet user@host> show packet-capture status packet capture is running: 1 counter of packet capture: 100 packet capture capture-file name: /var/log/cli-e2e.pcap size: 52428800 rotate: 0 snap_len: 1514 bidirectional: 0 Flag: 72 Source: 0.0.0.0 0.0.0.0 (port 23~23) Destination: 0.0.0.0 0.0.0.0 (port 0~65535) Interface: None ifl: 0
Packet capture using protocol
user@host> request packet-capture start protocol 6 user@host> show packet-capture status packet capture is running: 1 counter of packet capture: 100 packet capture capture-file name: /var/log/packet-capture.pcap size: 52428800 rotate: 0 snap_len: 1514 bidirectional: 0 Flag: 68 Protocol: tcp Source: 0.0.0.0 0.0.0.0 (port 0~65535) Destination: 0.0.0.0 0.0.0.0 (port 0~65535) Interface: None ifl: 0
Release Information
Junos OS リリース 19.3R1 で導入されたステートメント。