Email This Page  

NNTP: Network News Transfer ProtocolOverview

NNTP specifies a protocol for the distribution, inquiry, retrieval, and posting of news articles using a reliable stream (such as TCP port 119) server-client model. NNTP is designed so that news articles need only be stored on one (presumably central) server host, and subscribers on other hosts attached to the network may read news articles using stream connections to the news host. The Network News Transfer Protocol (NNTP) established the technical foundation for the widely used Newsgroups.

NNTP is modeled after the USENET news system. However, NNTP makes few demands upon the structure, content, or storage of news articles, and thus it easily can be adapted to other non-USENET news systems. Using NNTP, hosts exchanging news articles have an interactive mechanism for deciding which articles are to be transmitted.

A host desiring new news, or which has new news to send, will typically contact one or more of its neighbors using NNTP. The client host will then inquire as to which new articles have arrived in all or some of the newsgroups that it desires to receive, using the NEWNEWS command. It will receive a list of new articles from the server, and can request transmission of those articles that it desires and does not already have.  Finally, the client can advise the server of those new articles which the client has recently received. The server will indicate those articles that it has already obtained copies of, and which articles should be sent to add to its collection. In this manner, only those articles which are not duplicates and which are desired are transferred.

Protocol Structure - NNTP: Network News Transfer Protocol 

NNTP uses commands and responces for communications. Commands consist of a command word, which in some cases may be followed by a parameter. NNTP has many commands. The following are the key commands:

  • Article <message ID> - Display the header, a blank line, then the body (text) of the specified article. Message-id, optional field, is the message id of an article as shown in that article's header. If it is blank, the current article is assumed.
  • Head - identical to the ARTICLE command except that they respectively return only the header lines or text body of the article.
  • Status - similar to the ARTICLE command except that no text is returned.
  • Group <ggg> - The required parameter ggg is the name of the newsgroup to be selected. A list of valid newsgroups may be obtained from the LIST command. The successful selection response will return the article numbers of the first and last articles in the group, and an estimate of the number of articles on file in the group.
  • Body - identical to the ARTICLE command except that they respectively return only the header lines or text body of the article.
  • List - Returns a list of valid newsgroups and associated information.
  • NewsGroups - A list of newsgroups created since <date and time> will be listed in the same format as the LIST command.
  • NewNews - A list of message-ids of articles posted or received to the specified newsgroup since "date" will be listed.
  • Next - The internally maintained "current article pointer" is advanced to the next article in the current newsgroup.
  • Post - If posting is allowed, response code 340 is returned to indicate that the article to be posted should be sent.
  • Quit - The server process acknowledges the QUIT command and then closes the connection to the client.
   

Related Protocols
TCP

Sponsor Source

NNTP is defined by IETF (www.ietf.org ) in RFC 977.



Reference
http://www.javvin.com/protocol/rfc977.pdf : Network News Transfer Protocol