UNIT :-II
Routing Protocols
2.1 Routing Architecture:-
Explanation:-
• A router has four components namely, input ports,
output ports, the routing processor, and the switching
fabric.
• A router is a networking device that forwards data
packets between computer networks. It performs two
main functions namely, switching and queuing to
ensure efficient packet delivery.
• One or more packet-switched networks or subnetworks
can be connected using a router .By sending data
packets to their intended IP addresses, it manages
traffic between different networks and permits several
devices to share an internet connection.
Following are the major uses of a router:
1.Multiple Network Connection:
It connects multiple networks and forwards data packets that are destined for
direct or remotely attached network.
2.Managing Congestion:
It manages traffic between networks by forwarding data packets to the destination
address. It also allows multiple addresses to use the same internet connecton.
3.Providing Connectivity:
Large routers interconnect several Internet Service Providers (ISPs). Small routers
provide connectivity for homes and office networks.
4.Connecting Subnets:
Routers are used for connecting multiple logical groups
ofcomputer devices called subnets with the different network prefixes.
5. Port Forwarding:
They are also used for port forwarding among private ISPs.
6.Trafic Classification:
A router with the help of QoS, takes the decision on which data packet should be
first processed.
It performs the physical and data link layer functions of the router. The bits are constructed from the received signal. The packet is
decapsulated from the frame.
Errors are detected and corrected, The packet is ready to be forwarded by the network layer.
• It performs the same functions as the input port, but in the reverse order.
First the outgoing packets are queued, then the packet is encapsulated in
a frame, and finally the physical layer functions are applied to the frame
to create the signal to be sent on the line.
Routing Processor:-
• It executes routing protocols. It maintains routing information
and forwarding tables.
• It also performs network management functions within the
router.
Switching Fabric:-
• The switching fabric connects the router's input ports to
its output ports.
• Switching fabric is the combination of hardware and
software which moves data coming in to a network
node out by the correct port to the next node in the
network
• Today, routers use a variety of switching tabrics such
as crossbar switch, banyan switch and so on.
Types of Routers:-
1.Edge Router
2.Wireless Router
3.Virtual Router
4.Distribution Router
5.Core Router
Advantages :-
• Dynamic Routing
• Scalability
• Redundancy
• Efficient Routing
• Network Reliability
• Disadvantages :-
• Complexity
• Resource Intensive
• Security Risk
• Convergence Time
• Scalability Limitation
Routing Table:-
• Router table is a set of rules that helps network devices decide the best
path for data packets as they move from their source to a destination.
• A router is a networking device that forwards data packets between
computer network This device is usually connected to two or more
different networks.
• Each entry in the routing table consists of the following entries:
• Network ID: The network ID or destination corresponding to the route.
• Subnet Mask: The mask that is used to match a destination IP address
to the nerwork ID.
• Next Hop: The IP address to which the packet is forwarded
• Outgoing Interface: Outgoing interface the packet should go out to
reach the destination network.
• Metric: . A common use of the metric is to indicate the minimum
number of hops (routers crossed) to the nerwork ID.
Queueing and Switching:-
Queuing in Router:-
• The purpose of Queuing is to store packets temporarily
when the arrival rate exceeds the departure
rate,preventing packet loss due to congestion.
• Queuing is the process of storing packets in buffers
before forwarding them.
• Types of Queuing in Routers:-
1.FIFO(First –in-First-out):
The simplest form of queuing
Packets are processed in the order they arrive
No priority mechanism.
Assigns priority levels to packets.
• 2.Priority Queuing(PQ):-
Higher priority packets are transmitted first.
Risk:low priority packets
3.Weighted Fair Queuing(WFQ):-
Bandwidth is distribution among different flows.
Multimedia applications.
4.Round Robin Queuing:-
Each queue gets an equal opportunity to send
packets.
Resource allocation
Switching in Router:-
• Switching is the process of moving packets from the input interface
to the appropriate output interface.
• Types of Switching router-
1.Memory Based Switching:-
The router store incoming packets in memory before forwording them
CPU based operation , Slow and limited by memory speed.
2. Bus based Switching:
A shared bus connects input and output ports.
Packets wait for their turn to be transmitted over the bus.
Faster than memory switching but suffers from congestion.
3. Crossbar Based Switching:-
Use a matrix to directly connect input ports to output ports
Multiple packets to be switched simultaneously.
High performance but expensive
2.2 Routing Protocols:-
Intra-Domain Routing:-
• intra-domain routing protocols are used by routers
within a network to determine the best path for
forwarding packets to destinations within that same
network.
• When a packet of data leaves its source, there are many
different paths it can take to its destination.The routing
algorithm is used to determine mathematically the best
path to take.
The routing algorithm can be classified into following two types:
1. Static (Non-Adaptive) Routing Algorithms:
In this are type of algorithms, the network topology
determines the final path. All the possible paths already
calculated are loaded into the routing table.
Static routing is suitable for small networks. The
disadvantage of static routing is, inability to respond quickly
in case of network failure.
• 2. Dynamic (Adaptive) Routing Algorithms:
• The dynamic routing algorithms can change their routing
decision on the basis of some changes made in the topology.
• Each router can check the network status by communicating
with the neighbors. So, the changes in the topology are
reflected to all routers.
Distance Vector Routing:-
• Distance vector routing algorithm is the dynamic routing algorithm in
computer networks.Distance vector routin algorithm also known as
Bellman-Ford routing algorithm (also called Ford FuIKerSon algorithm)
to find the shortest path between nodes in a graph given the distance
between nodes.
• It was designed for small network topologies. Distance Vector Routing
(DVR) method sees an AS,with all routers and networks as a graph a
set of nodes and lines connected the nodes.
• A router can normally be represented by a node and a network by a
link Connecting two nodes,although other representations are also
possible.
• In distance vector routing algorithm. node router constructs a table
containing the distance (total cost of path) to all other nodes and
distributes that vector to its immediate neighbors.
• For distance vector routing. it is assumed that each node knows the
cost of the link to each of its directly connected neighbors.
The shortest path can be computed as:-
• Distance vector routing protocols are like road signs
because routers must make preferred path decisions based
on a distance or metric to a network.
• Just as travelers trust a road sign to accurately state the
distance to the next town, a distance vector router trusts
that another router is advertising the true distance to the
destination network.
• In distance vector routing, the least-cost route between any
two nodes is the route with minimum distance (mi).
• In this protocol, as the name implies, each node maintains
a vector (table) of minimum distances to every node. The
table at each node also guides the packets to the desired
node by showing the next Stop in the route(next hop
routing)
Initialization:-
Explanation:-
• The tables in Fig. 2.7 are stable: each node knows how
to reach any other node and the cost. At the beginning,
however, this is not the case. Each node can know only
the distance between itself and its immediate
neighbors, those directly connected to it. So, for the
moment, we assume that each node can send a
message to the immediate neighbors and find the
distance between itself and these neighbors. The
distance for any entry that is not a neighbor is marked
as infinite (unreachable).
Sharing:-
Explanation:-
• Sharing: The whole idea of distance vector routing is
the sharing of information between neighbors. Although
node A does not know about node E, node C does. So, if
node C shares its routing table with A, node A can also
know how to reach node E. On the other hand, node C
does not know how to reach node D, but node A does. If
node A shares its routing table with node C, node C also
knows how to reach node D. In other words, nodes A
and C, as immediate neighbors, can improve their
routing tables if they help each other.
Updating:-
• Updating: When a node receives a two-column table
from a neighbor, it needs to update its routing table
Updating takes following three steps:
• Step 1: The receiving node needs to add the cost
between itself and the sending node to each value in
the second column. The logic is clear. If node C claims
that its distance to a destination is X mi, and the
distance between A andC is y mi, then the distance
between A and that destination, via C, is x + y mi.
• Step 2: The receiving node needs to add the name of
the sending node to each row as the third column if the
receiving node uses information from any row. The
sending node is the next node in the route.
• Step 3: The receiving node needs to compare each row
of its old table with the corresponding row the modified
version of the received table.
• (i) If the next-node entry is different, the receiving node
chooses the row with the smaller cost. If there is a tie,
the old one is kept.
• (ii) If the next-node entry is the same, the receiving
node chooses the new row.
Routing Information Protocol(RIPv2):-