Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 ELEN602 Lecture 2 Review of Last Lecture Layering.

Similar presentations


Presentation on theme: "1 ELEN602 Lecture 2 Review of Last Lecture Layering."— Presentation transcript:

1 1 ELEN602 Lecture 2 Review of Last Lecture Layering

2 2 Communication Networks Many forms of communication networks around –Postal mail, telephone, Internet etc. Generic steps involved in communication –Addressing, name-to-address translation, transport, routing, delivery Forms of delivery –Reliable, in-order –Unreliable, no acknowledgement

3 3 The user clicks on a link to indicate which document is to be retrieved. The browser must determine the address that contains the document. It does this by sending a query to its local name server. Once the address is known the browser establishes a connection to the specified machine, usually a TCP connection. In order for the connection to be successful, the specified machine must be ready to accept TCP connections. The browser runs a client version of HTTP, which issues a request specifying both the name of the document and the possible document formats it can handle. The machine that contains the requested document runs a server version of HTTP. It reacts to the HTTP request by sending an HTTP response which contains the desired document in the appropriate format. The TCP connection is then closed and the user may view the document. 1. 2. 3. 4. 5. 6. Steps in Web Surfing

4 4 HTTP server HTTP client Request Response Application level View

5 5 Steps in HTTP Transfer User selects document Networking software locates the remote machine address & establishes a 2-way connection HTTP client sends request for document (GET ) HTTP daemon on remote machine interprets the GET message Remote HTTP daemon sends the result of GET operation –Result code, Description of the information, requested file Remote HTTP daemon disconnects the connection HTTP client displays the HTML content in the browser.

6 6 Domain Name Service DNS servers help resolve name-to-address translation –Given a name such as ee.tamu.edu, find its IP address IP addresses = telephone numbers in phone network Machines (computers/network elements) know each other by IP addresses IP addresses are 32bits in IPv4. DNS protocol allows name-to-IP address resolution –Similar to phone directory assistance (411 or 555-1212)

7 7 DNS Example (cont’d) QNAME = ee.tamu.edu, QCLASS = IN QTYPE = A QNAME = ee.tamu.edu QCLASS = IN QTYPE = A –IN A 165.91.241.199 The application will now use 165.91.241.199 whenever it needs to contact ee.tamu.edu

8 8 HTTP server HTTP client TCP GET 80, # #, 80 STATUS Port 80 Ephemeral Port # A more detailed view - Transport protocol

9 9 Email and SMTP Web transfers use HTTP, email uses SMTP (Simple Mail Transfer Protocol) - Application level protocols Sender - Local SMTP Server -- Remote SMTP Server - Receiver SMTP uses Port 25, HTTP uses port 80 POP (Post Office Protocol) may be used if receiver not on all the time.

10 10 Sender establishes TCP Connection to SMTP server Sends HELO message -identifying itself to SMTP server Client sends sender’s email address SMTP server acknowledges with 250 if successful Client sends receiver’s email address SMTRP server acknowledges with 250 Client sends a DATA message - requesting permission to send email message SMTP server sends OK-to-send message Client transfers the email message SMTP server returns ack with a message ID Client indicates that the transfer is complete. SMTP confirms the receipt of End-of-transfer message

11 11 n entity n-PDUs n entity Abstract View

12 12 n+1 entity n-SAP n+1 entity n-SAP n entity n-SDU H H n-PDU Layering in General

13 13 n-SDU n-PDU n-SDU n-PDU Segmentation Reassembly n-PDU n-SDU n-PDU Blocking Unblocking n-SDU (a) (b) Data Units at different layers

14 14 Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Network Layer Electrical and/or Optical Signals Application A Application B Data Link Layer Physical Layer Network Layer Data Link Layer Physical Layer Communication Network OSI Seven-layer Model

15 15 C PS C C C C PS = packet switch C = computer Packet-Switched Network

16 16 G G G G G net 1 net 2 net 3 net 4 net 5 G = gateway/router G An Internetwork

17 17 Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Application A Application B data ah ph sh th nh dh bits dt Headers and Trailers

18 18 Application Layer Transport Layer Internet Layer Network Interface Application Layer Transport Layer Internet Layer Network Interface (a) (b) TCP/IP Network Architecture

19 19 Application Transport Internet Network Interface Application Transport Internet Network Interface Internet Network Interface Network 1 Network 2 Machine A Machine B Router/Gateway IP Layer and Network Interface Layer

20 20 HTTP SMTP RTP TCP UDP IP Network Interface 1 Network Interface 3 Network Interface 2 DNS IP Hour-Glass Protocol Graph

21 21 Net Interface IP TCP HTTP Net Interface IP Net Interface IP TCP HTTP EthernetPPP Router router (1,1) s (1,2) w (2,1) (1,3) r (2,2) PPP Ethernet (a) (b) Server PC

22 22 IP Header Header contains source and destination physical addresses; network protocol type Frame Check Sequence Ethernet Header IP Datagram on an Ethernet

23 23 HTTP Request TCP Header Header contains source and destination port numbers Header contains source and destination IP addresses; transport protocol type IP Header Header contains source and destination physical addresses; network protocol type Frame Check Sequence Ethernet Header

24 24 Application 1 Socket socket interface user kernel Application 2 user kernel Underlying communication Protocols Communications network Socket socket interface

25 25

26 26 socket() bind() sendto() close() socket() bind() recvfrom() sendto() close() blocks until server receives data from client data Server Client recvfrom()

27 27 User Interface User PI User DTP PI = Protocol interpreter DTP = Data transfer process User FTP Server PI Server DTP Server FTP Control Connection Data Connection

28 28 C:\WINDOWS>ping nal.toronto.edu Pinging nal.toronto.edu [128.100.244.3] with 32 bytes of data: Reply from 128.100.244.3: bytes=32 time=118ms TTL=243 C:\WINDOWS>


Download ppt "1 ELEN602 Lecture 2 Review of Last Lecture Layering."

Similar presentations


Ads by Google