OSI Transport Layer

46
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1 Version 4.0 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 Public 1Version 4.0

OSI Transport Layer

Network Fundamentals – Chapter 4

Page 2: OSI Transport Layer

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

3© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer Role and Services Transport layer is responsible for overall end-to-end

transfer of application data

Page 4: OSI Transport Layer

4© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer Role and Services Transport layer enables applications on devices to

communicate Fig 4.2

Page 5: OSI Transport Layer

5© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Purpose of Transport Layer

Tracking the individual communications between applications on the source and destination hosts

Segmenting data and managing each piece Reassembling the segments into streams of application

data Identifying the different applications Performing flow control between end users Enabling error recovery Initiating a session

Page 6: OSI Transport Layer

6© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

1. Tracking Individual Conversation Any host can have multiple applications communicating

across the network TL maintain the multiple communication streams

between these applications. Ex. Email, IM, Websites and VoIP simultaneously Fig 4-3

Page 7: OSI Transport Layer

7© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Segmenting Data AL passes large amounts of data to TL TL has to break data into smaller pieces =segments –

suited transmission Without segmentations, only one application would be

able to receive data Fig 4.4

Page 8: OSI Transport Layer

8© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Reassembling Segments

Networks prove multiple routes – diff trans times Data can arrives in the wrong order Numbering and sequencing – TL ensure segments are

reassembled into the proper order Each segment of data reassembled and directed to

appropriate application.

Page 9: OSI Transport Layer

9© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Identifying the Applications To pass data streams to the proper applications TL must identify target application TL assigns an identifier to an application In TCP/IP, the identifier = port number Port number used in TL header to indicate which

application the data is associated Each particular set of pieces flowing between a source

application and destination application is known as conversation

Dividing data into small parts enables many diff comm to be interleaved/multiplexed on the same network

Page 10: OSI Transport Layer

10© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Flow Control

Network hosts have limited resources – memory, bandwidth

When TL aware, some protocol can request the sending application to reduce the rate of data flow

This is done at TL by regulating the amount of data source transmits as a group.

=FLOW CONTROL Prevent the loss of segments on net and avoid

retransmission

Page 11: OSI Transport Layer

11© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Error Recovery Possible Piece of data corrupted or lost while transmitted over

the network TL ensure all pieces reach destination – source device

retransmit any data that is lost

Initiating a Session TL can provide connection orientation by creating a

session between the app. These connections prepare the app to communicate

with each other before any data transmitted Data can be closely managed

Page 12: OSI Transport Layer

12© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer Role and Services Supporting Reliable Communication

• Diff apps have diff requirements for their data• Diff transport protocols have been developed to meet these

requirements• TCP is a TL protocol – ensure reliable delivery• In networking, reliability means each piece of data the source

sends arrives at the destination• Three basic operation at TL to support reliability

• Tracking transmitted data• Acknowledging received data• Retransmitting any unacknowledged data

• More control data (in Layer 4 header) is exchanged to support acknowledgement, tracking and retransmission

Page 13: OSI Transport Layer

13© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer Role and Services Supporting Reliable Communication

Page 14: OSI Transport Layer

14© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP and UDP

Two most common TL protocols of TCP/IP are Transmission Control Protocol (TCP) and User

Datagram Protocol (TCP)

Page 15: OSI Transport Layer

15© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP Simple and connectionless protocol Low-overhead data delivery 8 bytes of overhead UDP segments = datagrams UDP sends datagrams as ‘best effort’ Applications of UDP

• DNS• Video Streaming• VoIP

Page 16: OSI Transport Layer

16© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer Role and Services Identify the basic characteristics of the UDP and TCP

protocols

Page 17: OSI Transport Layer

17© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Connection-Oriented protocol Additional overhead to gain functions Additional functions

• Same-order delivery• Reliable delivery• Flow-control

• Each TCP segments has 20 bytes of overhead

• Applications• Web browsers• E-mail• File transfer

Page 18: OSI Transport Layer

18© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer Role and Services Identify the basic characteristics of the UDP and TCP

protocols

Page 19: OSI Transport Layer

19© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport Layer Role and Services

Page 20: OSI Transport Layer

20© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Port Addressing

TCP and UDP based services keep track of various applications.

To differentiate segments and datagrams for each application – TCP and UDP have header fields that uniquely identify these apps.

Header contains source and dest port Server processes have static port number assigned Client dynamically choose a port number for each

conversation.

Page 21: OSI Transport Layer

21© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Port Addressing Identifying Conversations

Page 22: OSI Transport Layer

22© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Port Addressing

The combination of TL port number and NL IP address uniquely identifies a particular process running on specific host device.

This combination = socket Ex : Web server on host 192.168.1.20, web browser

(dynamically assigned port 49152) on host 192.168.100.48

Destined socket = 192.168.1.10:80 Socket for the web page = 192.168.100.48:49152

Page 23: OSI Transport Layer

23© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Port Addressing

Page 24: OSI Transport Layer

24© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Port Addressing

Different types of port numbers • Well-known ports (0-1023)

• Reserved for services and apps• FTP 20, SMTP 25, HTTP 80

• Registered Ports (1024-49151)• Assigned to user processes or application

• Dynamic or private ports (49152-65535)

• Netstat command

Page 25: OSI Transport Layer

25© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Connection Establishment and Termination TCP Three-Way Handshake Three steps in TCP connection establishment:

1. Initiating client sends a segment containing an initial sequence value.2. Server responds with segment containing an acknowledgement value of received sequence+1, plus its own synchronizing sequence value3. Initiating client responds with an acknowledgement received sequence+1

Fig 4.11

Page 26: OSI Transport Layer

26© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Connection Establishment and Termination

Page 27: OSI Transport Layer

27© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Session Termination

Client has no more data to send, it sends a segment with FIN flag set

The server sends an ACK to acknowledge the receipt of the FIN to terminate the session from client to server

The server sends a FIN to the client to terminate server to client session

Client responds with ACK to acknowledge the FIN from server

Fig 4-12

Page 28: OSI Transport Layer

28© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Session Termination

Page 29: OSI Transport Layer

29© 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 30: OSI Transport Layer

30© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Managing TCP Sessions TCP Acknowledgement with Windowing

• The sequence number indicates the relative number of bytes that have been transmitted in this session, including the bytes in the current segment.

• TCP use acknowledgement number in segment sent back to indicate the next byte expects to receive.

• Fig 4-13• But if A had to wait for ack of the receipt of each 10

bytes – lot of overhead

Page 31: OSI Transport Layer

31© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Managing TCP Sessions TCP Acknowledgement with Windowing

Page 32: OSI Transport Layer

32© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Managing TCP Sessions TCP Acknowledgement with Windowing

• Multiple segments of data can be sent and ack with a single TCP message in opposite direction.

• Ex start with SEQ = 2000, if 10 segments of 1000bytes were received, an ACK = 12001 would be returned to the source.

• Amount of data can be transmitted before ACK = window size

• Window size is a field in TCP header used for management of lost data and flow control

Page 33: OSI Transport Layer

33© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Retransmission Data loss will occasionally occur Dest host using TCP only ack data for contiguous

sequence bytes If one or more segments are missing, only segments

that complete the stream is ack Ex. Segments with SEQ=1500 to 3000 and SEQ=3400

to 3500 were received, the ACK will be =3001

Page 34: OSI Transport Layer

34© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Retransmission

Page 35: OSI Transport Layer

35© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Congestion Control

Flow Control & Dynamic Window Sizes

Page 36: OSI Transport Layer

36© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Congestion Control

Flow Control• Adjusting the effective rate of data flow.• Window size field in TCP header specifies amount of data can

be transmitted before an ACK• Initial window size determined through 3-way handshake• TCP feedback mechanism adjusts the effective rate to the

maximum flow network and destination can support without loss• Fig 4-14• During the delay in receiving the ACK, sender will not sent

additional segments for the session

Page 37: OSI Transport Layer

37© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Congestion Control

Dynamic Window Size• When network resources are constrained, TCP can reduce the

window size• After no data losses or constrained resources, receiver will

begin to increase the window size field• This dynamic increasing and decreasing of window size is a

continuous process in TCP

Page 38: OSI Transport Layer

38© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

TCP Congestion Control

Page 39: OSI Transport Layer

39© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP Protocol Communicating with low overhead

Page 40: OSI Transport Layer

40© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP Protocol Simple protocol Basic TL functions Not connection oriented Does not provide sophisticated retransmission,

sequencing and flow control mechanism UDP does not provide reliability..so be careful.. but, are not always unreliable just the reliability is not

provided

Page 41: OSI Transport Layer

41© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP Datagram Reassembly Session are not established When app has data to send, it simply sends the data When larger amounts of data – split into multiple

segments =datagrams Multiple datagrams – may take different paths and

arrives in the wrong order UDP has no way to reorder the datagrams into their

transmission order. UDP simply reassembles the data in order it was

received and forward to app If seq is important for app, the app will have to identify

the proper sequence and how it should be processed

Page 42: OSI Transport Layer

42© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP Datagram Reassembly

Page 43: OSI Transport Layer

43© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP Protocol Servers use port numbers to identify a specified

application layer process and direct segments to the proper service or application

Page 44: OSI Transport Layer

44© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

UDP Protocol UDP protocol and port numbers are utilized in client-

server communication

Page 45: OSI Transport Layer

45© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

Page 46: OSI Transport Layer

46© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public