Character Generator Protocol
also
- std-22
Extracted elements (14)
TCP flow control mechanisms naturally limit the rate at which the server sends data, so there is no risk of overwhelming the client; no application-level rate limiting is needed.
The one-datagram-in one-datagram-out discipline for the UDP service prevents the server from generating more traffic than the client requests, avoiding self-amplifying floods.
The rotating 72-character ASCII pattern is specifically chosen because it is recognizable and allows easy visual inspection of data integrity; the 95-character ring structure ensures all printable ASCII characters appear and rotate predictably across lines.
The UDP service maintains no history or state information, so there is no continuity of data between successive answering datagrams; each response is independent.
Both the TCP and UDP variants of the Character Generator Protocol share port 19; implementations offering both transports must listen on port 19 for both TCP connections and UDP datagrams simultaneously.
For the TCP service, any data received on the connection is thrown away; the service sends data continuously without regard to input.
It is recommended that a recognizable pattern be used in the generated data rather than arbitrary bytes, to aid debugging and measurement.
The TCP-based character generator service must be prepared for either a careful (graceful) close or a rude (abrupt) abort of the TCP connection, since users are likely to terminate abruptly.
The UDP-based service sends exactly one datagram in response to each received datagram, ensuring the service cannot send data faster than the client can process it.
The Character Generator Protocol also operates on UDP port 19. When a UDP datagram is received, the server responds with a single answering datagram containing a random number of characters (between 0 and 512); the content of the received datagram is ignored.
The Character Generator Protocol operates on TCP port 19. A server listens for TCP connections; once established, it streams data continuously until the client terminates the connection, discarding all received data.
The UDP CHARGEN service responds to any received datagram with up to 512 bytes, creating a potential amplification vector: a spoofed source address can cause the server to flood a third-party victim. No authentication or source validation is defined. This protocol was deprecated for public Internet use precisely because of abuse in reflection/amplification attacks.
The recommended data pattern consists of 72-character lines of the 95 ASCII printing characters arranged as a rotating ring: line N contains characters (0+N mod 95) through (71+N mod 95), each line terminated with carriage return and line feed (CRLF).
The UDP response datagram carries a random number of characters between 0 and 512; the data in the triggering datagram is ignored and carries no semantic meaning.