0% found this document useful (0 votes)
161 views

Types of Routing

There are three main types of routing: 1. Static routing, where routes are manually configured and require administrator knowledge of network topology. 2. Default routing, where all packets are forwarded to a single router. It is used for stub routers with one path to other networks. 3. Dynamic routing uses routing protocols to automatically discover network destinations and optimal paths, adjusting when routes fail. Distance vector and link state protocols differ in how routing information is shared between routers.

Uploaded by

muluken
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
161 views

Types of Routing

There are three main types of routing: 1. Static routing, where routes are manually configured and require administrator knowledge of network topology. 2. Default routing, where all packets are forwarded to a single router. It is used for stub routers with one path to other networks. 3. Dynamic routing uses routing protocols to automatically discover network destinations and optimal paths, adjusting when routes fail. Distance vector and link state protocols differ in how routing information is shared between routers.

Uploaded by

muluken
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 34

Types of Routing

Routing is a process that is performed by layer 3 (or network layer) devices in order to
deliver the packet by choosing an optimal path from one network to another. 
There are 3 types of routing: 
 
1. Static routing – 
Static routing is a process in which we have to manually add routes to the routing table. 
Advantages – 
 No routing overhead for router CPU which means a cheaper router can be used to do
routing. 
 It adds security because an only administrator can allow routing to particular networks
only. 
 No bandwidth usage between routers. 
Disadvantage – 
 For a large network, it is a hectic task for administrators to manually add each route
for the network in the routing table on each router. 
 The administrator should have good knowledge of the topology. If a new
administrator comes, then he has to manually add each route so he should have very
good knowledge of the routes of the topology. 
Configuration – 
 
R1 having IP address 172.16.10.6/30 on s0/0/1, 192.168.20.1/24 on fa0/0. 
R2 having IP address 172.16.10.2/30 on s0/0/0, 192.168.10.1/24 on fa0/0. 
R3 having IP address 172.16.10.5/30 on s0/1, 172.16.10.1/30 on s0/0, 10.10.10.1/24 on
fa0/0. 
Now configuring static routes for router R3: 
R3(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.2
R3(config)#ip route 192.168.20.0 255.255.255.0 172.16.10.6
Here, provided the route for 192.168.10.0 network where 192.168.10.0 is its network I’d
and 172.16.10.2 and 172.16.10.6 are the next-hop address. 
 
Now, configuring for R2: 
R2(config)#ip route 192.168.20.0 255.255.255.0 172.16.10.1
R2(config)#ip route 10.10.10.0 255.255.255.0 172.16.10.1
R2(config)#ip route 172.16.10.0 255.255.255.0 172.16.10.1
Similarly for R1: 
R1(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.5
R1(config)#ip route 10.10.10.0 255.255.255.0 172.16.10.5
R1(config)#ip route 172.16.10.0 255.255.255.0 172.16.10.5
2. Default Routing – 
This is the method where the router is configured to send all packets towards a single
router (next hop). It doesn’t matter to which network the packet belongs, it is forwarded
out to the router which is configured for default routing. It is generally used with stub
routers. A stub router is a router that has only one route to reach all other networks. 
 
Configuration – 
Using the same topology which we have used for the static routing before. 
 
In this topology, R1 and R2 are stub routers so we can configure default routing for both
these routers. 
 
Configuring default routing for R1: 
R1(config)#ip route 0.0.0.0 0.0.0.0 172.16.10.5
Now configuring default routing for R2: 
R2(config)#ip route 0.0.0.0 0.0.0.0 172.16.10.1
3. Dynamic Routing – 
Dynamic routing makes automatic adjustments of the routes according to the current state
of the route in the routing table. Dynamic routing uses protocols to discover network
destinations and the routes to reach them. RIP and OSPF are the best examples of
dynamic routing protocols. Automatic adjustments will be made to reach the network
destination if one route goes down. 
A dynamic protocol has the following features: 
1. The routers should have the same dynamic protocol running in order to exchange
routes. 
2. When a router finds a change in the topology then the router advertises it to all other
routers. 
Advantages – 
 Easy to configure. 
 More effective at selecting the best route to a destination remote network and also for
discovering remote network. 
Disadvantage – 
 Consumes more bandwidth for communicating with other neighbors. 
 Less secure than static routing. 

Classes of Routing Protocols


Prerequisite – Distance vector routing protocol, Link state routing protocol 
Routing is a process in which the layer 3 devices (either router or layer 3 switches) find
the optimal path to deliver a packet from one network to another. Dynamic routing
protocols use metric, cost, and hop count to identify the best path from the path available
for the destination network. There are mainly 3 different classes of routing protocols: 
1. Distance Vector Routing Protocol :
These protocols select the best path on the basis of hop counts to reach a destination
network in a particular direction. Dynamic protocol like RIP is an example of a distance
vector routing protocol. Hop count is each router that occurs in between the source and
the destination network. The path with the least hop count will be chosen as the best
path. 
Features – 
 Updates of the network are exchanged periodically. 
 Updates (routing information) are always broadcast. 
 Full routing tables are sent in updates. 
 Routers always trust routing information received from neighbor routers. This is also
known as routing on rumors. 
 
Disadvantages – 
 As the routing information is exchanged periodically, unnecessary traffic is generated
which consumes available bandwidth. 
 As full routing tables are exchanged, therefore it has security issues. If an authorized
person enters the network, then the whole topology will be very easy to understand. 
 Also, the broadcasting of the network periodically creates unnecessary traffic. 
 
2. Link State Routing Protocol :
These protocols know more about Internetwork than any other distance vector routing
protocol. These are also known as SPF (Shortest Path First) protocol. OSPF is an
example of link-state routing protocol. 
Features – 
 Hello, messages, also known as keep-alive messages are used for neighbor discovery
and recovery. 
 Concept of triggered updates is used i.e updates are triggered only when there is a
topology change. 
 Only that many updates are exchanged which is requested by the neighbor router. 
 
Link state routing protocol maintains three tables namely: 
1. Neighbor table- the table which contains information about the neighbors of the
router only, i.e, to which adjacency has been formed. 
2. Topology table- This table contains information about the whole topology i.e
contains both best and backup routes to a particular advertised networks. 
3. Routing table- This table contains all the best routes to the advertised network. 
 
Advantages – 
 As it maintains separate tables for both the best route and the backup routes ( whole
topology) therefore it has more knowledge of the internetwork than any other distance
vector routing protocol. 
 Concept of triggered updates is used therefore no more unnecessary bandwidth
consumption is seen like in distance vector routing protocol. 
 Partial updates are triggered when there is a topology change, not a full update like
distance vector routing protocol where the whole routing table is exchanged. 
 
3. Advanced Distance vector routing protocol :
It is also known as hybrid routing protocol which uses the concept of both distance vector
and link-state routing protocol. Enhanced Interior Gateway Routing Protocol (EIGRP) is
an example of this class of routing protocol. EIGRP acts as a link-state routing protocol
as it uses the concept of Hello protocol for neighbor discovery and forming an adjacency.
Also, partial updates are triggered when a change occurs. EIGRP acts as a distance-vector
routing protocol as it learned routes from directly connected neighbors.
Difference between Distance vector
routing and Link State routing
 Difficulty Level : Easy
 Last Updated : 21 Oct, 2021

Prerequisite – Classification of Routing Algorithms 


Distance Vector Routing – 
 It is a dynamic routing algorithm in which each router computes a distance between
itself and each possible destination i.e. its immediate neighbors.
 The router shares its knowledge about the whole network to its neighbors and
accordingly updates the table based on its neighbors.
 The sharing of information with the neighbors takes place at regular intervals.
 It makes use of Bellman-Ford Algorithm for making routing tables.
 Problems – Count to infinity problem which can be solved by splitting horizon. 
– Good news spread fast and bad news spread slowly. 
– Persistent looping problem i.e. loop will be there forever.
Link State Routing – 
 It is a dynamic routing algorithm in which each router shares knowledge of its
neighbors with every other router in the network.
 A router sends its information about its neighbors only to all the routers through
flooding.
 Information sharing takes place only whenever there is a change.
 It makes use of Dijkstra’s Algorithm for making routing tables.
 Problems – Heavy traffic due to flooding of packets. 
– Flooding can result in infinite looping which can be solved by using the Time to
live (TTL) field.
Routing v/s Routed Protocols in
Computer Network
 Difficulty Level : Easy
 Last Updated : 12 Aug, 2019

The Network Layer of the OSI Model is responsible for providing logical addressing,
which routers use to select best path for routing packets. There are two types of packets
used at this layer :
1. Data Packets –
The user data is transferred in the inter-network by these data packets. Routed
protocols are those protocols which support such data traffic. Examples of routed
protocols are IPv4, IPv6 and AppleTalk.
2. Route Update Packets –
The information about the networks connected to all the routers is updated to the
neighbouring routers through route update packets. Routing protocols are the ones
that are responsible for sending them. Examples of routing protocols are RIP(Routing
Information Protocol), EIGRP(Enhanced Interior Gateway Routing Protocol) and
OSPF(Open Shortest Path First).
Now let’s take an real-life analogy to better understand the difference between routed and
routing protocols.
Suppose you want to go to your home after your semester examinations. You book a cab
or take a bus to your home. In the path of your journey, you encounter several sign
boards which help you take proper or best path, or in case of a cab, Google Maps will
help you in choosing the best route.
In this analogy, consider yourself as the DATA, the bus or cab as the ROUTED
PROTOCOL and the sign boards or the GPS installed in your driver’s phone as the
ROUTING PROTOCOL.
Similarly, in a network routers use routing protocols to determine the best path for a
packet to travel through the inter-network more efficiently. Routed protocols are assigned
to an interface and determine the method of delivering the packet.
Now, lets move on to the different types of routing protocols.

Abbreviations –
IGP – Interior Gateway Protocol
EGP – Exterior Gateway Protocol
RIP – Routing Information Protocol
IGRP – Interior Gateway Routing Protocol
OSPF – Open Shortest Path First
ISIS – Intermediate System to Intermediate System
EIGRP – Enhanced Interior Gateway Routing Protocol
BGP – Border Gateway Protocol

Configuration of Router on a stick


Switches divide broadcast domain through VLAN (Virtual LAN). VLAN is a
partitioned broadcast domain from a single broadcast domain. Switch doesn’t
forward packets across different VLANs by itself. If we want to make these
virtual LANs communicate with each other, a concept of Inter VLAN Routing is
used.
Inter VLAN Routing :
Inter VLAN routing is a process in which we make different virtual LANs
communicate with each other irrespective of where the VLANs are present (on
same switch or different switch). Inter VLAN Routing can be achieved through a
layer-3 device i.e. Router or layer-3 Switch. When the Inter VLAN Routing is
done through Router it is known as Router on a stick.
 
Router On a Stick :
The Router’s interface is divided into sub-interfaces, which acts as a default
gateway to their respective VLANs.
Configuration :

Here is a topology in which there is a router and a switch and some end hosts.
2 different VLANs have been created on the switch. The router’s interface is
divided into 2 sub-interfaces (as there are 2 different VLANs) which will acts as
a default gateway to their respective VLANs. Then router will perform Inter
VLAN Routing and the VLANs will communicate with each other.
First we will assign IP address to the host PC1 as 192.168.1.10/24, Server
192.168.1.20/24, and the other host PC2 will have IP address 192.168.2.10/24
manually.
Now, we will make sub-interface of fa0/0 as fa0/0.1 and fa0/0.2 and assign IP
addresses as 192.168.1.1/24 and 192.168.2.1/24 respectively on the router’s
ports.
r1# int fa0/0.1
r1# encapsulation dot1q 2
r1# ip address 192.168.1.1 255.255.255.0
r1# int fa0/0.2
r1# encapsulation dot1q 3
r1# ip address 192.168.2.1 255.255.255.0
NOTE : Here encapsulation type dot1q is used for frame tagging between the 2
different VLAN. When the switch forwards packet of one VLAN to another, it
inserts a VLAN into the Ethernet header.
Now, we will make 2 different VLANs on switch namely VLAN 2 and VLAN 3
giving names HR_dept and sales_dept.
Switch# vlan 2
Switch# name HR_dept
Switch# vlan 3
Switch# name sales_dept
Switch# int range fa0/1-2
Switch# switchport mode access
Switch# switchport access vlan 2
Switch# int fa0/3
Switch# switchport mode access
Switch# switchport access vlan 3
Here, we have assigned VLAN 2 to the specific switch ports fa0/1, fa0/2 and
vlan 3 to fa0/3 respectively.
NOTE : int range fa0/1-2 command is used as there are more than one host
present in a single VLAN.
 
Now to check reachability of PC2 from PC1, we will try to PING PC2 from PC1.
From the above figures, we see that the packet is delivered to the router by the
switch, because now the broadcast domain have been divided by the different
VLANs present on the switch therefore, the packet will be delivered to the
default gateway (as PC2 is present on different network) and then to the
destination.

Open Shortest Path First (OSPF)


Protocol fundamentals
Open shortest path first (OSPF) is a link-state routing protocol that is used to find the
best path between the source and the destination router using its own shortest path first
(SPF) algorithm. A link-state routing protocol is a protocol that uses the concept of
triggered updates, i.e., if there is a change observed in the learned routing table then the
updates are triggered only, not like the distance-vector routing protocol where the routing
table is exchanged at a period of time. 
Open shortest path first (OSPF) is developed by Internet Engineering Task Force (IETF)
as one of the Interior Gateway Protocol (IGP), i.e., the protocol which aims at moving the
packet within a large autonomous system or routing domain. It is a network layer
protocol that works on protocol number 89 and uses AD value 110. OSPF uses multicast
address 224.0.0.5 for normal communication and 224.0.0.6 for update to designated
router(DR)/Backup Designated Router (BDR). 
Criteria – 
To form neighbourship in OSPF, there is a criterion for both the routers:  
1. It should be present in the same area.
2. The router I’d be unique.
3. The subnet mask should be the same. 
4. Hello, and the dead timer should be the same. 
5. The stub flag must match. 
6. Authentication must match. 
 
OSPF supports NULL, plain text, MD5 authentication. 
Note – Both the routers (neighbors) should have some type of authentication enabled.
e.g- if one neighbor has MD5 authentication enabled then others should also have MD5
authentication enabled. 
OSPF messages – 
OSPF uses certain messages for the communication between the routers operating OSPF. 
 Hello message – 
These are keep-alive messages used for neighbor discovery /recovery. These are
exchanged every 10 seconds. This includes the following information: Router I’d,
Hello/dead interval, Area I’d, Router priority, DR and BDR IP address, authentication
data. 
 Database Description (DBD) – 
It is the OSPF route of the router. This contains the topology of an AS or an area
(routing domain). 
 Link state request (LSR) – 
When a router receives DBD, it compares it with its own DBD. If the DBD received
has some more updates than its own DBD then LSR is being sent to its neighbor. 
 Link state update (LSU) – 
When a router receives LSR, it responds with an LSU message containing the details
requested. 
 Link state acknowledgement – 
This provides reliability to the link-state exchange process. It is sent as the
acknowledgement of LSU. 
 Link state advertisement (LSA) – 
It is an OSPF data packet that contains link-state routing information, shared only
with the routers to which adjacency has been formed. 
Note – Link State Advertisement and Link State Acknowledgement both are different
messages. 
Timers – 
 Hello timer – 
The interval in which the OSPF router sends a hello message on an interface. It is 10
seconds by default. 
 Dead timer – 
The interval in which the neighbor will be declared dead if it is not able to send the
hello packet. It is 40 seconds by default. It is usually 4 times the hello interval but can
be configured manually according to need. 
 
OSPF supports/provides/advantages – 
 Both IPv4 and IPv6 routed protocols 
 Load balancing with equal-cost routes for the same destination 
 VLSM and route summarization 
 Unlimited hop counts 
 Trigger updates for fast convergence 
 A loop-free topology using SPF algorithm 
 Run-on most routers 
 Classless protocol 
 
There are some disadvantages of OSPF like, it requires an extra CPU process to run the
SPF algorithm, requiring more RAM to store adjacency topology, and being more
complex to set up and hard to troubleshoot

Open Shortest Path First (OSPF)


protocol States
Prerequisite – OSPF fundamentals 
Open Shortest Path First (OSPF) is a link-state routing protocol that is used to find the
best path between the source and the destination router using its own Shortest Path First).
OSPF is developed by Internet Engineering Task Force (IETF) as one of the Interior
Gateway Protocol (IGP), i.e, the protocol which aims at moving the packet within a large
autonomous system or routing domain. It is a network layer protocol which works on
protocol number 89 and uses AD value 110. OSPF uses multicast address 224.0.0.5 for
normal communication and 224.0.0.6 for update to designated router(DR)/Backup
Designated Router (BDR). 
OSPF terms – 
 
1. Router I’d – It is the highest active IP address present on the router. First, the highest
loopback address is considered. If no loopback is configured then the highest active IP
address on the interface of the router is considered. 
 
2. Router priority – It is an 8-bit value assigned to a router operating OSPF, used to
elect DR and BDR in a broadcast network. 
 
3. Designated Router (DR) – It is elected to minimize the number of adjacencies
formed. DR distributes the LSAs to all the other routers. DR is elected in a broadcast
network to which all the other routers share their DBD. In a broadcast network, the
router requests for an update to DR, and DR will respond to that request with an
update. 
 
4. Backup Designated Router (BDR) – BDR is a backup to DR in a broadcast network.
When DR goes down, BDR becomes DR and performs its functions. 
 
DR and BDR election – DR and BDR election takes place in the broadcast network or
multi-access network. Here are the criteria for the election: 
 
1. Router having the highest router priority will be declared as DR. 
 
2. If there is a tie in router priority then the highest router I’d be considered. First, the
highest loopback address is considered. If no loopback is configured then the highest
active IP address on the interface of the router is considered. 
 
OSPF states – The device operating OSPF goes through certain states. These states are: 
 
1. Down – In this state, no hello packets have been received on the interface. 
Note – The Downstate doesn’t mean that the interface is physically down. Here, it
means that the OSPF adjacency process has not started yet. 
 
2. INIT – In this state, the hello packets have been received from the other router. 
 
3. 2WAY – In the 2WAY state, both the routers have received the hello packets from
other routers. Bidirectional connectivity has been established. 
Note – In between the 2WAY state and Exstart state, the DR and BDR election takes
place. 
 
4. Exstart – In this state, NULL DBD are exchanged. In this state, the master and slave
elections take place. The router having the higher router I’d become the master while
the other becomes the slave. This election decides Which router will send its DBD
first (routers who have formed neighbourship will take part in this election). 
 
5. Exchange – In this state, the actual DBDs are exchanged. 
 
6. Loading – In this state, LSR, LSU, and LSA (Link State Acknowledgement) are
exchanged. 
Important – When a router receives DBD from other router, it compares its own
DBD with the other router DBD. If the received DBD is more updated than its own
DBD then the router will send LSR to the other router stating what links are needed.
The other router replies with the LSU containing the updates that are needed. In return
to this, the router replies with the Link State Acknowledgement. 
 
7. Full – In this state, synchronization of all the information takes place. OSPF routing
can begin only after the Full state. 
Open shortest path first (OSPF) router
roles and configuration
 Difficulty Level : Basic
 Last Updated : 25 Oct, 2021

Prerequisite – Open shortest path first (OSPF)


Open shortest path first (OSPF) is a link-state routing protocol which is used to find the
best path between the source and the destination router using its own SPF algorithm.
Open shortest path first (OSPF) router roles –
An area is a group of contiguous networks and routers. Routers belonging to same area
shares a common topology table and area I’d. The area I’d is associated with router’s
interface as a router can belong to more than one area. There are some roles of router in
OSPF:

1. Backbone router – The area 0 is known as backbone area and the routers
in area 0 are known as backbone routers. If the routers exists partially in the
area 0then also it is a backbone router.
2. Internal router – An internal router is a router which have all of its interfaces
in a single area.
3. Area Boundary Router (ABR) – The router which connects backbone area
with another area is called Area Boundary Router. It belongs to more than
one area. The ABRs, therefore, maintain multiple link-state databases that
describe both the backbone topology and the topology of the other areas.
4. Area Summary Border Router (ASBR) – When an OSPF router is
connected to a different protocol like EIGRP or Border Gateway Protocol, or
any other routing protocol then it is known as AS. The router which connects
two different AS (in which one of the interfaces is operating OSPF) is known
as Area Summary Border Router. These routers perform redistribution.
ASBRs run both OSPF and another routing protocol, such as RIP or BGP.
ASBRs advertise the exchanged external routing information throughout
their AS.
Note – A router can be backbone router and Area Boundary Router at the same
time i.e a router can perform more than one role at a time.

Configuration –

There is a small topology in which there are 3 routers namely R1, R2, R3 are
connected. R1 is connected to networks 10.255.255.80/30 (interface fa0/1),
192.168.10.48/29 (interface fa0/0) and 10.255.255.8/30 (interface gi0/0)
Note – In the figure, IP addresses are written with their respected interfaces but
as have to advertise networks therefore, you have to write network I’d. R2 is
connected to networks 192.168.10.64/29 (interface fa0/0), 10.255.255.80/30
(interface fa0/1). R3 is connected to networks 10.255.255.8/30 (int fa0/1),
192.168.10.16/29 (int fa0/0).
Now, configuring OSPF for R1.
R1(config)#router ospf 1
R1(config-router)#network 192.168.10.48 0.0.0.7 area 1
R1(config-router)#network 10.255.255.80 0.0.0.3 area 1
R1(config-router)#network 10.255.255.8 0.0.0.3 area 1
Here, 1 is the OSPF instance or process I’d. It can be same or different (doesn’t
matter). You have use wildcard mask here and area used is 1.
Now, configuring R2
R2(config)#router ospf 1
R2(config-router)#network 192.168.10.64 0.0.0.7 area 1
R2(config-router)#network 10.255.255.80 0.0.0.3 area 1
Similarly, for R3
R3(config)#router ospf 1
R3(config-router)#network 192.168.10.16 0.0.0.7 area 1
R3(config-router)#network 10.255.255.8 0.0.0.3 area 1
You can check the configuration by typing command
R3#show ip protocols

EIGRP fundamentals
Dynamic routing Protocol performs the same function as static routing Protocol does. In
dynamic routing Protocol, if the destination is unreachable then another entry, in the
routing table, to the same destination can be used. One of the routing protocols is
EIGRP. 
EIGRP: 
Enhanced Interior Gateway Routing Protocol (EIGRP) is a dynamic routing protocol that
is used to find the best path between any two-layer 3 devices to deliver the packet.
EIGRP works on network layer Protocol of OSI model and uses protocol number 88. It
uses metrics to find out the best path between two layer 3 devices (router or layer 3
switches) operating EIGRP. Administrative Distance for EIGRP are:- 
 
EIGRP routes AD values

Summary Routes5

Internal Routes 90

external routes 170


It uses some messages to communicate with the neighbour devices that operate EIGRP.
These are:- 
 
1. Hello message-These messages are kept alive messages which are exchanged
between two devices operating EIGRP. These messages are used for neighbour
discovery/recovery, if there is any device operating EIGRP or if any device(operating
EIGRP) coming up again. 
These messages are used for neighbor discovery if multicast at 224.0.0.10. It contains
values like AS number, k values, etc. 
These messages are used as acknowledgment when unicast. A hello with no data is
used as the acknowledgment.
2. NULL update-It is used to calculate SRTT(Smooth Round Trip Timer) and
RTO(Retransmission Time Out). 
SRTT: The time is taken by a packet to reach the neighboring router and the
acknowledgment of the packet to reach the local router. 
RTO: If a multicast fails then unicast is being sent to that router. RTO is the time for
which the local router waits for an acknowledgment of the packet.
3. Full Update – After exchanging hello messages or after the neighbourship is formed,
these messages are exchanged. This message contains all the best routes.
4. Partial update-These messages are exchanged when there is a topology change and
new links are added. It contains only the new routes, not all the routes. These
messages are multicast.
5. Query message-These messages are multicast when the device is declared dead and it
has no routes to it in its topology table.
6. Reply message – These messages are the acknowledgment of the query message sent
to the originator of the query message stating the route to the network which has been
asked in the query message.
7. Acknowledgement message 
It is used to acknowledge EIGRP updates, queries, and replies. Acks are hello packets
that contain no data. 
Note:-Hello and acknowledgment packets do not require any acknowledgment. 
Reply, query, update messages are reliable messages i.e require acknowledgement.
Composite matrix-The EIGRP composite metric calculation can use up to 5 variables,
but only 2 are used by default (K1 and K3). The composite metric values are : 
K1 (bandwidth) 
K2 (load) 
K3 (delay) 
K4 (reliability) 
K5 (MTU) 
The lowest bandwidth, load, delay, reliability, MTU along the path between the source
and the destination is considered in the composite matrix in order to calculate the cost. 
Note:- Generally, only k1 and k3 values are used for metric calculation by EIGRP. The
values are 10100 for k1, k2, k3, k4, k5 respectively. 
criteria To form EIGRP neighbourship, these criteria should be fulfilled:- 
 
1. k values should match.
2. Autonomous system number should match. (AS is a group of networks running under
a single administrative control) .
3. authentication should match (if applied). EIGRP supports MD5 authentication only.
4. subnet mask should be the same.
Timers:- 
Hello timer- The interval in which EIGRP sends a hello message on an interface. It is 5
seconds by default. 
Dead timer- The interval in which the neighbor will be declared dead if it is not able to
send the hello packet. It is 15 seconds by default.

Features of Enhanced Interior Gateway


Routing Protocol (EIGRP)
 Last Updated : 21 Oct, 2021
Enhanced Interior Gateway Routing Protocol (EIGRP) is a Cisco-proprietary
Hybrid routing protocol that contains features of distance-vector and link-state
routing protocols. It is a network layer protocol that works on protocol number
88. 
Some of its features are: 
1. Rapid convergence – EIGRP uses a DUAL algorithm to support rapid
convergence. If a route to a network goes down then another route(feasible
successor) can be used. If there is no route present to that network in the
topology table also then a query message is multicast to find out the
alternative route to that network. 
 
2. Reduced bandwidth usage – EIGRP doesn’t send periodic updates like
other distance vector routing protocol does. Distance Vector Routing
protocol like RIP sends full routing table over a period of time, therefore,
consumes the available bandwidth needlessly but EIGRP uses partial
updates if there is any change in the topology occurs i.e updates are
triggered only if any event occurs therefore consuming the bandwidth when
needed. Also, EIGRP updates are propagated to the routers only who
require it. 
 
3. Support all LAN and WAN data link protocols and topologies – EIGRP
supports multi-access networks like FDDI, token ring, etc, and all WAN
topologies like leased line, point-to-point links. EIGRP doesn’t require any
additional configuration across layer 2 protocols like frame relay. 
 
4. Supports auto-summary – In EIGRP, auto-summarization is enabled by
default. Auto summarization is a feature that allows Routing Protocols to
summarize their routes to their classful networks automatically i.e routers will
receive summarised routes automatically. EIGRP. e.g-1.1.1.1 /24 will be
automatically summarised to the classful 1.1.1.1/8 
 
5. Supports unequal cost load balancing – Unequal cost load balancing is
possible in EIGRP by changing the value of variance. By default, variance is
1, therefore, supports equal-cost load balancing but if we want to use
unequal cost load balancing then we can change the value of variance
according to the amount of traffic we want to divide across different paths.
Feasible distance is multiplied in such a way that it becomes greater than the
value of the feasible distance of successor. 
 
6. Communication via Reliable Transfer Protocol (RTP) – EIGRP depends
upon proprietary protocol RTP to manage the communication between
EIGRP speaking routers. EIGRP uses 224.0.0.10 as its a multicast address.
For each multicast it sends, the router prepares and maintains a list of
routers (speaking EIGRP). If no acknowledgement of multicast is received
then the same data is transmitted through 16 unicast messages. If no
acknowledgement is received even after 16 unicast attempts then it is
declared dead. This process is known as reliable multicast. 
 
7. Best path selection using DUAL – EIGRP uses Diffusing Update Algorithm
(DUAL) to find out the best path available to a network. EIGRP speaking
routers maintain a topology table in which all the routes to the network are
maintained. If the best path (successor) goes down, then the second best
path (feasible successor) is used from the topology table. If there is no path
available in the topology table then it sends a query message to resolve the
query. 
It maintains 3 different tables mainly: 
(a) Neighbor table: It contains information about the routers with which
neighbourship has been formed. It contains the SRTT, RTP. It also contains
the queue count value for the hello messages that are not being
acknowledged. 
(b) Topology table: It contains all the routes available to a network (both
feasible successor and successor). 
(c) Routing table: It contains all the routes which are being used to make
current routing decisions. The routes in this table are considered as
successor (best path) routes. 
 
8. Traffic control – Suppose if one of the interfaces of the router is connected
to ISP then we don’t want that interface to be part of the EIGRP process. For
this scenario, EIGRP provides a feature in which we can flag the interface as
passive i.e not to take part in the EIGRP process. 
 
9. Support Variable Length Subnet Mask (VLSM).
10. Support for both IPv4 and IPv6.

How to configure Enhanced Interior


Gateway Routing Protocol (EIGRP)
If you are not familiar with Enhanced Interior Gateway Routing Protocol (EIGRP), click
the following link to view an introduction to Enhanced Interior Gateway Routing
Protocol (EIGRP).

Enhanced Interior Gateway Routing Protocol (EIGRP) Configuration


Enhanced Interior Gateway Routing Protocol (EIGRP) can be configured in a router using
the following IOS commands.

Router(config)# router eigrp ASN


Router(config-router)# network Network_ID

ASN in the above IOS command stands for Autonomous System Number.

Enhanced Interior Gateway Routing Protocol (EIGRP) - Lab Practice


The following diagram shows our lab setup. We have three routers, three switches and
three hosts connected as below. The host names, IP addresses and the interfaces of the
routers are shown in diagram. The IP addresses of the hosts are also shown in the
diagram.
If you are not familiar with a router console connection, click the following link to
learn how to connect the serial port of your computer to router console port.

Click the following link to learn how to connect to the console port of the router if there
is no serial port in your computer.

Click the following links to learn how to use HyperTerminal terminal


emulator and PuTTY terminal emulator to configure router.

Hostname and IP address configuration in Router01


Connect to Router01 console and use the following IOS commands to configure host
name as Router01.

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname Router01

Router01(config)#

Use the following IOS commands to open the fast ethernet interface Fa0/0 configuration
mode on Router01 and configure IP address as 172.16.0.1/16.
Router01>enable

Router01#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router01(config)#interface fa0/0

Router01(config-if)#ip address 172.16.0.1 255.255.0.0

Router01(config-if)#no shutdown

Use the following IOS commands to open the serial interface S0/0 configuration mode
on Router01 and configure IP address as 172.17.0.1/16. You have to set a clock rate also
using the "clock rate" command on S0/0 interface, since this is the DCE side.

Router01>enable

Router01#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router01(config)#interface s0/0

Router01(config-if)#clock rate 64000

Router01(config-if)#ip address 172.17.0.1 255.255.0.0

Router01(config-if)#no shutdown

Do remember to run the "copy running-config startup-config" command from enable


mode, if you want to save the changes you have made in the router.

Hostname and IP address configuration in Router02


Connect to Router02 console and use the following IOS commands to configure host name as
Router02.

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname Router02

Router02(config)#

Use the following IOS commands to open the fast ethernet interface Fa0/0 configuration
mode on Router02 and configure IP address as 172.18.0.1/16.
Router02>enable

Router02#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router02(config)#interface fa0/0

Router02(config-if)#ip address 172.18.0.1 255.255.0.0

Router02(config-if)#no shutdown

Use the following IOS commands to open the serial interface S0/0 configuration mode
on Router02 and configure IP address as 172.17.0.2/16.

Router02>enable

Router02#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router02(config)#interface s0/0

Router02(config-if)#ip address 172.17.0.2 255.255.0.0

Router02(config-if)#no shutdown

Use the following IOS commands to open the serial interface S0/1 configuration mode
on Router02 and configure IP address as 172.19.0.1/16. You have to set a clock rate also
using the "clock rate" command on S0/1 interface, since this is the DCE side.

Router02>enable

Router02#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router02(config)#interface s0/1

Router02(config-if)#clock rate 64000

Router02(config-if)#ip address 172.19.0.1 255.255.0.0

Router02(config-if)#no shutdown

Do remember to run the "copy running-config startup-config" command from enable


mode, if you want to save the changes you have made in the router.
Hostname and IP address configuration in Router03
Connect to Router03 console and use the following IOS commands to configure host
name as Router03.

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname Router03

Router03(config)#

Use the following IOS commands to open the fast ethernet interface Fa0/0 configuration
mode on Router03 and configure IP address as 172.20.0.1/16.

Router03>enable

Router03#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router03(config)#interface fa0/0

Router03(config-if)#ip address 172.20.0.1 255.255.0.0

Router03(config-if)#no shutdown

Use the following IOS commands to open the serial interface S0/1 configuration mode
on Router03 and configure IP address as 172.19.0.2/16.

Router03>enable

Router03#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router03(config)#interface s0/1

Router03(config-if)#ip address 172.19.0.2 255.255.0.0

Router03(config-if)#no shutdown

Do remember to run the "copy running-config startup-config" command from enable


mode, if you want to save the changes you have made in the router.
Enhanced Interior Gateway Routing Protocol (EIGRP) configuration in Router01
Connect to Router01 console and use the following IOS commands to configure
Enhanced Interior Gateway Routing Protocol (EIGRP) in Router01. Please refer the
beginning of this lesson to view the Enhanced Interior Gateway Routing Protocol
(EIGRP) configuration IOS command.

In the IOS "network" command, shown below, we specify only the directly connected
networks of this router.

Router01>enable

Router01#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router01(config)#router eigrp 1

Router01(config-router)#network 172.16.0.0

Router01(config-router)#network 172.17.0.0

Router01(config-router)#exit

Router01(config)#exit

Router01#

Do remember to run the "copy running-config startup-config" command from enable


mode, if you want to save the changes you have made in the router.

Enhanced Interior Gateway Routing Protocol (EIGRP) configuration in Router02


Connect to Router02 console and use the following IOS commands to configure
Enhanced Interior Gateway Routing Protocol (EIGRP) in Router02. Please refer the
beginning of this lesson to view the Enhanced Interior Gateway Routing Protocol
(EIGRP) configuration IOS command.

In the IOS "network" command, shown below, we specify only the directly connected
networks of this router.

Router02>enable

Router02#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router02(config)#router eigrp 1
Router02(config-router)#network 172.17.0.0

Router02(config-router)#network 172.18.0.0

Router02(config-router)#network 172.19.0.0

Router02(config-router)#exit

Router02(config)#exit

Router02#

Do remember to run the "copy running-config startup-config" command from enable


mode, if you want to save the changes you have made in the router.

Enhanced Interior Gateway Routing Protocol (EIGRP) configuration in Router03


Connect to Router03 console and use the following IOS commands to configure
Enhanced Interior Gateway Routing Protocol (EIGRP) in Router03. Please refer the
beginning of this lesson to view the Enhanced Interior Gateway Routing Protocol
(EIGRP) configuration IOS command.

In the IOS "network" command, shown below, we specify only the directly connected
networks of this router.

Router03>enable

Router03#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router03(config)#router eigrp 1

Router03(config-router)#network 172.19.0.0

Router03(config-router)#network 172.20.0.0

Router03(config-router)#exit

Router03(config)#exit

Router03#

Do remember to run the "copy running-config startup-config" command from enable


mode, if you want to save the changes you have made in the router.
How to view the routing table in Router01
After the initial configuration and Enhanced Interior Gateway Routing Protocol (EIGRP)
configuration in all routers, we can use the "show ip route" to view the routing table in
Router01, as shown below.

Router01>enable

Router01#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

* - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route

Gateway of last resort is not set

C 172.16.0.0/16 is directly connected, FastEthernet0/0

C 172.17.0.0/16 is directly connected, Serial0/0

D 172.18.0.0/16 [90/2172416] via 172.17.0.2, 00:05:36, Serial0/0

D 172.19.0.0/16 [90/2681856] via 172.17.0.2, 00:05:30, Serial0/0

D 172.20.0.0/16 [90/2684416] via 172.17.0.2, 00:02:35, Serial0/0

The "D" character at the beginning of a line in routing table shows that it is a route
discovered by Enhanced Interior Gateway Routing Protocol (EIGRP) and "C" character
shows that it is a directly connected network.

How to view the routing table in Router02


After the initial configuration and Enhanced Interior Gateway Routing Protocol (EIGRP)
configuration in all routers, we can use the "show ip route" to view the routing table in
Router02, as shown below.

Router02>enable

Router02#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP


D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

* - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route

Gateway of last resort is not set

D 172.16.0.0/16 [90/2172416] via 172.17.0.1, 00:08:02, Serial0/0

C 172.17.0.0/16 is directly connected, Serial0/0

C 172.18.0.0/16 is directly connected, FastEthernet0/0

C 172.19.0.0/16 is directly connected, Serial0/1

D 172.20.0.0/16 [90/2172416] via 172.19.0.2, 00:04:45, Serial0/1

The "D" character at the beginning of a line in routing table shows that it is a route
discovered by Enhanced Interior Gateway Routing Protocol (EIGRP) and "C" character
shows that it is a directly connected network.

How to view the routing table in Router03


After the initial configuration and Enhanced Interior Gateway Routing Protocol (EIGRP)
configuration in all routers, we can use the "show ip route" to view the routing table in
Router03, as shown below.

Router03>enable

Router03#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

* - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route


Gateway of last resort is not set

D 172.16.0.0/16 [90/2684416] via 172.19.0.1, 00:06:01, Serial0/1

D 172.17.0.0/16 [90/2681856] via 172.19.0.1, 00:06:01, Serial0/1

D 172.18.0.0/16 [90/2172416] via 172.19.0.1, 00:06:01, Serial0/1

C 172.19.0.0/16 is directly connected, Serial0/1

C 172.20.0.0/16 is directly connected, FastEthernet0/0

The "D" character at the beginning of a line in routing table shows that it is a route
discovered by Enhanced Interior Gateway Routing Protocol (EIGRP) and "C" character
shows that it is a directly connected network.

Verify the connectivity between networks using the ping command


To verify the Enhanced Interior Gateway Routing Protocol (EIGRP) routes and the
connectivity between networks, run the ping command from Host01 (IP address:
172.16.0.10/16) to Host03 (IP address: 172.20.0.10/16).

C:\>ping 172.20.0.10

Pinging 172.20.0.10 with 32 bytes of data:

Reply from 172.20.0.10: bytes=32 time=172ms TTL=125


Reply from 172.20.0.10: bytes=32 time=188ms TTL=125
Reply from 172.20.0.10: bytes=32 time=157ms TTL=125
Reply from 172.20.0.10: bytes=32 time=188ms TTL=125

Ping statistics for 172.20.0.10:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 157ms, Maximum = 188ms, Average = 176ms

The ping reply from Host03 (IP address: 172.20.0.10/16) shows that the Enhanced
Interior Gateway Routing Protocol (EIGRP) Protocol is configured well in three routers
and there is network connectivity between different networks.
Routing Information Protocol (RIP)
 Difficulty Level : Easy
 Last Updated : 24 Dec, 2021
Routing Information Protocol (RIP) is a dynamic routing protocol that uses hop count
as a routing metric to find the best path between the source and the destination network.
It is a distance-vector routing protocol that has an AD value of 120 and works on the
Network layer of the OSI model. RIP uses port number 520. 
Hop Count 
Hop count is the number of routers occurring in between the source and destination
network. The path with the lowest hop count is considered as the best route to reach a
network and therefore placed in the routing table. RIP prevents routing loops by limiting
the number of hops allowed in a path from source and destination. The maximum hop
count allowed for RIP is 15 and a hop count of 16 is considered as network unreachable. 
Features of RIP 
1. Updates of the network are exchanged periodically. 
2. Updates (routing information) are always broadcast. 
3. Full routing tables are sent in updates. 
4. Routers always trust routing information received from neighbor routers. This is also
known as Routing on rumors. 
RIP versions : 
There are three versions of routing information protocol – RIP Version1, RIP Version2,
and RIPng. 
RIP v1 RIP v2 RIPng

Sends update as broadcast Sends update as multicast Sends update as multicast

Multicast at FF02::9 (RIPng


can only run on IPv6
networks) 
Broadcast at 255.255.255.255 Multicast at 224.0.0.9

Doesn’t support
authentication of updated Supports authentication of
messages RIPv2 update messages –
RIP v1 RIP v2 RIPng

Classless protocol updated


Classful routing protocol supports classful Classless updates are sent

RIP v1 is known as Classful Routing Protocol because it doesn’t send information of


subnet mask in its routing update. 
RIP v2 is known as Classless Routing Protocol because it sends information of subnet
mask in its routing update. 
 
>> Use debug command to get the details : 
# debug ip rip
>> Use this command to show all routes configured in router, say for router R1 :  
R1# show ip route
>> Use this command to show all protocols configured in router, say for router R1 :  
R1# show ip protocols
Configuration :  
Consider the above-given topology which has 3-routers R1, R2, R3. R1 has IP address
172.16.10.6/30 on s0/0/1, 192.168.20.1/24 on fa0/0. R2 has IP address 172.16.10.2/30 on
s0/0/0, 192.168.10.1/24 on fa0/0. R3 has IP address 172.16.10.5/30 on s0/1,
172.16.10.1/30 on s0/0, 10.10.10.1/24 on fa0/0. 
Configure RIP for R1 : 
R1(config)# router rip
R1(config-router)# network 192.168.20.0
R1(config-router)# network 172.16.10.4
R1(config-router)# version 2
R1(config-router)# no auto-summary
Note: no auto-summary command disables the auto-summarisation. If we don’t select
any auto-summary, then the subnet mask will be considered as classful in Version 1. 
Configuring RIP for R2:  
R2(config)# router rip
R2(config-router)# network 192.168.10.0
R2(config-router)# network 172.16.10.0
R2(config-router)# version 2
R2(config-router)# no auto-summary
Similarly, Configure RIP for R3 :  
R3(config)# router rip
R3(config-router)# network 10.10.10.0
R3(config-router)# network 172.16.10.4
R3(config-router)# network 172.16.10.0
R3(config-router)# version 2
R3(config-router)# no auto-summary
RIP timers:  
 Update timer: The default timing for routing information being exchanged by the
routers operating RIP is 30 seconds. Using an Update timer, the routers exchange
their routing table periodically.
 Invalid timer: If no update comes until 180 seconds, then the destination router
considers it invalid. In this scenario, the destination router mark hop counts as 16 for
that router.
 Hold down timer: This is the time for which the router waits for a neighbor router to
respond. If the router isn’t able to respond within a given time then it is declared dead.
It is 180 seconds by default.
 Flush time: It is the time after which the entry of the route will be flushed if it doesn’t
respond within the flush time. It is 60 seconds by default. This timer starts after the
route has been declared invalid and after 60 seconds i.e time will be 180 + 60 = 240
seconds.
Note that all these times are adjustable. Use this command to change the timers :  
R1(config-router)# timers basic
R1(config-router)# timers basic 20 80 80 90
 
Routing Information Protocol (RIP) V1 &
V2
 Last Updated : 21 Oct, 2021
Routing Information Protocol (RIP) protocol are the intradomain (interior) routing
protocol which is based on distance vector routing and it is used inside an autonomous
system.Routers and network links are called node. The first column of routing table is
destination address. The cost of metric in this protocol is hop count which is number of
networks which need to be passed to reach destination. Here infinity is defined by a fixed
number which is 16 it means that using a Rip, network cannot have more than 15 hops.
RIP Version-1:
It is an open standard protocol means it works on the various vendor’s routers. It works
on most of the routers, it is classful routing protocol. Updates are broadcasted. Its
administrative distance value is 120, it means it is not reliable, The lesser the
administrative distance value the reliability is much more. Its metric is hop count and
max hop count is 15. There will be a total of 16 routers in the network. When there will
be the same number of hop to reach the destination, Rip starts to perform load balancing.
Load balancing means if there are three ways to reach the destination and each way has
same number of routers then packets will be sent to each path to reach the destination.
This reduces traffic and also the load is balanced. It is used in small companies, in this
protocol routing tables are updated in each 30 sec. Whenever link breaks rip trace out
another path to reach the destination. It is one of the slowest protocol.
Advantages of RIP ver1 –
1. Easy to configure, static router are complex.
2. Less overhead
3. No complexity.
Disadvantage of RIP ver1 –
1. Bandwidth utilization is very high as broadcast for every 30 seconds.
2. It works only on hop count.
3. It is not scalable as hop count is only 15. If there will be requirement of more routers
in the network it would be a problem .
4. Convergence is very slow, wastes a lot of time in finding alternate path.
RIP Version-2:
Due to some deficiencies in the original RIP specification, RIP version 2 was developed
in 1993. It supports classless Inter-Domain Routing (CIDR) and has the ability to carry
subnet information, its metric is also hop count, and max hop count 15 is same as rip
version 1. It supports authentication and does subnetting and multicasting. Auto summary
can be done on every router. In RIPv2 Subnet masks are included in the routing update.
RIPv2 multicasts the entire routing table to all adjacent routers at the address 224.0.0.9,
as opposed to RIPv1 which uses broadcast (255.255.255.255).
Advantages of RIP ver2 –
1. It’s a standardized protocol.
2. It’s VLSM compliant.
3. Provides fast convergence.
4. It sends triggered updates when the network changes.
5. Works with snapshot routing – making it ideal for dial networks.
Disadvantage of RIP ver2 – There lies some disadvantages as well:
1. Max hopcount of 15, due to the ‘count-to-infinity’ vulnerability.
2. No concept of neighbours.
3. Exchanges entire table with all neighbours every 30 seconds (except in the case of a
triggered update).
RIP ver1 versus RIP ver2:

RIP Ver1 RIP Ver2

RIP v2 is a classless protocol and it supports variable-


RIP v1 uses what is known as length subnet masking (VLSM), CIDR, and route
classful routing summarization

RIPv1 routing updates are


broadcasted RIP v2 routing updates are multicasted

RIPv1 has no authentication RIP v2 supports authentication

RIP v1 does not carry mask in RIP v2 does carry mask in updates, so it supports for
updates VLSM

IP v2 can be useful in small, flat networks or at the


RIP v1 is an older, no longer edge of larger networks because of its simplicity in
much used routing protocol configuration and usage

You might also like