You are on page 1of 57

Routing Information Protocol

Aug 2010

© Tech Mahindra Limited 2008 Tech Mahindra Limited confidential


Agenda

ƒ Routing

ƒ Routing vs Routed

ƒ Routing Process/Steps

ƒ Distance Vector vs Link State Algorithm

ƒ Classful vs Classless

ƒ Types of Routing

ƒ Static Route

ƒ Default Route

ƒ Interior & Exterior Routing Protocol

ƒ Summary of RIP

ƒ Summary of OSPF

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 2


Routing

ƒ The process that a router uses to forward packets toward the


destination network.

ƒ A router makes this decision based on the destination IP


address

ƒ If dynamic routing is used, routers have to learn routes from


other routers.

ƒ If static routing is used, the administrator configures this


information into the router manually

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 3


Routed VS. Routing

• Routed protocols
are protocols that
are routed over an
Internetwork (IP,
AppleTalk, IPX)
• Routing protocols
use algorithms to
route routed
protocols through
the Internetwork
(RIP, IGRP, OSPF)

•Routed protocols are used BETWEEN routers to direct traffic


•Routing protocols allow routers to share information about
known networks with other networks (their purpose)
CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 4
Routing Process

© Tech Mahindra Limited 2008 Tech Mahindra Limited confidential


The Routing Process

192.168.1.56 • The protocol


01-00-A5-C3-26-6B
address (IP) always
remains the same.
192.168.1.56
34-7E-33-12-C9-20

192.168.1.56
6A-5F-0D-09-8B-AA

ƒ The physical
192.168.1.56 address (MAC)
BC-48-03-8F-FF-AA
changes at each
hop.
CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 6
IP ROUTING OVERVIEW

Host A Host B

Applications Applications

TCP/UDP IP Forwarding and Routing IP Forwarding and Routing TCP/UDP


Protocols Protocols

IP IP IP IP

Interface Interface Interface Interface Interface Interface

Network 1 Network 2 Network 3

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 7


Routing decision criteria
ƒ Routers must determine the best route to send traffic on
toward its destination.

ƒ 1. Valid next-hop IP address—When updates are received, the


router first verifies that the next-hop IP address to reach the
potential destination is valid.

ƒ 2. Metric—The router then examines the metrics for the various


routes that might exist from a particular protocol. For example,
if OSPF has several routes to the destination, the router tries to
install the route with the best metric (in this case, cost) into the
routing table.

ƒ 3. Administrative distance—If multiple routing protocols are


running on the device, and multiple protocols are all presenting
routes to the destination with valid next hops, the router
examines administrative distance. The route sourced from the
lowest administrative distance protocol or mechanism is
installed in the routing table.

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 8


Administrative distance
ƒ If a router learns of a network from multiple sources (routing protocols
or static configurations), it uses the administrative distance value to
determine which route to install in the routing (forwarding) table.

ƒ The default administrative distance values are listed here.


ƒ Source Administrative Distance
Connected interface 0
Static route 1
EIGRP summary route 5
External BGP 20
Internal EIGRP 90
IGRP 100
OSPF 110
IS-IS 115
RIP 120
Exterior Gateway Protocol 140
On-Demand Routing 160
External EIGRP 170
Internal BGP 200
Unknown 255
CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 9
Types of Routing Algorithm

© Tech Mahindra Limited 2008 Tech Mahindra Limited confidential


Distance Vector Routing

Neighbor to
neighbor
ONLY

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 11


Distance Vector Routing

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 12


Distance Vector Algorithm

ƒ Examples: Routing Information Protocol Version 1 (RIPv1), RIPv2,


Interior Gateway Routing Protocol (IGRP)

ƒ Features periodic transmission of entire routing tables to directly


connected neighbors

ƒ Distance vector routing protocols work by passing copies of their


routing table to their neighbors (this is also known as "routing by
rumor" because neighbors talk to neighbors and not the source of the
route).

ƒ Mathematically compares routes using some measurement of


distance

ƒ Features hop-count limitation

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 13


Link State Algorithm

ƒ Forms adjacencies with neighboring routers that speak the


same protocol; sends local link information to these devices.

ƒ Sends local connection information to all nodes in the


Internetwork.

ƒ The routers then run the Shortest Path First algorithm to


analyze all paths and determine best paths.

ƒ Note that although this is flooding of information to all


nodes, the router is sending only the portion of information
that deals with the state of its own links.

ƒ (E.g) OSPF, IS-IS

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 14


Hybrid

ƒ Example: Enhanced Interior Gateway Routing Protocol


(EIGRP)

ƒ Features properties of both distance vector and link-state


routing protocols

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 15


Path vector protocol

ƒ Example: Border Gateway Protocol (BGP).

ƒ Path vector protocols are a subset of distance vector


protocols; BGP uses “path vectors” or a list of all the
autonomous systems a prefix has crossed to make metric
decisions and to ensure a loop free environment.

ƒ In addition to the autonomous system path list, an


administrator can use many other factors to affect the
forwarding or receipt of traffic using BGP.

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 16


Distance vs Link State
ƒ Distance vector routing is less processor- and memory-
intensive than link state routing, but can have loops because
decisions are made on incomplete information.

ƒ Link state routing is loop-proof because routers know all


possible routes, but link state routing requires more CPU
time and memory.

ƒ Protocol Technique
RIP Distance Vector
RIPv2 Distance Vector
EIGRP Distance Vector
OSPF Link State
IS-IS Link State
BGP Path Vector

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 17


Review – Link State & Distance Vector

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 18


Split horizon

ƒ Split horizon is a technique used by routing protocols to help


prevent routing loops.

ƒ The split-horizon rule states that an interface will not send


routing information out an interface from which the routing
information was originally received.

ƒ Don’t tell me what I told u

ƒ Don’t Send information out of the interface, in which it is


learnt.

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 19


Summarization
ƒ Summarization is the process in which the administrator
collapses many routes with a long mask to form another
route with a shorter mask.

ƒ Route summarization reduces the size of routing tables and


makes routing function more efficiently.

ƒ Route summarization also helps make networks more stable


by reducing the number of updates that are sent when
subnets change state.

ƒ Route summarization makes classless interdomain routing


(CIDR) possible.

ƒ Variable-length subnet masking (VLSM) promotes the use of


route summarization.

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 20


Classful vs Classless

© Tech Mahindra Limited 2008 Tech Mahindra Limited confidential


Classful routing protocols
ƒ Classful routing protocols do not include subnet mask
information with routing updates.

ƒ (e.g) RIPv1 and IGRP.

ƒ The default mask for Class A networks is /8, for Class B it is


/16, and for Class C it is /24.

ƒ This behavior is called classful, because the assumption is


based on the class of the IP address.

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 22


Classful Example RIPv1 Advertisements
ƒ Notice that no subnet mask is advertised. For instance, the
first route is 10.0.0.0 with no indication of the appropriate
subnet mask.

ƒ This shows that RIP is a classful routing protocol.

ƒ Router1# debug ip rip


RIP protocol debugging is on
00:03:40: RIP: received v1 update from 172.16.2.200 on
Serial1/0
00:03:40: 10.0.0.0 in 1 hops
00:03:40: 172.16.4.0 in 1 hops
00:03:40: 172.16.6.0 in 1 hops
00:03:40: 172.16.44.0 in 2 hops
00:03:40: 172.16.66.0 in 2 hops

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 23


Classless Routing protocol

ƒ Modern routing protocols (OSPF, IS-IS, and EIGRP) explicitly


advertise the mask.

ƒ There is no assumption involved, the mask is clearly


indicated. This behavior is referred to as classless.

ƒ Mostly used Nowadays.

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 24


Classless Example of RIPv2
ƒ Notice that the subnet mask is now advertised. RIPv2 is a
classless routing protocol.

ƒ Router1(config)# router rip


Router1(config-router)# version 2
Router1(config-router)# end
Router1#debug ip rip
RIP protocol debugging is on
00:11:07: RIP: sending v2 update to 224.0.0.9 via
FastEthernet0/0 (172.16.22.1)
00:11:07: RIP: build update entries
00:11:07: 10.0.0.0/8 via 0.0.0.0, metric 2, tag 0
00:11:07: 172.16.2.0/24 via 0.0.0.0, metric 1, tag 0
00:11:07: 172.16.4.0/24 via 0.0.0.0, metric 2, tag 0
00:11:07: 172.16.6.0/24 via 0.0.0.0, metric 2, tag 0
00:11:07: 172.16.44.0/24 via 0.0.0.0, metric 3, tag 0
00:11:07: 172.16.66.0/24 via 0.0.0.0, metric 3, tag 0
CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 25
Classless vs Classful

ƒ The Internet has been classless for years and the vast
majority of enterprise networks are classless.

ƒ Classless routing protocols are necessary in today's network.

ƒ Protocol Classless or Classful

RIPv1 Classful
RIPv2 Classless
EIGRP Classless
OSPF Classless
IS-IS Classless
BGP Classless

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 26


Types of Routing

© Tech Mahindra Limited 2008 Tech Mahindra Limited confidential


Types of Routing

ƒ Default Routing

ƒ Static Routing

ƒ Dynamic Routing
y It uses routing protocols to find the networks

ƒ Static and Default routes are managed by administrator.

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 28


Static Routing with Exit Interface

Outgoing
interface

Administrative
distance of 1 -
default

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 29


Static Routing with Next hop Interface

Next hop
interface

Administrative
distance of 1 -
default

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 30


S0 192.168.2.1/24 S0 192.168.4.1/24

Router A Router B Router C

S1 192.168.2.2/24 S1 192.168.4.2/24

192.168.1.0/24 192.168.3.0/24 192.168.5.0/24

What would you enter to configure a static route from


Router C to the LAN on Router A using outgoing
interface?
The LAN on Router B from Router A using next-hop?
CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 31
Default Routes

ƒ A router should be configured with a special


type of static route – a default route.

ƒ This default route routes packets with


destinations that do not match any of the
other routes in the routing table

ip route 0.0.0.0 0.0.0.0 [next-hop-address |


outgoing interface]

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 32


Default Route on non-directly
connected networks

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 33


Summary of Static & Default
ƒ Static routing has the following benefits:
y There is no overhead on the router CPU, which means you
could possibly buy a cheaper router than you would use if you
were using dynamic routing.
y There is no bandwidth usage between routers, which means
you could possibly save money on WAN links.
y It adds security because the administrator can choose to allow
routing access to certain networks only.
ƒ Static routing has the following disadvantages:
y The administrator must really understand the Internetwork
and how each router is connected in order to configure routes
correctly.
y If a network is added to the Internetwork, the administrator
has to add a route to it on all routers—by hand.
y It’s not feasible in large networks because maintaining it
would be a full-time job in itself.
ƒ You should only use default routing on stub networks—those
with only one exit path out of the network.
CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 34
Dynamic Routing - IGP vs EGP

© Tech Mahindra Limited 2008 Tech Mahindra Limited confidential


Interior Gateway and Exterior Gateway Protocol
ƒ Most protocols are interior gateway protocols, meaning that
they are designed to run inside your network.

ƒ Inside a network, routers can trust each other and—since all


links are owned by the organization—can choose paths
without regard to who owns a link.

ƒ BGP is an exterior gateway protocol (EGP), meaning that


BGP is the routing protocol used between autonomous
systems in the public Internet.

ƒ Because it is the only EGP, you will have to consider using it


if you connect your network to the Internet.

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 36


IGP vs EGP
ƒ The routing protocols and whether each is intended for
interior or exterior use.

ƒ Protocol Interior or Exterior Gateway Protocol


RIP IGP
RIPv2 IGP
EIGRP IGP
OSPF IGP
IS-IS IGP
BGP EGP

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 37


Routing Protocol and Autonomous System

ƒ An autonomous system (AS) is a collection of networks


under a common administration sharing a common
routing strategy.

ƒ The goal of a routing protocol is to build and maintain


the routing table.

ƒ A routers learns about routes to a network by:


y Gathering information from its own configuration
regarding directly connected networks.
y Other routers forward information about known networks.
y Manually entered routes by a network administrator.

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 38


IP Routing Overview

Autonomous System A Autonomous System B

R R
IGP IGP
R EGP R

R R

Single Management Entity


EGP

Autonomous System C
R
IGP

Internet
R

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 39


Convergence Time
ƒ Convergence times are generally grouped as slow or fast.

ƒ Fast convergence means that the routing protocol is able to


recognize a problem and fix it faster than a user can call to
report the problem.

ƒ Slow protocols, such as RIP and IGRP, can take minutes to


converge.

ƒ Fast protocols, such as OSPF, IS-IS, and EIGRP, generally


converge in less than ten seconds.

ƒ Protocol Convergence Speed


RIP Slow
RIPv2 Slow
EIGRP Fast
OSPF Fast
IS-IS Fast
BGP Slow
CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 40
Proprietary and Open Protocols
ƒ The routing protocols and points out which are proprietary.

ƒ Protocol Proprietary

RIP No
RIPv2 No
EIGRP Yes
OSPF No
IS-IS No
BGP No

EIGRP will be easy to configure and maintain.

EIGRP, OSPF, IS-IS will be most commonly used.

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 41


Routing Information Protocol (RIP)

4
8/10/2010 2
Introduction to RIP

ƒ RIP is the distance vector IP routing protocol Based on


Bellman-Ford algorithm

ƒ RIP is a Dynamic Internetwork routing protocol and is


primarily used in Interior routing environments (IGP)

ƒ RIP Currently available in two version: RIPv1 and RIPv2

ƒ RIP uses UDP port number 520

ƒ All RIP messages are encapsulated in UDP datagram with


both source and destination port fields set to that value 520

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 43


Introduction to RIP (contd..)

ƒ The metric used by RIP is hop count, least number of hop


count is best-path to the destination.

ƒ RIP Support only 15 hop counts, 16 is unreachable.

ƒ Hop count 1 signifying a directly connected network of the


advertising router and 16 signifying an unreachable router.

ƒ If two route are available with same hop count, equal-cost


load balancing is done

ƒ RIPv1 is a Classful Routing protocol

ƒ RIPv2 is a Classless Routing protocol

ƒ RIPv2 supports Summarization, authentication

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 44


RIPv1
ƒ RIPv1 is classful routing protocol

ƒ RIPv1 doesn't support the subnet addresses in which the


subnets bits are all zeros and all ones.

ƒ RIPv1 don't have a Authentication


ƒ RIPv1 doesn't carry next hop ip address

ƒ RIPv1 broadcasts a packet carrying a request message out


each RIP enabled Interface using 255.255.255.255

ƒ By default, IOS receives RIPv1 and RIPv2 packets, but sends


only RIPv1 packets

ƒ RIPv1 doesn’t receive the multi cast RIPv2 packets. Send &
receive RIPv1 packet
CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 45
RIPv2
ƒ RIPv2 is classless routing
ƒ RIPv2 supports CIDR/VLSM
ƒ RIPv2 send the update using multicasting address
(224.0.0.9)
ƒ Subnet mask carried with each route entry

ƒ Authentication of routing updates

ƒ Next-hop addresses carried with each route entry


ƒ External route tags

ƒ If authentication enabled, then it won’t receive any RIPv1


packets and it can send/receive RIPv2 packets

ƒ If authentication disabled, it will receive & process RIPv1


packets

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 46


RIP v1 – Packet Format

Number of bytes
1 Command
1 Version
2 Reserved • Command Either Request or Response
2 Address family ID • Version – Always 1 for RIP v1
2 Reserved • AFI – Address Family Identifier
4 IP Address
Identifies routing information for
which type of network
4 Reserved • IP Address – The network for which
4 Reserved this entry is sent
4 Metric • Metric – The distance to this network
from the sender

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 47


RIP v2 – Packet Format

1 Command
1 Version
2 Reserved
2 Address family ID
2 Route tag/Authentication type
4 IP Address
4 Subnet Mask
4 Next Hop
4 Metric

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 48


RIPv1 Packet Format

ƒ Command—Indicates whether the packet is a request or a response. The


request asks that a router send all or part of its routing table. The response
can be an unsolicited regular routing update or a reply to a request.
Responses contain routing table entries. Multiple RIP packets are used to
convey information from large routing tables.
ƒ Version number—Specifies the RIP version used. This field can signal
different potentially incompatible versions.
ƒ Zero—This field is not actually used by RFC 1058 RIP; it was added solely
to provide backward compatibility with prestandard varieties of RIP. Its
name comes from its defaulted value: zero.
ƒ Address-family identifier (AFI)—Specifies the address family used. RIP
is designed to carry routing information for several different protocols. Each
entry has an address-family identifier to indicate the type of address being
specified. The AFI for IP is 2.
ƒ Address—Specifies the IP address for the entry.
ƒ Metric—Indicates how many internetwork hops (routers) have been
traversed in the trip to the destination. This value is between 1 and 15 for a
valid route, or 16 for an unreachable route.

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 49


RIPv2 Packet Format

ƒ Unused—Has a value set to zero.

ƒ Address-family identifier (AFI)—


y A new AFI of 0xffff indicates authentication
y The authentication type indicates the type of authentication that is to
be used
y Currently only password based authentication is supported
y If present the rest 16 bytes are password Route tag—Provides a
method for distinguishing between internal routes (learned by RIP) and
external routes (learned from other protocols).

ƒ IP address—Specifies the IP address for the entry.

ƒ Subnet mask—Contains the subnet mask for the entry. If this


field is zero, no subnet mask has been specified for the entry.

ƒ Next hop—Indicates the IP address of the next hop to which


packets for the entry should be forwarded.
CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 50
RIP Timers
ƒ Update Time:

ƒ RIP sends update periodically.

ƒ The Time between each advertisement is update time.

ƒ RIP sends response message to RIP enabled interface after


every 30 sec

ƒ Update contains full routing table with exceptions of entries


suppressed by the split horizon rule

ƒ Update timer also adds small random delay to avoid routing


table synchronization

ƒ Hence, update time varies from 25 – 35 seconds (+/- 5 sec)

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 51


Invalid Time:

ƒ Invalidation timer used to limit the amount of time a route


can stay in the routing table without being updated

ƒ RIP calls it as expiration timer or timeout Cisco IOS call it as


invalid timer

ƒ The expiration timer is initialized to 180 seconds whenever a


new route is established and reset to the initial value
whenever an update is heard for that route.

ƒ If no updates received, wait for this long after the last


successful update before making the route is invalid. Default
is 180 secs

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 52


Hold down Time

ƒ When route became invalid, don’t accept updates about this


route for this period of time, default is 180 secs

ƒ An update with a hop count higher than the metric recorded


in the routing table will cause the route to go into hold-down
for 180 seconds.

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 53


Flush Time

ƒ The garbage collection or flush timer is set to 240 seconds –


60 seconds longer than the expiration timer

ƒ If the route has been invalid for this time, flush it (remove)
from the routing table.

ƒ Default is 240 secs for cisco .

ƒ Non cisco (RFC) supports 300 secs

ƒ The route will be advertised with the unreachable metric


until the garbage collection timer expires, at which time the
route is removed from the routing table

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 54


Difference Between RIPv1 & RIPv2

ƒ RIPv1 supports only classful addressing, and RIPv2 supports


classless (CIDR / VLSM).

ƒ RIPv2 supports authentication of routing updates.

ƒ RIPv2 supports multicast (224.0.0.9, 01-00-5E-00-00-09)


route updates, and RIPv1 supports broadcast updates
(255.255.255.255) which causes “broadcast storm”.

ƒ RIPv2 carries next hop addresses and Subnet Mask with


each route entry.

ƒ RIPv2 carries Route Tag Information

ƒ RIPv2 supports Auto and Manual summarization.


CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 55
Advantages of RIP

ƒ RIP was designed for smaller inter networks

ƒ RIP is easy to Implement

ƒ RIP supports Auto and Manual summarization.

ƒ RIP doesn’t consume valuable resources in the router or


computer since there are no calculations to perform

ƒ Little overheads in terms of bandwidth, memory


consumption and processor load, etc

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 56


Disadvantages & Limitations of RIP

ƒ When RIP was designed and implemented, dynamic routing


protocols are not widely used

ƒ RIP was designed for smaller inter networks

ƒ RIP Support only 15 hop counts, 16 is unreachable.

ƒ Slow convergence

ƒ Routing Loops

CONFIDENTIAL© Copyright 2008 Tech Mahindra Limited 57

You might also like