What are ‘protocol numbers’ in IP?
When the kernel receives IP packets, how does it know what they represent? Are they part of a TCP stream, a UDP datagram, or something else?
The answer is that all IP packets contain an IP protocol number. It’s the ninth byte in the packet. Each protocol running over IP has its own number. TCP is number
6; UDP is number
You can see them all at
/etc/protocols on your machine! The official list is maintained by IANA (Internet Assigned Numbers Authority, part of ICANN) here: http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
More by Jim
- Project C-43: the lost origins of asymmetric crypto
- How Hacker News stays interesting
- My parents are Flat-Earthers
- The dots do matter: how to scam a Gmail user
- The sorry state of OpenSSL usability
- I hate telephones
- The Three Ts of Time, Thought and Typing: measuring cost on the web
- Granddad died today
- Your syntax highlighter is wrong
I wrote this because I felt like it. This post is not associated with my employer. Found an error? Edit this page.