0% found this document useful (0 votes)
6 views6 pages

Write The Service of Transport Layer

Chapter 3 discusses the transport layer's services, including multiplexing, reliable data transfer, flow control, and congestion control, highlighting the roles of TCP and UDP protocols. It explains the processes of multiplexing and demultiplexing, detailing connection-oriented and connectionless communication, along with the principles of reliable data transfer such as acknowledgments, timeouts, and error detection. Additionally, it covers the UDP header format and checksum for error detection in data transmission.

Uploaded by

PhooPwint Waddi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views6 pages

Write The Service of Transport Layer

Chapter 3 discusses the transport layer's services, including multiplexing, reliable data transfer, flow control, and congestion control, highlighting the roles of TCP and UDP protocols. It explains the processes of multiplexing and demultiplexing, detailing connection-oriented and connectionless communication, along with the principles of reliable data transfer such as acknowledgments, timeouts, and error detection. Additionally, it covers the UDP header format and checksum for error detection in data transmission.

Uploaded by

PhooPwint Waddi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Chapter 3

1.Write the service of transport Layer.

ANS

1. Multiplexing and Demultiplexing:

1. Multiplexing: The transport layer collects data from multiple application


processes and sends them to the network layer.

2. Demultiplexing: The receiving transport layer delivers incoming data to the


appropriate application.

2.Reliable Data Transfer:

Some transport protocols (like TCP) provide error checking, acknowledgments, and
retransmissions to ensure data is correctly received.

3.Flow Control:

Prevents the sender from overwhelming the receiver by regulating data transmission speed.

4.Congestion Control:

Helps prevent network congestion by adjusting the sender’s transmission rate based on
network conditions.

Two Main Transport Protocols for transport layer service:

 TCP (Transmission Control Protocol): Reliable, connection-oriented service with error


checking, flow control, and congestion control.

 UDP (User Datagram Protocol): Connectionless, unreliable, and lightweight, useful for
real-time applications like VoIP and video streaming.

2. Describe the types of Multiplexing and Demultiplexing in transport layer.

Multiplexing (At the Sender)

Multiplexing allows multiple applications on a single device to share the transport layer. The
transport layer collects data from different application-layer processes, encapsulates them
with transport-layer headers, and forwards them to the network layer.

Each transport-layer segment includes source and destination port numbers, which help
identify the sending and receiving application processes.
Demultiplexing (At the Receiver)

Demultiplexing ensures that incoming transport-layer segments are correctly delivered to the
appropriate application process. The transport layer examines the port numbers in the
segment header and directs the segment to the correct socket.

1. Connection-Oriented Multiplexing and Demultiplexing (TCP)

 Connection-oriented communication requires a setup phase before data is exchanged.

 It ensures reliable, ordered, and error-free data delivery.

 Each connection is identified by a 4-tuple:

 Source IP Address

 Source Port Number

 Destination IP Address

 Destination Port Number

 TCP assigns a unique socket for each connection, ensuring that multiple applications can
run simultaneously without interference. Example (Web Browsing - TCP) A user opens
multiple tabs in a browser to visit www.example.com and www.google.com

 TCP creates separate connections for each tab using different port numbers.

 The web server distinguishes requests based on the source port number and destination
IP address, ensuring that responses go to the correct tab.

 The advantages are ensures reliable, ordered, and complete data delivery.
2.Suitable for applications like web browsing (HTTP/HTTPS), email (SMTP, IMAP), and file
transfer (FTP). The disadvantages are slower due to connection setup and error
handling.

 2. Connectionless Multiplexing and Demultiplexing (UDP)

 No connection establishment before data transmission.

 Each UDP packet (datagram) is independent and does not track previous or future
packets.

 Identified by a 2-tuple:

 Destination IP Address

 Destination Port Number


 The receiver uses only the destination port to forward data to the correct application,
without maintaining session information. Example A user's computer sends a DNS
request to resolve "www.google.com" to an IP address.

 The request is sent over UDP without establishing a connection.

 The DNS server receives the request, processes it, and sends back a response to the
correct application using the destination port number.

 The advantages are faster connection and uses fewer system resources, making it
efficient for real-time applications like video streaming, gaming, and VoIP.

 The disadvantages are no reliability—packets may be lost or arrive out of order and
no congestion or flow control, which can lead to data loss if the network is overloaded.

3. Write the principles of Reliable Data Transfer

To achieve reliable data transfer, the following principles and mechanisms are typically involved:

1. Acknowledgments (ACKs)

When the receiver receives a data packet correctly, it sends an acknowledgment (ACK) back to
the sender, confirming the successful receipt of the data.

Positive Acknowledgment: The receiver sends an ACK to indicate the successful receipt of the
packet.

Negative Acknowledgment: Some protocols might send a negative acknowledgment (NAK) if an


error is detected.

2. Timeouts and Retransmission

 The sender sets a timeout period after sending a packet. If the sender doesn’t receive an
acknowledgment (or NAK) before the timeout expires, it will retransmit the data packet.

 Retransmission ensures that packets that were lost or corrupted during transmission are
sent again, increasing the reliability of the communication.

 The timeout period is crucial; it should be long enough to account for network delays
but short enough to retransmit lost packets promptly.

Sequence Numbers

 To avoid confusion between multiple copies of the same packet (in case of
retransmissions), sequence numbers are added to each packet.
 Sequence numbers help the receiver know the order in which packets are supposed to
be delivered and detect duplicates.

 The receiver uses the sequence number to identify if it has already received a particular
packet and to reassemble the data in the correct order.

4. Error Detection and Correction

 Checksums or cyclic redundancy checks (CRC) are commonly used to detect errors in
transmitted data.

 If a packet is received with errors (e.g., corrupted data), it is discarded, and the sender is
notified through the ACK/NAK mechanism.

 Some protocols may include error correction mechanisms, where the receiver can
correct errors in the data itself, although this is less common than error detection.

4. Describe about the UDP header format and its segment structure.

UDP Header Format

The UDP datagram consists of a header and the data being transmitted. The header includes the
following four fields (each 2 bytes long):

Source Port (2 bytes): The port number on the sender’s side.

Destination Port (2 bytes): The port number on the receiver’s side.

Length (2 bytes): The total length of the UDP header and the data.

Checksum (2 bytes): A checksum used for error checking of the header and data. This field is
optional in IPv4, but it is mandatory in IPv6.
5. List Internet applications and transport protocol in transport layer.

Checksum for Error Detection

Checksum is a method used to detect errors in data transmission or storage. It involves


calculating a small-size numerical value (checksum) from a block of data and sending it along
with the data. The receiver performs the same calculation and compares the result with the
received checksum to detect errors.
How Checksum Works for Error Detection

1. Data Division: The sender divides the data into fixed-size blocks (e.g., 16-bit or 32-bit
words).

2. Checksum Calculation: The sender adds up all blocks using binary addition and takes the
complement of the sum (usually 1’s complement or modulo sum).

3. Transmission: The sender transmits the original data along with the checksum.

4. Verification: The receiver performs the same checksum calculation on the received data
and compares it with the received checksum. If the values match, the data is assumed to
be correct. Otherwise, an error is detected.

You might also like