Presentation is loading. Please wait.

Presentation is loading. Please wait.

CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 26 Introduction to Computer Networks.

Similar presentations


Presentation on theme: "CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 26 Introduction to Computer Networks."— Presentation transcript:

1 CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 26 Introduction to Computer Networks

2 CMPE 150- Introduction to Computer Networks 2 Announcements Homework 5 posted. –Due, Mon, 12.05. There will be a lab this week. –Wed session will be looonger! Final exam: December 7 th. 4-7pm –In class. –Closed books/notes. Course evaluation. –Last day of class. CE 151 will be offered in Winter 06!

3 CMPE 150- Introduction to Computer Networks 3 Today Transport Layer! –Chapter 6 of Tanenbaum.

4 CMPE 150- Introduction to Computer Networks 4 The Transport Layer End-to-end. –Communication from source to destination host. –Only hosts run transport-level protocols. –Under user’s control as opposed to network layer which is controlled/owned by carrier.

5 CMPE 150- Introduction to Computer Networks 5 The Transport Service Service provided to application layer. Transport entity: process that implements the transport protocol running on a host. –Typically at OS kernel, or user-level process.

6 CMPE 150- Introduction to Computer Networks 6 The Transport Layer Transport Entity Application Layer Network Layer Transport address Network Address Transport/ network interface Application/ transport interface Transport Entity Application Layer Network Layer TPDU Source host Destination host TPDU = Transport Protocol Data Unit

7 CMPE 150- Introduction to Computer Networks 7 Types of Transport Services Connection-less versus connection-oriented. Connection-less service: no logical connections, no flow or error control. Connection-oriented: –Based on logical connections: connection setup, data transfer, connection teardown. –Flow and error control.

8 CMPE 150- Introduction to Computer Networks 8 Transport Protocol Issues: Addressing Address of the transport-level entity. TSAP: transport service access point (analogous to NSAP). –Internet TSAP: (IP address, local port). –Internet NSAP: IP address. –There may be multiple TSAPs on one host. –Typically, only one NSAP.

9 CMPE 150- Introduction to Computer Networks 9 Addressing: Example TSAPs, NSAPs and transport connections.

10 CMPE 150- Introduction to Computer Networks 10 Finding Services Well-known TSAP. –Time-of-day server has been using TSAP 1522 forever so every users know it.

11 CMPE 150- Introduction to Computer Networks 11 Finding Services Alternative Name or directory service. –Name server listens to well-known TSAP. –User sends service name and name server responds with service’s TSAP. –New services need to register with name server.

12 CMPE 150- Introduction to Computer Networks 12 The Internet Transport Layer Two main protocols: –TCP: Transmission Control Protocol. –UDP: User Datagram Protocol.

13 CMPE 150- Introduction to Computer Networks 13 UDP

14 CMPE 150- Introduction to Computer Networks 14 UDP RFC 768. No connection establishment. No reliability. No ordering. No flow- or congestion control.

15 CMPE 150- Introduction to Computer Networks 15 The UDP Header 8 bytes. Optional checksum.

16 CMPE 150- Introduction to Computer Networks 16 TCP

17 CMPE 150- Introduction to Computer Networks 17 Transmission Control Protocol RFCs 793, 1122, and 1323. Reliable end-to-end. Expects unreliable network.

18 CMPE 150- Introduction to Computer Networks 18 The TCP Service Model Ports below 1024 are reserved. Some assigned ports (for more look at www.iana.org). PortProtocol Use 21 FTP File transfer 23 Telnet Remote login 25 SMTP E-mail 69 TFTP Trivial File Transfer Protocol 79 FingerLookup info about a user 80 HTTP World Wide Web 110 POP-3 Remote e-mail access 119 NNTP USENET news

19 CMPE 150- Introduction to Computer Networks 19 TCP Connections Point-to-point. Full duplex. Byte stream.

20 CMPE 150- Introduction to Computer Networks 20 The TCP Service Model (2) (a) Four 512-byte segments sent as separate IP datagrams. (b) The 2048 bytes of data delivered to the application in a single READ CALL.

21 CMPE 150- Introduction to Computer Networks 21 TCP Segment Header: –20 bytes mandatory. –Options. Payload: –Up to (64 Kbytes – 20 -20) of data.

22 CMPE 150- Introduction to Computer Networks 22 The TCP Header

23 CMPE 150- Introduction to Computer Networks 23 Connection Establishment

24 CMPE 150- Introduction to Computer Networks 24 Three-Way Handshake Solves the problem of getting 2 sides to agree on initial sequence number. CR (seq=x) ACK(seq=y,ACK=x) DATA(seq=x, ACK=y) CR: connection request. 1 2

25 CMPE 150- Introduction to Computer Networks 25 Delayed Duplicates. Old duplicate CR.. The ACK from host 2 tries to verify if host 1 was trying to open a new connection with seq=x.. Host 1 rejects host 2’s attempt to establish. Host 2 realizes it was a duplicate CR and aborts connection. CR(seq=x) * ACK(seq=y, ACK=x) REJECT(ACK=y) 1 2

26 CMPE 150- Introduction to Computer Networks 26 Delayed Duplicates. Old duplicate CR and ACK to connection accepted. CR(seq=x) * ACK(seq=y, ACK=x) REJECT(ACK=y) 1 2 DATA(seq=x, ACK=z)

27 CMPE 150- Introduction to Computer Networks 27 TCP Connection Establishment 6-31

28 CMPE 150- Introduction to Computer Networks 28 Sequence Numbers versus Time 1 Seq. #’s Time. Linear relation between time and initial sequence number.

29 CMPE 150- Introduction to Computer Networks 29 Connection Release Asymmetric release: telephone system. –When one party hangs up, connection breaks. –May cause data loss. Symmetric release: –Treats connection as 2 separate unidirectional connections. –Requires each to be released separately.

30 CMPE 150- Introduction to Computer Networks 30 Symmetric Release How to determine when all data has been sent and connection could be released? 2-army problem: Blue army 1 White army Blue army 2. White army larger than either blue armies.. Blue army together is larger.. If each blue army attacks, it’ll be defeated. They win if attack together.

31 CMPE 150- Introduction to Computer Networks 31 2-Army Problem To synchronize attack, they must use messengers that need to cross valley: unreliable. Is there a protocol that allows blue army to win? No. –Blue army 1 sends message to blue army 2. –Blue army 2 sends ACK back. –Blue army 2 is not sure whether ACK was received.

32 CMPE 150- Introduction to Computer Networks 32 2-Army Problem (Cont’d) Use 2-way handshake. –Blue army 1 ACKs back but it’ll never know if the ACK was received. Applying to connection release: –Neither side is prepared to disconnect until convinced other side is prepared to disconnect. –In practice, hosts are willing to take risks.

33 CMPE 150- Introduction to Computer Networks 33 Connection Release Protocol DR ACK DR: disconnection request. Send DR+ start timer Send DR+ start timer Release connection Send ACK Release connection

34 CMPE 150- Introduction to Computer Networks 34 Connection Release: Scenario 1 DR ACK DR: disconnection request. Send DR+ start timer Send DR+ start timer Release connection Send ACK Timeout: Release connection

35 CMPE 150- Introduction to Computer Networks 35 Connection Release: Scenario 2 DR DR: disconnection request. Send DR+ start timer Send DR+ start timer Timeout: send DR+ start timer Release connection DR Send DR+ start timer DR ACK

36 CMPE 150- Introduction to Computer Networks 36 TCP Connection Release Each side released independently. –TCP segment with FIN bit set. –Means that side has no more data to send. When both sides have shutdown, connection is released,

37 CMPE 150- Introduction to Computer Networks 37 TCP Connection Release FIN FIN ACK FIN FIN ACK Timers to avoid 2-army problem.


Download ppt "CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 26 Introduction to Computer Networks."

Similar presentations


Ads by Google