Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 11 Overview. Router Architecture Overview Two key router functions: – run routing algorithms/protocol (RIP, OSPF, BGP) – forwarding datagrams.

Similar presentations


Presentation on theme: "Lecture 11 Overview. Router Architecture Overview Two key router functions: – run routing algorithms/protocol (RIP, OSPF, BGP) – forwarding datagrams."— 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 2

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

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 4

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

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 6

7 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 RTT C. N CPE 401/601 Lecture 11 : Router Architectures 7

8 Bridge Software A bridge connects networks and forwards frames from one network to another. 8 BRIDGE AB CD EF GH PORTS 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 9 BRIDGE AB CD EF GH 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. 10 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 11 CPE 401/601 Lecture 11 : Bridges

12 What is the problem ? 12 Bridge 1 10 Bridge 2 10 A C B D F E 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. 13 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 14 CPE 401/601 Lecture 11 : Bridges

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

16 Lecture 12 Telnet and E-mail Protocols CPE 401 / 601 Computer Network Systems 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 17

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

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) 19 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 20 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 21 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 22 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): – echoport 7discardport 9 – daytimeport 13chargenport 19 23 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 stop it ^] telnet> quit Connection closed. 24 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, …) 26 CPE 401/601 Lecture 12 : E-mail protocols

27 A Typical Mail Environment Internet Mail Server POP Store IMAP store Mail Server Mail Client Mail Client SMTP POP IMAP SMTP Interactive Mail Access Protocol 27 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 28 CPE 401/601 Lecture 12 : E-mail protocols

29 SMTP Used to exchange mail messages between mail servers (Message Transfer Agents) 29 MTA UA SMTP File System File System MTA SMTP 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 30 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 31 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 32 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. Hi Mehmet. 250 2.0.0 Ok: queued as C0D242F8D9 34 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: 35 Hi Mehmet - this message is a test of SMTP..foo Hi Mehmet - this message is a test of SMTP..foo CPE 401/601 Lecture 12 : E-mail protocols - SMTP

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

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 37 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 38 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 TCP / IP model 39 $ 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

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 40 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 41

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 This identical boundary marker separates the parts of the mail message 42 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 43 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 44 Mail Server Mail Server UA File System File System POP 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 45 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 46 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 47 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!!!! 48 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. 49 CPE 401/601 Lecture 12 : E-mail protocols - POP3

50 POP3 Example Continued retr 1 +OK 412 octets Return-Path: 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 Message-Id: To: joe@monte.cs.rpi.edu Status: O blah. 50 CPE 401/601 Lecture 12 : E-mail protocols - POP3

51 Internet Message Access Protocol On-line, off-line, or disconnected mode operation Server-side Mailbox Manipulation – Multiple mailbox support – Control of all folders everywhere Online performance optimization – User can check email header or search a string before downloading Real authentication CPE 401/601 Lecture 12 : E-mail protocols - IMAP 51

52 All Messages POP3: IMAP: Dr.Amer Friends …. headers Whole message Internet POP vs. IMAP

53 WebMail Web-base email access User agent -> web browser User agent-mail server communication based on HTTP – HTTP to send messages from user to the mail server of the user – HTTP to get mail from the mail server of the destination TCP / IP model 53


Download ppt "Lecture 11 Overview. Router Architecture Overview Two key router functions: – run routing algorithms/protocol (RIP, OSPF, BGP) – forwarding datagrams."

Similar presentations


Ads by Google