Requirements for Internet Hosts - Communication Layers
updated by
- rfc-1349 — Type of Service in the Internet Protocol Suite
- rfc-4379 — Detecting Multi-Protocol Label Switched (MPLS) Data Plane Failures
- rfc-5884 — Bidirectional Forwarding Detection (BFD) for MPLS Label Switched Paths (LSPs)
- rfc-6093 — On the Implementation of the TCP Urgent Mechanism
- rfc-6298 — Computing TCP's Retransmission Timer
- rfc-6633 — Deprecation of ICMP Source Quench Messages
- rfc-6864 — Updated Specification of the IPv4 ID Field
- rfc-8029 — Detecting Multiprotocol Label Switched (MPLS) Data-Plane Failures
- rfc-9293 — Transmission Control Protocol (TCP)
updates
- rfc-793 — Transmission Control Protocol
also
- std-3
Extracted elements (30)
Passing all received IP options to the transport layer is a deliberate violation of strict layering, designed to ease the future introduction of transport-relevant IP options without requiring simultaneous changes at both layers.
The Robustness Principle states: 'Be liberal in what you accept, and conservative in what you send.' Software must handle every conceivable error and unexpected variation gracefully, while senders should avoid obscure or non-obvious features that may break other implementations.
RFC-1122 corrects the TCP urgent pointer definition from RFC-793: the urgent pointer points to the sequence number of the last byte of urgent data, not one beyond it. Both interpretations are deployed; implementations must handle the ambiguity carefully when interoperating.
A host MUST implement a dead gateway detection mechanism. When evidence of failure accumulates (e.g., repeated TCP retransmissions without progress), the host SHOULD select an alternative first-hop gateway from its known candidate gateway list.
A host MUST implement an ICMP Timestamp server. Timestamp values MUST be in milliseconds since midnight UT; if the host cannot maintain standard time it MUST indicate this by setting the high-order bit of the Timestamp value.
A host MUST implement IP fragment reassembly. If reassembly times out (recommended range 60–120 seconds, must be configurable), the incomplete datagram MUST be discarded and an ICMP Time Exceeded (Fragment Reassembly Time Exceeded) message MUST be sent to the source if the first fragment was received.
A host MUST NOT send a datagram with TTL=0, and MUST NOT discard a received datagram solely because its TTL is less than 2. The IP layer MUST provide a means for the transport layer to set the TTL; when a fixed TTL value is used it MUST be configurable.
A host MUST NOT send an ICMP error message in response to a datagram destined to an IP broadcast or multicast address, a datagram sent as a link-layer broadcast, or in response to an ICMP error message. This rule prevents broadcast storms.
A host MUST support the subnet extensions to IP (RFC-950); every local IP address will have an associated address mask of the form {-1,-1,0}. The subnet mask MUST be used in all local/remote routing decisions.
A host MUST update its routing information when it receives a valid ICMP Redirect from the current first-hop gateway. Redirects from hosts that are not the current gateway SHOULD be silently discarded. A host MUST NOT originate an ICMP Redirect message.
A host MUST verify the IP header checksum on every received datagram and silently discard datagrams with a bad checksum. A datagram with a version number other than 4 MUST be silently discarded.
A TCP MUST implement Karn's algorithm (do not use retransmitted segments when updating the RTT estimator) and MUST implement exponential backoff of the RTO after each retransmission. TCP SHOULD compute the RTO using the Jacobson/Karels mean-plus-variance SRTT algorithm.
A TCP MUST implement the MSS option and MUST send an MSS option on every SYN segment. If no MSS option appears in the received SYN, a default of 536 bytes MUST be assumed. The MSS should be set to the connected-network MTU minus 40 bytes (20 IP + 20 TCP header).
A TCP receiver MUST NOT shrink the window after advertising it. Both sender and receiver SHOULD implement Silly Window Syndrome (SWS) avoidance: the receiver should not advertise small window increments and the sender should not transmit tiny segments when a larger segment could be deferred.
A TCP SHOULD implement a delayed ACK, sending at most one ACK per two full-sized segments received; the delay MUST be less than 500 ms. An ACK MUST be sent immediately in response to an out-of-order segment or one that fills a gap in the receive buffer.
A TCP SHOULD implement the Nagle algorithm: while a small unacknowledged segment is outstanding, hold further small segments until the outstanding data is acknowledged. An application MUST be able to disable the Nagle algorithm per connection to support latency-sensitive protocols.
All IP options except NOP and END-OF-LIST received in datagrams MUST be passed to the transport layer. Both the IP and transport layers MUST interpret options they understand and silently ignore the others. There MUST be a means for the transport layer to specify IP options to be included in transmitted datagrams.
An ARP implementation MUST provide a mechanism to flush out-of-date cache entries; if timeout-based, the timeout SHOULD be configurable. ARP flooding MUST be prevented, with a recommended maximum rate of one ARP Request per second per destination.
An Internet host that implements embedded gateway functionality MUST have a configuration switch to disable the gateway function, and this switch MUST default to the non-gateway mode. The host MUST NOT automatically enable gateway mode solely because it has more than one interface.
Every host MUST implement an ICMP Echo server function that receives Echo Requests and sends corresponding Echo Replies. A host SHOULD also provide an application-layer interface for sending Echo Requests and receiving Echo Replies.
Every Internet host connected to a 10 Mbps Ethernet MUST send and receive RFC-894 encapsulation and SHOULD receive RFC-1042 encapsulation. If a host sends both formats, it MUST provide a configuration switch defaulting to RFC-894. A host MUST NOT send IEEE 802 packets using the K1=6 protocol identifier.
TCP keep-alive probes MAY be implemented; if present, they MUST be configurable per connection, MUST default to off, and the probe interval MUST default to no less than two hours. Keep-alive probes MUST NOT be sent with data.
The IP layer MUST provide a means for the transport layer to set the TOS field of every outgoing datagram (default all-zero). The IP layer SHOULD pass received TOS values up to the transport layer. The RFC-795 link-layer TOS mappings SHOULD NOT be implemented.
The link layer SHOULD save at least one (the latest) packet destined to each unresolved IP address and transmit it once ARP resolution completes; discarding such packets causes the first packet of every new exchange to be lost.
The packet receive interface between IP and the link layer MUST include a flag indicating whether the incoming packet was addressed to a link-layer broadcast address. The packet send interface MUST include the 5-bit TOS field. The link layer MUST NOT report Destination Unreachable solely because there is no ARP cache entry.
UDP SHOULD always compute and send checksums on transmitted datagrams; a received datagram containing a non-zero checksum field that fails validation MUST be discarded silently. An application MAY optionally disable checksum generation for special cases.
RFC-1122 defines special-case IP addresses: {0,0} and {0,host} are source-only initialization addresses; {-1,-1} is limited broadcast; {net,-1}, {net,subnet,-1}, and {net,-1,-1} are directed broadcasts; {127,any} is loopback. Broadcast addresses MUST NOT be used as source addresses, and loopback addresses MUST NOT appear outside a host.
A host MUST silently discard an incoming datagram with an IP source address that is invalid per Section 3.2.1.3 (broadcast, loopback, or otherwise reserved). This prevents source-address spoofing and forged broadcast responses.
A TCP implementation SHOULD validate that the IP source address of every arriving segment matches the remote address negotiated during the handshake; segments arriving from unexpected source addresses enable connection hijacking. The robustness principle also requires software to assume malevolent senders and design defensively at every layer.
TCP defines eleven states: CLOSED, LISTEN, SYN-SENT, SYN-RECEIVED, ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, LAST-ACK, and TIME-WAIT. RFC-1122 requires that TIME-WAIT last at least 2*MSL (MSL recommended as 2 minutes), and that simultaneous open and simultaneous close both be supported.