Character Generator Protocol

Character Generator Protocol

The Character Generator Protocol (CHARGEN) is a service of the Internet Protocol Suite defined in RFC 864 in 1983 by Jon Postel. It is intended for testing, debugging, and measurement purposes.

A host may connect to a server that supports the Character Generator Protocol on either Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) port number 19. Upon opening a TCP connection, the server starts sending arbitrary characters to the connecting host and continues until the host closes the connection. In the UDP implementation of the protocol, the server sends a UDP datagram containing a random number (between 0 and 512) of characters every time it receives a datagram from the connecting host. Any data received by the server is discarded.


Inetd implementation

On most UNIX-like operating systems a CHARGEN server is built into the inetd (or xinetd) daemon. The CHARGEN service is usually not enabled by default. It may be enabled by adding the following lines to the file /etc/inetd.conf and telling inetd to reload its configuration:

chargen   stream  tcp     nowait  root    internal
chargen   dgram   udp     wait    root    internal


The CHARGEN service may be used as a source of a byte-stream for debugging TCP network code for proper bounds checking and buffer management. It may also be a source of generic payload for bandwidth measurement and/or QoS fine-tuning.[citation needed] Although consideration must be given if hardware compression is active, as the output from the CHARGEN service is easily and efficiently compressed. This compression can cause bandwidth tests to report the size of the data after decompression, instead of the actual amount of data which passed the wire.

Sample session

A typical CHARGEN service session looks like this: The user connects to the host using a telnet client. The user receives a stream of bytes. Although the specific format of the output is not prescribed by RFC 864, the recommended pattern (and a de-facto standard) is shifted lines of 72 ASCII characters repeating.

$ telnet localhost chargen
Connected to localhost.
Escape character is '^]'.
telnet> quit
Connection closed.

This continues until the TCP connection is closed as shown in the trace by ending the telnet session.


The service was used maliciously to crash MS DNS servers running Microsoft Windows NT 4.0 by piping the arbitrary characters straight into the DNS server listening port (telnet ntbox 19 | telnet ntbox 53).[1] However, the attack was presumably a symptom of improper buffer management on the part of Microsoft's DNS service and not directly related to the CHARGEN service.[citation needed]

See also


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Character generator — This article is about video technology. For hardware character generators in computing context, see text mode. For the Internet service, see Character Generator Protocol. An Aston Ethos hardware character generator A character generator, often… …   Wikipedia

  • Discard Protocol — Internet protocol suite Application layer BGP DHCP DNS FTP HTTP …   Wikipedia

  • RFC 864 — Character Generator Protocol. Postel, J.B. 1983 May; 3 p …   Acronyms

  • RFC 864 — Character Generator Protocol. Postel, J.B. 1983 May; 3 p …   Acronyms von A bis Z

  • CHARGEN — The CHARGEN (character generator) service is an internet protocol defined in RFC 864. It is intended for testing and measurement purposes.A host may connect to a server that supports the CHARGEN protocol, on either TCP or UDP port 19. Upon… …   Wikipedia

  • Список RFC — Здесь представлен список RFC (документ запроса комментариев). Поскольку на данный момент их существует более 5000, то в данном списке представлены лишь наиболее значимые из них, по которым существуют связанные с ними статьи. Содержание 1 RFC по… …   Википедия

  • Liste der standardisierten Ports — Die folgende Liste enthält die Zuordnung von Ports zu Protokollen, die von der IANA standardisiert wurden. Eine vollständige Liste kann unter Unixoiden Betriebssystemen in der Datei /etc/services eingesehen werden. Inhaltsverzeichnis 1 Legende 2… …   Deutsch Wikipedia

  • CHARGEN — (Character Generator Protocol) это служба стека протоколов TCP/IP, определённая в RFC 864 в 1983 году Джоном Постелом. Она предназначена для тестирования, измерения и отладки. Узел сети может установить соединение с сервером, поддерживающим… …   Википедия

  • CHARGEN — abbr. comp. Character Generator Protocol …   Dictionary of English abbreviation

  • Liste Des Ports Logiciels — Pour consulter un article plus général, voir : ports logiciels. Liste des ports TCP/UDP. Afin de permettre aux clients de connecter des serveurs, des numéros de ports logiciels sont bien connus. Les informations qui suivent sont en général… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”