280 likes | 402 Views
Review of Last Lecture Layering. ELEN602 Lecture 2. 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
E N D
Review of Last Lecture Layering ELEN602 Lecture 2
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 Communication Networks
Steps in Web Surfing 1. 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. 2. 3. 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. 4. 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. 5. 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. 6. The TCP connection is then closed and the user may view the document.
Application level View Request HTTP server HTTP client Response
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. Steps in HTTP Transfer
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) Domain Name Service
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 DNS Example (cont’d)
A more detailed view - Transport protocol HTTP server HTTP client Ephemeral Port # Port 80 GET 80, # TCP TCP #, 80 STATUS
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. Email and SMTP
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
Abstract View n-PDUs n entity n entity
Layering in General n+1 entity n+1 entity n-SDU n-SDU n-SAP n-SAP n-SDU H n entity n entity n-SDU H n-PDU
Data Units at different layers (a) Segmentation Reassembly n-SDU n-SDU n-PDU n-PDU n-PDU n-PDU n-PDU n-PDU (b) Blocking Unblocking n-SDU n-SDU n-SDU n-SDU n-SDU n-SDU n-PDU n-PDU
OSI Seven-layer Model Application A Application B Application Layer Application Layer Presentation Layer Presentation Layer Session Layer Session Layer Transport Layer Transport Layer Communication Network Network Layer Network Layer Network Layer Network Layer Data Link Layer Data Link Layer Data Link Layer Data Link Layer Physical Layer Physical Layer Physical Layer Physical Layer Electrical and/or Optical Signals
Packet-Switched Network PS = packet switch C = computer C PS C PS PS PS C C C
G An Internetwork net 3 G net 1 G G G net 5 net 2 net 4 G G = gateway/router
Headers and Trailers Application B Application A data Application Layer Application Layer ah data Presentation Layer Presentation Layer ph data Session Layer Session Layer sh data Transport Layer Transport Layer th data Network Layer Network Layer data nh Data Link Layer Data Link Layer dt dh data Physical Layer Physical Layer bits
TCP/IP Network Architecture Application Layer Application Layer Transport Layer Transport Layer Internet Layer Internet Layer Network Interface Network Interface (b) (a)
Application Transport Internet Internet Network Interface Network Interface IP Layer and Network Interface Layer Machine B Machine A Application Transport Router/Gateway Internet Network Interface Network 1 Network 2
IP Hour-Glass Protocol Graph IP Network Interface 1 Network Interface 3 Network Interface 2 RTP SMTP HTTP DNS TCP UDP
(1,1) (a) (2,1) (2,2) router s PPP (1,3) r w Ethernet (1,2) (b) Server PC HTTP HTTP TCP Router TCP IP IP IP Net Interface Net Interface Net Interface Ethernet PPP
IP Datagram on an Ethernet IP Header Header contains source and destination physical addresses; network protocol type Frame Check Sequence Ethernet Header
HTTP Request Header contains source and destination port numbers TCP Header 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
socket interface socket interface Application 1 Application 2 user user kernel kernel Socket Socket Underlying communication Protocols Underlying communication Protocols Communications network
Server socket() bind() listen() Client accept() socket() blocks until server receives a connect request from client connect negotiation connect() data write() read() data write() read() close() close()
Server socket() Client socket() bind() bind() recvfrom() blocks until server sendto() data receives data from client sendto() data recvfrom() close() close()
User Interface Control Connection Server PI User PI Data Connection Server DTP User DTP Server FTP User FTP PI = Protocol interpreter DTP = Data transfer process
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 Reply from 128.100.244.3: bytes=32 time=118ms TTL=243 Reply from 128.100.244.3: bytes=32 time=118ms TTL=243 Reply from 128.100.244.3: bytes=32 time=118ms TTL=243 C:\WINDOWS>