Вы находитесь на странице: 1из 36

ROUTING BASICS, RIP

Iskra Djonova-Popova
Why are Routers Necessary?
A B
■ One of the key
components of
R1 R2
the technical
infrastructure of
the network R3
■ Connect networks
■ Provide the best
R4 R5
path from the
source to C
destination
Budapest, August 1999
Routing basics, RIP Iskra Dj. Popova 2
Sending Packets through
the Network
■ Sending packets on the same
subnet
Internet
■ Default router
■ Discovering the local router
R2
A
■ Using redirects
R1

B
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 3
The Internal Elements of a
Router
Routing table
Interfaces
Destination Next hop Interface
1
... ... 1
... ... 2 2

Routing Engine
4

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 4


Schematic View of a
Router

ncoming packets Outgoing packets

Processing

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 5


The Routing Table
■ The crucial element of the router
– defines the topology of the network
– must be consistent with other router’s
tables
■ Static and dynamic routing tables
– static - when constructed by network
administrator
– dynamic - when constructed by routing
protocols
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 6
Static Routes
■ Advantages
– predictability
– no overhead
– simplicity
■ Disadvantages
– lack of scalability
– can not adapt to a failure in a network

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 7


Example:
172.16.5.0/24 172.16.3.0/24
hostname Router1
172.16.5.1 172.16.3.1
R2
172.16.1.2 172.16.3.2 interface e0
R3
IP 172.16.1.1
172.16.2.0/24 172.16.4.1
255.255.255.0
172.16.2.1
172.16.4.0/24interface e1
R1
172.16.1.1 IP 172.16.2.1
172.16.1.0 255.255.255.0
IP route 172.16.3.0 255.25.255.0
/24 172.16.1.2
IP route 172.16.5.0 255.25.255.0
172.16.1.2
Budapest, August 1999 IP route 172.16.4.0
Routing basics, RIP
255.25.255.0 8
Iskra Dj. Popova
172.16.1.2
Dynamic Routes
■ Advantages
– adapt to a failure in a network
– work in large networks
■ Disadvantages
– increase in complexity
– overhead on the lines and routers

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 9


Hybrid Routing Schemes
■ Some parts use
static and some
parts dynamic R1
Core
R2 R3
routing Distribution
– static routing on
the access network R4 R5 R6
– dynamic routing on Access
the core and
distribution
network
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 10
Classification of the
Routing Protocols
■ Where the protocol is used
– Interior protocols (IGP)
– Exterior protocols (EGP)
■ Kind of information that is carried
and the way the routing table are
calculated
– Distance-vector protocols
– Link-state protocols
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 11
IGP Vs EGP
■ Interior Gateway Protocols
– within a single autonomous system
■ single network administration
■ unique routing policy

■ make best use of network resources

■ Exterior Gateway Protocols


– among different autonomous systems
■ independent administrative entities
■ communication between independent

network infrastructures
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 12
Distance-Vector Vs Link-
State
■ Distance-vector ■ Link-state protocols
protocols – Each router sends
– Each router information about
periodically sends to ■ links to which it is
his neighbors attached
■ how far is the ■ state of these links
destination – it is flooded
■ the next hop to get throughout the
there network
– Install routes directly – every router
in tables
Budapest, August 1999 Routing basics, RIP calculates
Iskra Dj. Popova its routing
13
The Role of IGPs
■ Maintain a coherent picture of the
network topology and address domain
in the router
■ Distribute this information to the other
routers
■ Maintain consistent routing tables,
such that the path to every
destination is “optimal”
■ Converge quickly when there are
changes
Budapest, August 1999 inRouting
thebasics,
network
RIP Iskra Dj. Popova 14
Example: Choosing an
R1
Optimal Path
R4
5
R7

40 5
5 R6 6 B
10
R2 15
A 10
20 R8
10
4
5 10
R3
R5
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 15
The Link Metric
■ Possible metrics
– hop count
– inverse of the link bandwidth
– delay
– dynamically calculated
– administratively assigned
– combination
■ Traffic should be monitored and
metrics adjusted
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 16
Example for Bad Metrics
Bandw.
256K
Metric 14
1024K
A 256K 1024K B
2
10 2

2048K 1
1
2048K
3 3 3 3
3
768K 768K 7 768K768K
68K
Bandw.
768K
Metric 17
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 17
RIP - Routing Information
Protocol
■ IGP, distance-vector protocol
■ First used in XNS (Xerox Network
Systems)
■ Designed as a component of the
networking code for the BSD release of
UNIX
■ incorporated in program “routed” (rote
management daemon)
■ First documented in rfc 1058
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 18
RIP - Characteristics
■ Packets are sent every 30 seconds
or faster when necessary
■ Route is considered down if not
refreshed within 180 sec. (distance
set to infinity)
■ Two kinds of messages
■ request
■ response

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 19


RIP - Characteristics
■ The metric is a hop-count
■ The value of 1 to 15 is used (16 denotes
infinity)
■ Bellman-Ford algorithm is used to find
the shortest paths
■ Doesn't support classless routing
■ Used only in IP networks
■ at first the intention was to be used in variety
of networks

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 20


Dest. Link Hop
A local 0 Dest. Link Example:
B 1 1 Hop
Dest. Link
E 2 1 B local
Hop
A 0
C local Dest. Link Hop
A 1
0 D local 0
1 1B B 4 C 5 1
C 4
1C G 7 1
1 4 D 5 D
E 3 5
2 1
3 1 F 6
6
1
7
E F
E HopDest. Link Hop
Dest. Link 8 Dest. Link Hop
E local 0 F local 0 G G local 0
A 2 1 C 6 1 D 7 1
B 3 1 G 8 1 F 8 1

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 21


A
1 B
table for
4 C node A
5 D
2 3 6

7 After
E
F four
8 After three iteratio
After G iterations Dest. Link
ns
two Hop
iteratio Dest. Link A local
Dest. Link Hop 0
ns
Hop A local B 1
A local 0 1
0 B 1 C 1
B 1 1 2
1 C 1 D 1
C 1 2 3
21999
Budapest, August D
Routing basics, RIP 1Iskra Dj. Popova E 2 22
E 2 3
A 1 B
C
In Case of a
4
2 5 D Link Failure
3 6
Routing table of node
7 afterA the
E before the
F 8 failure of failure of
Dest. Link link 1 link 3
G Dest. Link Dest. Link
Hop
E local Hop Hop
0 A local A local
A 2 0 0
1 B - B 2
B 3 - 2
1 C - C 2
C 3 - 3
2 D - D 2
D August 3 1999 - 4
Budapest, Routing basics, RIP Iskra Dj. Popova 23
3 E 2 E 2
Split-Horizon and Poison
Reverse

■ Split-horizon
– the information about destination routed on
the link is omitted
■ Poison reverse
– the corresponding distance is set to infinity
if the destination is routed on the link

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 24


Triggered Updates

■ A timer is associated with each entry in


the routing table
– much longer than the period of transmission
of information
■ Triggered updates
– request nodes to send messages as soon as
they notice a change in the routing table

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 25


Advantages and
Disadvantages
■ Advantages
– Simple to implement
– Low requirement in processing and
memory at the nodes
– Suitable for small networks
■ Disadvantages
– Slow convergence
– Bouncing effect
– Counting to infinity problem

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 26


RIP - Message Format
0 31
Command(1) Version (1) Must be zero(2)
Address family identifier (2) Must be zero(2)
IP address (4)
Must be zero(4)
Must be zero(4)
Metric (4)

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 27


RIP - Limitations
■ Maximum hop count of 15
– restricts the use of RIP in larger networks,
but prevents the count to infinity problem
(endless loops)
■ Difference in links speed is not reflected
in the hop-count metrics
– congested links can be still included in the
best path

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 28


RIP II - Why Was Developed?

■ Many superior IGP exists (RIP is often


referred as Rest In Peace)
■ There are still many implementations of
RIP
■ Given that RIP will still be used, it
deserves improvements
■ RIP II is documented in RFC-1287, RFC-
1388 and RFC-2453
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 29
RIP II - Message Format

Command (1) Version (1) Routing domain(2)


Address family identifier (2) Route Tag(2)
IP address(4)
Subnet Mask(4)
Next Hop(4)

Metric(4)

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 30


RIP II - The Added Fields
■ Routing domain
– used together with the next hop field to
allow multiple autonomous systems to
share a single wire
■ Route tag
– to flag external routes (for use by EGP and
BGP)
■ Subnet mask
– to support subnets
■ Metric
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 31
RIP II - Improvements
■ Authentication
– uses a simple password procedure
■ Routing per subnet
■ Support of multiple metrics
– hop count, throughput, measured as
10logC
■ Routing domains
■ Multicasting

Compatible
■ August
Budapest, 1999 with
Routing RIP
basics, RIP Iskra Dj. Popova 32
RIP is not alone!
IGRP and EIGRP
■ Interior Gateway Protocol was
developed in the mid1980s by
Cisco Systems, Inc.
■ Designed to overcome the
limitations of RIP
■ Initially worked in IP
environment, but latter ported to
OSI CLNP networks
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 33
IGRP - Main
Characteristics
■ Distance vector protocol
■ Uses a combination of metrics
– internetwork, delay, bandwidth, reliability
and load
■ the weighting factors are set either by
administrators or default values are
used

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 34


IGRP - Additional flexibility

■ Wide metric ranges


– allow satisfactory metric setting in
internetworks with widely varying
performance characteristics
■ Permits multipath routing
– dual equal-bandwidth lines may run a
single stream of traffic in round-robin
fashion

Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 35


EIGRP
■ Enhanced version of IGRP
■ Improvements
– convergence properties
■ The Distributed Update Algorithm (DUAL)
is used to obtain loop-freedom
throughout a route computation
– operational efficiency
■ Provides compatibility with IGRP
Budapest, August 1999 Routing basics, RIP Iskra Dj. Popova 36

Вам также может понравиться