31.07.2015 Views

network protocols handbook.pdf

network protocols handbook.pdf

network protocols handbook.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

28Protocols GuideTCP/IP - Application Layer ProtocolsProtocol NameNNTP: Network News TransferProtocolProtocol DescriptionNetwork News Transfer Protocol (NNTP) specifies a protocol forthe distribution, inquiry, retrieval, and posting of news articlesusing a reliable stream (such as TCP port 119) server-clientmodel. NNTP is designed so that news articles need only bestored on one (presumably central) server host, and subscriberson other hosts attached to the <strong>network</strong> may read news articlesusing stream connections to the news host. The Network NewsTransfer Protocol (NNTP) established the technical foundationfor the widely used Newsgroups.NNTP is modeled after the USENET news system. However,NNTP makes few demands upon the structure, content or storageof news articles and thus it can easily be adapted to othernon-USENET news systems. Using NNTP, hosts exchangingnews articles have an interactive mechanism for deciding whicharticles are to be transmitted.A host desiring new news, or which has new news to send, willtypically contact one or more of its neighbors using NNTP. Theclient host will then inquire as to which new articles have arrivedin all or some of the newsgroups that it desires to receive, usingthe NEWNEWS command. It will receive a list of new articlesfrom the server, and can request transmission of those articlesthat it desires and does not already have. Finally, the client canadvise the server of those new articles which the client has recentlyreceived. The server will indicate those articles that it hasalready obtained copies of and which articles should be sent toadd to its collection. In this manner, only those articles which arenot duplicates and which are desired are transferred.Protocol StructureNNTP uses commands and responses for communications.Commands consist of a command word, which in some casesmay be followed by a parameter. NNTP has many commands.The following are the key commands:Article Displays the header, a blank line,then the body (text) of the specified article.Message-id Optional field, is the message id of an article asshown in that article’s header. If it is blank, the currentarticle is assumed.Group The required parameter ggg is the name ofthe newsgroup to be selected. A list of valid newsgroupsmay be obtained from the LIST command.The successful selection response will return thearticle numbers of the first and last articles in thegroup, and an estimate of the number of articles onfile in the group.BodyListIdentical to the ARTICLE command except that itreturns only the text body of the article.Returns a list of valid newsgroups and associatedinformation.NewsGroups A list of newsgroups created since will be listed in the same format as the LISTcommand.NewNews A list of message-ids of articles posted to orreceived by the specified newsgroup since “date”will be listed.NextPostQuitRelated <strong>protocols</strong>TCPThe internally maintained “current article pointer”is advanced to the next article in the current newsgroup.If posting is allowed, response code 340 is returnedto indicate that the article to be posted should besent.The server process acknowledges the QUIT commandand then closes the connection to the client.Sponsor SourceNNTP is defined by IETF (http://www.ietf.org) in RFC 977.Referencehttp://www.javvin.com/protocol/rfc977.<strong>pdf</strong>Network News Transfer ProtocolHeadIdentical to the ARTICLE command except that itreturns only the header lines.Status Similar to the ARTICLE command except that notext is returned.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!