request packet-capture start
구문
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
>
설명
운영 모드에서 패킷 정보를 캡처합니다. 구성을 커밋하지 않고도 운영 시스템에 미치는 영향을 최소화하면서 운영 모드에서 패킷 캡처를 실행할 수 있습니다. 요구 사항에 따라 트래픽 유형을 추적하도록 패킷 필터를 정의할 수 있습니다.
한 번에 하나의 패킷 캡처만 요청할 수 있으며, 다른 패킷 캡처 요청을 제공하기 전에 각 패킷 캡처 요청을 중지해야 합니다. 각 패킷 캡처 요청에 대해 출력을 보려면 해당 show 명령을 제공해야 합니다.
섀시 클러스터 모드에서는 기본 노드에서 운영 모드 패킷 캡처를 요청해야 합니다. 운영 모드 패킷 캡처는 보조 노드에서 실행될 때 작동하지 않습니다.
옵션
bidirectional | 양방향 정보를 수집할 수 있습니다. |
capture-file | 캡처 파일의 이름입니다. 접미사 '.pcap'을 추가하여 Wireshark를 지원할 수 있는 pcap 파일을 생성합니다. |
count | 캡처할 패킷 수입니다.
|
destination-port | TCP/UDP 대상 포트. |
destination-prefix | 패킷을 필터링하기 위한 대상 IPv4/IPv6 주소 접두사입니다. |
interface | 논리적 인터페이스의 이름입니다. |
maximum-capture-size | 패킷 캡처의 최대 크기입니다. 캡처 크기가 지정된 캡처 크기보다 크면 패킷이 잘립니다.
|
protocol-number | 숫자 프로토콜 값입니다.
|
size | 패킷 캡처 파일의 최대 크기입니다.
|
source-port | TCP/UDP 소스 포트. |
source-prefix | 패킷을 필터링하기 위한 소스 IPv4/IPv6 주소 접두사입니다. |
필요한 권한 수준
보기
출력 필드
표 1 에는 명령의 출력 필드가 나열되어 있습니다 request packet-capture start
. 출력 필드는 나타나는 대략적인 순서대로 나열됩니다.
필드 이름 |
필드 설명 |
---|---|
|
패킷 캡처 세션 상태:
|
|
캡처된 패킷 수입니다. |
|
패킷 캡처 파일의 이름, 위치, 크기 및 캡처 길이. |
|
구성된 필터 유형에 해당하는 10진수 값입니다. 이 값을 다음과 같은 2진수 또는 16진수 형식으로 변환합니다.
예를 들어 플래그 값이 72 = 0x48
즉, 필터가 유효하며 필터 소스 포트로만 구성됩니다. |
|
소스 IPv4/IPv6 주소입니다. |
|
대상 IPv4/IPv6 주소입니다. |
|
논리적 인터페이스의 이름입니다. |
|
양방향 키워드 구성의 상태:
|
|
숫자 프로토콜 값입니다. |
|
캡처 파일 수입니다. |
|
최대 패킷 캡처 크기입니다. |
|
인터페이스의 인덱스 값인 경우. |
샘플 출력
- 프로토콜, 대상 포트, 대상 접두사 및 양방향 옵션을 사용한 패킷 캡처
- 인터페이스를 사용한 패킷 캡처
- 소스 접두사를 사용한 패킷 캡처
- 소스 포트를 사용한 패킷 캡처
- 프로토콜을 사용한 패킷 캡처
프로토콜, 대상 포트, 대상 접두사 및 양방향 옵션을 사용한 패킷 캡처
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
인터페이스를 사용한 패킷 캡처
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
소스 접두사를 사용한 패킷 캡처
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
소스 포트를 사용한 패킷 캡처
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
프로토콜을 사용한 패킷 캡처
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
릴리스 정보
Junos OS 릴리스 19.3R1에 소개된 명령문.