Protocol Numbers, EtherTypes & Flags

IP protocol numbers, Ethernet EtherTypes, ICMP types and TCP flags in one searchable place - the values that appear in ACLs and packet captures.

Reference Protocol Reference Runs in your browser
Try:

Result

IP protocol numbers

NumberProtocolNotes
1ICMPInternet Control Message Protocol - ping, unreachables, PMTUD.
2IGMPMulticast group management.
4IPv4IPv4 encapsulation (IP-in-IP).
6TCPTransmission Control Protocol.
17UDPUser Datagram Protocol.
41IPv6IPv6 encapsulation - 6in4 tunnels.
46RSVPResource Reservation Protocol, used by MPLS TE.
47GREGeneric Routing Encapsulation.
50ESPIPsec Encapsulating Security Payload - must be permitted for IPsec.
51AHIPsec Authentication Header - breaks through NAT.
58ICMPv6Essential for IPv6: never block it wholesale.
88EIGRPCisco EIGRP.
89OSPFOSPFv2 and OSPFv3.
103PIMProtocol Independent Multicast.
112VRRPVirtual Router Redundancy Protocol (also CARP).
115L2TPLayer 2 Tunnelling Protocol.
132SCTPStream Control Transmission Protocol - used in mobile core networks.
137MPLS-in-IPMPLS encapsulated in IP.

EtherTypes

EtherTypeProtocol
0x0800IPv4
0x0806ARP
0x8035RARP
0x8100802.1Q VLAN tag
0x86DDIPv6
0x8808Ethernet flow control (PAUSE)
0x8809LACP / slow protocols
0x8847MPLS unicast
0x8848MPLS multicast
0x8863PPPoE discovery
0x8864PPPoE session
0x88A8802.1ad QinQ
0x88CCLLDP
0x88E5MACsec
0x8892PROFINET
0x88F7PTP (IEEE 1588)

ICMP types (IPv4)

TypeMessageNotes
0Echo ReplyPing response.
3Destination UnreachableCode 4 is "fragmentation needed" - blocking it breaks PMTUD.
5RedirectBetter first hop available. Usually disabled.
8Echo RequestPing.
11Time ExceededTTL hit zero - this is what makes traceroute work.
12Parameter ProblemMalformed header.
13/14TimestampLegacy; often blocked as an information leak.

TCP flags

FlagBitMeaning
SYN0x02Start a connection.
ACK0x10Acknowledges data. Set on everything after the first packet.
FIN0x01Graceful close.
RST0x04Abrupt reset - refused connection or a stale session.
PSH0x08Deliver to the application immediately.
URG0x20Urgent pointer valid. Effectively obsolete.
ECE/CWR0x40/0x80Explicit Congestion Notification signalling.
Protocols without ports
Permitting only TCP and UDP is the classic mistake that breaks IPsec and GRE. ESP is protocol 50, AH is 51 and GRE is 47 - none of them have ports, so a port-based rule cannot match them.

About Protocol Numbers, EtherTypes & Flags

Protocol numbers identify what sits inside an IP packet; EtherTypes identify what sits inside an Ethernet frame. Both appear in ACLs, packet captures and firewall rules, and neither is memorable.

How the fields nest

An Ethernet frame declares its payload with a 16-bit EtherType: 0x0800 for IPv4, 0x86DD for IPv6, 0x8100 for a VLAN tag. When a VLAN tag is present the real EtherType sits four bytes further in, which is why a capture filter written for untagged traffic silently misses tagged frames. Inside the IP header, the 8-bit protocol field names the next layer: 6 for TCP, 17 for UDP, 47 for GRE. IPv6 replaces it with a Next Header chain, so extension headers must be walked before the transport header is reached — a detail that breaks naive hardware ACLs.

Never block ICMPv6

IPv4 tolerates aggressive ICMP filtering, badly. IPv6 does not: neighbour discovery, router advertisement and PMTUD all run over ICMPv6, so blocking protocol 58 breaks address resolution itself. RFC 4890 sets out what may safely be filtered - the answer is much less than people assume.

Common use cases

  • Writing a firewall rule that permits a GRE or IPsec tunnel.
  • Decoding an EtherType from a packet capture.
  • Explaining why blocking ICMP type 3 code 4 causes intermittent hangs.

Edge cases and gotchas

  • ICMP type 3 code 4 carries path MTU information - filtering it creates black holes.
  • EtherType 0x8100 indicates a VLAN tag, so the real payload type is four bytes further in.

Frequently asked questions

Why does my ACL block GRE or IPsec even though I permitted TCP and UDP?
GRE (47), ESP (50) and AH (51) are separate IP protocols with no port numbers at all, so a rule matching TCP or UDP ports cannot match them. Permit the protocol number explicitly.
What protocol number does IPsec use?
ESP is 50 and AH is 51, plus UDP 500 for IKE and UDP 4500 for NAT traversal. A rule permitting only UDP 500 will not pass traffic.