Routing protocols - WordPress – www.wordpress.com

enginestagNetworking and Communications

Oct 26, 2013 (4 years and 2 months ago)

90 views

ROUTING PROTOCOLS

PART I

ET4187/ET5187 Advanced Telecommunication Network

Autonomous systems


An autonomous
system
(AS)
is defined as a logical
portion
of a
larger IP
network


An
AS normally consists of an internetwork within
an
organization


It
is administered by a single management authority.

2


Interior Gateway Protocols (IGPs): Interior Gateway Protocols allow routers
to
exchange
information within an AS. Examples
Open Short
Path First (OSPF)
and Routing Information Protocol (RIP
)


Exterior
Gateway Protocols (EGPs): Exterior Gateway Protocols allow
the
exchange
of summary information between autonomous systems.
Example:
Border
Gateway Protocol (BGP).

3

Types of IP routing and IP routing algorithms


Routing algorithms build and maintain the IP routing table on a
device


There
are two
primary methods used to build the routing table:


Static routing


Static
routing uses preprogrammed definitions
representing paths
through the network.


Dynamic routing


It allow
routers to
automatically discover
and maintain awareness of
the paths through the network.


This automatic
discovery can use a number of currently available
dynamic
routing protocols
.


Distance
vector protocols


Link
state protocols


Path
vector protocols


Hybrid
protocols

4

Static routing

5


Static routing is manually performed by the network
administrator


In small
and simple networks
with minimal redundancy, this process is relatively simple
to
administer


Cons


Static routes require a considerable amount of coordination and
maintenance in
non
-
trivial
network environments.


Static
routes cannot dynamically adapt to the current operational state of
the network


Pros in some circumstances


To manually define a default route. This route is used to forward traffic
when the
routing
table does not contain a more specific route to the destination.


To
define a route that is not automatically advertised within a network.


When
utilization or line tariffs make it undesirable to send
routing advertisement
traffic
through lower
-
capacity WAN connections.


When
complex routing policies are required. For example, static routes
can be
used to
guarantee that traffic destined for a specific host traverses
a designated
network path.


To
provide a more secure network environment. The administrator is aware
of all
subnetworks

defined in the environment. The administrator
specifically authorizes
all
communication permitted between these
subnetworks
.


To provide more efficient resource utilization

Distance vector routing

6


Each router in
the internetwork
maintains the distance or cost
from itself to every known
destination


Paths
associated with
a smaller
cost value are more
attractive to use than paths associated with a
larger value


The
path represented by the smallest cost becomes the preferred
path
to reach
the
destination


This information is maintained in a distance vector
table


The
table is
periodically advertised
to
each neighboring
router


Each
router processes
these advertisements
to determine the
best paths through the
network


Example: RIP

7


Pros


Easy to
implement and
debug


Very
useful in small networks with
limited redundancy


Cons


During an adverse condition, the length of time for every device in
the network
to produce an accurate routing table is called the
convergence
time
.


In
large, complex internetworks using distance vector algorithms, this
time can
be
excessive.


While
the routing tables are converging, networks
are susceptible
to inconsistent
routing
behavior.


This
can cause routing loops
or other
types of unstable packet
forwarding


To
reduce convergence time, a limit is often placed on the maximum
number of
hops contained in a single route.


Valid
paths exceeding this limit are
not usable
in distance vector
networks


Distance
vector routing tables are periodically transmitted to
neighboring
devices
.



They
are sent even if no changes have been made to the contents
of the
table.


This
can cause noticeable periods of increased utilization
in reduced
capacity
environments

Link state routing

8


It use
the principle of a
link state

to determine
network topology.


A
link state

is the description of an interface on a
router (for example, IP
address, subnet
mask, type
of network) and its relationship to neighboring
routers.


The collection
of these link states forms a link state
database
.


Example: OSPF

9


Process:


Each router identifies all other routing devices on the directly
connected networks
.


Each
router advertises a list of all directly connected network
links and
the associated
cost of each link. This is performed
through the exchange of
link state
advertisements (LSAs) with
other routers in the network.


Using
these advertisements, each router creates a database
detailing
the current
network topology. The topology database in
each router is identical.


Each
router uses the information in the topology database to
compute
the most
desirable routes to each destination
network.


This
information is used
to update
the IP routing table

10


Shortest
-
Path First (SPF)
algorithm


It
is used to process the information in the topology
database.


It provides
a tree
-
representation of the network.


The
device running the
SPF algorithm
is the root of the
tree.


The
output of the algorithm is the list
of shortest
-
paths
to each destination network.


Path vector routing

11


The path vector routing algorithm is
similar
to the
distance
vector algorithm


Each
border router advertises the destinations it
can
reach
to its neighboring
router


Networks
are advertised as
destination addresses

and
path

descriptions to reach those destinations.


In distance vector: networks are advertised in terms
of
a destination and the distance to that
destination

12


A route is defined as a pairing between a destination and
the attributes of
the path
to that
destination


The
name, path vector routing, where the
routers receive
a vector
that contains paths to a set of destinations.


The path, expressed in terms of the
domains (or
confederations) traversed
so far
, is carried in a special path
attribute that records the sequence of
routing domains
through which the reachability information has passed.


The path represented
by the smallest number of domains
becomes the preferred path
to reach
the destination
.


Example: BGP

13


Pros


The
computational complexity is smaller than that of the link state
protocol.


The
path vector computation consists of evaluating a newly arrived route
and
comparing
it with the existing one, while conventional link state
computation
requires
execution of an SPF algorithm
.


Path
vector routing does not require all routing domains to
have homogeneous
policies for route selection; route selection policies used
by one
routing domain
are not necessarily known to other routing domains.


Only
the domains whose routes are affected by the changes have
to
recompute
.


Suppression
of routing loops is implemented through the path attribute,


Route
computation precedes routing information dissemination.


Therefore, only
routing information associated with the routes selected by a domain
is
distributed
to adjacent domains
.


Path
vector routing has the ability to selectively hide information.

14


Cons


Topology changes only result in the
recomputation

of
routes affected by
these changes
, which is more
efficient than complete
recomputation
.
However,
because
of the inclusion of full path information with
each distance vector,
the effect
of a topology change
can propagate farther than in traditional
distance
vector
algorithms.


Unless
the network topology is fully meshed or is able
to appear so,
routing loops
can become an issue.

Hybrid routing

15


These
protocols attempt
to combine the positive attributes of both
distance vector and link
state protocols
.


Like
distance vector, hybrid protocols use metrics to assign
a
preference
to a route. However, the metrics are more accurate than
conventional distance
vector protocols.


Like
link state algorithms, routing updates in
hybrid protocols
are
event driven rather than periodic.


Networks
using hybrid
protocols tend
to converge more quickly than
networks using distance vector protocols.


Finally, these protocols potentially reduce the costs of link state
updates
and distance
vector advertisements.


Although open hybrid protocols exist, this category is almost
exclusively associated
with the proprietary EIGRP algorithm.


EIGRP
was developed
by Cisco
Systems, Inc.

Routing Information Protocol (RIP)

16

RIP packet types

17


Request
packets


It queries
neighboring RIP devices to
obtain their
distance vector table.


The
request indicates if the neighbor should
return either
a specific subset or the
entire contents of the table.


Response packets


A
response packet is sent by a device to advertise
the information
maintained in
its local distance vector table.


The
table is
sent during
the following situations:


The
table is automatically sent every 30 seconds.


The
table is sent as a response to a request packet generated by
another RIP
node.


If
triggered updates are supported, the table is sent when there is
a change
to the
local distance vector table.


When
a response packet is received by a device, the information contained
in the
update is compared against the local distance vector table.


If
the
update contains
a lower cost route to a destination, the table is updated to
reflect
the new
path.

RIP packet format

18


RIP packets are transmitted using UDP datagrams.


RIP sends and receives datagrams using UDP port 520
.


RIP datagrams have a maximum size of 512 octets
.


Updates
larger than this
size must
be advertised in multiple
datagrams.


In
LAN environments, RIP
datagrams are
sent using the MAC
all
-
stations broadcast address and an IP
network broadcast
address.


In
point
-
to
-
point or non
-
broadcast environments,
datagrams
are
specifically addressed to the destination device
.


A 512 byte packet size allows a maximum of 25 routing
entries to be included
in a
single RIP advertisement.

19

RIP modes of operation

20


RIP hosts have two modes of operation:


Active mode


Devices
operating in active mode advertise their distance
vector
table
and also receive routing updates from neighboring RIP hosts.


Routing devices
are typically configured to operate in active
mode.


Passive
(or silent)
mode


Devices
operating in this mode simply
receive routing
updates
from neighboring RIP devices.


They
do not advertise
their distance
vector table.


End
stations are typically configured to operate
in passive
mode.

Calculating distance vectors

21


The distance vector table describes each destination
network.


The
entries in
this table
contain the following
information
:


The
destination network (vector) described by this entry in
the table.


The
associated cost (distance) of the most attractive path to
reach
this destination
.


It provides
the ability to differentiate between multiple paths
to a
destination.


The IP address of the next
-
hop device used to reach the
destination network.

22


RIP distance vector
algorithm


At router initialization, each device contains a distance vector table
listing each
directly attached networks and configured cost.


Typically
, each
network is
assigned a cost of 1
.


This
represents a single hop through the network.


The total
number of hops in a route is equal to the total cost of the route.


Cost
can be changed to reflect other measurements such as
utilization, speed
, or reliability.


Each
router periodically (typically every 30 seconds) transmits its
distance vector
table to each of its neighbors.


The
router can also transmit the
table when
a topology change occurs.


Each
router uses this information to
update its
local distance vector table:


The
total cost to each destination is calculated by adding the cost
reported in
a neighbor's
distance vector table to the cost of the link to that neighbor.


The path with the least cost is stored in the distance vector table.


All
updates automatically supersede the previous information in
the distance
vector table.


This
allows RIP to maintain the integrity of
the routes
in the routing table.



The IP routing table is updated to reflect the least
-
cost path to
each destination
.

23


RIP routing table update example

24

25

26

27

converged

Count to infinity problem

28


For simplicity, assume that the announcements sent
by Router 1 on Network 1 and Router 2 on Network
3 are not included.

A converged internetwork

29


Now assume that the link from Router 2 to Network 3 fails
and is sensed by Router 2.


As
shown in
Figure,
Router 2 changes the hop count for the
route to Network 3 to indicate that it is unreachable, an
infinite distance away.


For
RIP for IP, infinity is
16

30


However, before Router 2 can advertise the new hop count to Network 3 in
a scheduled announcement, it receives an announcement from Router 1.


The
Router 1 announcement contains a route to Network 3 which is two hops
away.


Because
two hops away is a better route than 16 hops, Router 2 updates its
routing table entry for Network 3, changing it from 16 hops to three
hops

31


When Router 2 announces its new routes, Router 1 notes that
Network 3 is available three hops away through Router 2.


Because
the route to Network 3 on Router 1 was originally learned
from Router 2, Router 1 updates its route to Network 3 to four hops
.

32


When Router 1 announces its new routes, Router 2 notes that Network 3 is available
four hops away through Router 1.


Because
the route to Network 3 on Router 2 was originally learned from Router 1,
Router 2 updates its route to Network 3 to five hops
.


The two routers continue to announce routes to Network 3 with higher and higher
hop counts until infinity (16) is reached.


Then
, Network 3 is considered unreachable and the route to Network 3 is eventually
timed out of the routing table.


This
is known as the count
-
to
-
infinity problem.

33


To minimize this exposure, whenever a network is
unavailable,
the incrementing
of metrics through routing
updates must be halted as soon as it
is practical
to do so.


In
a RIP environment, costs continue to increment until
they
reach
a maximum value of 16.
(This
limit is defined in RFC
1058)


A side effect of the metric limit is that it also limits the
number of hops a
packet can
traverse from source network
to destination network.


In
a RIP
environment, any
path exceeding 15 hops is
considered invalid.


The
routing algorithm
will discard
these paths

34


To help reduce the convergence time of RIP for IP
internetworks and to avoid count
-
to
-
infinity and
routing loops in most situations,
we
can enable the
following modifications to the RIP announcement
mechanism:


Split horizon


Split horizon with poison reverse


Triggered updates


35


Split Horizon


Split horizon helps reduce convergence time by not allowing routers to advertise networks in
the direction from which those networks were learned.


The
only information sent in RIP announcements are for those networks that are beyond the
neighboring router in the opposite direction.


Networks
learned from the neighboring router are not included.


Split horizon eliminates count
-
to
-
infinity and routing loops during convergence in single
-
path
internetworks and reduces the chances of count
-
to
-
infinity in multi
-
path internetworks.

36


Split Horizon with Poison Reverse


Split horizon with poison reverse differs from simple split horizon because it announces all networks.


However
, those networks learned in a given direction are announced with a hop count of 16, indicating that the
network is unreachable.


In
a single
-
path internetwork, split horizon with poison reverse has no benefit beyond split horizon.


However
, in a multipath internetwork, split horizon with poison reverse greatly reduces count
-
to
-
infinity and routing
loops.


Count
-
to
-
infinity
can still occur in a multipath internetwork because routes to networks can be learned from multiple
sources.


In Figure,
split horizon with poison reverse advertises learned routes as unreachable in the direction from which they
are learned.


Split
horizon with poison reverse does have the disadvantage of additional RIP message overhead because all
networks are advertised.

37


Hold down timers


After hearing a route poisoning, router starts a hold
-
down
timer for that route.


If
it gets an update with a better metric than the originally
recorded metric within the hold
-
down timer period, the hold
-
down timer is removed and data can be sent to that
network.


Also
within the hold
-
down timer, if an update is received
from a different router than the one who performed route
poisoning with an equal or poorer metric, that update is
ignored.


During
the hold
-
down timer, the “downed” route appears as
“possibly down” in the routing table.

38


Triggered
Updates


Triggered updates allow a RIP router to announce changes in metric
values
almost immediately
rather than waiting for the next periodic
announcement.


The
trigger is a change to a metric in an entry in the routing table.


For
example, networks that become unavailable can be announced with
a hop count of 16 through a triggered update.


Note
that the update is sent

almost immediately

, where a time interval to
wait is typically specified on the router.


If
triggered updates were sent by all routers immediately, each triggered
update could cause a cascade of broadcast traffic across the IP internetwork.


Triggered updates improve the convergence time of RIP internetworks
but at the expense of additional broadcast traffic as the triggered
updates are
propagated

RIP limitations

39


Path cost
limits


The
resolution to the counting to infinity problem enforces
a maximum
cost for a
network path.


Networks
requiring paths greater than 15 hops must
use an
alternate routing
protocol.


Network
-
intensive
table
updates


Periodic
broadcasting of the distance
vector table
can result in increased
utilization of network resources.


This
can be
a concern
in reduced
-
capacity segments.


Relatively
slow
convergence


RIP
, like other distance vector protocols,
is relatively
slow to converge.


The
algorithms rely on timers to initiate
routing table
advertisements.


No
support for variable length subnet
masking


Route
advertisements in
a RIP
environment do not include subnet masking
information.


This
makes
it impossible
for RIP networks to deploy variable length subnet masks.

Routing Information Protocol Version 2
(RIP
-
2)

40

41


RIP Version 1 (RIP
-
1
)


This
protocol is described in RFC 1058.


RIP
Version 2 (RIP
-
2
)


RIP
-
2
is also a distance vector protocol designed
for
use
within an AS.


It
was developed to address the limitations observed
in
RIP
-
1
.


RIP
-
2
is described in RFC 2453.


The
standard (STD 56)
was published
in late 1994.

RIP
-
2
additional
benefits

42


Support for CIDR and
VLSM


Support
for
multicasting


This
reduces the
processing load
on hosts not listening for RIP
-
2
messages


To
ensure
interoperability with
RIP
-
1 environments, this option is
configured on each network interface.


Support
for
authentication


RIP
-
2
supports authentication of any
node transmitting
route
advertisements.


This
prevents fraudulent sources
from corrupting
the routing table.


Support
for
RIP
-
1


RIP
-
2
is fully interoperable with RIP
-
1. This
provides backward
-
compatibility
between the two standards.


In RIP
-
1 as well as RIP
-
2 networks
paths with a hop
-
count greater
than 15
are interpreted as unreachable.

RIP
-
2 packet format

43


The first entry in the
update contains either a
routing entry
or an
authentication entry.


If
the first entry is an

authentication
entry,
24
additional
routing
entries can be included
in the message.


If
there is
no
authentication
information, 25 routing
entries can be provided.

44


Version
The value contained in this field must be two.
This instructs
RIP
-
1
routers to ignore any
information contained
in the previously unused fields.


AFI (Address Family)
A value of x’0002’ indicates the address contained
in
the network
address field is an IP address. An value
of
x'FFFF
' indicates
an authentication entry.


Authentication
Type
This field defines the remaining 16 bytes of
the
authentication
entry. A value of 0 indicates
no
authentication
. A value of
two indicates the
authentication data
field contains password data.


Authentication Data
This field contains a 16
-
byte password.


Route Tag
This field is intended to differentiate between internal
and
external
routes. Internal routes are learned through
RIP
-
2 within
the same
network or AS.


Subnet Mask
This field contains the subnet mask of the
referenced network
.


Next Hop
This field contains a recommendation about the next
hop the
router should use when sending datagrams to
the referenced
network.

RIP
-
2 limitations

45


The
path cost limits and slow convergence inherent
in RIP
-
1
networks are
also concerns in RIP
-
2
environments.


There
are limitations to the RIP
-
2
authentication
process
.


The
RIP
-
2 standard does not encrypt the authentication
password.


It is transmitted
in clear text.


This
makes the network vulnerable to attack by
anyone
with
direct physical access to the environment.

RIPng

for IPv6

46


RIPng

was developed to allow routers within an IPv6
-
based network to
exchange information
used to
compute routes.


It
is documented in RFC 2080
.


is a distance vector
protocol designed
for use within a
small autonomous system.


RIPng

uses the
same algorithms
, timers, and logic used in
RIP
-
2.


RIPng

has many of the same limitations inherent in other
distance
vector protocols
.


Path
cost restrictions and convergence time remain a
concern
in
RIPng

networks.

Differences between
RIPng

and RIP
-
2

47


Support for authentication:


RIPng

does
not include
any native authentication support.


RIPng

uses the
security features
inherent in
IPv6


In
addition to authentication, these security
features provide
the ability to encrypt each
RIPng

packet.


One
consequence of using
IPv6 security
features is that the
AFI field within the
RIPng

packet is eliminated.


There is no longer a need to distinguish between authentication
entries
and routing
entries within an advertisement.


Support
for IPv6 addressing
formats


The
fields contained in
RIPng

packets were
updated to
support the longer IPv6 address format.