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

ACN Chapter 3 - Part 2 Notes

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 6

Ur Engineering Friend

Advance Computer Network

About Subject ACN ( elective ) -:


In Maharashtra State Board of Technical Education (MSBTE) diploma programs, an elective
subject is a course that students can choose from a set of options, in addition to the core
curriculum. Elective subjects allow students to tailor their education to their interests and
career goals by selecting topics that are not mandatory but are available as part of the broader
curriculum. These subjects often provide specialized knowledge and skills that can enhance a
student's expertise in a particular area of their field.

The "Advanced Computer Network" subject in a diploma or engineering program typically covers in-
depth topics related to computer networking. The curriculum aims to provide students with a
comprehensive understanding of advanced networking concepts, protocols, and technologies.

Chapters / Syllabus

1. Network Layers & Protocols

2. Next Generation IP

3. Unicast & Multicast Routing Protocols

4. Transport Layer Protocols

5. Application Layer Protocols

Join Maharashtra’s No. 1 Online Class – Course Details Youtube Channel


Ur Engineering Friend

Chapter 3 – Unicast & Multicast Routing Protocols

( Part 2 )

1.1 Distance Vector Algorithm

The Distance Vector Routing Algorithm is a method used by routers (devices that direct network
traffic) to figure out the best path to send data across a network.

It is used in routing protocols like RIP (Routing Information Protocol).

How the Distance Vector Algorithm Works:

1. Routing Table:
o Each router maintains a routing table. The table lists all the destinations it
knows, the cost to reach each destination, and the next hop (the neighboring
router to which it should forward the packet).

Join Maharashtra’s No. 1 Online Class – Course Details Youtube Channel


Ur Engineering Friend
o The cost typically refers to the number of hops, but it could also be based on
other metrics like delay, bandwidth, etc.
2. Initial Knowledge:
o Each router only knows the distance to its directly connected neighbors at the
beginning (cost of 1 hop to each neighbor).
3. Periodic Updates:
o Periodically, each router shares its routing table with its neighbors.
o When a router receives an update from a neighbor, it checks if it can improve
its own routes using the information from the neighbor’s table.
o It will add the cost of the link to the neighbor to the neighbor's reported
distances.
4. Bellman-Ford Algorithm:
o The distance vector algorithm relies on the Bellman-Ford algorithm to update
the routing table.
o After receiving new information, the router recalculates its routing table based
on this formula:

Distance to Destination = Distance to Neighbor + Distance from Neighbor to


Destination

• If the newly calculated distance is shorter than the current distance in the routing
table, the router updates its table.

Convergence:

• Over time, routers will exchange enough information that every router knows the best
route to every destination. This is known as the network converging.

Example of the Distance Vector Algorithm

Let’s consider a simple network of 4 routers: A, B, C, and D, connected as follows:

• A <-> B (cost = 1)
• A <-> C (cost = 3)

Join Maharashtra’s No. 1 Online Class – Course Details Youtube Channel


Ur Engineering Friend
• B <-> D (cost = 1)
• C <-> D (cost = 1)

At the start, each router only knows the cost to its directly connected neighbors:

Step-by-Step Update Process:

1. A sends its routing table to B and C:


o B learns that A can reach C in 3 hops. So, B adds this to its table: C via A
with a cost of 4.
o C learns that A can reach B in 1 hop, so it adds B via A with a cost of 4.
2. B sends its routing table to A and D:
o A learns from B that D can be reached via B with a cost of 2 (1 hop to B, and
1 hop from B to D).
o D learns that A can be reached via B with a cost of 2.
3. C sends its routing table to A and D:
o A already knows the cost to C, so no update happens for A.
o D learns that A can be reached via C with a cost of 4 (1 hop to C, and 3 hops
from C to A).
4. D sends its routing table to B and C:
o B learns that C can be reached via D with a cost of 2 (1 hop to D, 1 hop from
D to C). Since this is shorter than B’s current route to C (which was 4 via A),
B updates its table to show C via D with a cost of 2.

After the exchange of routing tables, the final routing tables would look like this:

Join Maharashtra’s No. 1 Online Class – Course Details Youtube Channel


Ur Engineering Friend
Router A:

Router B:

Router C:

Router D:

Key Issues with Distance Vector:

1. Slow Convergence:
o It takes time for the routers to exchange enough information to ensure all
routes are updated, especially in larger networks.
2. Count-to-Infinity Problem:

Join Maharashtra’s No. 1 Online Class – Course Details Youtube Channel


Ur Engineering Friend
o In some failure cases, routers may mistakenly keep increasing the cost to a
destination in a loop (this is called "counting to infinity").
o Solutions like split horizon and route poisoning are used to prevent such
loops.
3. Scalability:
o This algorithm can work well for smaller networks, but in very large networks,
it becomes inefficient due to the slow convergence and frequent updates.

Improvements and Alternatives:

• Split Horizon: A technique to prevent a router from sending information back to the
router from which it learned it, helping to prevent loops.
• Route Poisoning: A router marks a route as unreachable by setting the distance to
infinity if a link goes down, which helps other routers quickly learn that the route is
no longer available.
• Link State Routing: An alternative approach where each router has a complete map
of the network and calculates the shortest path using algorithms like Dijkstra’s.

Join Maharashtra’s No. 1 Online Class – Course Details Youtube Channel

You might also like