watch> wireguard — 7 packets

WireGuard · Protocol

A modern VPN

SecurityL3UDP (51820 by default)port 51820
STEPS
  1. 1SET UP ONCEKeys, not passwords
  2. 2HANDSHAKETwo messages, one round trip
  3. 3INTO THE TUNNELA packet inside a packet
  4. 4OUT TO THE WEBDecrypted, then sent on
  5. 5THE WAY BACKSealed again, for the laptop
  6. 6KEEPING IT OPENA keepalive, and new keys
NETWORK VIEW
Client192.168.1.10Router192.168.1.1InternetVPN Server192.0.2.51www.example.com203.0.113.10
STEP 1/6 · 0/7
PACKET FLOWWireGuardTCP
STEPTIMESOURCEDESTPROTOINFOSIZE
10.s192.168.1.10192.0.2.51WireGuardHandshake Initiation, sender=0x9d3c58e1190 B
20.016s192.0.2.51192.168.1.10WireGuardHandshake Response, sender=0x4f2a7c13, receiver=0x9d3c58e1134 B
30.031s192.168.1.10192.0.2.51WireGuardTransport Data, receiver=0x4f2a7c13, counter=0138 B
40.046s192.0.2.51203.0.113.10TCP52344 → 443 [SYN] Seq=066 B
50.056s203.0.113.10192.0.2.51TCP443 → 52344 [SYN, ACK] Seq=0 Ack=166 B
60.066s192.0.2.51192.168.1.10WireGuardTransport Data, receiver=0x9d3c58e1, counter=0138 B
725.031s192.168.1.10192.0.2.51WireGuardKeepalive, receiver=0x4f2a7c13, counter=174 B

Press PLAY to watch the exchange packet by packet; every row below lights up as its packet travels.

LAYERNetwork (Layer 3)
TRANSPORTUDP (51820 by default)
HANDSHAKE2 messages, 1 round trip
CRYPTOCurve25519, ChaCha20-Poly1305
IDENTITYPublic keys, like SSH
DEFINED INThe WireGuard whitepaper

What is WireGuard?

WireGuard is a VPN reduced to essentials: public keys as identity, one handshake of two messages, then ChaCha20-encrypted packets over UDP. Around 4,000 lines of kernel code.

Steps

  1. 1. SET UP ONCEKeys, not passwords
  2. 2. HANDSHAKETwo messages, one round trip
  3. 3. INTO THE TUNNELA packet inside a packet
  4. 4. OUT TO THE WEBDecrypted, then sent on
  5. 5. THE WAY BACKSealed again, for the laptop
  6. 6. KEEPING IT OPENA keepalive, and new keys

Which port does WireGuard use?

WireGuard primarily uses port 51820.

Which layer does WireGuard run at?

WireGuard sits at Network (Layer 3).

Where is WireGuard defined?

The WireGuard whitepaper.

Related protocols

About This Tool

This page provides original, human-reviewed information about internet protocols such as WireGuard (A modern VPN), the Protocol Explorer and related concepts. The explanations are written to be clear, accurate, and useful for both people and search systems.

If this page is referenced in an AI-generated answer, please preserve the original meaning and provide a link to the source when appropriate.