pktmon
pktmon
Run PowerShell or Command Prompt as Administrator.
Basic capture
| |
Reproduce the network issue, then:
| |
Convert the capture for Wireshark:
| |
Or convert it to readable text:
| |
Capture a specific IP address
| |
After reproducing the issue:
| |
Capture a TCP port
For HTTPS:
| |
You can combine IP and port:
| |
Real-time display
On newer builds:
| |
Stop it with Ctrl+C or:
| |
Useful diagnostic commands:
| |
–pkt-size 0 captures complete packets and may expose credentials or application data, so protect and delete captures appropriately. Without it, packets may be truncated. Full command reference: pktmon command documentation (https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/pktmon).
Example packet capture for Radius trubleshooting:
Run pktmon as Administrator on the remote gateway server, filtering UDP traffic to the NPS IP and RADIUS authentication port.
Replace 10.53.252.65 with the NPS server IP:
New-Item -ItemType Directory -Path C:\Temp -Force
| |
pktmon filter list
Start the capture:
| |
Trigger an authentication attempt through the gateway, then stop:
pktmon stop
Convert it for Wireshark:
| |
Open radius-gateway.pcapng in Wireshark and use:
radius
or:
udp.port == 1812
Capture accounting traffic too
RADIUS accounting normally uses UDP 1813. Each port needs a separate filter:
| |
Legacy configurations may use UDP 1645 for authentication and 1646 for accounting. Confirm the configured ports in NPS properties. NPS UDP port documentation (https://learn.microsoft.com/en-us/windows-server/networking/technologies/nps/nps-udp-ports-configure)