Unit 5
Unit 5
9. What is the difference between TCP and UDP in one line?
➤ TCP is reliable and connection-oriented, while UDP is faster and
connectionless.
✅ Definition:
The client-server paradigm is a network architecture where one machine (client) requests
services or data from another machine (server) that provides those services.
✅ How it works:
● The client initiates communication.
✅ Example:
● When you open a browser and visit www.google.com:
✅ Real-Life Examples:
Client Server
Use Case File transfer, web, email Video streaming, gaming, VoIP
✅ Conclusion:
Use TCP when accuracy is critical. Use UDP when speed is more important than accuracy.
3. Explain the concept of flow control in transport layer.
✅ Definition:
Flow control is a technique used to manage the rate of data transmission between
sender and receiver.
✅ Why Needed?
To prevent the sender from overwhelming the receiver, especially if the receiver
processes data slowly.
○ Sender sends one frame, waits for acknowledgment before sending the next.
✅ Used In:
TCP uses sliding window protocol for efficient flow control.
✅ Full Form:
User Datagram Protocol
✅ Features:
● Connectionless: No setup required before data transfer.
✅ Use Cases:
● Live video/audio streaming
● Online games
● VoIP (Voice over IP)
✅ Structure:
UDP packet has a simple header:
● Source port
● Destination port
● Length
● Checksum
🔸 Working of TCP:
Connection Establishment – 3-Way Handshake:
Client Server
|---SYN---->|
|<--SYN+ACK-|
|---ACK---->|
1.
○ Client sends SYN to start.
3.
✅ Application Layer:
Top-most layer in OSI model. Provides user interface and services for network
communication.
✅ Role:
● Supports process-to-process communication
Sure! Here are some numericals related to Unit 5: Transport and Application Layer,
focusing on concepts like TCP sequence numbers, flow control, and basic IP addressing
relevant to the transport/application layer.
● What will be the sequence number of the next byte to be sent after these three
segments?
Solution:
● How many segments can the sender send now without waiting for more ACKs?
Solution:
● So, sender can send 2 more segments to keep the window full.
Solution:
● ACK is sent immediately after SYN-ACK without waiting for another RTT.
● A client uses IP address 192.168.1.5 and port number 4500 to communicate with a
server IP 172.16.5.10 on port 80.
Solution:
Solution:
● Time = 20 seconds
Great! Here are some numericals with step-by-step solutions on Subnetting and TCP
Sliding Window (Flow Control) — both very important for networking exams.
🔢 Subnetting Numericals
Numerical 1: Find the number of subnets and hosts per subnet
Step 1: Convert subnet mask to binary and find number of subnet bits
● 255.255.255.240 in binary:
11111111.11111111.11111111.11110000
Answer:
● IP address: 192.168.5.65
● 255.255.255.192 = 11111111.11111111.11111111.11000000
● Block size = 256 - last octet subnet mask value = 256 - 192 = 64
Answer:
Solution:
● Sender can send segments 6 and 7 (two more to keep window size 5)
● If the sender has sent segments with seq numbers 0, 1, 2 and received ACK for 1,
Solution: