24
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy Network Fundamentals CH4: TRANSPORT LAYER Abdelkhalik Elsaid Mosa [email protected] http://abdelkhalik.staff.scuegypt.edu.eg / Last Update: 10/7/2011 “In God we trust, all others bring data” - W. Edwards Deming

Network Fundamentals: Ch4 - Transport Layer

Embed Size (px)

DESCRIPTION

Transport layer is responsible for the overall end-to-end transfer of application data. Because different applications have different requirements, there are multiple Transport layer protocols. Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). TCP and UDP headers. Port Addressing, socket pair. Types of port numbers: Well Known Ports (0 to 1023), Registered Ports (1024 to 49151) and Dynamic or Private ‘Ephemeral’ Ports (49152 to 65535). Netstat command : examines the open connections on a host. Transport Layer Functions. TCP Connection Establishment (3-way handshake). Connection Management - Flow Control through buffering, congestion avoidance, and windowing. Flow Control – Reducing the window size . TCP Connection Termination (4-way Handshake).

Citation preview

Page 1: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Network Fundamentals

CH4: TRANSPORT LAYER

Abdelkhalik Elsaid [email protected]

http://abdelkhalik.staff.scuegypt.edu.eg/

Last Update: 10/7/2011

“In God we trust, all others bring data” - W. Edwards Deming

Page 2: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Introduction

• Layer 4, responsible for the overall end-to-end transfer of application data.

• Transport layer also encompasses these functions: 1. Enables multiple applications to communicate over the

network at the same time on a single device.2. Ensures that, if required, all the

data is received reliably and in order by the correct application.

3. Employs error handling mechanisms.

Page 3: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Applications Requirements Vary

• Because different applications have different requirements, there are multiple Transport layer protocols.

Page 4: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Data Encapsulation

TransportTransport

Data LinkData Link

PhysicalPhysical

NetworkNetwork

DataData

Header DataHeader Data

Presentation

Application

Session

Segment-Datagram

Packet

Bits

Frame

Header Segment / DatagramHeader Segment / Datagram

Header Packet TrailerHeader Packet Trailer

10000001111110000011100001000000111111000001110000

Page 5: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

TCP and UDP

• UDP is a simple, low overhead, connectionless protocol, RFC 768 Pieces of communication in UDP are called datagrams. Datagrams are sent as "best effort“ “Unreliable”. Applications that use UDP include: DNS,DHCP,SNMP,RIP, TFTP, Online games, Video Streaming, and VoIP.

• TCP is a connection-oriented, RFC 793, additional overhead Reliable delivery. Flow control which prevents overflow Applications that use TCP are: Web Browsers, E-mail, File Transfers.

Page 6: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Transport Layer Header

Page 7: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

TCP Header Fields

• Source port : a random value above 1023.• Destination port: Identifies the destination protocol or application.• Sequence number: the first byte in the current segment.

Is the SYN flag set or not??• Acknowledgement number: specifies the next expected byte by

the receiver.• Window size: determines how many bytes can be sent before

waiting for acknowledgement.• H.length (Offset): the length of the segment header in bytes.• Checksum: used for error checking.• Reserved: Reserved for future use and should be set to zero.

Page 8: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Port Addressing

• Port Number (L4 Addressing): Uniquely identifies applications. Server processes have static port numbers assigned to them. Clients dynamically choose a port number for each conversation.

• Socket: is the combination of the port number and the IP address, Ex: 198.16.23.213:80.

• Socket Pair: consists of the source and destination IP addresses and port numbers, is also unique and identifies the conversation between the two hosts.

• IANA is responsible for assigning various addressing standards.

Page 9: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Types of port numbers

1. Well Known Ports (0 to 1023): are reserved for services and applications such as HTTP (80), SMTP (25), DNS (53), ... .

2. Registered Ports (1024 to 49151): are assigned to user processes or applications such as MSN Messenger (1863).

3. Dynamic or Private ‘Ephemeral’ Ports (49152 to 65535): assigned dynamically to client applications when initiating a connection.

Well Known UDP Ports69 - TFTP520 - RIP

Well Known TCP/UDP Ports53 - DNS

161 - SNMP

Well Known TCP PortsTelnet: 23, SMTP:25, HTTP: 80, POP3: 110, HTTPS:443

Page 10: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Identifying Applications and hosts

• Netstat: examines the open connections on a host

192.168.1.101

172.16.5.5

Destination Port8080

Source Port

49890

49888

198.133.219.2549888

www.cisco.com

66.13.29.25

80

Source Port

Page 11: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Transport Layer Functions

• TCP/UDP Functions.1.Segmentation and Reassembly.2.Conversation Multiplexing using port numbers.3.Error detection.

• TCP Additional functions 1. Connection Establishment (3-way handshake)2. Connection Management.

Reliability (acknowledgements). Flow control (Buffering, congestion avoidance, windowing). Error correction .

3. Connection Termination (4-way handshake)

Page 12: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

At the source: Segmentation

• divides application data into blocks of data that are of appropriate size

Page 13: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

At the Destination: TCP in order Reassembly

• The Transport layer reassembles the data before sending it to the destination application or service.

Page 14: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

At the Destination: UDP Out of order Reassembly

• The Transport layer reassembles the data before sending it to the destination application or service.

Page 15: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Conversation Multiplexing

• Multiple Applications can use the network at the same time where each application is identified by unique port number.

Page 16: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

TCP Connection Establishment (3-way handshake)

• When two hosts communicate using TCP, a connection (Three-way handshake) is established before data can be exchanged.

Page 17: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Connection Management - Reliability

• At the Transport layer the three basic operations of reliability are:

1. Tracking transmitted data: keep track of all the data pieces of each conversation.

2. Acknowledging received data: The destination sends acknowledgements to the source for the segments that it receives.

3. Retransmitting any unacknowledged data: Retransmit any of data that were not acknowledged by the destination.

If the source does not receive an acknowledgement within a predetermined amount of time, it retransmits that data to the destination.

Page 18: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Connection Management - Flow Control

• Flow Control: the management of data flow between devices in the network. is a method of making sure that an excessive amount of data

doesn't overrun the end station. Example: imagine that PC A is running at 100 Mbps and PC B is running at

10 Mbps. If PC A sends something to PC B at full speed, 90 percent of the information will be lost because PC B cannot accept the information at 100 Mbps. This is the reason for flow control.

• Flow control Methods:1. Buffering2. Congestion Avoidance3. Windowing

Page 19: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Flow Control - Buffering & Congestion Avoidance

Page 20: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Flow Control - Windowing

• Window Size: The amount of data that a source can transmit before an acknowledgement must be received

Page 21: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Flow Control - Windowing

• Flow control assists the reliability of TCP transmission by adjusting the effective rate of data flow between the two services in the session.

Page 22: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Flow Control – Reducing the window size

• If a receiving host has congestion, it may respond to the sending host with a segment with a reduced window size.

Page 23: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

TCP Connection Termination (4-way Handshake)

Page 24: Network Fundamentals: Ch4 - Transport Layer

Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy

Thank You..