0% found this document useful (0 votes)
39 views48 pages

What Is Routing ?

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1/ 48

What is Routing ?

 The term “routing” is used for taking a packet


from one device and sending it through the
network to another device on a different network.

 Routers don’t really care about hosts—they


only care about networks and the best path to
each network.
Routers route traffic to all the networks in your
internetwork. To be able to route packets, a router must
know, at a minimum, the following:

 Destination address

 Neighbor routers from which it can learn about


remote networks

 Possible routes to all remote networks

 The best route to each remote network

 How to maintain and verify routing information


Routing Example :

 Routing is taking place from Host_A to Host_B

through the Lab_A Router.


 To be able to route, the router must know how to get into
the network 172.16.20.0.
Routing Types :

The different types of routing are :

 Static routing
 Default routing
 Dynamic routing
Static Routing

 Static routing occurs when you manually add routes


in each router’s routing table.

Static routing has the following benefits:

• There is no overhead on the router CPU


• There is no bandwidth usage between routers
• It adds security, because the administrator can choose
to allow routing access to certain networks only.
Configuring Static Route :

ip route [destination_network] [mask]


[next-hop_address or exitinterface]
[administrative_distance]

ip route : The command used to create the static route.


destination_network : The network you’re placing in the routing table.

mask : The subnet mask being used on the network.

next-hop_address : The address of the next-hop router

Exitinterface : You can use it in place of the next-hop address

administrative_distance : By default, static routes have an


administrative distance of 1
Static Route LAB :

E0 DTE DCE DTE DCE


E0
S0 S0 S1 S0

DCE : Data Communication Equipment


DTE : Data Terminal Equipment
Default Routing

“default routing” is used to send packets with a


remote destination network not in the routing
table to the next-hop router.

You can only use default routing on stub


networks—those with only one exit path out of
the network.
Default Routing Configuration

Visual(config)#ip route 0.0.0.0 0.0.0.0 20.142.26.1

Visual(config)#ip route 0.0.0.0 0.0.0.0 s0/0

Visual(config)#ip default-network 20.142.26.0


Default Routing LAB :
Dynamic Routing
Dynamic routing is when protocols are used to find networks
and Update routing tables on routers.

A routing protocol defines the set of rules used by a router


when it communicates routing information between neighbor
routers.
There are two types of routing protocols used in internetworks:

 Interior Gateway Protocols (IGPs) and


 Exterior Gateway Protocols (EGPs).

 IGPs are used to exchange routing information with routers in the same
autonomous system (AS)
 EGPs are used to communicate between ASes.

An AS is a collection of networks under a common administrative domain, which


basically means that all routers sharing the same routing table information are in
the same AS.
Routing Protocol Basics

Some basic things to understand in Routing Protocols :

 Administrative Distances

 Three different kinds of routing protocols

 Routing loops
Administrative Distances

 The administrative distance (AD) is used to rate the trustworthiness


of routing information received on a router from a neighbor router. 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.

 If a router receives two updates listing the same remote network, the

first thing the router checks is the AD. If one of the advertised routes
has a lower AD than the other, then the route with the lowest AD will
be placed in the routing table.
 If both advertised routes to the same network have the same AD,
then routing protocol metrics (such as hop count or bandwidth of the
lines) will be used to find the best path to the remote network.The
advertised route with the lowest metric will be placed in the routing
table.
 But if both advertised routes have the same AD as well as the same
metrics, then the routing protocol will load-balance to the remote
network.
Default Administrative Distances

Route Source Default AD

Connected interface 0
Static route 1
EIGRP 90
IGRP 100
OSPF 110
RIP 120
External EIGRP 170
Unknown 255 (this route will never be used)
Routing Protocols
There are three classes of routing protocols:
 Distance vector : The distance-vector protocols find the best
path to a remote network by judging distance. Each time a packet
goes through a router, that’s called a hop. The route with the least
number of hops to the network is determined to be the best route.
The vector indicates the direction to the remote network. They send
the entire routing table to directly connected neighbors.Ex:RIP,IGRP

 Link state : Also called shortest-path-first protocols, the routers


each create three separate tables. One keeps track of directly attached
neighbors, one determines the topology of the entire internetwork, and
one is used as the routing table. Linkstate routers know more about the
internetwork than any distance-vector routing protocol.Link state
protocols send updates containing the state of their own links to all
other routers on the network. Ex : OSPF

 Hybrid : Hybrid protocols use aspects of both distance vector and


link state. Ex: EIGRP.
Distance-Vector Routing Protocols

• The distance-vector routing algorithm passes complete


routing table contents to neighboring routers

• A router receiving an update from a neighbor router


believes the information about remote networks without
actually finding out for itself.

• It’s possible to have a network that has multiple links to


the same remote network, and if that’s the case, the
administrative distance is checked first. If the AD is the
same, the protocol will have to use other metrics to
determine the best path to use to that remote network.
Converged Network
Routing Loops

Distance-vector routing protocols keep track of any


changes to the internetwork by broadcasting periodic
routing updates out all active interfaces. This broadcast
includes the complete routing table.

Routing loops can occur because every router isn’t


updated simultaneously.
Routing Loop Example :

The interface to Network 5 fails. All routers know about


Network 5 from Router E. Router A, in its tables, has a
path to Network 5 through Router B.

When Network 5 fails, Router E tells Router C. This causes Router C to stop
routing to Network 5 through Router E. But Routers A, B, and D don’t know
about Network 5 yet, so they keep sending out update information. Router C will
eventually send out its update and cause B to stop routing to Network 5, but
Routers A and D are still not updated. To them, it appears that Network 5 is still
available through Router B with a metric of 3.The problem occurs when Router
A sends out its regular 30-second “Hello, I’m still here—these are the links I
know about” message, which includes the ability to reach Network 5 and now
Routers B and D receive the wonderful news that Network 5 can be reached
from Router A, so Routers B and D then send out the information that Network 5
is available. Anypacket destined for Network 5 will go to Router A, to Router B,
Loop Avoidance
Maximum Hop Count
RIP permits a hop count of up to 15, so anything that requires
16 hops is deemed unreachable. Thus, the maximum hop count
will control how long it takes for a routing table entry to become
invalid.
Split Horizon
This reduces incorrect routing information and routing overhead
in a distance-vector network by enforcing the rule that routing
information cannot be sent back in the direction from which it was
received.
Route Poisoning
when Network 5 goes down, Router E initiates route poisoning by
advertising Network 5 as 16, or unreachable. When Router C
receives a route poisoning from Router E, it sends an update,
called a poison reverse, back to Router E. This ensures all routes
on the segment have received the poisoned route information.
 Routing Information Protocol (RIP) is a true distance-vector routing
protocol.
 It sends the complete routing table out to all active interfaces
every 30 seconds.
 RIP only uses hop count to determine the best way to a remote
network, but it has a maximum allowable hop count of 15 by
default, meaning that 16 is deemed unreachable.

 RIP version 1 uses only classful routing, which means that all
devices in the network must use the same subnet mask.

 RIP version 2 provides something called prefix routing, and does

send subnet mask information with the route updates. This is


called classless routing.
RIP Timers

RIP uses three different kinds of timers to regulate its performance:

Route update timer Sets the interval (30 seconds) between periodic routing
updates, in which the router sends a complete copy of its routing table out to all
neighbors.

Route invalid timer Determines the length of time that must elapse (180
seconds) before a router determines that a route has become invalid. It will
come to this conclusion if it hasn’t heard any updates about a particular route for
that period. When that happens, the router will send out updates to all its
neighbors letting them know that the route is invalid.

Holddown timer This sets the amount of time during which routing information
is suppressed. Routes will enter into the holddown state when an update packet
is received that indicated the route is unreachable. This continues until either an
update packet is received with a better metric or until the holddown timer
expires. The default is 180 seconds.

Route flush timer Sets the time between a route becoming invalid and its
removal from the routing table (240 seconds). Before it’s removed from the
table, the router notifies its neighbors of that route’s impending demise. The
value of the route invalid timer must be less than that of the route flush timer.
RIP LAB 1 :
RIP LAB 2:
RIP Version 2 (RIPv2)

 Both RIPv1 and RIPv2 are distance-vector protocols, which


means that each router running RIP sends its complete routing
tables out all active interfaces at periodic time intervals.

 The timers and loop-avoidance schemes are the same in both RIP
versions
 Both RIPv1 and RIPv2 are configured as classful addressing, (but RIPv2
is considered classless because subnet information is sent with each
route update)
 Both have the same administrative distance (120)

 RIP is an open standard, you can use RIP with any brand of router.
RIP V1 Vs RIP V2
 Interior Gateway Routing Protocol (IGRP) is a Cisco-proprietary
distance-vector routing protocol.

 To use IGRP, all your routers must be Cisco routers.

 IGRP has a maximum hop count of 255 with a default of 100.

 IGRP uses bandwidth and delay of the line by default as a metric


for determining the best route to an internetwork.

 Reliability, load, and maximum transmission unit (MTU) can also


be used, although they are not used by default.

The main difference between RIP and IGRP configuration is


that when you configure IGRP, you supply the autonomous
system number. All routers must use the same number in order
to share routing table information.
IGRP vs. RIP
IGRP Timers
To control performance, IGRP includes the following timers with default
settings:

Update timers :These specify how frequently routing-update messages


should be sent. The default is 90 seconds.

Invalid timers : These specify how long a router should wait before
declaring a route invalid if it doesn’t receive a specific update about it.
The default is three times the update period.

Holddown timers : These specify the holddown period. The default is


three times the update timer period plus 10 seconds.

Flush timers : These indicate how much time should pass before a
route should be flushed from the routing table. The default is seven
times the routing update period. If the update timer is 90 seconds by
default, then 7 × 90 = 630 seconds elapse before a route will be flushed
from the route table.
IGRP LAB 1 :
RIP & IGRP LAB :
 Enhanced IGRP (EIGRP) is a classless, enhanced distance-vector protocol
that gives us a real edge over IGRP.

 Like IGRP, EIGRP uses the concept of an autonomous system to describe


the set of contiguous routers that run the same routing protocol and share
routing information.
 But unlike IGRP, EIGRP includes the subnet mask in its route updates.

 The advertisement of subnet information allows us to use VLSM and


summarization when designing our networks.

 EIGRP is sometimes referred to as a hybrid routing protocol because it


has characteristics of both distance-vector and link-state protocols.
 It sends traditional distance-vector updates containing information about
networks plus the cost of reaching them from the perspective of the
advertising router.
 EIGRP has a maximum hop count of 255.
Powerful features that make EIGRP a real standout from IGRP

 Support for IP, IPX, and AppleTalk via protocol-dependent


modules Considered classless (same as RIPv2 and OSPF)

 Support for VLSM/CIDR

 Support for summaries and discontiguous networks

 Efficient neighbor discovery

 Communication via Reliable Transport Protocol (RTP)

 Best path selection via Diffusing Update Algorithm (DUAL)

Note: Cisco calls EIGRP a distance vector routing protocol, or sometimes an


advanced distance vector or even a hybrid routing protocol.
 EIGRP supports different Network layer protocols through the use of
protocol-dependent modules (PDMs).

 Each EIGRP PDM will maintain a separate series of tables containing the
routing information that applies to a specific protocol.

 It means that there will be IP/EIGRP tables, IPX/EIGRP tables, and


AppleTalk/EIGRP tables.

Neighbor Discovery

Before EIGRP routers are willing to exchange routes with each other,
they must become neighbors.There are three conditions that must be met
for neighborship establishment:

 Hello or ACK received

 AS numbers match

 Identical metrics (K values)


To maintain the neighborship relationship, EIGRP routers must
also continue receiving Hellos from their neighbors.

EIGRP routers that belong to different autonomous systems (ASes)


don’t automatically share routing information and they don’t become
neighbors.

The only time EIGRP advertises its entire routing table is when it
discovers a new neighbor and forms an adjacency with it
through the exchange of Hello packets. When this happens,
both neighbors advertise their entire routing tables to one
another. After each has learned its neighbor’s routes, only
changes to the routing table are propagated from then on.
EIGRP maintains three tables containing information about the internetworks.

1. Neighbor Table (records information about routers with whom neighborship relationships have been formed.)
2. Topology Table (stores the route advertisements about every route in the internetwork received from each neighbor.)
3. Routing Table (stores the routes that are currently used to make routing decisions.)
Feasible distance
This is the best metric along all paths to a remote network, including the metric
to the neighbor that is advertising that remote network. This is the route that you will find
in the routing table, because it is considered the best path. The metric of a feasible
distance is the metric reported by the neighbor (called reported distance), plus the metric
to the neighbor reporting the route.

Reported distance ( Advertised Distance )


This is the metric of a remote network, as reported by a neighbor. It is also
the routing table metric of the neighbor.

Neighbor table
Each router keeps state information about adjacent neighbors. When a newly
discovered neighbor is learned, the address and interface of the neighbor are recorded,
and this information is held in the neighbor table, stored in RAM. There is one neighbor
table for each protocol-dependent module.

Topology table
The topology table is populated by the PDMs and acted upon by the Diffusing Update
Algorithm (DUAL). It contains all destinations advertised by neighboring routers, holding
each destination address and a list of neighbors that have advertised the destination.
For each neighbor, the advertised metric is recorded, which comes only from the
neighbor’s routing table. If the neighbor is advertising this destination, it must be using
the route to forward packets.
Feasible successor

A destination entry is moved from the topology table to the routing table
when there is a feasible successor. A feasible successor is a path whose reported
distance is less than the feasible distance, and it is considered a backup route. EIGRP
will keep up to six feasible
successors in the topology table. Only the one with the best metric (the successor).is
placed in the routing table.

Successor

A successor route is the best route to a remote network. A successor route is used by
EIGRP to forward traffic to a destination and is stored in the routing table. It is backed up
by a feasible successor route that is stored in the topology table—if one is available.

 A feasible successor is a backup route and is


stored in the topology table.

 A successor route is stored in the topology


table and also placed in the routing table.
EIGRP uses a proprietary protocol, called Reliable Transport Protocol (RTP), to manage
the communication of messages between EIGRP-speaking routers.

EIGRP sends updates via multicast traffic, it uses the Class D address 224.0.0.10.

If EIGRP doesn’t get a reply from a neighbor, it will switch to using unicasts to resend
the same data.

If it still doesn’t get a reply after 16 unicast attempts, the neighbor is declared dead.

This process is reffered to as reliable multicast

EIGRP uses Diffusing Update Algorithm (DUAL) for selecting and maintaining the best
path to each remote network. This algorithm allows for the following:

 Backup route determination if one is available


 Support of Variable-Length Subnet Masks (VLSMs)
 Dynamic route recoveries
 Queries for an alternate route if no route can be found

DUAL provides EIGRP with possibly the fastest route convergence time among all protocols.
EIGRP Metrics

Another really sweet thing about EIGRP is that unlike many other protocols that use a
single factor to compare routes and select the best possible path, EIGRP can use a
combination of four:

Bandwidth

Delay

Load

Reliability

MTU

Like IGRP, EIGRP uses only bandwidth and delay of the line to determine the
best path to a remote network by default.
Maximum Paths and Hop Count

By default, EIGRP (and IGRP) can provide unequal cost load balancing of up to four
links.However, you can have EIGRP actually load balance across up to six links.

EIGRP (and IGRP) has a maximum hop count of 100, but can be set up to 255.

If you need to stop EIGRP from working on a specific interface, such as


Ethernet interface or a serial connection to the Internet. Configure with passive-
interface interface command.

By using the no auto-summary command, EIGRP will advertise all the subnets
between the two routers. If the networks were larger, you could then provide
manual summarization on these same boundaries.
Open Shortest Path First (OSPF) is an open standards routing protocol that’s
been implemented by a wide variety of network vendors, including Cisco.

This works by using the Dijkstra algorithm. First, a shortest path tree is
constructed, and then the routing table is populated with the resulting best
paths. OSPF converges quickly, although perhaps not as quickly as EIGRP,
and it supports multiple, equal-cost routes to the same destination. But unlike
EIGRP, it only supports IP routing.

OSPF provides the following features:

 Consists of areas and autonomous systems


 Minimizes routing update traffic
 Allows scalability
 Supports VLSM/CIDR
 Has unlimited hop count
 Allows multi-vendor deployment (open standard)
OSPF is the first link-state routing protocol that most people are introduced to.
OSPF and RIP comparison

Characteristic OSPF RIPv2 RIPv1

Type of protocol Link-state Distance Vector Distance-vector


Classless support Yes Yes No
VLSM support Yes Yes No
Auto summarization No Yes Yes
Manual summarization Yes No No
Discontiguous support Yes Yes No
Route propagation Multicast on change Periodic multicast Periodic broadcast
Path metric Bandwidth Hops Hops
Hop count limit None 15 15
Convergence Fast Slow Slow
Peer authentication Yes Yes No
Hierarchical network Yes (using areas) No (flat only) No (flat only)
Updates Event Triggered Route table updates Route table updates
Route computation Dijkstra Bellman-Ford Bellman-Ford
OSPF is supposed to be designed in a hierarchical fashion, which basically means
that you can separate the larger internetwork into smaller internetworks called areas.
This is the best design for OSPF.

The reasons for creating OSPF in a hierarchical design include:

To decrease routing overhead


To speed up convergence
To confine network instability to single areas of the network

Each router in the network connects to the backbone called area 0,or the backbone area.
OSPF must have an area 0, and all routers should connect to this area if at all possible.
But routers that connect other areas to the backbone within an AS are called
Area Border Routers (ABRs). Still, at least one interface must be in area 0.
OSPF runs inside an autonomous system, but can also connect multiple autonomous
systems together. The router that connects these ASes together is called an
Autonomous System Boundary Router (ASBR).
OSPF Terminology
Link A link is a network or router interface assigned to any given network. When an
interface is added to the OSPF process, it’s considered by OSPF to be a link.
Router ID The Router ID (RID) is an IP address used to identify the router. Cisco
chooses the Router ID by using the highest IP address of all configured loopback
interfaces. If no loopback interfaces are configured with addresses, OSPF will choose
the highest IP address of all active physical interfaces.
Neighbors Neighbors are two or more routers that have an interface on a common
network,such as two routers connected on a point-to-point serial link.
Adjacency An adjacency is a relationship between two OSPF routers that permits the
direct exchange of route updates. OSPF is really picky about sharing routing
information—unlike EIGRP, which directly shares routes with all of its neighbors.
Instead, OSPF directly shares routes only with neighbors that have also established
adjacencies. And not all neighbors will become adjacent—this depends upon both the
type of network and the configuration of the routers.
Hello protocol The OSPF Hello protocol provides dynamic neighbor discovery and
maintains neighbor relationships. Hello packets and Link State Advertisements (LSAs)
build and maintain the topological database. Hello packets are addressed to 224.0.0.5.
Neighborship database The neighborship database is a list of all OSPF routers for
which Hello packets have been seen. A variety of details, including the Router ID and
state, are maintained on each router in the neighborship database.
Topology database The topology database contains information from all of the
Link State Advertisement packets that have been received for an area. The router
uses the information from the topology database as input into the Dijkstra algorithm
that computes the shortest path to every network. LSA packets are used to update
and maintain the topology database.
Link State Advertisement A Link State Advertisement (LSA) is an OSPF data
packet containing link-state and routing information that’s shared among OSPF
routers. There are different types of LSA packets. An OSPF router will exchange
LSA packets only with routers to which it has established adjacencies.
Designated router A designated router (DR) is elected whenever OSPF routers
are connected to the same multi-access network. A prime example is an Ethernet
LAN.
Backup designated router A backup designated router (BDR) is a hot standby for
the DR on multi-access links The BDR receives all routing updates from OSPF
adjacent routers, but doesn’t flood LSA updates.

OSPF areas An OSPF area is a grouping of contiguous networks and routers. All
routers in the same area share a common Area ID.
Broadcast (multi-access) Broadcast (multi-access) networks such as Ethernet
allow multiple devices to connect to (or access) the same network, as well as
provide a broadcast ability in which a single packet is delivered to all nodes on
the network. In OSPF, a DR and a BDR must be elected for each broadcast
multi-access network.
Non-broadcast multi-access Non-Broadcast Multi-Access (NBMA) networks
are types such as Frame Relay, X.25, and Asynchronous Transfer Mode (ATM).
These networks allow for multi-access, but have no broadcast ability like
Ethernet. So, NBMA networks require special OSPF configuration to function
properly and neighbor relationships must be defined.
Point-to-point Point-to-point refers to a type of network topology consisting of a
direct connection between two routers that provides a single communication
path. The point-to-point connection can be physical, as in a serial cable directly
connecting two routers, or it can be logical.
Point-to-multipoint Point-to-multipoint refers to a type of network topology
consisting of a series of connections between a single interface on one router
and multiple destination routers.All of the interfaces on all of the routers sharing
the point-to-multipoint connection belong to the same network. As with point-to-
point, no DRs or BDRs are needed.
 Within an area, each router calculates the best/shortest path to every
network in that same area.This calculation is based upon the information
collected in the topology database and an algorithm called shortest path
first (SPF)

 OSPF uses a metric referred to as cost. A cost is associated with every


outgoing interface included in an SPF tree. The cost of the entire path is the
sum of costs of the outgoing interfaces along the path.

 Cisco uses a simple equation of 108/bandwidth.The bandwidth is the


configured bandwidth for the interface. Using this rule, a 100Mbps Fast
Ethernet interface would have a default OSPF cost of 1 and a 10Mbps
Ethernet interface would have a cost of 10. An interface set with a
bandwidth of 64,000 would have a default cost of 1563.

You might also like