1 / 53

Lecture 11 Overview

Lecture 11 Overview. Router Architecture Overview. Two key router functions: run routing algorithms/protocol (RIP, OSPF, BGP) forwarding datagrams from incoming to outgoing link. Input Port Functions. Goal : complete input port processing at ‘ line speed ’. Physical layer:

burt
Download Presentation

Lecture 11 Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 11 Overview

  2. Router Architecture Overview • Two key router functions: • run routing algorithms/protocol (RIP, OSPF, BGP) • forwarding datagrams from incoming to outgoing link CPE 401/601 Lecture 11 : Router Architectures

  3. Input Port Functions • Goal: complete input port processing at ‘line speed’ Physical layer: bit-level reception Network layer: Routing & forwarding Data link layer: e.g., Ethernet CPE 401/601 Lecture 11 : Router Architectures

  4. Input Port Queuing • Queuing when datagrams arrive faster than forwarding rate into switch fabric • queuing delay and loss due to input buffer overflow! • Head-of-the-Line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward CPE 401/601 Lecture 11 : Router Architectures

  5. Three types of switching fabrics CPE 401/601 Lecture 11 : Router Architectures

  6. Output Ports • Buffering required when datagrams arrive from fabric faster than the transmission rate • Queuing: Scheduling discipline chooses among queued datagrams for transmission CPE 401/601 Lecture 11 : Router Architectures

  7. . RTT C N How much buffering? • RFC 3439 rule of thumb: • buffering equal to typical RTT (say 250 msec) times link capacity C • e.g., C = 10 Gps link: • 2.5 Gbit buffer • Recent recommendation: • with N flows, buffering equal to CPE 401/601 Lecture 11 : Router Architectures

  8. Bridge Software • A bridge connects networks and forwards frames from one network to another. PORTS A B E F BRIDGE C D G H CPE 401/601 Lecture 11 : Bridges

  9. Selective Forwarding • If A sends a frame to E • the frame must be forwarded by the bridge • If A sends a frame to B • there is no reason to forward the frame A B E F BRIDGE C D G H CPE 401/601 Lecture 11 : Bridges

  10. Bridge Database • The bridge needs a database that contains information about which hosts are on which network. • The realistic options are: • The system administrator can create and maintain the database. • The bridge can acquire the database on the fly. Hard to add new computers Some loss of efficiency CPE 401/601 Lecture 11 : Bridges

  11. Learning the host mapping • Bridge forwards packets whose destination network is unknown • Every time bridge forwards a packet it can record the network on which the sender is • Each host mapping expires when it is unused for a “long” period of time • New hosts can be added at any time • Requires no setup information from humans • A host can be moved to another network CPE 401/601 Lecture 11 : Bridges

  12. What is the problem ? Bridge 1 0 1 D A E B F C Bridge 2 0 1 CPE 401/601 Lecture 11 : Bridges

  13. Possible Solutions • Forget about smart bridges • Tell customers to avoid topologies that include loops • design bridges so that they detect loops and scream at the customer • Design bridges that prune the network topology into something with no loops. CPE 401/601 Lecture 11 : Bridges

  14. Spanning Tree Creation • The bridges must communicate! • They send configuration bridge protocol data units (BPDUs) • Multicast: special data link address • Each bridge has a unique ID • Use an algorithm to construct a spanning tree based on local messages CPE 401/601 Lecture 11 : Bridges

  15. Spanning Tree B B B B B B B B Prune B B B B network B bridge CPE 401/601 Lecture 11 : Bridges

  16. Lecture 12Telnet and E-mail Protocols CPE 401 / 601 Computer Network Systems slides are modified from Dave Hollinger slides are modified from Dave Hollinger

  17. TELNET • TELNET is a protocol that provides • general, • bi-directional, • eight-bit byte oriented communications • Over TCP connection • data and control over the same connection • Many application protocols are built upon the TELNET protocol • Used to test HTTP, FTP, SMTP, POP3, IRC, etc. CPE 401/601 Lecture 12 : TELNET protocol

  18. Network Virtual Terminal • intermediate representation of a generic terminal • provides a standard language for communication of terminal control functions Server Process NVT NVT TCP TCP CPE 401/601 Lecture 12 : TELNET protocol

  19. Negotiated Options • All NVTs support a minimal set of capabilities • Some terminals have more capabilities • Set of options is not part of TELNET protocol • so that new terminal features can be incorporated without changing the TELNET protocol • Two endpoints negotiate a set of mutually acceptable options • Line mode vs. character mode • echo modes • character set (EBCDIC vs. ASCII) CPE 401/601 Lecture 12 : TELNET protocol

  20. Control Functions • TELNET includes support for a series of control functions commonly supported by servers • This provides a uniform mechanism for communication of (the supported) control functions CPE 401/601 Lecture 12 : TELNET protocol

  21. Control Functions • Interrupt Process (IP) • suspend/abort process • Abort Output (AO) • send no more output to user’s terminal • Are You There (AYT) • check to see if system is still running • Erase Character (EC) • delete last character sent • Erase Line (EL) • delete all input in current line CPE 401/601 Lecture 12 : TELNET protocol

  22. Command Structure • Commands start with a special character called the Interpret as Command escape character • The IAC code is 255 • If a 255 is sent as data, it must be followed by another 255 • If IAC is found and the next byte is IAC • a single byte is presented to application/terminal • If IAC is followed by any other code • the TELNET layer interprets this as a command CPE 401/601 Lecture 12 : TELNET protocol

  23. Playing with TELNET • telnet is a generic TCP client • Sends whatever you type to the TCP socket • Prints whatever comes back through the TCP socket • Useful for testing TCP servers • ASCII based protocols • Many Unix systems have these servers running (by default): • echo port 7 discard port 9 • daytime port 13 chargen port 19 CPE 401/601 Lecture 12 : TELNET protocol

  24. telnet hostname port > telnet amele-2.cse.unr.edu 7 Trying 134.197.40.246... Connected to amele-2.cse.unr.edu (134.197.40.246). Escape character is '^]'. Hi mehmet Hi mehmet stop it stop it ^] telnet> quit Connection closed. CPE 401/601 Lecture 12 : TELNET protocol

  25. E-mail Protocols

  26. Email • SMTP - Simple Mail Transfer Protocol • 1982 (RFC 821, 5321, …) • POP - Post Office Protocol (v3) • 1984 (RFC 1939 , …) • IMAP (v4) • 1986 (RFC 1730, 3501 , …) • MIME extensions • 1992 (RFCs 1521, 1522 , …) CPE 401/601 Lecture 12 : E-mail protocols

  27. Internet A Typical Mail Environment Interactive Mail Access Protocol SMTP IMAP Mail Server Mail Server Mail Client IMAP store POP Store SMTP POP SMTP Mail Client CPE 401/601 Lecture 12 : E-mail protocols

  28. Terminology • User Agent • end-user mail program • Message Transfer Agent • responsible for communicating with remote hosts and transmitting/receiving email • both a client and server • Mail Exchanger • host that takes care of email for a domain CPE 401/601 Lecture 12 : E-mail protocols

  29. SMTP • Used to exchange mail messages between mail servers (Message Transfer Agents) MTA MTA MTA SMTP SMTP File System UA UA CPE 401/601 Lecture 12 : E-mail protocols - SMTP

  30. SMTP Protocol • SMTP sender is the client • SMTP receiver is the server • Alternating dialogue: • client sends command and server responds with command status message • Order of the commands is important! • Status messages include • ASCII encoded numeric status code (like HTTP,FTP) and • text string CPE 401/601 Lecture 12 : E-mail protocols - SMTP

  31. SMTP Commands • HELO • identifies sender • MAIL FROM: • starts mail transaction and identifies mail originator • RCPT TO: • identifies individual recipient • there may be multiple RCPT TO: commands • DATA • sender ready to transmit a series of lines of text, each ends with ‘\r\n’ • A line containing only a period ‘.’ indicates end of the data CPE 401/601 Lecture 12 : E-mail protocols - SMTP

  32. Data Format • ASCII only • must convert binary to an ASCII representation to send via email • What if we want to send a line containing only a period? • Sender prepends a period to any line staring with a period (in the message) • Receiver strips the leading period in any line that starts with a period and has more stuff CPE 401/601 Lecture 12 : E-mail protocols - SMTP

  33. Message Progress TCP Connection Establishment TCP Connection Termination

  34. Typical Exchange > telnet mail.cse.unr.edu 25 Trying 134.197.40.1... Connected to mail.cse.unr.edu. Escape character is '^]'. 220 ponderosa.cse.unr.edu ESMTP Postfix HELO cse.unr.edu 250 ponderosa.cse.unr.edu MAIL FROM: bill@microsoft.com 250 2.1.0 Ok RCPT TO: mgunes 250 2.1.5 Ok DATA 354 End data with <CR><LF>.<CR><LF> Hi Mehmet . 250 2.0.0 Ok: queued as C0D242F8D9 CPE 401/601 Lecture 12 : E-mail protocols - SMTP

  35. Leading Period DATA 354 Enter mail, end with "." on a line by itself Hi Mehmet - this message is a test of SMTP .. ..foo .. . 250 2.0.0 Ok: queued as VAA0771 Resulting Message: Hi Mehmet - this message is a test of SMTP . .foo CPE 401/601 Lecture 12 : E-mail protocols - SMTP

  36. 354 Reply Codes • Contain a Lot of Information • Only the reply codes count • Other information in a reply is purely for humans The first digit indicates success, failure, or incomplete The third digit is the specific message for that category The second digit is the category of error message

  37. Other SMTP Commands • VRFY • confirm that a name is a valid recipient • EXPN • expand an alias (group email address) • TURN • switch roles (sender <=> receiver) • NOOP • send back a positive reply code CPE 401/601 Lecture 12 : E-mail protocols - SMTP

  38. Other SMTP Commands • SOML • Send Or Mail • if recipient is logged in, display message on terminal, otherwise email • SAML • Send and Mail • RSET • abort current transaction CPE 401/601 Lecture 12 : E-mail protocols - SMTP

  39. SMTP Extensions (EHLO) • A mailer supporting extensions uses EHLO instead of HELO in the greeting $ telnet mail.unr.edu 25 Trying 134.197.1.112... 220 smtp.unr.edu ESMTP Postfix EHLO 250-smtp.unr.edu 250-PIPELINING 250-SIZE 30720000 250-VRFY 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DNS A mailer that supports extensions responds with a list of which ones it can do TCP / IP model

  40. Mail Headers • Email messages contain many headers • some headers are created by the UA • some are automatically added by the MTA • Every MTA adds (at least) a “Received:” header • Some of the headers are parsed by intermediate MTAs • but the message content is ignored and passed on transparently CPE 401/601 Lecture 12 : E-mail protocols - SMTP

  41. Multipurpose Internet Mail Extensions • Defines extensions to support binary attachments of arbitrary format • Images, Audio, Video and multi-media messages • Text having unlimited line length or overall length • Multiple objects in a single message • Character sets other than ASCII • Multi-font messages • Requires more capable UAs to interpret messages CPE 401/601 Lecture 12 : E-mail protocols - MIME

  42. A sample MIME message From: trumbo@Opus1.COM (Jan Trumbo) Subject: small message with Word attachment To: trumbo@Opus1.COM MIME-version: 1.0 Content-type: MULTIPART/MIXED; BOUNDARY="Boundary_[ID_nf99lkyavAuSoClF/HeK0Q]" --Boundary_[ID_nf99lkyavAuSoClF/HeK0Q] Content-type: text/plain; charset=us-ascii Joel, attached is a Word document. - Jan --Boundary_[ID_nf99lkyavAuSoClF/HeK0Q] Date: Thu, 19 Sep 1996 16:49:52 -0700 Content-type: application/mac-binhex40; name=tiny_text_Word_doc.doc Content-disposition: attachment; filename=tiny_text_Word_doc.doc <Word document and more stuff below here> This identical boundary marker separates the parts of the mail message CPE 401/601 Lecture 12 : E-mail protocols - MIME

  43. Pulling Emails • Offline (POP3 model) • Client connects to server and pulls all email down to client • Everything is stored on the client • Online (Original IMAP model) • Client connects to server for every transaction • Everything is stored on the server • Disconnected (Later IMAP model) • Client and server share storage burden • Server is always authoritative and client must synchronize to server CPE 401/601 Lecture 12 : E-mail protocols

  44. POP – Post Office Protocol • Used to transfer mail from a mail server to a User Agent Mail Server POP UA File System CPE 401/601 Lecture 12 : E-mail protocols - POP3

  45. POP (version 3) • Similar to SMTP command/reply lockstep • Minimizes server resources • Used to retrieve mail for a single user • requires authentication • Commands and replies are ASCII lines • Replies start with “+OK” or “-ERR” • Replies may contain multiple lines • POP has no security • Except when used with SSL, TLS CPE 401/601 Lecture 12 : E-mail protocols - POP3

  46. POP-3 Commands • USER • specify username • PASS • specify password • STAT • get mailbox status • number of messages in the mailbox and their size • LIST • get a list of messages and sizes • One per line, termination line contains ‘.’ only CPE 401/601 Lecture 12 : E-mail protocols - POP3

  47. More POP-3 Commands • RETR • retrieve a message • DELE • mark a message for deletion from the mailbox • NOOP • send back positive reply • RSET • All deletion marks are unmarked • QUIT • remove marked messages and close connection CPE 401/601 Lecture 12 : E-mail protocols - POP3

  48. Optional Commands • TOP • send header lines from messages • APOP • alternative authentication • message digest based on opening greeting sent from POP server • Requires shared secret! • No cleartext password on the network • Does not authenticate the server!!!! CPE 401/601 Lecture 12 : E-mail protocols - POP3

  49. A POP3 Exchange > telnet monte pop3 Trying 128.213.8.110... Connected to monte.cs.rpi.edu (128.213.8.110). Escape character is '^]'. +OK POP3 monte.cs.rpi.edu v7.59 server ready user joe +OK User name accepted, password please pass joepw +OK Mailbox open, 1 messages stat +OK 1 412 list +OK Mailbox scan listing follows 1 412 . CPE 401/601 Lecture 12 : E-mail protocols - POP3

  50. POP3 Example Continued retr 1 +OK 412 octets Return-Path: <hollingd> Received: (from hollingd@localhost) by monte.cs.rpi.edu (8.9.3/8.9.3) id NAA06943 for joe; Mon, 20 Mar 2000 13:49:54 -0500 Date: Mon, 20 Mar 2000 13:49:54 -0500 From: Dave Hollinger <hollingd@monte.cs.rpi.edu> Message-Id: <200003201849.NAA06943@monte.cs.rpi.edu> To: joe@monte.cs.rpi.edu Status: O blah . CPE 401/601 Lecture 12 : E-mail protocols - POP3

More Related