IP Protocol Numbers Reference β€” TCP, UDP, ICMP, GRE, ESP, OSPF

The numbers inside an IP packet's header that identify which higher-layer protocol it's carrying.

ICMP (1)

Used to exchange status and error messages like ping replies or 'destination unreachable' notices. It's for checking network status, not for carrying application data.

IGMP (2)

Manages which devices belong to which group in multicast communication, where one sender delivers data to many receivers at once. Commonly used for IPTV-style delivery.

TCP (6)

A reliable protocol that confirms data arrives in order and without loss. Most services where loss is unacceptable β€” web browsing, email, file transfer β€” run on TCP.

UDP (17)

Sends data quickly with no delivery confirmation step. Used where speed matters more than occasional loss β€” online gaming, real-time video calls, DNS lookups.

GRE (47)

A tunneling protocol that encapsulates one network packet inside another. Commonly used to virtually connect private networks in different locations.

ESP (50)

Used in IPsec VPNs to encrypt the actual data being transmitted, making intercepted traffic unreadable to anyone without the key.

AH (51)

Used in IPsec VPNs to verify that data hasn't been tampered with in transit. It handles integrity verification only, without encrypting the content.

OSPF (89)

A routing protocol routers within a single organization use to exchange information about the best paths between them. Widely used inside enterprise and carrier internal networks.

ICMPv6 (58)

Performs ICMP's role on IPv6 networks, with an expanded scope that also handles neighbor discovery β€” finding the addresses of nearby devices.

Not the same thing as a port number

The protocol numbers covered here live inside the IP header and identify which protocol β€” TCP, UDP, ICMP β€” is being used. A port number is a separate value that lives inside TCP or UDP itself and identifies which service the traffic is meant for.

Useful for reading firewall rules

Firewall and router configuration screens often show a 'Protocol: TCP/UDP/ICMP/ALL' option, and these are exactly the numbers behind that choice. When troubleshooting a VPN connection, checking that ESP (50) and AH (51) aren't blocked by a firewall is a common diagnostic step.

Frequently Asked Questions

Who assigns IP protocol numbers?

The Internet Assigned Numbers Authority (IANA) officially manages and assigns them, ensuring every network device worldwide uses the same numbering scheme so they can all understand each other.

Why are ESP and AH always mentioned together?

Both are protocols used to build an IPsec VPN β€” ESP handles encrypting the data, AH handles verifying it hasn't been altered, and they're sometimes used together depending on the setup.