CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Winter 2004 Lecture 21 Introduction to Networks and the Internet.

Slides:



Advertisements
Similar presentations
CCNA – Network Fundamentals
Advertisements

© 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.
Guide to TCP/IP, Third Edition
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Winter 2008CS244a Handout #61 CS244a: An Introduction to Computer Networks Handout 6: The Transport Layer, Transmission Control Protocol (TCP), and User.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 7: Objectives Part 1
Chapter 7 – Transport Layer Protocols
TELE202 Lecture 14 TCP/UDP (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »TCP/UDP (1) »Source: chapter 17 ¥This Lecture »TCP/UDP (2) »Source: chapter.
Computer Networks 2 Lecture 2 TCP – I - Transport Protocols: TCP Segments, Flow control and Connection Setup.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Spring 2003 Week 7 Introduction to Networks and the Internet.
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Spring 2003 Week 9 Introduction to Networks and the Internet.
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Spring 2003 Week 8 Introduction to Networks and the Internet.
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Winter 2004 Lecture 19 Introduction to Networks and the Internet.
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.
2: Application Layer 1 1DT066 Distributed Information System Chapter 3 Transport Layer.
Winter 2005 CMPE 151: Network Administration Clients.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
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.
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?
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
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.
ECE453 – Introduction to Computer Networks Lecture 14 – Transport Layer (I)
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.
Transmission Control Protocol
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
ECE 4110 – Internetwork Programming
Transport Protocols.
1 End-to-End Protocols User Datagram Protocol (UDP) Transmission Control Protocol(TCP)
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Principles of reliable data transfer 0.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 3: Transport.
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).
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
Ch 3. Transport Layer Myungchul Kim
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Chapter 9: Transport Layer
Fast Retransmit For sliding windows flow control we waited for a timer to expire before beginning retransmission of a packet TCP uses an additional mechanism.
Instructor Materials Chapter 9: Transport Layer
Introduction to Networks
Process-to-Process Delivery, TCP and UDP protocols
Introduction of Transport Protocols
Process-to-Process Delivery:
Transport Protocols: TCP Segments, Flow control and Connection Setup
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Presentation transcript:

CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Winter 2004 Lecture 21 Introduction to Networks and the Internet

CMPE 80N - Introduction to Networks and the Internet 2 Announcements Library presentation on Wed. March 3 rd. “Internet behind the Web” video on March 10 th. 5 th. Quiz Friday, March 12 th. Final exam, Thu March 18 th. Stay tuned for: –Discussion sessions for 5 th. quiz. –Discussion sessions for final.

CMPE 80N - Introduction to Networks and the Internet 3 TCP (cont’d)

CMPE 80N - Introduction to Networks and the Internet 4 Delivering TCP TCP at destination interprets TCP messages

CMPE 80N - Introduction to Networks and the Internet 5 Features of TCP Connection-oriented. Reliable delivery. Ordered delivery. Flow and congestion control.

CMPE 80N - Introduction to Networks and the Internet 6 TCP Connection Setup 3-way handshake. Host 1 Host 2 SYN (SEQ=x) SYN(SEQ=y,ACK=x+1) (SEQ=x+1, ACK=y+1)

CMPE 80N - Introduction to Networks and the Internet 7 TCP and Reliable Delivery TCP provides reliable delivery, recovering from: –Lost packets –Duplicate packets –Delayed packets –Corrupted data –Source/destination mismatches –Congestion

CMPE 80N - Introduction to Networks and the Internet 8 TCP Reliability Reliable delivery. – Acknowledgements.. – Timeouts and retransmissions. Ordered delivery. –Sequence numbers.

CMPE 80N - Introduction to Networks and the Internet 9 Lost Packets Recipient sends acknowledgment control message (ACK) to sender to verify successful receipt of data –ACKs usually are carried onboard other TCP packets. –However, even if an application has nothing to transmit, it must transmit acknowledgment packets for each packet it receives. Thus, for each packet sent, a host expects to receive an acknowledgment, which ensures that the packet did not get lost. –What if the packet or the acknowledgment get lost?

CMPE 80N - Introduction to Networks and the Internet 10 Lost Packets (cont’d) Retransmission timer –When a data segment is sent, a timer is started –If the segment is acknowledged before the timer expires, the timer is stopped and reset –Otherwise, the segment is retransmitted (and the timer is reset and started again) The choice of the timeout is critical! –If timeout is too long: overall throughput may be reduced (always waiting for acknowledgments) –If timeout is too short: too many packets get retransmitted (may increase network congestion)

CMPE 80N - Introduction to Networks and the Internet 11 Lost Packets (cont’d) IMPORTANT: packet retransmission (especially if it has to be carried out on an end-to-end basis) significantly increases latency (delay) For real-time video or audio transmission, delay is a more important performance issue than error rate Thus, in many cases it is preferable to forget the error and simply work with the received data stream

CMPE 80N - Introduction to Networks and the Internet 12 Lost Packets - Example

CMPE 80N - Introduction to Networks and the Internet 13 TCP Transmission Sender process initiates connection. Once connection established, TCP can start sending data. Sender writes bytes to TCP stream. TCP sender breaks byte stream into segments. – Each byte assigned sequence number. – Segment sent and timer started.

CMPE 80N - Introduction to Networks and the Internet 14 TCP Transmission (cont’d) If timer expires, retransmit segment. –After retransmitting segment for maximum number of times, assumes connection is dead and closes it.

CMPE 80N - Introduction to Networks and the Internet 15 Flow Control Flow control is necessary so that source doesn’t transmit too fast for given receiver. –E.g., a fast server trying to send 1Gb/s data to a small PC. –Without some form of control, some data will get lost. Requires feedback from receiver. - So sender realizes it is sending too fast. - Depends on receiver’s storage (buffer) capacity.

CMPE 80N - Introduction to Networks and the Internet 16 Sliding Window TCP uses ACKs and sliding window mechanism for flow control.

CMPE 80N - Introduction to Networks and the Internet 17 TCP Sliding Window

CMPE 80N - Introduction to Networks and the Internet 18 TCP Flow Control: Example 2K;SEQ=0 ACK=2048; WIN=2048 2K; SEQ=2048 ACK=4096; WIN=0 ACK=4096; WIN=2048 1K; SEQ=4096 App. writes 2K of data 4K 2K 0 App. reads 2K of data 2K 1K App. does 3K write Sender blocked Sender may send up to 2K

CMPE 80N - Introduction to Networks and the Internet 19 Queuing Packets are queued inside router, waiting to be transmitted on outgoing link.

CMPE 80N - Introduction to Networks and the Internet 20 Queuing (cont’d) What happens if packets are coming in faster than router is able to forward them? –Needs to “queue” the packets as they are waiting to be transmitted. What happens when a queue becomes too long? –Packets are dropped! How can the receiver detected that a packet was dropped? –Look at the packet sequence number!

CMPE 80N - Introduction to Networks and the Internet 21 Congestion Network with 1 Mb/s lines and 1000 computers, half of which are trying to transfer files at 100 Kb/s to the other half. –The total offered traffic exceeds what the network can handle (congestion). Congestion collapse: –When congestion occurs, packets get dropped. –Due to packet loss, packets get retransmitted. –Congestions gets worse and worse!

CMPE 80N - Introduction to Networks and the Internet 22 Congestion Control Why do it at the transport layer? –Real fix to congestion is to slow down sender. Use law of “conservation of packets”. –Keep number of packets in the network constant. –Don’t inject new packet until old one leaves. Congestion indicator: packet loss.

CMPE 80N - Introduction to Networks and the Internet 23 TCP and Congestion Control Interprets packet loss as an indicator of congestion –When it senses packet loss, it slows down the rate of packet transmission –When packets are received correctly, sends packets faster Still within the limits of the sliding window

CMPE 80N - Introduction to Networks and the Internet 24 TCP Congestion Control Like, flow control, also window based. –Sender keeps congestion window (cwin). –Each sender keeps 2 windows: receiver’s advertised window and congestion window. –Number of bytes that may be sent is min(advertised window, cwin).

CMPE 80N - Introduction to Networks and the Internet 25 TCP Segment Header Source port Destination port Sequence number Acknowledgment number Header length UA PRSF Window size ChecksumUrgent pointer Options (0 or more 32-bit words) Data

CMPE 80N - Introduction to Networks and the Internet 26 UDP Provides connection-less, unreliable service. – No delivery guarantees. – No ordering guarantees. – No duplicate detection. Low overhead. – No connection establishment/teardown. Suitable for short-lived connections. –Example: client-server applications.

CMPE 80N - Introduction to Networks and the Internet 27 UDP Segment Format Source port Destination port Length Checksum Data Source and destination ports: identify the end points. Length: 8-byte header+ data. Checksum: optional; if not used, set to zero.

CMPE 80N - Introduction to Networks and the Internet 28 TCP and UDP TCP provides end-to-end communication. It takes care of reliable, error-free transfer of data, and in- sequence delivery UDP has less overhead compared to TCP, but does not guarantee transfers –TCP is preferred to transfer files –UDP is preferred to transfer audio/video streams In real-time streaming, we cannot afford the delay consequent to packet retransmission Both protocols support multiplexing, i.e. they allow several distinct streams of data between two hosts

CMPE 80N - Introduction to Networks and the Internet 29 The Domain Name System (DNS)

CMPE 80N - Introduction to Networks and the Internet 30 DNS IP addresses are not easy to remember. The Domain Name System (DNS) maps IP addresses to host names. Host name is formed by machine name followed by domain name. –Host_name.domain_name

CMPE 80N - Introduction to Networks and the Internet 31 DNS (cont’d) The domain_name is formed by the institutional site name and the Top-Level Domain name (TLD). –So the host name is of the form:machine_name.Ist_site_name.TLD_name Examples: –sundance.ucsc.edu –soe.ucsc.edu (alias for sundance.ucsc.edu) –italia.cse.ucsc.edu –helios.jpl.nasa.gov –

CMPE 80N - Introduction to Networks and the Internet 32 TLD TLD names identify organization types or country codes. Examples:. comCommercial org..auAustralia.eduEducational site in US.caCanada.govGovernment site in US.frFrance.milMilitary organization in US.deGermany.netNetwork site.ukGreat Britain.orgNonprofit organization.itItaly.esSpain Countries define their own internal hierarchy (e.g.,.ac.uk,.edu.au)

CMPE 80N - Introduction to Networks and the Internet 33 DNS (cont’d) Organizations can create any internal DNS hierarchy. Authority for creating new subdomains within a domain name is delegated to each domain. –Administration of ucsc.edu has authority to create cse.ucsc.edu and need not contact any central naming authority.

CMPE 80N - Introduction to Networks and the Internet 34 Example of DNS Hierarchy

CMPE 80N - Introduction to Networks and the Internet 35 DNS Name Space DNS names are managed by a hierarchy of DNS servers. –Hierarchy is related to DNS domain hierarchy Root server at top of tree knows about next level servers. Next level servers, in turn, know about lower level servers.

CMPE 80N - Introduction to Networks and the Internet 36 Example of DNS Hierarchy

CMPE 80N - Introduction to Networks and the Internet 37 Example of DSN Hierarchy (cont’d)

CMPE 80N - Introduction to Networks and the Internet 38 Choosing DNS Server Architecture Small organizations can use a single server. –Easy to administer. –Inexpensive. Large organizations often use multiple servers. –Reliability through redundancy. –Improved response time through load sharing.

CMPE 80N - Introduction to Networks and the Internet 39 Name Resolution “Resolving a name” means mapping the host name to the IP address. Reverse mapping is also possible. A client computer calls a DNS server for name resolution –DNS request contains name to be resolved. –DNS reply contains IP address for name in request.

CMPE 80N - Introduction to Networks and the Internet 40 Using DNS Servers Each DNS server is the authoritative server for the names it manages. –If request contains name managed by receiving server, that server replies directly. –Otherwise, request is forwarded to the appropriate authoritative server. DNS request is originally sent to root server, which points at next server to use –Eventually, the authoritative server for the DNS name in the request is located and IP address is returned.