0% found this document useful (0 votes)
14 views4 pages

Assignment 3 Word

Uploaded by

Muhammad Junaid
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)
14 views4 pages

Assignment 3 Word

Uploaded by

Muhammad Junaid
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/ 4

National University of Modern

Languages
(Faisalabad Campus)

Subject Computer Network

Semester 5th

Assignment 03

Date 16 Dec 2024

Student Name Muhammad Junaid Akbar

Student Roll No FSD-FL-114


Question:1:
Differentiate between the Link State and Distance Vector Routing
Algorithms.

Link State Routing Algorithm: [1]

 How it Works: Each router builds a complete map of the network by exchanging
information about the state of its links with all other routers. Using this data, it computes
the shortest path using algorithms like Dijkstra's.
 Communication: Sends link-state advertisements (LSAs) to all routers in the network
when a change occurs.
 Convergence: Rapid convergence because all routers have a global view of the network.
 Scalability: Performs efficiently in large networks due to selective updates and efficient
routing.
 Protocols: Examples include OSPF (Open Shortest Path First) and IS-IS (Intermediate
System to Intermediate System).

Distance Vector Routing Algorithm:

 How it Works: Routers share information only with their neighbors and update their
routing tables based on the shortest path calculated using the Bellman-Ford algorithm.
 Communication: Periodic updates are exchanged with neighbors, even if the topology
hasn’t changed.
 Convergence: Slower convergence, prone to routing loops and count-to-infinity
problems.
 Scalability: Best suited for smaller networks due to limitations in update mechanisms.
 Protocols: Examples include RIP (Routing Information Protocol) and EIGRP (Enhanced
Interior Gateway Routing Protocol).

Key Differences

 Link State provides a global view and fast convergence, while Distance Vector relies on
neighbors’ information, leading to slower and less reliable updates.

Question:2:
What's the difference between API and socket programming? Justify with
examples.

API (Application Programming Interface): [2]

 Purpose: Provides predefined methods to allow different software components to


communicate. It abstracts underlying processes like network communication.
 Abstraction Level: High-level, focusing on ease of integration without needing low-
level implementation details.
 Use Case: A web application retrieving weather data using the OpenWeatherMap API.

Socket Programming:

 Purpose: Focuses on real-time communication between devices using network protocols


like TCP or UDP.
 Abstraction Level: Low-level, requiring manual management of connections, data
transfer, and error handling.
 Use Case: Real-time chat applications, where the server and client directly exchange
messages, often rely on sockets.

Key Differences:

 APIs abstract complex operations for simpler integration, while socket programming
involves managing the entire communication pipeline.

Question:3:
Discuss opening and closing and the silly window syndrome concerning flow
control. Second, talk about acknowledgments and retransmissions in terms of
error control. Third, talk about TCP detection policies and congestion control.

Flow Control: Opening, Closing, and Silly Window Syndrome: [3]

 Opening and Closing: Flow control mechanisms ensure data is sent at a rate the receiver
can handle. The sliding window protocol adjusts the transmission based on
acknowledgment from the receiver.
 Silly Window Syndrome: This inefficiency occurs when small packets are sent
frequently due to poorly managed buffer sizes. TCP uses the Nagle algorithm to combine
smaller packets into larger ones, reducing overhead.

Error Control: Acknowledgments and Retransmissions:

 Acknowledgments: Confirm the successful delivery of data. TCP uses acknowledgment


numbers to track received data.
 Retransmissions: Occur when an acknowledgment is not received within the timeout
period or if errors are detected in the received packet. This ensures reliability and
correctness in data transmission.
TCP Detection Policies and Congestion Control:

 Detection Policies:
o Timeout-Based Detection: Identifies lost packets when acknowledgments are
delayed.
o Duplicate Acknowledgments: Detects missing packets through repeated
acknowledgments for the same data.
 Congestion Control:
o Slow Start: Gradually increases the transmission rate until a threshold is reached.
o Congestion Avoidance: Adjusts the congestion window based on network
feedback.
o Fast Retransmit and Recovery: Retransmits lost packets quickly without
waiting for a timeout, ensuring minimal data loss.

References

1. Peterson, L., & Davie, B. (2021). Chapter 5, network layer protocols. Computer
Networks: A Systems Approach (6th ed.). Morgan Kaufmann. [1]
2. Forouzan, B. A. (2020). Chapter 6, transport layer concepts. Data Communications and
Networking (5th ed.). McGraw-Hill. [2]
3. Tanenbaum, A. S., & Wetherall, D. J. (2011). Chapter 6, transport layer protocols.
Computer Networks (5th ed.). Prentice Hall. [3]

You might also like