OSI Transport Layer

26
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4

description

OSI Transport Layer. Network Fundamentals – Chapter 4. Objectives. Explain the role of Transport Layer protocols and services in supporting communications across data networks Analyze the application and operation of TCP mechanisms that support reliability - PowerPoint PPT Presentation

Transcript of OSI Transport Layer

Page 1: OSI Transport Layer

© 2007 Cisco Systems, Inc. All rights reserved. Cisco PublicITE PC v4.0Chapter 1 1

OSI Transport Layer

Network Fundamentals – Chapter 4

Page 2: OSI Transport Layer

ITE PC v4.0Chapter 1 2© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Objectives Explain the role of Transport Layer protocols and

services in supporting communications across data networks

Analyze the application and operation of TCP mechanisms that support reliability

Analyze the application and operation of TCP mechanisms that support reassembly and manage data loss.

Analyze the operation of UDP to support communicate between two processes on end devices

Page 3: OSI Transport Layer

ITE PC v4.0Chapter 1 3© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer Role of Transport layer

Page 4: OSI Transport Layer

ITE PC v4.0Chapter 1 4© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport layer

The purpose :–Tracking the individual communication between application on the source and destination host

–Segmenting data and managing each piece

–Reassembling the segment into stream of application

–Identifying the different application

–Performing flow control between end user

– enabling error discovery

–Initiating a session

Page 5: OSI Transport Layer

ITE PC v4.0Chapter 1 5© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

5

Transport Layer

Primary responsibilities:

–Tracking the individual communication between applications

–Segmenting data

–Managing each segment

–Reassembling the segments

–Identifying the different applications

Page 6: OSI Transport Layer

ITE PC v4.0Chapter 1 6© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer Major functions of the transport layer and the role it

plays in data networks

Page 7: OSI Transport Layer

ITE PC v4.0Chapter 1 7© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

7

Transport Layer

Protocols:

–TCP

–UDP

IP is a best-effort delivery service

–No guarantees

–Best-effort service

–“Unreliable service”

TCP/UDP is responsible for extending IP’s delivery service between two end systems.

–Known as transport layer multiplexing and demultiplexing.

segment

segment

Page 8: OSI Transport Layer

ITE PC v4.0Chapter 1 8© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer Role and Services Supporting Reliable Communication

Page 9: OSI Transport Layer

ITE PC v4.0Chapter 1 9© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport layer

2 protocol involve (UDP & TCP)– UDP

Charateristic Application

Minimal delay in data delivery

DNS

Low overhead Video streaming

Connectionless Voice Over IP (VoIP)

Page 10: OSI Transport Layer

ITE PC v4.0Chapter 1 10© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer

TCP

Charateristic Application

Flow control Web browser

Connectionless service E mail

Numbering & sequencing File transfer

Page 11: OSI Transport Layer

ITE PC v4.0Chapter 1 11© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

11

TCP vs. UDP

TCP provides:

–Reliable delivery

–Error checking

–Flow control

–Congestion control

–Ordered delivery

–(Connection establishment)

–Applications:

•HTTP

•FTP

•Telnet

•MSN messenger

UDP provides: Unreliable delivery No error checking No flow control

No congestion control No ordered delivery

(No connection establishment)

Applications DNS (usually)

SMTP DHCP

RTP (Real-Time Protocol) VoIP

Page 12: OSI Transport Layer

ITE PC v4.0Chapter 1 12© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

12

A single client may have multiple transport connections with multiple servers.

Notice that TCP is a connection-oriented service (two-way arrow) between the hosts, whereas UDP is a connectionless service (one-way arrow) . (later)

TCPTCP

TCP

TCP

TCP

TCP

HTTP

HTTP

FTP

UDP

SMTP

UDP

Cabrillo Web

Server

ISP’s Email and FTP

Server

Page 13: OSI Transport Layer

ITE PC v4.0Chapter 1 13© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Port Numbers Group (page 110)-use netstat

Type Number Example

Well Known ports•Reserved for service & application

0 to 1023 20 – FTP – TCP23 – telnet – TCP520 – RIP - UDP

Register Port• assigned to user processes or application

1024 to 49151 1863-MSN Messenger –TCP5060 – SIP – UDP

Dynamic or Private Port• ephemeral port to initiating a connection

49152 to 65535 53 – DNS – TCP/UDP161 –SNMP – TCP/UDP

Page 14: OSI Transport Layer

ITE PC v4.0Chapter 1 14© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Laye port numbers play in the TCP and UDP protocols.

Page 15: OSI Transport Layer

ITE PC v4.0Chapter 1 15© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application and Operation of TCP Mechanisms port numbers in establishing TCP sessions and

directing segments to server process

Page 16: OSI Transport Layer

ITE PC v4.0Chapter 1 16© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application and Operation of TCP Mechanisms

Trace the steps in the handshake in the establishment of TCP sessions

Page 17: OSI Transport Layer

ITE PC v4.0Chapter 1 17© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application and Operation of TCP Mechanisms Trace the steps in the handshake in the establishment

of TCP sessions

Page 18: OSI Transport Layer

ITE PC v4.0Chapter 1 18© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Application and Operation of TCP Mechanisms Trace the steps in the handshake in the termination of

TCP sessions

Page 19: OSI Transport Layer

ITE PC v4.0Chapter 1 19© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Managing TCP Sessions Describe how TCP sequence numbers are used to

reconstruct the data stream with segments placed in the correct order

Page 20: OSI Transport Layer

ITE PC v4.0Chapter 1 20© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

20

TCP: Connection Establishment

For a connection to be established, the two end stations must synchronize on each other's TCP initial sequence numbers (ISNs).

Sequence numbers :

–Track the order of packets

–Ensure that no packets are lost in transmission.

The initial sequence number is the starting number used when a TCP connection is established.

Exchanging beginning sequence numbers during the connection sequence ensures that lost data can be recovered.

0 15 16 31

16-bit Source Port Number

16-bit Destination Port Number

32-bit Sequence Number

32 bit Acknowledgement Number

4-bit Header Length

6-bit (Reserved)

URG

ACK

PSH

RST

SYN

FIN

16-bit Window Size

16-bit TCP Checksum

16-bit Urgent Pointer

Options (if any)

Data (if any)

Page 21: OSI Transport Layer

ITE PC v4.0Chapter 1 21© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

21

Three-way Handshake

Step 1:

The three-way handshake happens before any data, HTTP Request (GET), is sent by the client.

A TCP client begins the three-way handshake by sending a segment with the SYN (Synchronize Sequence Number) control flag set, indicating an initial value in the sequence number field in the header.

The sequence number is the Initial Sequence Number (ISN), is randomly chosen and is used to begin tracking the flow of data from the client to the server for this session.

ClientSYN, SEQ=8563

SYN Received

Web Server

Note: ISNs do not start a 0 or 1. There are several

reasons for this including segments that may still be in buffers and also security issues. (Beyond the scope

of this presentation.)

Page 22: OSI Transport Layer

ITE PC v4.0Chapter 1 22© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

22

Three-way Handshake

Step 2:

The TCP server needs to acknowledge the receipt of the SYN segment.

Server sends a segment back to the client with:

–ACK flag set indicating that the Acknowledgment number is significant.

•The value of the acknowledgment number field is equal to the client initial sequence number plus 1.

•This is called an expectational acknowledgement – the next byte this host expects to receive (more soon).

–SYN flag is set with its own random ISN for the Sequence number

ClientSYN, SEQ=8563

SYN, ACK, SEQ=1678 ACK=8564

SYN Received

SYN, ACK Received

Web Server

Page 23: OSI Transport Layer

ITE PC v4.0Chapter 1 23© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

23

Three-way Handshake

Step 3:

TCP client responds with a segment containing an ACK that is the response to the TCP SYN sent by the server.

The value in the acknowledgment number field contains one more than the initial sequence number received from the server.

The client can now send application data encapsulated in TCP segment.

–HTTP Request (GET)

ClientSYN, SEQ=8563

SYN, ACK, SEQ=1678 ACK=8564

ACK, SEQ=8564 ACK=1679

SYN Received

SYN, ACK Received

ACK Received

Web Server

HTTP Request (GET)

Page 24: OSI Transport Layer

ITE PC v4.0Chapter 1 24© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Managing TCP Sessions TCP that manage the interrelationship between window size, data loss and congestion

during a session through 2 way – flow control & Dynamic Window size

Page 25: OSI Transport Layer

ITE PC v4.0Chapter 1 25© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

Page 26: OSI Transport Layer

ITE PC v4.0Chapter 1 26© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public