Computer Network Unit 4 (Easy Notes ) Edushine Classes
Computer Network Unit 4 (Easy Notes ) Edushine Classes
Edushine Classes
Follow Us
Download Notes : https://rzp.io/rzp/ISpFCsNk
https://telegram.me/rrsimtclasses/
Computer Network (BCS603)
3. Connection Control
Some protocols like TCP create a connection before sending data.
📦 Example:
Before talking to someone, we say “Hello” first. Similarly, TCP does a 3-way
handshake to start a connection. UDP, however, sends without saying "Hello"
(connectionless).
4. Reliable Delivery
Making sure that the data reaches safely, completely, and in the right order.
📦 Example:
If you're downloading a file, the transport layer checks whether all parts of the file have
arrived. If any part is missing, it requests it again.
This is done using acknowledgments (ACKs) and retransmissions.
5. Error Control
Checks for errors in the data and fixes them if possible.
📦 Example:
If a video frame is corrupted during download, the transport layer can detect it and
request again. It uses a method like a checksum to do this.
6. Flow Control
Prevents fast senders from overloading slow receivers.
📦 Example:
You are sending messages to a friend, but your friend is replying slowly. You should wait.
The transport layer ensures this wait happens using a mechanism called a sliding window.
7. Congestion Control
Prevents the entire network from getting overloaded.
📦 Example:
If many people are watching YouTube at the same time, the transport layer may slow
down some connections so the network doesn’t crash.
Computer Network (BCS603)
🔹 What is a Process?
A process is simply a running program or application on a computer.
Example:
• WhatsApp is one process
• YouTube is another process
• Gmail is also a process
🔹 What is Process-to-Process Delivery?(Port to port)
When you send data (like a message, video, or file) from one device to another, the data
should not just reach the computer — it should reach the correct application (process)
on that computer.
✅ This is called Process-to-Process Delivery.
🔹 Real-Life Example:
Imagine you are sending letters to a big building 🏢 (a computer). Inside the building,
there are many people (processes).
You don’t just send the letter to the building — you write the name of the person on the
envelope (port number) so the letter reaches the correct person.
💡 Similarly, the transport layer uses port numbers to deliver data to the correct
application/process.
“Transport layer is responsible for making sure that the message goes from the right app
on sender’s computer to the right app on receiver’s computer. This is called process-to-
process delivery”
❌ No guarantee it reaches
✅ But it's very fast and has less overhead
🧠 Protocol that uses this:
• UDP (User Datagram Protocol)
1. 💡 What is TCP?
TCP (Transmission Control Protocol) is a connection-oriented protocol.
This means before sending data, it sets up a connection between two devices.
👉 It makes sure the data is:
• Delivered correctly
• Delivered in the correct order
• Delivered without loss
4. Acknowledgment Number
This is used to confirm that data was received.
Example: If a device gets data with sequence number 1001, it will send back an
acknowledgment number of 1002.
This is used to say “Hey, I received your data successfully up to this number.” It
confirms that the other side got the data.
5. Data Offset (Header Length)
It tells how long the header is so the receiver knows where the actual data starts.
This tells the receiver where the TCP header ends and the real data (message) begins.
6. Reserved
These are a few bits kept for future use. Normally set to 0.
These are just empty boxes saved for future features. They are not used currently and are se
7. Control Flags
These are important signals that help manage the connection:
Computer Network (BCS603)
Passive
Open
Active
Open
Computer Network (BCS603)
3. Faster Speed:
Because there is no connection setup and no error checking, UDP is very fast.
4. Lightweight Protocol:
UDP has less overhead (no extra steps or headers), making it efficient for time-sensitive
applications.
UDP Header Format (Total 8 Bytes = 64 bits) : (V.V.VIMP)
The UDP header is very small and simple — it is always 8 bytes long, and contains 4
fields, each 16 bits (2 bytes).
Computer Network (BCS603)
Multiplexing :
Multiplexing in the transport layer means:
Sending data from many applications through a single network connection.
Imagine your phone is running:
• WhatsApp
• YouTube
• Instagram
All these apps want to send and receive data — but your phone only has one IP
address and one network connection (like Wi-Fi or mobile data).
So how does your device know which data belongs to which app?
That’s where Multiplexing comes in.
1. Multiplexing 2. Demultiplexing
• Happens at Sender side • Happens at Receiver side
• Takes data from multiple apps • Looks at port number in the header
• Adds headers (with port numbers) • Sends data to the correct app
• Sends it over the network
Computer Network (BCS603)
Example:
You’re watching a YouTube video and chatting on WhatsApp at the same
time.
• YouTube uses port 8080
• WhatsApp uses port 5222
When packets come in, your system checks:
• “Is this for port 8080?” → send to YouTube
• “Is this for port 5222?” → send to WhatsApp
That’s demultiplexing in action.
🔁 What is Retransmission?
Retransmission means:
• Sending the data again if it was lost, damaged, or not acknowledged by the receiver.
• It’s a method used by TCP (Transmission Control Protocol) to ensure reliable delivery of
data.
🧠 Real-Life Example:
Imagine you sent a WhatsApp message to a friend, but they didn’t reply.
You might think: “Maybe they didn’t get it.”
So, you send the message again.
That’s retransmission — repeating the message to make sure it’s received.
🧠 Why It Matters:
✅ Helps avoid congestion
✅ Adjusts to receiver’s capacity
✅ Speeds up or slows down based on need
✅ Supports reliable and efficient communication
Congestion Control Techniques : Already Covered Same to same Unit 3 me hai.
🔄 How Does TCP Handle Congestion?(IMP) :
TCP uses 4 phases to control congestion:
1. Slow Start
• TCP starts sending data slowly.
• Begins with 1 segment, then doubles the data each time (1 → 2 → 4 → 8…).
• This continues until it reaches a limit called the threshold or congestion window
(cwnd).
✅ Goal: Check how much the network can handle.
2. Congestion Avoidance
• When TCP reaches the threshold, it stops doubling.
• Now it increases slowly (1 segment at a time).
• This avoids sudden overload.
✅ Goal: Grow carefully without causing congestion.
💡 Simple Example:
• Start: Send 1 packet
• Got ACK → Send 2 packets
• Got ACK → Send 4 packets
• Got ACK → Send 8 packets
• Then network drops a packet ❌ → congestion!
Now:
• TCP reduces sending speed
• Slowly increases again
✅ 1. Scheduling
• Traffic is arranged so that important packets go first.
Example: Give priority to video call data over file downloads.
🛠 Method:
• FIFO (First In First Out)
• Priority Queuing
• Weighted Fair Queuing (WFQ)
✅ 2. Traffic Shaping
• Controls the flow of outgoing data.
• It delays packets if too many are being sent at once.
🛠 Example: Leaky Bucket or Token Bucket algorithm
✅ 3. Resource Reservation
• Before sending, the sender reserves bandwidth and resources in the network.
• Ensures that when data is sent, the network is ready and not congested.
🛠 Protocol: RSVP (Resource Reservation Protocol)
Computer Network (BCS603)
✅ 4. Admission Control
• Before accepting a new traffic flow, the network checks if it can handle it.
• If not, it rejects or delays that flow to maintain QoS for existing traffic.
Quality of Service (QoS) is the ability of a network to provide better service to certain
types of traffic. It ensures that important applications like voice, video, and gaming work
smoothly without delay or data loss. To improve QoS, techniques like scheduling, traffic
shaping, resource reservation, admission control, and packet marking are used. These
help manage bandwidth, reduce delay, and give priority to critical data.
Computer Network (BCS603)
Thank You…