IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.

Slides:



Advertisements
Similar presentations
Layer 3 of the TCP/IP protocol stack. Transport layer.
Advertisements

Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
CCNA – Network Fundamentals
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
CSCI 4550/8556 Computer Networks
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
Chapter 7: Transport Layer
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 7: Transport Layer Introduction to Networking.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Chapter 7 – Transport Layer Protocols
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Networking Theory (part 2). Internet Architecture The Internet is a worldwide collection of smaller networks that share a common suite of communication.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
Gursharan Singh Tatla Transport Layer 16-May
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
Electronic Mail (SMTP, POP, IMAP, MIME)
Process-to-Process Delivery:
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
1 Applications Electronic Mail. 2 Electronic Mail Many user applications use client-server architecture. Electronic mail client accepts mail.
1 Chapter Overview TCP/IP DoD model. 2 Network Layer Protocols Responsible for end-to-end communications on an internetwork Contrast with data-link layer.
Jaringan Komputer Dasar OSI Transport Layer Aurelio Rahmadian.
TCP/IP: Basics1 User Datagram Protocol (UDP) Another protocol at transport layer is UDP. It is Connectionless protocol i.e. no need to establish & terminate.
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
1 Version 3.0 Module 11 TCP Application and Transport.
Chap 9 TCP/IP Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
University of the Western Cape Chapter 12: The Transport Layer.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
Section 5: The Transport Layer. 5.2 CS Computer Networks John Mc Donald, Dept. of Computer Science, NUI Maynooth. Introduction In the previous section.
TCP/IP Transport and Application (Topic 6)
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
TCP/IP Honolulu Community College Cisco Academy Training Center Semester 2 Version 2.1.
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Computer Networks23-1 PART 5 Transport Layer. Computer Networks23-2 Position of Transport Layer Responsible for the delivery of a message from one process.
Transmission Control Protocol (TCP) BSAD 146 Dave Novak Sources: Network+ Guide to Networks, Dean 2013.
1 End-to-End Protocols User Datagram Protocol (UDP) Transmission Control Protocol(TCP)
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Process-to-Process Delivery:
IST 201 Chapter 11 Lecture 2. Ports Used by TCP & UDP Keep track of different types of transmissions crossing the network simultaneously. Combination.
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
The Transport Layer Implementation Services Functions Protocols
Chapter 9: Transport Layer
Module 1 UDP & TCP.
PART 5 Transport Layer Computer Networks.
CCNA 2 v3.1 Module 10 Intermediate TCP/IP
Process-to-Process Delivery:
TCP and UDP Layer 3 of the TCP/IP protocol stack. Transport layer
Networking Theory (part 2)
PART V Transport Layer.
PART 5 Transport Layer.
Process-to-Process Delivery: UDP, TCP
Networking Theory (part 2)
Presentation transcript:

IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted

Internet Control Message Protocol (ICMP) Separate Protocol for Errors and Information Part of IP Sends Error Messages to Original Source

ICMP Example Source Quench –Sent by router –Triggered by datagram overrun –Request sending host(s) to slow down Time Exceeded –TTL to Zero –Reassembly Timer

Destination Unreachable Redirect Parameter Problem Echo Request/Reply Address Mask Request/Reply

TCP: Reliable Transport Service  Internet Protocol (IP) provides ``unreliable datagram service'' between hosts  Transport protocols provide end-to-end delivery between endpoints of a connection; e.g., processes or programs  User Datagram Protocol (UDP) provides datagram service  Transmission Control Protocol (TCP) provides reliable data delivery

UDP: User Datagram Protocol  UDP delivers independent messages, called datagrams between applications or processes on host computers  ``Best effort'' delivery - datagrams may be lost, delivered out of order, etc.  Checksum (optionally) guarantees integrity of data  For generality, endpoints of UDP are called protocol ports or ports  Each UDP data transmission identifies the internet address and port number of the destination and the source of the message  Destination port and source port may be different

 UDP datagrams have a header that follows the hardware and IP headers: Hardware | IP | UDP | Application | Data  UDP header is very simple:  Port numbers  Message length  Checksum |UDP source port | UDP destination port | UDP message length | UDP checksum | Data

 Communicating computers must agree on a port number  ``Server'' opens selected port and waits for incoming messages  ``Client'' selects local port and sends message to selected port  Services provided by many computers use reserved, well-known port numbers:  ECHO  DISCARD  NTP  Other services use dynamically assigned port numbers

Port Name Description ____________________________________________________ 7 echo Echo input back to sender 9 discard Discard input 11 systat System statistics 13 daytime Time of day (ASCII) 17 quote Quote of the day 19 chargen Character generator 37 time System time (seconds since 1970) 53 domain DNS 69 tftp Trivial File Transfer Protocol (TFTP) 123 ntp Network Time Protocol (NTP) 161 snmp Simple Network Management Protocol (SNMP)

TCP Transmission Control Protocol (TCP) is most widely used transport protocol Provides reliable data delivery by using IP unreliable datagram delivery Compensates for loss, delay, duplication and similar problems in Internet components Reliable delivery is high-level, familiar model for construction of applications

Features  Connection oriented: Application requests connection to destination and then uses connection to deliver data to transfer data  Point-to-point: A TCP connection has two endpoints  Reliability: TCP guarantees data will be delivered without loss, duplication or transmission errors  Full duplex: The endpoints of a TCP connection can exchange data in both directions simultaneously  Stream interface: Application delivers data to TCP as a continuous stream, with no record boundaries; TCP makes no guarantees that data will be received in same blocks as transmitted  Reliable connection startup: Three-way handshake guarantees reliable, synchronized startup between endpoints  Graceful connection shutdown: TCP guarantees delivery of all data after endpoint shutdown by application

TCP uses many techniques described earlier to provide reliable delivery Recovers from  Lost packets  Duplicate packets  Delayed packets  Corrupted data  Transmission speed mismatches  Congestion  System reboots

Lost Packets TCP uses positive acknowledgment with retransmission to achieve reliable data delivery Recipient sends acknowledgment control messages (ACK) to sender to verify successful receipt of data Sender sets timer when data transmitted; if timer expires before acknowledgment arrives, sender retransmits (with new timer)

TCP Segments and Sequence Numbers Application delivers arbitrarily large chunks of data to TCP as a``stream'' TCP breaks this data into segments, each of which fits into an IP datagram Original stream is numbered by bytes Segment contains sequence number of data bytes

Acknowledgements Receiver sends segment with sequence number of acknowledged data (not segments) One ACK can acknowledge many segments

Timeouts Inappropriate timeout can cause poor performance:  Too long - sender waits longer than necessary before retransmitting  Too short - sender generates unnecessary traffic Timeout must be different for each connection and set dynamically  Host on same LAN should have shorter timeout than host 20 hops away  Delivery time across internet may change over time; timeout must accommodate changes

Timeout should be based on round trip time (RTT) Sender can't know RTT of any packet before transmission Sender picks retransmission timeout (RTO) based on previous RTTs Specific method is call adaptive retransmission algorithm

Sliding Window and Flow Control TCP uses sliding window for flow control Receiver specifies window  Called window advertisement  Specifies which bytes in the data stream can be sent  Carried in segment along with ACK Sender can transmit any bytes, in any size segment, between last acknowledged byte and within window size

Three-way Handshake TCP uses three-way handshake for reliable connection establishment and termination  Host 1 sends segment with SYN bit set and random sequence number  Host 2 responds with segment with SYN bit set, acknowledgment to Host 1 and random sequence number  Host 1 responds with acknowledgment TCP will retransmit lost segments Random sequence numbers ensure synchronization between endpoints

Client/Server Client initiates communication Server waits on clients, accepts their requests, and replies

Client  Arbitrary application program  Becomes client when network service is needed  Also performs other computations  Invoked directly by user  Runs locally on user's computer  Initiates contact with server  Can access multiple services (one at a time)  Does not require special hardware or sophisticated operating system

Server Special purpose application dedicated to providing network service Starts at system initialization time Runs on a remote computer (usually centralized, shared computer) Waits for service requests from clients; loops to wait for next request Will accept requests from arbitrary clients; provides one service to each client Requires powerful hardware and sophisticated operating system

Identifying a Service  Each service gets a unique identifier; both client and server use that identifier  Server registers with local protocol software under the identifier  Client contacts protocol software for session under that identifier  Example - TCP uses protocol port numbers as identifiers  Server registers under port number for service  Client requests session with port number for service

Sockets The socket is one form of interface between application programs and protocol software Widely available - program portability Used by both clients and servers Extension to UNIX file I/O paradigm Java, WinSock, etc...

API  Application interactions with protocol software:  Passive listen or active open  Protocol to use  IP address and port number  Interface to protocol is call Application Program Interface (API)  Defined by programming/operating system  Includes collection of procedures for application program

Socket API  Protocols do not typically specify API  API defined by programming system  Allows greatest flexibility - compatibility with different programming systems  Socket API is a specific protocol API  Originated with Berkeley BSD UNIX  Now available on Windows 95 and Windows NT, Solaris, etc.  Not defined as TCP/IP standard; de factostandard

Sockets and Unix I/O  Developed as extension to UNIX I/O system  Uses same file descriptor address space (small integers)  Based on open-read-write-close paradigm  open - prepare a file for access  read/write - access contents of file  close - gracefully terminate use of file  Open returns a file descriptor, which is used to identify the file to read/write/close

Domain Name Service (DNS) Maps IP address to symbolic addresses Symbolic Names must be resolved into IP addresses Frequently used names are cached

Electronic Mail Host portion is domain name Source mail client  Resolves destination name using DNS (MX, if available)  Contacts mail delivery server at destination  Copies mail to server Destination mail server  Interprets user name according to local mailbox addresses  Places mail in appropriate mailbox

Format Simple two-part format:  Header includes delivery information  Body carries text of message Header and body separated by blank line

MIME  Extends and automates encoding mechanisms - Multipart Internet Mail Extensions  Allows inclusion of separate components - programs, pictures, audio clips - in a single mail message  Sending program identifies the components so receiving program can automatically extract and inform mail recipient  Header includes: –MIME-Version: 1.0 –Content-Type: Multipart/Mixed; Boundary=Mime_separator  Separator line gives information about specific encoding  Plain text includes: –Content-type: text/plain

 MIME is extensible - sender and receiver agree on encoding scheme  MIME is compatible with existing mail systems  Everything encoded as ASCII  Headers and separators ignored by non-MIME mail systems  MIME encapsulates binary data in ASCII mail envelope

SMTP  Simple Mail Transfer Protocol (SMTP) is standard application protocol for delivery of mail from source to destination  Provides reliable delivery of messages  Uses TCP and message exchange between client and server  Other functions:  address lookup  address verification

POP  Instead of TELNET, use protocl that accesses mail on remote computer directly  TCP/IP protocol suite includes Post Office Protocol (POP) for remote mailbox access  Computer with mailboxes runs POP server  User runs POP client on local computer  POP client can access and retrieve messages from mailbox  Requires authentication (password)  Local computer uses SMTP for outgoing mail