Echo Protocol
also
- std-20
Extracted elements (9)
The echo service is described as 'a very useful debugging and measurement tool.' Reflecting data back allows originators to verify end-to-end connectivity, measure round-trip latency, and test network paths without requiring application-layer logic on the remote host.
The TCP echo service is connection-based; both TCP and UDP variants use port 7. Implementations supporting both transports on the same port must handle the protocol distinction at the socket layer.
A TCP echo server MUST listen for incoming connections on TCP port 7. Once a connection is established, any data received MUST be sent back to the originating source.
A UDP echo server MUST listen for datagrams on UDP port 7. When a datagram is received, the data MUST be sent back in an answering datagram to the originating source.
The TCP echo session continues until the calling user (client) terminates the connection. The server does not unilaterally close the connection.
The Echo Protocol defines two variants: a TCP-based connection-oriented service and a UDP-based datagram service, both operating on port 7. The service reflects any data received back to the sender without modification.
Port 7 is assigned to the Echo service for both TCP and UDP. This document standardizes the use of that well-known port assignment for the ARPA Internet community.
The Echo Protocol defines no authentication, access control, or rate limiting. The UDP variant is susceptible to amplification and reflection abuse (a spoofed source address causes the server to send traffic to an arbitrary third party). Unrestricted TCP echo servers can be used to create echo-loop denial-of-service conditions when two echo servers are connected to each other.
For TCP: echo payload is the raw byte stream received on the connection, returned verbatim with no framing added. For UDP: the echo response is a single answering datagram containing the data from the received datagram, with no modification to content or length.