RFC 1122: Requirements for internet hosts
Summary
In October 1989, RFC 1122, edited by Robert Braden, brought together the mandatory requirements for internet hosts, from the link layer through IP and ICMP up to TCP and UDP. The document corrects gaps and ambiguities in the individual standards and uses MUST, SHOULD and MAY to define what an implementation really has to do. Together with RFC 1123 for application protocols, it became the yardstick against which network stacks were measured for decades.
A specification sheet for network stacks
In the late 1980s many TCP/IP implementations followed the same RFCs and still did not work together cleanly. RFC 1122 therefore collects experience from operation and troubleshooting and makes it binding. At the end of each chapter a table summarises which requirement is MUST, SHOULD or MAY.
Many properties taken for granted today appear here as an obligation for the first time: every host must have an ICMP echo server, that is, answer ping. TCP must implement Van Jacobson’s slow start and congestion avoidance and Karn’s algorithm for timing. Acknowledgements may be delayed by at most 0.5 seconds, and TCP keepalives may start only after two hours of idleness at the earliest.
The robustness principle with a postscript
RFC 1122 quotes the well-known sentence about being liberal in what you accept and conservative in what you send. The postscript is remarkable: software should be prepared for every conceivable error, and it is best to assume the network is full of malicious participants sending packets with the worst possible effect.
This attitude is more modern than the robustness principle’s reputation. Liberal here does not mean accepting anything somehow, but being prepared for everything.
Ideas
- Interoperability needs requirements across all layers, not just individual protocols.
- MUST, SHOULD and MAY separate obligation, recommendation and option.
- Every host must answer ICMP echo.
- TCP must implement slow start and congestion avoidance.
- Delayed acknowledgements may wait at most 0.5 seconds.
- Keepalives may begin only after two hours of idleness.
Insights
- Good standards often only emerge from operational experience; RFC 1122 is essentially a bug report with consequences.
- The two-hour limit for keepalives explains why applications and load balancers still send their own signs of life today.
- Anyone who assumes a hostile network writes more robust software than someone who only tests standard cases.
Facts
- RFC 1122 appeared in October 1989 and is an Internet Standard.
- The companion document RFC 1123 covers application and support protocols.
- Keepalive intervals must default to at least two hours.
- Later RFCs such as 6298 (retransmission timer) and 9293 (TCP) update individual requirements.
References
- RFC 1122: Requirements for Internet Hosts - Communication Layers
- RFC 1123: Requirements for Internet Hosts: Application and Support (1989)
- RFC 9293: Transmission Control Protocol (2022)
Remarks
- The Linux parameter net.ipv4.tcp_keepalive_time defaults to 7200 seconds, exactly the two hours from RFC 1122.
Recommendations
- When facing puzzling interoperability problems, read RFC 1122 alongside the individual protocol.
- Set keepalives for long-lived connections behind NAT and firewalls much shorter, in the application or via socket option.
- Do not block ICMP wholesale but filter it selectively, because diagnostics and path MTU depend on it.
Read the RFC at the RFC Editor
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.