Week 10 - Routing Algorithms Flashcards

(33 cards)

1
Q

How is graph abstraction useful in networking contexts like P2P?

A

In P2P networks, the system can be modeled as a graph where N is the set of peers and E is the set of TCP connections, helping analyze connectivity and data flow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the difference between global and decentralized routing algorithms?

A
  • Global (Link State): All routers have complete topology and link cost info.
  • Decentralized (Distance Vector): Each router only knows info about its neighbors and exchanges data iteratively.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What distinguishes static from dynamic routing algorithms?

A
  • Static: Routes change slowly over time.
  • Dynamic: Routes update frequently, either periodically or in response to changes in link cost.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the goal and approach of Dijkstra’s Algorithm in routing?

A
  • Goal: Compute the least-cost paths from a source node to all other nodes.
  • Approach: Iteratively builds the set of nodes with known shortest paths using complete network topology and link cost info.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What key terms are used in Dijkstra’s Algorithm?

A
  • c(x, y): cost from node x to y (∞ if not directly connected)
  • D(v): current shortest path cost from source to v
  • p(v): predecessor of v on the shortest path
  • N’: set of nodes with confirmed shortest paths
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the time complexity of Dijkstra’s Algorithm and how can it be improved?

A

Basic implementation: O(n²) due to checking all nodes not in N′ during each of n iterations.

Optimized implementation (e.g., using a priority queue): O(n log n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What causes oscillations in Dijkstra’s Algorithm when link costs depend on traffic?

A
  • Cause: Link costs are based on the amount of traffic, so changes in routing affect traffic, which in turn alters the link costs, creating a feedback loop.
  • Result: This can cause oscillations, as new routes change the traffic load, leading to new cost calculations and potentially unstable routing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the key idea behind the Distance Vector algorithm?

A

The key idea is that each node periodically sends its own distance vector estimate to its neighbors, which helps in updating and computing the shortest paths in the network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does a node update its distance vector using the Bellman-Ford equation in the Distance Vector algorithm?

A

When node x receives a distance vector from a neighbor v, it updates its own vector for each destination y:
Dx(y)←minv{c(x,v)+Dv(y)}.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does the Distance Vector algorithm converge to the actual least cost?

A

Under minor natural conditions, the distance vector estimates will converge to the actual least cost from any node to every destination.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does the Distance Vector Algorithm operate in terms of updates?

A

It is iterative and asynchronous, where each local iteration occurs due to a local link cost change or a Distance Vector (DV) update message from a neighbor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How is the Distance Vector Algorithm distributed across the network?

A

Each node notifies its neighbors only when its distance vector changes. Neighbors then propagate updates to their neighbors if necessary.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What happens when a node receives a change in link cost or a message from a neighbor in the Distance Vector Algorithm?

A

The node recomputes its distance estimates and, if any estimates change, it notifies its neighbors to update them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does the Distance Vector Algorithm handle link cost changes?

A

When a node detects a local link cost change, it updates its routing information, recalculates its distance vector, and notifies its neighbors if the distance vector changes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What happens after a node detects a link cost change and updates its distance vector?

A

The node informs its neighbors, and the neighbors update their own distance tables and potentially propagate the changes further.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

In the Distance Vector Algorithm, what happens if a link cost increases?

A

If the link cost increases, the node recalculates the new least cost and informs its neighbors. The update propagates through the network, adjusting the routing tables as necessary.

17
Q

What is the message complexity of Link-State (LS) and Distance Vector (DV) algorithms?

A
  • LS: O(NE) messages with N nodes and E links.
  • DV: Exchange between neighbors only.
18
Q

How do Link-State (LS) and Distance Vector (DV) algorithms compare in terms of convergence time and robustness?

A
  • LS: O(N²) complexity, may have oscillations.
  • DV: Convergence time varies, may experience routing loops and count-to-infinity problems.
19
Q

How do Link-State (LS) and Distance Vector (DV) handle errors or router malfunctions?

A
  • LS: A node can advertise incorrect link cost, but each node computes only its own table.
  • DV: A node can advertise incorrect path costs, which propagate errors through the network as each node’s table is used by others.
20
Q

Why is hierarchical routing necessary in large-scale networks?

A
  • Scale: Storing all destination addresses in routing tables is not feasible (e.g., 600 million destinations).
  • Routing Table Exchange: Would overwhelm network links.
21
Q

What is the concept of administrative autonomy in hierarchical routing?

A
  • The Internet is a network of networks.
  • Each network admin may want to control routing within their own network.
22
Q

Why is the flat network model not realistic in practice?

A
  • All routers being identical and the network being flat doesn’t scale for large networks.
  • Hierarchical routing allows more efficient routing and better scalability.
23
Q

What is an Autonomous System (AS) in hierarchical routing?

A
  • An Autonomous System (AS) is a group of routers aggregated into a region.
  • Routers in the same AS run the same intra-AS routing protocol.
24
Q

What is the role of a Gateway Router in hierarchical routing?

A
  • A Gateway Router is located at the edge of its own AS.
  • It has a link to a router in another AS to facilitate communication between different ASes.
25
Can routers in different Autonomous Systems (ASes) run the same routing protocol?
- No, routers in different ASes may run different intra-AS routing protocols. - Each AS manages its internal routing independently.
26
What sets the entries in a router's forwarding table for internal destinations?
Intra-AS routing algorithms set entries for internal destinations within the same Autonomous System (AS).
27
What sets the entries in a router's forwarding table for external destinations?
Both inter-AS and intra-AS routing algorithms set entries for external destinations (i.e., destinations outside of the local AS).
28
What is the first task of inter-AS routing when a router in AS1 receives a datagram destined outside AS1?
AS1 must learn which destinations are reachable through neighboring ASes (e.g., AS2 or AS3).
29
What is the second task of inter-AS routing within AS1?
AS1 must propagate reachability information to all routers within AS1, so they know how to forward packets to the correct gateway.
30
How does AS1 learn that a subnet (e.g., x) is reachable via a specific gateway like 1c?
AS1 learns this via an inter-AS routing protocol, which propagates reachability information to all routers in the AS.
31
How does router 1d decide which interface to use to reach subnet x?
Router 1d uses intra-AS routing to determine that interface I lies on the least-cost path to gateway 1c, then installs the entry (x, I) in its forwarding table.
32
If subnet x is reachable via both AS2 and AS3, how does router 1d in AS1 decide where to forward packets?
The inter-AS routing protocol determines which gateway (AS2 or AS3) to use based on policy, performance, or cost criteria, then router 1d installs the forwarding table entry accordingly.
33