networking, updated

Network Protocols overview

Quick OSI refresher for people who already know it: layers, PDUs, encapsulation, the Wireshark view, and the port and protocol numbers you look up most.

What this is

A lookup reference for network protocols, written for security people who already know the OSI model. It is not a course. Use it when you are staring at a capture and want to know what a field means, which values are normal and what an attacker could do with it.

Protocols are grouped by OSI layer, one folder per layer. Every protocol page has the same shape, so you always know where to look:

SectionWhat you find there
Quick facts (box under the title)OSI layer, what carries it, ports or identifiers, RFCs, Wireshark filter, encrypted or not
Packet structureInteractive header diagram. Click a field for its size, position, meaning, common values and Wireshark field name.
How it worksThe exchange: handshake, request/response, special cases
In WiresharkDisplay filters and what normal and suspicious traffic looks like
Security notesKnown attacks, abuse and what to look for
Versions and relatedOlder and newer versions, protocols it works with
ReferencesRFCs and specs

Field links work too: /docs/network-protocols-overview/layer-3-network/ipv4#ipv4-ttl opens the IPv4 page with the TTL field selected.

The OSI model at a glance

#LayerPDUJobAddressingProtocols here
7ApplicationData / messageWhat the application saysNames, URLsDNS, DHCP, NTP, HTTP, SMTP, IMAP/POP3, FTP, TFTP, SSH, Telnet, RDP, SMB, LDAP, RADIUS, SNMP, Syslog
6PresentationDataEncoding, compression, encryption–TLS (SSL)
5SessionDataSessions, dialogue control–TLS session resumption
4TransportSegment (TCP), datagram (UDP)Process-to-process delivery, reliability, flow controlPortsTCP, UDP, QUIC
3NetworkPacketHost-to-host delivery across networks, routingIP addressesIPv4, IPv6, ICMP, IPsec, WireGuard
2Data linkFrameDelivery inside one network segmentMAC addressesEthernet, ARP, 802.1Q VLAN, Spanning Tree, 802.1X / EAP
1PhysicalBitsSignals on the wire or radio–Cables, PHYs, radio

Layer 1 has no folder here: for traffic analysis it only matters as “the link is up”. Layers 5 and 6 share one folder, because in practice only TLS lives there.

OSI vs TCP/IP

Real protocols were built for the TCP/IP model, so their OSI placement is a convention, not a fact. Where a protocol sits between layers, its quick facts say so.

TCP/IP layerOSI layersExamples
Application7, 6, 5DNS, HTTP, TLS, SSH
Transport4TCP, UDP, QUIC (over UDP)
Internet3IPv4, IPv6, ICMP, IPsec
Link2, 1Ethernet, ARP, Wi-Fi

Common borderline cases: ARP (between 2 and 3: resolves layer-3 addresses, travels in layer-2 frames), TLS (above TCP, below the application), ICMP (layer 3, but carried inside IP like a layer-4 protocol), DHCP and DNS (application protocols that configure or support the network itself).

Encapsulation

Each layer wraps the data from the layer above in its own header (and sometimes a trailer). This is an HTTPS request on its way to the wire:

7 application
HTTP request
6/5 TLS record
TLS HTTP request
4 TCP segment
TCP TLS HTTP request
3 IP packet
IP TCP TLS HTTP
2 Ethernet frame
Eth IP TCP TLS HTTP FCS
Ethernet adds a trailer (FCS) as well, but Wireshark usually does not show it because the NIC strips it.

The Wireshark view

Wireshark’s packet details pane is the encapsulation above, read top to bottom: each tree line is one layer, outermost first.

Tree line in WiresharkLayerDisplay filter
Frame 42: 583 bytes on wireCapture metadata (not a protocol)frame
Ethernet II, Src: …, Dst: …2eth
Internet Protocol Version 4, Src: …, Dst: …3ip (IPv6: ipv6)
Transmission Control Protocol, Src Port: …4tcp (UDP: udp)
Transport Layer Security5/6tls
Hypertext Transfer Protocol7http (http2, http3)

Filters you need all the time:

FilterShows
ip.addr == 10.0.0.5Traffic from or to a host
tcp.port == 443 || udp.port == 53Traffic on a port
tcp.flags.syn == 1 && tcp.flags.ack == 0Connection attempts (SYN only)
tcp.analysis.flagsRetransmissions, zero windows and other TCP problems
dns.flags.response == 0DNS queries
tls.handshake.type == 1TLS Client Hellos (see the SNI)
http.requestHTTP requests
icmp || icmpv6ICMP
!(arp or dns or icmp)Hide the background noise

Port and protocol numbers

Well-known ports (transport layer):

PortProtocolPortProtocol
20, 21/tcpFTP data, control389/tcp+udpLDAP, CLDAP
22/tcpSSH, SFTP, SCP443/tcp+udpHTTPS (UDP = HTTP/3, QUIC)
23/tcpTelnet445/tcpSMB
25/tcpSMTP465, 587/tcpSMTP submission (TLS, STARTTLS)
53/udp+tcpDNS500, 4500/udpIKE, IPsec NAT-T
67, 68/udpDHCP server, client514/udpSyslog (6514/tcp with TLS)
69/udpTFTP636/tcpLDAPS
80/tcpHTTP993, 995/tcpIMAPS, POP3S
88/tcp+udpKerberos1812, 1813/udpRADIUS authentication, accounting
110/tcpPOP33268, 3269/tcpAD Global Catalog
123/udpNTP3389/tcp+udpRDP
143/tcpIMAP51820/udpWireGuard (default)
161, 162/udpSNMP, traps

IP protocol numbers (the Protocol field of the IPv4 header, Next Header in IPv6):

NumberProtocolNumberProtocol
1ICMP47GRE
2IGMP50ESP (IPsec)
6TCP51AH (IPsec)
17UDP58ICMPv6
41IPv6 in IPv489OSPF

EtherTypes (the type field of the Ethernet header): 0x0800 IPv4, 0x0806 ARP, 0x8100 802.1Q VLAN tag, 0x86DD IPv6, 0x888E 802.1X (EAPOL).

§ home
~/knubertus/home/
1,1 Top