Module 3
Q1. Structure of a Router
A high-level view of a generic router architecture is shown below. Four router components can
be identified:
x Input ports: An input port performs several key functions.
It performs the physical layer function of terminating an incoming physical link at a router.
An input port also performs link-layer functions needed to interoperate with the link layer at
the other side of the incoming link.
The lookup function is also performed at the input port.
x Switching fabric: The switching fabric connects the router’s input ports to its output ports.
x Output port:. An output port stores packets received from the switching fabricand transmits
these packets on the outgoing link by performing the necessary link-layer and physical-layer
functions.
x Routing processor: The routing processor executes the routing protocols maintains routing
tables and attached link state information, and computes the forwarding table for the router. It
also performs the network management functions.x Router control plane functions are usually
implemented in software and execute on the
routing processor.
Q2. • LS Routing Algorithm
Dijkstra’s Algorithm
• Dijkstra’s algorithm computes the least-cost path from one node to all other nodes in the
network.
• Let us define the following notation:
1) u: source-node
2) D(v): cost of the least-cost path from the source u to destination v.
3) p(v): previous node (neighbor of v) along the current least-cost path from the source to v.
4) N’: subset of nodes; v is in N’ if the least-cost path from the source to v is known.
• Example: Consider the network in Figure 3.22 and compute the least-cost paths from u to all
possible destinations.
Figure 3.22: Abstract graph model of a computer network
Solution:
• Let’s consider the few first steps in detail.
1) In the initialization step, the currently known least-cost paths from u to its directly attached
neighbors,
v, x, and w, are initialized to 2, 1, and 5, respectively.
2) In the first iteration, we
→ look among those nodes not yet added to the set N’ and
→ find that node with the least cost as of the end of the previous iteration.
3) In the second iteration,
→ nodes v and y are found to have the least-cost paths (2) and
→ we break the tie arbitrarily and
→add y to the set N’ so that N’ now contains u, x, and y.
4) And so on. . . .
5) When the LS algorithm terminates,
We have, for each node, its predecessor along the least-cost path from the source.
A tabular summary of the algorithm’s computation is shown in Table 3.5
Table 3.5: Running the link-state algorithm
Figure 3.23 shows the resulting least-cost paths for u for the network in Figure 3.22.
Q3- List the broadcast routing algorithms. Explain any two of them.
Broadcast-routing means delivering a packet from a source-node to all other nodes in the
network.
Broadcast Routing Algorithms are:
• N-way Unicast
• Uncontrolled Flooding
• Controlled Flooding
• Spanning - Tree Broadcast
Spanning - Tree Broadcast
• This is another approach to providing broadcast. (MST Minimum Spanning Tree).
• Spanning-tree is a tree that contains each and every node in a graph.
• A spanning-tree whose cost is the minimum of all of the graph’s spanning-trees is called a
MST.
• Here is how it works (Figure 3.33):
1) Firstly, the nodes construct a spanning-tree.
2) The node sends broadcast-packet out on all incident links that belong to the
spanning-tree.
3) The receiving-node forwards the broadcast-packet to all neighbors in the
spanning-tree.
(Fig: Broadcast along a spanning-tree)
• Disadvantage:
Complex: The main complexity is the creation and maintenance of the spanning-tree.
Center Based Approach
• This is a method used for building a spanning-tree.
• Here is how it works:
1) A center-node (rendezvous point or a core) is defined.
2) Then, the nodes send unicast tree-join messages to the center-node.
3) Finally, a tree-join message is forwarded toward the center until the message either
→ arrives at a node that already belongs to the spanning-tree or
→ arrives at the center. (diagram)
Q4- Explain the intra-AS routing protocol in detail. Intra-AS Routing Protocol
• The routing-algorithm running within an autonomous-system is called intra-AS routing
protocol.
• All routers within the same AS must run the same intra-AS routing protocol. For ex: RIP
and OSPF
• Figure 6.C provides a simple example with three ASs: AS1, AS2, and AS3.
• AS1 has four routers: 1a, 1b, 1c, and 1d. These four routers run the intra-AS routing
protocol.
Q5 - Explain various broadcast routing algorithms.
N-way Unicast
• Given N destination-nodes, the source-node
→ makes N copies of the packet and
→ transmits then the N copies to the N destinations using unicast routing (Figure 3.31).
• Disadvantages:
1) Inefficiency
If source is connected to the n/w via single link, then N copies of packet will traverse
this link.
2) More Overhead & Complexity
An implicit assumption is that the sender knows broadcast recipients and their
addresses.
Obtaining this information adds more overhead and additional complexity to a protocol.
3) Not suitable for Unicast Routing
It is not good idea to depend on the unicast routing infrastructure to achieve broadcast.