unit- 4 Transport Layer
TRANSPORT LAYER FUNCTIONS / SERVICES
- The transport layer is located between the network layer and the application layer.
- The transport layer is responsible for providing services to the application layer; it receives services from the network layer.
- The services that can be provided by the transport layer are
1. Process-to-Process Communication
2.Addressing : Port Numbers
3.Encapsulation and Decapsulation
4.Multiplexing and Demultiplexing
5.Flow Control
6. Error Control
7. Congestion Control
1. Process-to-Process Communication
- The Transport Layer is responsible for delivering data to the appropriate application process on the host computers.
- This involves multiplexing of data from different application processes, i.e. forming data packets, and adding source and destination port numbers in the header of each Transport Layer data packet.
- Together with the source and destination IP address, the port numbers constitutes a network socket, i.e. an identification address of the process-to-process communication.
2. Addressing:
Port Numbers
- Ports are the essential ways to address multiple entities in the same location.
- Using port addressing it is possible to use more than one network-based application at the same time.
- Three types of Port numbers are used :
Well-known ports - These are permanent port numbers. They range between
0 to 1023.These port numbers are used by Server Process.
Registered ports - The ports ranging from 1024 to 49,151 are not assigned or
controlled.
Ephemeral ports (Dynamic Ports) – These are temporary port numbers. They
range between 49152– 65535.These port numbers are used by Client Process
3. Encapsulation and Decapsulation
- To send a message from one process to another, the transport-layer protocol encapsulates and decapsulates messages.
- Encapsulation happens at the sender site. The transport layer receives the data and adds the transport-layer header.
- Decapsulation happens at the receiver site. When the message arrives at the destination transport layer, the header is dropped and the transport layer delivers the message to the process running at the application layer.
4. Multiplexing and Demultiplexing
- Whenever an entity accepts items from more than one source, this is referred to as multiplexing (many to one).
- Whenever an entity delivers items to more than one source, this is referred to as demultiplexing (one to many).
- The transport layer at the source performs multiplexing
- The transport layer at the destination performs demultiplexing
5. Flow Control
- Flow Control is the process of managing the rate of data transmission between two nodes to prevent a fast sender from overwhelming a slow receiver.
- It provides a mechanism for the receiver to control the transmission speed, so that the receiving node is not overwhelmed with data from transmitting node.
6. Error Control.
Error control at the transport layer is responsible for
1. Detecting and discarding corrupted packets.
2. Keeping track of lost and discarded packets and resending them.
3. Recognizing duplicate packets and discarding them.
4. Buffering out-of-order packets until the missing packets arrive.
Error Control involves Error Detection and Error Correction
7. Congestion Control
- Congestion in a network may occur if the load on the network (the number of packets sent to the network) is greater than the capacity of the network (the number of packets a network can handle).
- Congestion control refers to the mechanisms and techniques that control the congestion and keep the load below the capacity.
- Congestion Control refers to techniques and mechanisms that can either prevent congestion, before it happens, or remove congestion, after it has happened
Congestion control mechanisms are divided into two categories,
1. Open loop - prevent the congestion before it happens.
2. Closed loop - remove the congestion after it happens.
TRANSPORT LAYER PROTOCOLS
Three protocols are associated with the Transport layer.
They are
(1) UDP –User Datagram Protocol
(2) TCP – Transmission Control Protocol
(3) SCTP - Stream Control Transmission Protocol
Each protocol provides a different type of service and should be used appropriately.
UDP -
UDP is an unreliable connectionless transport-layer protocol used for its simplicity
and efficiency in applications where error control can be provided by the application-layer
process.
TCP - TCP is a reliable connection-oriented protocol that can be used in any application
where reliability is important.
SCTP - SCTP is a new transport-layer protocol designed to combine some features of UDP
and TCP in an effort to create a better protocol for multimedia communication.
USER DATAGRAM PROTOCOL (UDP)
- User Datagram Protocol (UDP) is a connectionless, unreliable transport protocol.
- UDP adds process-to-process communication to best-effort service provided by IP.
- UDP is a very simple protocol using a minimum of overhead.
- UDP is a simple demultiplexer, which allows multiple processes on each host to communicate.
- UDP does not provide flow control , reliable or ordered delivery.
- UDP can be used to send small message where reliability is not expected.
- Sending a small message using UDP takes much less interaction between the sender and receiver.
- UDP allow processes to indirectly identify each other using an abstract locator called port or mailbox.
UDP PORTS
- Processes (server/client) are identified by an abstract locator known as port.
- Server accepts message at well known port.
- Some well-known UDP ports are 7–Echo, 53–DNS, 111–RPC, 161–SNMP, etc. < port, host > pair is used as key for demultiplexing.
- Ports are implemented as a message queue.
- When a message arrives, UDP appends it to end of the queue.
- When queue is full, the message is discarded.
- When a message is read, it is removed from the queue.
- When an application process wants to receive a message, one is removed from the front of the queue.
- If the queue is empty, the process blocks until a message becomes available.
UDP DATAGRAM (PACKET) FORMAT
Comments
Post a Comment