Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
278 views

Chapter Two Routing Protocols

Routing protocols allow routers to determine the optimal path to send packets between networks. Dynamic routing protocols use metrics like hop count or bandwidth to evaluate paths and populate routing tables. Static routes can also be used to administratively define paths. Dynamic routing allows for automatic adaptation to network changes, while static requires manual updates.

Uploaded by

khalidgabbal
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
278 views

Chapter Two Routing Protocols

Routing protocols allow routers to determine the optimal path to send packets between networks. Dynamic routing protocols use metrics like hop count or bandwidth to evaluate paths and populate routing tables. Static routes can also be used to administratively define paths. Dynamic routing allows for automatic adaptation to network changes, while static requires manual updates.

Uploaded by

khalidgabbal
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

Chapter Two:

Routing Protocols.

CCNP ROUTING AND SWITCHING


CCNP - Lecturer: Khalid Gabbal
Router
 A router is a networking hardware device designed to receive, analyze
and forwards internet protocol packets between computers in a network.
Functions of a router
 A router uses information contained in the internet protocol header to
make various decisions; these decisions include:
 Path determination
 Routing decision
 Load balancing
CCNP - Lecturer: Khalid Gabbal
Path determination
 When a router receives an IP packet through any of its interfaces, the router
examines the packet’s destination IP address, the optimal path to reach this
destination is added to the routing table. Metrics are used to determine the
optimal path to reach a destination IP address through static and dynamic
routing protocols.
 These metrics are standard measurements or vectors that give a quantitative
value measure for the distance to a given network.
Common metric:
 A common metric can either be: hop count, bandwidth, delay, current load
on the path, reliability, or the combination of two or more of these standards.

CCNP - Lecturer: Khalid Gabbal


Hop count
 Hop count is the number of internetworking devices, such as a router that an
IP packet must pass through to reach its destination subnet. If a routing
protocol uses Hop count as its metric, then the path with the least metric or
number of routers is considered the best path. This path is then added to the
routing table if there is no other routing protocol with less administrative
distance.
 RIP uses hop count as its metric.

CCNP - Lecturer: Khalid Gabbal


Routing decision
 The primary function of a router is to forward a packet to its destination. The
router achieves this by encapsulating the IP packet with the appropriate data link
frame type of the egress port. This encapsulation happens after the router has
determined the exit interface associated with the best path to forward that packet.
The path can either be:
 A directly connected route (the destination address in the IP header belongs to a
network connected to one of the router interfaces).
 A remote network (when the destination IP address of the packet belongs to
another network).
 No route determined (when the destination address is not in the routing table).
CCNP - Lecturer: Khalid Gabbal
Load balancing
 A router can have two or more paths with equal metric and administrative
distance to a destination sub-network. When this happens, the router will
forward the packet using both paths.
 The method of sending data to a destination sub-network using two or
more paths is called Load balancing.
 Load balancing is possible because a routing table can contain many paths
associated with different exit interfaces of a router having an equal metric or
cost path.

CCNP - Lecturer: Khalid Gabbal


Routing Principles
 Routing is the process of forwarding packets from one
network to another; this is sometimes referred to as a relay
system. Logical addressing is used to identify each network
as well as each device on the network.
 The actual movement of transient traffic through the
router is a separate function; it is actually considered to be
the switching function. Routing devices must perform both
a routing and a switching function to be effective.
CCNP - Lecturer: Khalid Gabbal
Routing Tables
 All the routing information needed for a router to forward packets
to a next hop relay device can be found in the router’s routing table.
Again, if a destination logical address is not found in the table, the
router discards the packets.
 A gateway of last resort can be set on the router to forward packets
not listed in the routing table. This is called setting the default route.
 A sample routing table is shown below:

CCNP - Lecturer: Khalid Gabbal


Administrative Distance vs. Metric
 A “metric” allows a router to choose the best path within a routing
protocol. Distance vector routing protocols use “distance” (usually hop-
count) as their metric. Link state protocols utilize some sort of “cost” as
their metric.
 Only routes with the best metric are added to the routing table. Thus,
even if a particular routing protocol (for example, RIP) has four routes to
the same network, only the route with the best metric (hop-count in this
example) would make it to the routing table. If multiple equal-metric routes
exist to a particular network, most routing protocols will load-balance.
 If your router is running multiple routing protocols, Administrative
Distance is used to determine which routing protocol to trust the most.
Lowest administrative distance wins.
CCNP - Lecturer: Khalid Gabbal
Administrative Distances
 Again: if a router receives two RIP routes to the
same network, it will use the routes’ metric to
determine which path to use. If the metric is
identical for both routes, the router will load balance
between both paths.
 If a router receives a RIP and an OSPF route to the
same network, it will use Administrative Distance
to determine which routing path to choose.
The Administrative Distance of common routing
protocols (remember, lowest wins):
 An administrative distance is an integer from 0 to
255, where 0 is the most trusted and 255 means no
traffic will be passed via this route. CCNP - Lecturer: Khalid Gabbal
Administrative distances
 An organization can configure its router(s) with many dynamic routing
protocols and a static route. However, this is not common but required in
some situations.
 For example, two companies, A and B, can connect their networks for
data transmission. If company A uses Open Shortest First (OSPF), while
company B uses the Enhanced Interior Gateway Routing Protocol
(EIGRP), one company must configure OSPF and EIGRP.
 This router then takes the route learned from OSPF and advertises it to
EIGRP and vice versa; this process is called route redistribution; under
such a situation, a routing table can contain more than one route source a
destination network.
CCNP - Lecturer: Khalid Gabbal
Metrics
 Metrics are a way to measure or compare. Routing protocols
use metrics to determine which route is the best path. Purpose of
a Metric There are cases when a routing protocol learns of more
than one route to the same destination.
To select the best path, , the routing protocol must be able to
evaluate and differentiate among the available paths. For this
purpose, a metric is used.
 A metric is a value used by routing protocols to assign costs to
reach remote networks. The metric is used to determine which
path is most preferable when there are multiple paths to the same
remote network. CCNP - Lecturer: Khalid Gabbal
 Each routing protocol calculates its metric in a
different way. For example, RIP uses hop count,
EIGRP uses a combination of bandwidth and delay,
and the Cisco implementation of OSPF uses
bandwidth.
 Hop count is the easiest metric to envision. The
hop count refers to the number of routers a packet
must cross to reach the destination network.
 For Router R3 in Figure 3-6, network 172.16.3.0
is two hops, or two routers, away. For Router R2,
network 172.16.3.0 is one hop away, and for Router
R1, it is 0 hops (because the network is directly
connected).
CCNP - Lecturer: Khalid Gabbal
Viewing the routing table
 The following command will allow
you to view the routing table:
Routes are labeled based on what protocol
 Router# show ip route placed them in the table:
 C – Directly connected
 S – Static
 S* - Default route
 D - EIGRP
 R – RIP
 To clear all routes from the routing table,
and thus forcing any routing protocol to  I – IGRP
repopulate the table:
 i – IS-IS
 Router# clear ip route *
 O - OSPF
CCNP - Lecturer: Khalid Gabbal
Packet Switching
 After a router is started up, the routing protocol tries to establish neighbor
relationships in order to understand the network topology and build the
routing table. All routing protocols perform this differently; for example,
some use broadcast addresses to find the neighbors and some use multicast
addresses.
 Once the neighbors are found, the routing protocol creates a peer
relationship at Layers 4 through 7 of the OSI model. Routing protocols
either send periodic routing updates or exchange Hello messages to
maintain the relationship.
 Only after the topology is completely understood and the best paths to all
remote networks are decided and put in the routing table can the forwarding
of packets begin. This forwarding of packets received on an interface to an
exit interface is known as packet-switching.
CCNP - Lecturer: Khalid Gabbal
Types of Routing:
 Static Routing
 Dynamic Routing
 Default Routing

Understanding Dynamic and Static Routing


 Networking devices share data among themselves with the help of a
router, a router is a device that learns which paths are available and
which path is best to forward traffic to.
 The mechanism through which the router makes such a decision is
known as routing. CCNP - Lecturer: Khalid Gabbal
Static routing
 Static routing is a routing type in which a network administrator
configures the routes into the routing table to be used by the router
to send packets to a destination network.

Advantages of Static Routing:

 No routing overhead for router CPU which means a cheaper


router can be used to do routing. 
 It adds security because only administrator can allow routing to
particular networks only.  
 No bandwidth usage between routers. 
CCNP - Lecturer: Khalid Gabbal
Disadvantage of Static Routing:
 For a large network, it is a hectic task for administrator 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. 

CCNP - Lecturer: Khalid Gabbal


Configuration of Static Routing
 R1 having IP address 172.16.10.6/30 on s0/0/1, 192.168.10.1/24 on fa0/0. 
 R2 having IP address 172.16.10.2/30 on s0/0/0, 192.168.20.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. 

CCNP - Lecturer: Khalid Gabbal


Dynamic routing
 Dynamic routing is a technique in which a router learns
about routing information without an administrator’s help and
adds the best route to its routing table.
 A router running a dynamic routing protocol adds the best
route to its routing table and can also determine another path if
the primary route goes down.
 Unlike static routing, the route needs to be reconfigured by
the administrator in the event of any change. Different types of
dynamic routing protocol are used today.
CCNP - Lecturer: Khalid Gabbal
Advantages of dynamic routing
 It adapts to network topology changes.
 Easy to configure. 
 More effective at selecting the best route to a destination remote network
and also for discovering remote network. 
Disadvantages of Dynamic Routing:
 Dynamic routing consumes many network resources when compared to
static routing.
 This is because dynamic routing broadcast network information, which
amounts to a huge security risk as an attacker can learn about the whole
network, especially during recon CCNP
attacks.
- Lecturer: Khalid Gabbal
Difference between Distance vector routing and
Link State routing
Distance Vector Routing –
 It is a dynamic routing algorithm in which each router computes
distance between itself and each possible destination i.e. its
immediate neighbors.
 The router share its knowledge about the whole network to its
neighbors and accordingly updates 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.
CCNP - Lecturer: Khalid Gabbal
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 Dijkastra’s Algorithm for making routing
tables.
CCNP - Lecturer: Khalid Gabbal
Classfull Routing VS Classless Routing
Classfull Routing
 The basic definition of classfull routing is that subnet mask
information is not carried within the routine, periodic routing updates.
This means that every interface and host on the network must use the
same subnet mask.
 Examples of classfull routing protocols are the Routing Information
Protocol version 1 (RIPv1) and the Interior Gateway Routing Protocol
(IGRP).

CCNP - Lecturer: Khalid Gabbal


Classfull Routing
 The problem with classful routing protocols is
wasted address space.
 Another problem with classful routing protocols is
the periodic routing updates sent out all active
interfaces of every router.
 For example, in Figure 2.1, there is a Class C
network address of 192.16.10.0, using the subnet
mask 255.255.255.240. The subnets would be 16, 32,
48, 64, etc. Each subnet has 14 valid hosts. In the
figure, each LAN has a requirement of 10 hosts each,
which is fine except for the WAN links connecting the
sites. WAN links use only two IP addresses.
Classless Routing
 Classless routing protocols include the subnet mask information when
an update is sent. This allows different length subnet masks to be used
on the network, called Variable Length Subnet Masks (VLSM).
You must use a classless routing protocol if you want to have a
network design like the one shown in this Figure.

CCNP - Lecturer: Khalid Gabbal


 Classless routing protocols allow summarization at non-
major network boundaries, unlike classful routing protocols,
which allow summarization only at major network
boundaries.
 Another benefit of classless routing is that less bandwidth
is consumed since no periodic updates are sent out the
routers’ interfaces. Updates are sent only when a change
occurs, and then only the change is sent, not the entire routing
table as with classfull routing protocols.
CCNP - Lecturer: Khalid Gabbal
CCNP - Lecturer: Khalid Gabbal
 There are six mainstream Routing Protocols in the world today and
those are RIP, IGRP, IS-IS, OSPF EIGRP and BGP.
 i. IGRP is just a bad idea from the beginning. Cisco designed it and it’s
a Cisco proprietary to compete with RIP. It found out that IGRP was
slower than RIP when it all came to the full design. So, IGRP has gone
for years and years.
 IS-IS on the other hand, was designed for the OSI protocol, the one
that was designed to compete with TCP/IP and lost. IS-IS was the
routing protocol for it and it was so good that some people prefer IS-IS
over OSPF and so they created integrated IS-IS which was a version of
IS-IS that worked for TCP/IP but still relied on some heavy knowledge
of OSI.
 IS-IS has been removed from the Cisco Route series for years and
years before.
CCNP - Lecturer: Khalid Gabbal
Interior and exterior routing protocols
 Dynamic routing protocols can be categorized into two groups: Interior
gateway protocols (IGP) and Exterior Gateway Routing Protocols (EGP).
 Interior routing protocols are designed for use within a single
autonomous system, while exterior routing protocols are designed for use
between different Autonomous Systems (AS). Any network under the
administrative control of a single organization is known
as Autonomous System (AS).
 Routing protocols that by design work best within an autonomous
system are known as IGP and protocols that are designed to exchange
routing information between Autonomous Systems (AS) are known as
EGP.
Border Gateway Protocol (BGP) is the
CCNP - Lecturer: only EGP.
Khalid Gabbal
Routing Information Protocol (RIP)
 RIP is a standardized vector distance routing protocol and
uses a form of distance as hop count metric. It is a distance
vector. Through limiting the number of hop counts allowed in
paths between sources and destinations, RIP prevents routing
loops.
 Typically, the maximum number of hops allowed for RIP is
15. However, by achieving this routing loop prevention, the size
of supporting networks is sacrificed. Since the maximum
number of hop counts allowed for RIP is 15, as long as the
number goes beyond 15, the route will be considered as
unreachable. CCNP - Lecturer: Khalid Gabbal
 When first developed, RIP only transmitted full updates every
30 seconds. In the early distributions, traffic was not important
because the routing tables were small enough. As networks
become larger, massive traffic burst becomes more likely during
the 30 seconds period, even if the routers had been initialized at
different times. Because of this random initialization, it is
commonly understood that the routing updates would spread out
in time, but that is not the case in real practice.
 Routing information protocol is not in use today because it does
not scale well for large network implementation.
CCNP - Lecturer: Khalid Gabbal
RIP has four basic timers:
 Update Timer (default 30 seconds): defines how often the router will
send out a routing table update.
 Invalid Timer (default 180 seconds): indicates how long a route will
remain in a routing table before being marked as invalid, if no new
updates are heard about this route. The invalid timer will be reset if an
update is received for that particular route before the timer expires.
 Hold-down Timer (default 180 seconds): specifies how long RIP
will keep a route from receiving updates when it is in a hold-down state.
In a hold-down state, RIP will not receive any new updates for routes
until the hold-down timer expires.
CCNP - Lecturer: Khalid Gabbal
RIP has four basic timers cont,…
 Flush Timer (default 240 seconds): When no new updates
are received about this route, flush timer indicates how long a
route can remain in a routing table before getting flushed out.
The flush timers operates simultaneously with the invalid timer,
so every 60 seconds, after it has been marked invalid, the route
will get flushed out.
 When RIP timer is not in sync with all routers on the RIP
network, system instability occurs. This timer must be set to a
higher value than the invalid timer.
CCNP - Lecturer: Khalid Gabbal
RIPv1 Contiguous Networks
 Objective:
 Configure RIPv1 between R1 and R2 to obtain connectivity between 1.0.0.0/8 and
2.0.0.0/8

CCNP - Lecturer: Khalid Gabbal


Chapter 2:
•Routing Protocols.

End
Chapter Two: Lecturer:
Khalid Gabbal

You might also like