Discard Protocol


The Discard Protocol is a service in the Internet Protocol Suite defined in 1983 in by Jon Postel. It was designed for testing, debugging, measurement, and host-management purposes.
A host may send data to a host that supports the Discard Protocol on either Transmission Control Protocol or User Datagram Protocol port number 9. The data sent to the server is simply discarded. No response is returned. For this reason, UDP is usually used, but TCP allows the services to be accessible on session-oriented connections.

Inetd implementation

On most Unix-like operating systems a discard server is built into the inetd daemon. The discard service is usually not enabled by default. It may be enabled by adding the following lines to the file and reloading the configuration:
discard stream tcp nowait root internal
discard dgram udp wait root internal
The Discard Protocol is the TCP/UDP equivalent of the Unix file-system node /dev/null. Such a service is guaranteed to receive what is sent to it and can be used for debugging code requiring a guaranteed reception TCP or UDP payloads.
On various routers, this TCP or UDP port 9 for the Discard Protocol is also used by default as a proxy to relay Wake-on-LAN magic packets from the Internet to hosts on the local network in order to wake them up remotely.