Internet infrastructure - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

Internet infrastructure

Description:

news articles are stored in a central database. mail: individual databases. subscription based ... method of exchanging articles between cooperating hosts. ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 46
Provided by: csK48
Category:

less

Transcript and Presenter's Notes

Title: Internet infrastructure


1
Internet infrastructure
  • Prof. dr. ir. André Mariën

2
NNTP
  • RFC 977 Network News Transfer Protocol
  • NNTP specifies a protocol for
  • the distribution
  • inquiry
  • retrieval
  • posting
  • TCP port 119

3
NNTP characteristics
  • news articles are stored in a central database
  • mail individual databases
  • subscription based
  • Supports
  • Indexing
  • cross-referencing
  • expiration of aged messages

4
News versus other options
  • bulletin boards
  • mailing lists

5
internet Mailing Lists problems
  • subscription
  • performance
  • centralization

6
News
  • multiple hosts
  • synchronization
  • remote
  • local
  • centralized storage and archiving for LAN users

7
article format RFC 850
  • Compare
  • Mail
  • SMTP
  • RFC822
  • NEWS
  • NNTP
  • RFC850

8
News Distribution
  • netnews system for synchronization
  • method of exchanging articles between cooperating
    hosts.
  • may be propagated from host to host by flooding
  • send all you have
  • let receiver either
  • discard doubles
  • clean and store

9
NNTP interactive mechanism
  • for deciding which articles are to be transmitted
  • changes
  • new news groups(see NEWGROUPS command)
  • new articles list( see NEWNEWS command)
  • article content
  • transfer of posts from client to server if not
    yet there
  • 7-bit ascii (like SMTP)

10
Command/response operation
  • two kinds
  • texttual
  • after status respons
  • ended with "." (see SMTP)
  • status
  • state during operation
  • current article pointer (CAP)

11
Response codes
  • general coding system
  • The first digit of the response code
  • 1xx - Informative message
  • 2xx - Command ok
  • 3xx - Command ok so far, send the rest of it.
  • 4xx - Command was correct, but couldn't be
    performed for some reason.
  • 5xx - Command unimplemented, or incorrect, or a
    serious program error occurred.

12
The next digit of the response code
  • x0x - Connection, setup, and miscellaneous
    messages
  • x1x - Newsgroup selection
  • x2x - Article selection
  • x3x - Distribution functions
  • x4x - Posting
  • x8x - Nonstandard (private implementation)
    extensions
  • x9x - Debugging output

13
ARTICLE, BODY, HEAD, STAT commands
  • same parameters, return different portions of
    article
  • ARTICLE all
  • BODY only body
  • HEAD only head
  • STAT only reply code
  • forms
  • ordinal number
  • article ID "lt...gt
  • Based on CAP (no parameter)

14
ARTICLE command
  • article lt...gt full article
  • article nnn full article, changes CAP
  • response
  • nnn ltidgt
  • ...
  • .

15
ARTICLE,... Responses
  • 220 n ltagt article retrieved - head and body
    follow
  • 221 n ltagt article retrieved - head follows
  • 222 n ltagt article retrieved - body follows
  • 223 n ltagt article retrieved - request text
    separately
  • 412 no newsgroup has been selected
  • 420 no current article has been selected
  • 423 no such article number in this group
  • 430 no such article found

16
GROUP command
  • GROUP ggg.ggg.ggg
  • Responses if 2xx CAP set to first article
  • 211 n f l s group selected
  • n estimated number of articles in group
  • f first article number in the group
  • l last article number in the group
  • s name of the group411 no such news group

17
IHAVE command
  • IHAVE ltmessageidgt
  • Used for synchronization

18
GROUP difference with POST
  • intended for use in transferring already-posted
    articles between hosts

19
GROUP Responses
  • 235 article transferred ok
  • 335 send article to be transferred. End with
    ltCR-LFgt.ltCR-LFgt
  • 435 article not wanted - do not send it
  • 436 transfer failed - try again later
  • 437 article rejected - do not try again

20
LIST command
  • LIST
  • 215 list of newsgroups follows
  • group last first y/n
  • ...
  • group last first y/n
  • .
  • y/n posting allowed (in theory)

21
NEWGROUPS command
  • NEWGROUPS date time GMT ltdistributionsgt
  • date format YYMMDD
  • time format HHMMSS in the server's timezone
  • distributions prefix, like net for net., alt
    for alt.
  • example ltnet,alt,bingt

22
NEWNEWS command
  • NEWNEWS newsgroups date time GMT
    ltdistributiongt
  • newsgroups
  • wildcard expansion
  • match negation (!alt.binaries.)
  • response
  • 230 list of new articles by message-id follows...
  • .

23
NEXT command
  • NEXT
  • Side effect CAP
  • Responses223 n a article retrieved - request text
    separately412 no newsgroup selected420 no current
    article has been selected421 no next article in
    this group

24
POST command
  • POST response code
  • 340 start posting
  • 440 posting prohibited
  • data format specified by RFC850
  • Responses (ok)
  • 240 article posted ok
  • 340 send article to be posted. End with
    ltCR-LFgt.ltCR-LFgt

25
POST failures
  • Response codes
  • 440 posting not allowed
  • 441 posting failed
  • Note server initially tells posting status
  • 200 server ready - posting allowed
  • 201 server ready - no posting allowedQUIT
    commandQUIT

26
Next examples
  • Sample ConversationsStraight from RFC

27
Example - relative access with NEXT
  • connection
  • (client asks for a current newsgroup list)
  • CLIST
  • S215 list of newsgroups follows
  • Snet.wombats 00543 00501 y
  • Snet.unix-wizards 10125 10011 y
  • (more information here)
  • Snet.idiots 00100 00001 n
  • S.

28
example
  • (client selects a newsgroup)
  • CGROUP net.unix-wizards
  • S211 104 10011 10125 net.unix-wizards group
    selected
  • (there are 104 articles on file, from 10011 to
    10125)

29
example
  • (client selects an article to read)
  • CSTAT 10110
  • S223 10110 lt23445_at_sdcsvax.ARPAgt article
    retrieved - statistics only
  • (article 10110 selected, its message-id is
    lt23445_at_sdcsvax.ARPAgt)

30
example
  • (client examines the header)
  • CHEAD
  • S221 10110 lt23445_at_sdcsvax.ARPAgt article
    retrieved - head follows
  • (text of the header appears here)
  • S.

31
example
  • (client wants to see the text body of the
    article)
  • CBODY
  • S222 10110 lt23445_at_sdcsvax.ARPAgt article
    retrieved body follows
  • (body text here)
  • S.

32
example
  • (client selects next article in group)
  • CNEXT
  • S223 10113 lt21495_at_nudebch.uucpgt article
    retrieved - statistics only
  • (article 10113 was next in group)

33
Example
  • absolute article access with ARTICLE
  • connection
  • CGROUP msgs
  • S211 103 402 504 msgs Your new group is msgs
  • (there are 103 articles, from 402 to 504)

34
example
  • CARTICLE 401
  • S423 No such article in this newsgroup
  • CARTICLE 402
  • S220 402 lt4105_at_ucbvax.ARPAgt Article retrieved,
    text follows
  • S (article header and body follow)
  • S .

35
example
  • CHEAD 403
  • S221 403 lt3108_at_mcvax.UUCPgt Article retrieved,
    header follows
  • S(article header follows)
  • S.
  • CQUIT
  • S205 UCB-VAX news server closing connection.
    Goodbye.

36
Example - NEWGROUPS command
  • connection
  • (client asks for new newsgroups since April 3,
    1985)
  • CNEWGROUPS 850403 020000
  • S231 New newsgroups since 03/04/85 020000
    follow
  • Snet.music.gdead
  • Snet.games.sources
  • S.

37
example
  • CGROUP net.music.gdead
  • S211 0 1 1 net.music.gdead Newsgroup selected
  • (there are no articles in that newsgroup, and
    the first and last article numbers should
    be ignored)
  • CQUIT
  • S205 Imaginary Institute news server ceasing
    service. Bye!

38
Example - posting a news article
  • connection
  • S200 BANZAIVAX news server ready, posting
    allowed.
  • CPOST
  • S340 Continue posting Period on a line by
    itself to end
  • C(transmits news article in RFC850 format)
  • C.
  • S240 Article posted successfully.

39
Example news distribution
  • connection
  • (client asks for new newsgroups since 2 am, May
    15, 1985)
  • CNEWGROUPS 850515 020000
  • S235 New newsgroups since 850515 follow
  • Snet.fluff
  • Snet.lint
  • S.

40
example
  • (client asks for new news articles since 2 am,
    May 15, 1985)
  • CNEWNEWS 850515 020000
  • S230 New news since 850515 020000 follows
  • Slt1772_at_foo.UUCPgt
  • Slt87623_at_baz.UUCPgt
  • Slt17872_at_GOLD.CSNETgt
  • S.

41
example
  • (client asks for article lt1772_at_foo.UUCPgt)
  • CARTICLE lt1772_at_foo.UUCPgt
  • S220 lt1772_at_foo.UUCPgt All of article follows
  • S(sends entire message)
  • S.

42
example
  • (client asks for article lt87623_at_baz.UUCPgt
  • CARTICLE lt87623_at_baz.UUCPgt
  • S220 lt87623_at_baz.UUCPgt All of article follows
  • S(sends entire message)
  • S.

43
example
  • (client asks for article lt17872_at_GOLD.CSNETgt
  • CARTICLE lt17872_at_GOLD.CSNETgt
  • S220 lt17872_at_GOLD.CSNETgt All of article follows
  • S(sends entire message)
  • S.

44
example
  • (client offers an article it has received
    recently)
  • CIHAVE lt4105_at_ucbvax.ARPAgt
  • S435 Already seen that one, where you been?

45
example
  • (client offers another article)
  • CIHAVE lt4106_at_ucbvax.ARPAgt
  • S335 News to me! ltCRLF.CRLFgt to end.
  • C(sends article)
  • C.
  • S235 Article transferred successfully. Thanks.
  • (or)
  • S436 Transfer failed.
Write a Comment
User Comments (0)
About PowerShow.com