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
운영 모드에서 패킷 정보를 캡처합니다. 운영 모드에서 패킷 캡처를 실행하여 구성을 커밋하지 않고도 프로덕션 시스템에 미치는 영향을 최소화할 수 있습니다. 요구 사항에 따라 트래픽 유형을 추적하기 위해 패킷 필터를 정의할 수 있습니다.
한 번의 패킷 캡처만 요청하면 다른 패킷 캡처 요청을 제공하려면 각 패킷 캡처 요청을 중단해야 합니다. 각 패킷 캡처 요청의 경우 출력을 보기 위해 해당 show 명령을 제공해야 합니다.
섀시 클러스터 모드에서는 기본 노드에서 운영 모드 패킷 캡처를 요청해야 합니다. 운영 모드 패킷 캡처는 보조 노드에서 실행될 때 작동하지 않습니다.
Options
양방향 | 양방향 정보를 수집할 수 있습니다. |
캡처 파일 | 캡처 파일의 이름. 이 네트워크는 접두사 '.pcap'을 추가하여 Wireshark을 지원할 수 있는 pcap 파일을 생성합니다. |
횟수 | 캡처할 패킷 수입니다.
|
대상-포트 | TCP/UDP 대상 포트. |
대상-Prefix | 대상 IPv4/IPv6 주소 패킷 필터링 프리픽스 |
인터페이스 | 논리적 인터페이스의 이름. |
최대 캡처 크기 | 최대 패킷 캡처 크기입니다. 캡처 크기가 지정된 캡처 크기보다 큰 경우 패킷이 통과합니다.
|
프로토콜 번호 | 숫자 프로토콜의 가치.
|
크기 | 최대 패킷 캡처 파일 크기입니다.
|
소스 포트 | TCP/UDP 소스 포트. |
소스-프리픽스 | 패킷을 필터링하기 위해 IPv4/IPv6 주소 프리픽스를 소스로 제공합니다. |
Required Privilege Level
보기
Output Fields
표 1 명령의 출력 필드를 request packet-capture start
나열합니다. 출력 필드는 대략적인 순서로 나열되어 있습니다.
필드 이름 |
필드 설명 |
---|---|
|
패킷 캡처 세션 상태:
|
|
캡처된 패킷 수입니다. |
|
패킷 캡처 파일의 이름, 위치, 크기 및 캡처 길이 |
|
구성된 필터 유형에 해당하는 소수(decimal) 값. 이 값을 바이너리 또는 원치(hexadecimal) 형식으로 변환합니다.
예를 들어 플래그 값이 바이너리 또는 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 Release 19.3R1.