Skip to content

🖥️ A simple GUI for exploring the data in Windows Host Network Service

License

Notifications You must be signed in to change notification settings

ShaunLawrie/HnsExplorer

Repository files navigation

HNS Explorer

A simple GUI for exploring the data in the Windows Host Network Service.

The Host Network Service is the system underpinning container networking on Windows:
https://docs.microsoft.com/en-us/virtualization/windowscontainers/container-networking/architecture

This was created while I've been learning more about the HNS and how to debug container networking issues on Windows Kubernetes nodes.

How To Use

Search

Entering something like a container ID in the text entry field and hitting enter will do a primitive search for all HNS activities that reference it. image

Dump to JSON

The "Dump to JSON" button will dump all the data collected by the tool to a massive JSON file.

Packet Capture

Packet capture for these virtual adaptors can be done with the pktmon tool https://docs.microsoft.com/en-us/windows-server/networking/technologies/pktmon/pktmon
The "Packet Capture" button just sets up a basic capture using pktmon and converts the output to something that can be opened in Wireshark.
image

Windows Performance Recorder Trace

Launch a WPR trace using a cut down version of the trace format at https://github.com/MicrosoftDocs/Virtualization-Documentation/blob/main/windows-server-container-tools/wpr-profiles/HcsTraceProfile.wprp
image image image

Reload HNS Data

The "Reload HNS Data" button will reload the data from the HNS/HCS apis.

Build Instructions

To build install the dotnet 6 SDK https://dotnet.microsoft.com/en-us/download/dotnet/6.0

This will generate a single exe output

dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true --self-contained