Assignment 3 Word
Assignment 3 Word
Languages
(Faisalabad Campus)
Semester 5th
Assignment 03
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).
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.
Socket Programming:
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.
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.
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]