Winter 20021 CMPE 155 Week 3. Winter 20022 Project 3: Basic Servers Telnet Rlogin FTP Web In this context, let’s look at the underlying protocols…

Slides:



Advertisements
Similar presentations
Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain Chapter 2 TCP/IP Fundamentals.
Advertisements

EE 4272Spring, 2003 Chapter 17 Transport Protocols Connection-Oriented Transport Protocol  Under Reliable Network Service  Design Issues  Under Unreliable.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
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.
Transport Layer – TCP (Part2) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
CSCI 4550/8556 Computer Networks
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
Networks I Transmission Control Protocol Instituto Tecnológico y de Estudios Superiores de Monterrey Campus Estado de México Prof. MSc. Ivan A. Escobar.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 7 – Transport Layer Protocols
EECC694 - Shaaban #1 lec #12 Spring Internet Transport Protocols Transmission Control Protocol (TCP):Transmission Control Protocol (TCP):
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.
TRANSPORT LAYER  Session multiplexing  Segmentation  Flow control (TCP)  Connection-oriented (TCP)  Reliability (TCP)
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
1 TCP CSE May TCP Services Flow control Connection establishment and termination Congestion control 2.
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Spring 2003 Week 7 Introduction to Networks and the Internet.
Winter 2005 CMPE 151: Network Administration Lecture 2.
CMPE 150 – Winter 2009 Lecture 17 March 5, 2009 P.E. Mantey.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 26 Introduction to Computer Networks.
Transport Layer Problems with network layer services
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
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.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Transport Layer.
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.
EE 4272Spring, 2003 Chapter 17 Transport Protocols Connection-Oriented Transport Protocol  Reliable Network Service: Design Issues  Unreliable Network.
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.
The Transport Layer.
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
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.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
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)
Copyright 2002, S.D. Personick. All Rights Reserved.1 Telecommunications Networking II Topic 20 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
The Transport Layer application transport network data link physical application transport network data link physical application transport network data.
1 TCP: Reliable Transport Service. 2 Transmission Control Protocol (TCP) Major transport protocol used in Internet Heavily used Completely reliable transfer.
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)
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.
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).
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
5. End-to-end protocols (part 1)
Transport Layer Unit 5.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Process-to-Process Delivery:
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Presentation transcript:

Winter CMPE 155 Week 3

Winter Project 3: Basic Servers Telnet Rlogin FTP Web In this context, let’s look at the underlying protocols…

Winter Client-Server Model Client Kernel File Server Kernel Printer Server Kernel

Winter What are protocols? Set of rules governing communication between network elements (applications, hosts, routers). Protocols define: –Format and order of messages. –Actions taken on receipt of a message. Protocols are hard to design –We need design guidelines!

Winter Protocol stack Host Application Transport Network Link User A User B Teleconferencing Layering: technique to simplify complex systems Peers

Winter Layering Characteristics Each layer relies on services from layer below and exports services to layer above. Interface defines interaction, Hides implementation - layers can change without disturbing other layers (black box).

Winter Encapsulation

Winter OSI Model: 7 Protocol Layers Physical: how to transmit bits Data link: how to transmit frames Network: how to route packets hop2hop Transport: how to send packets end2end Session: how to tie flows together Presentation: byte ordering, security Application: everything else!

Winter Layering Functionality Reliability Flow control Fragmentation Multiplexing Connection setup (handshaking) Addressing/naming (locating peers)

Winter Example: Transport layer First end-to-end layer. End-to-end state. May provide reliability, flow and congestion control.

Winter Example: Network Layer Point-to-point communication. Network and host addressing. Routing.

Winter The Internet Protocol Router Host Application Transport Network IP Network

Winter IP Glues Internet together. Common network-layer protocol spoken by all Internet participating networks. Best effort datagram service: –No reliability guarantees. –No ordering guarantees.

Winter Remote login protocols Telnet and rlogin. Allow interactive use of remote machines. Use reliable transport protocols, e.g., TCP. What’s TCP?

Winter The Internet Transport Protocols: TCP and UDP UDP: user datagram protocol (RFC 768). –Connection-less protocol. TCP: transmission control protocol (RFCs 793, 1122, 1323). –Connection-oriented protocol.

Winter 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.

Winter TCP Reliable end-to-end communication. TCP transport entity: – Runs on machine that supports TCP. – Interfaces to the IP layer. – Manages TCP streams. Accepts user data, breaks it down and sends it as separate IP datagrams. At receiver, reconstructs original byte stream from IP datagrams.

Winter TCP Reliability Reliable delivery. – ACKs. – Timeouts and retransmissions. Ordered delivery.

Winter TCP Service Model 1 Obtained by creating TCP end points. – Example: UNIX sockets. – Socket number or address: IP address + 16-bit port number (TSAP). – Multiple connections can terminate at same socket. –Connections identified by socket ids at both ends. – Port numbers below 1024: well-known ports reserved for standard services. List of well-known ports in RFC 1700.

Winter TCP Service Model 2 TCP connections are full-duplex and point-to-point. Byte stream (not message stream). – Message boundaries are not preserved e2e. A B C D byte segments sent as separate IP datagrams A B C D 2048 bytes of data delivered to application in single READ

Winter TCP Byte Stream When application passes data to TCP, it may send it immediately or buffer it. Sometimes application wants to send data immediately. – Example: interactive applications. – Use PUSH flag to force transmission. – TCP could still bundle PUSH data together (e.g., if it cannot transmit it right away). URGENT flag. – Also forces TCP to transmit at once.

Winter TCP Protocol Overview 1 TCP’s TPDU: segment. – 20-byte header + options. – Data. TCP entity decides the size of segment. – 2 limits: 64KByte IP payload and MTU. – Segments that are too large are fragmented. More overhead by addition of IP header.

Winter TCP Protocol Overview 2 Sequence numbers. – Reliability, ordering, and flow control. – Assigned to every byte. – 32-bit sequence numbers.

Winter 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)

Winter TCP Connection Release 1 Abrupt release: –Send RESET. –May cause data loss.

Winter TCP Connection Release 2 Graceful release: –Each side of the connection released independently. Either side send TCP segment with FIN=1. When FIN acknowledged, that direction is shut down for data. Connection released when both sides shut down. –4 segments: 1 FIN and 1 ACK for each direction; 1st. ACK+2nd. FIN combined.

Winter TCP Connection Release 3 Timers to avoid 2-army problem. – If response to FIN not received within 2*MSL (maximum segment lifetime), FIN sender releases connection. After connection released, TCP waits for 2*MSL (e.g., 120 sec) to ensure all old segments have aged.

Winter TCP Transmission 1 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.

Winter TCP Transmission 2 If timer expires, retransmit segment. –After retransmitting segment for maximum number of times, assumes connection is dead and closes it. If user aborts connection, sending TCP flushes its buffers and sends RESET segment. Receiving TCP decides when to pass received data to upper layer.

Winter TCP Flow Control Sliding window. –Receiver’s advertised window. Size of advertised window related to receiver’s buffer space. Sender can send data up to receiver’s advertised window.

Winter 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

Winter TCP Flow Control: Observations TCP sender not required to transmit data as soon as it comes in from application. –Example: when first 2KB of data comes in, could wait for more data since window is 4KB. Receiver not required to send ACKs as soon as possible. –Wait for data so ACK is piggybacked.

Winter 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.

Winter TCP Congestion Control 1 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).

Winter TCP Congestion Control 2 Slow start [Jacobson 1988]: –Connection’s congestion window starts at 1 segment. –If segment ACKed before time out, cwin=cwin+1. –As ACKs come in, current cwin is increased by 1. –Exponential increase.

Winter TCP Congestion Control 3 Congestion Avoidance: – Third parameter: threshold. – Initially set to 64KB. – If timeout, threshold=cwin/2 and cwin=1. – Re-enters slow-start until cwin=threshold. – Then, cwin grows linearly until it reaches receiver’s advertised window.

Winter TCP Congestion Control: Example threshold timeout threshold cwin time

Winter TCP Retransmission Timer When segment sent, retransmission timer starts. –If segment ACKed, timer stops. –If time out, segment retransmitted and timer starts again.

Winter How to set timer? Based on round-trip time: time between a segment is sent and ACK comes back. If timer is too short, unnecessary retransmissions. If timer is too long, long retransmission delay.

Winter Jacobson’s Algorithm 1 Determining the round-trip time: –TCP keeps RTT variable. –When segment sent, TCP measures how long it takes to get ACK back (M). –RTT = alpha*RTT + (1-alpha)M. –alpha: smoothing factor; determines weight given to previous estimate. –Typically, alpha=7/8.

Winter Jacobson’s Algorithm 2 Determining timeout value: –Measure RTT variation, or |RTT-M|. –Keeps smoothed value of cumulative variation D=alpha*D+(1-alpha)|RTT-M|. –Alpha may or may not be the same as value used to smooth RTT. –Timeout = RTT+4*D.

Winter Keepalive Timer Goes off when a connection is idle for a long time. Causes one side to check whether the other side is still alive. If no answer, connection terminated.

Winter TIME_WAIT 2*MSL. Makes sure all segments die after connection is closed.

Winter Back to remote login…

Winter Telnet User’s machine Telnet client OS TCP connection over Internet Telnet server OS

Winter Telnet basic operation When user invokes telnet, telnet client on user machine establishes TCP connection to specified server. TCP connection established; user’s keystrokes sent to remote machine. Telnet server sends back response, echoed on user’s terminal. Telnet server can accept multiple concurrent connections.

Winter Handling heterogeneity Telnet protocol specifies standard data exchange: network virtual terminal (NVT). Telnet client and server make translation.

Winter Rlogin Remote login between Unix hosts. Simpler than telnet.

Winter More details… Stevens, TCP/IP Illustrated, Vol. 1 Comer, Internetworking with TCP/IP, Vol. 1, 4 th. edition. RFC 854 (Telnet).

Winter File Transfer Sharing remote files: “on-line” access versus “file transfer”. “On-line” access transparent access to shared files, e.g., distributed file system. Sharing through file transfer: user copies file then operates on it.

Winter FTP File transfer accounted for most of the Internet traffic until the Web exploded! Also uses TCP. Allows interactive access; format specification (e.g., binary); authentication (clients required to authenticate themselves).

Winter FTP Operation Client Server OS DataControl OS DataControl TCP connection

Winter Port Assignment FTP server listens on well-known port (21); data transfer uses port 20. On client side, uses any unused port; client control process communicates that port number to server. Server process initiates data transfer connection.

Winter Anonymous FTP