Sie sind auf Seite 1von 49

Routing Fundamentals

IP Routing.

Direct Routing

If the datagram is routed locally i.e.


if the destination is on the same
subnet as the originator.

Indirect Routing

If the use of a forwarding device


such as router is invoked i.e. if the
destination is remote

IP Routing..

172.16.2.2

172.16.3.2
172.16.2.1

172.16.2.3

172.16.3.1
E1

E0
S0

172.16.2.4

Direct Routing

172.16.3.3

S0
172.16.3.4

Indirect Routing

Route Table Updation

Route table acquires information


in two ways:

Manually

Static route entries

Automatically

Dynamic routing protocols

Static Routing

Routes to destinations are set up


manually
Network reachability is not dependent
on the existence and state of the
network
Route may be up or down but static
routes will remain in the routing tables
and traffic would still be sent towards
the route
Not suitable for large networks
Also known as Non-adaptive routing

Static/Default route entries

Dynamic Routing
Routes are learnt via an internal or external
routing protocols
Network reachability is dependent on the
existence and state of the network
Routing decisions change to reflect the changes
in topology
Also known as Adaptive routing
RIP & OSPF are routing protocols

Router Table Lookup

The router will match the most


specific address it can in the
descending order of specificity
as below:
A
A
A
A
A
A

host address
subnet
group of subnets
major network number
group of major network numbers
last resort

Static and Default Routes

WAN
WAN

R1
R1

R2
R2

192.168.5.
192.168.5.
0
0

Traffic to network 192.168.5.0 (Static


Route).
All
outgoing
traffic
from
network
192.168.5.0 (Default Route).

Dynamic Routing Protocols

Distance Vector Routing Protocols

Distance vector algorithms are based


on the work done of R.E.Bellman,
L.R.Ford and D.R.Fulkerson
Often known as Bellman-ford or Fordfulkerson algorithms

Link State Advertisement Protocols

Built around a well known algorithm


from graph theory, E.W.Dijkstras
shortest path algorithm
Called as Shortest path first or
Distributive database protocols

Distance Vector Routing


Protocols

Routes are advertised as vectors of


<Distance, Direction>

Distance is defined in terms of a


metric
Direction is defined in terms of next
hop router

Each router learns routes from its


neighboring routers perspective
and then advertises the routes
from its own perspective
Sometimes referred to as Routing
By Rumor

Distance Vector Routing


Protocols

Routing Information Protocol (RIP)


for IP.
Xerox Networking Systems XNS
RIP.
Novells IPX RIP.
Ciscos Internet Gateway Routing
Protocol (IGRP).
DECs DNA Phase IV.
Apple Talks Routing Maintenance
Protocol (RTMP).

Link state Routing


Protocols
Each router originates

information
about itself, its directly connected
links and state of those links
The information is passed around
from router to router, each router
making a copy of it, but never
changing it
Every
router
has
identical
information about the internetwork
Each
router will independently
calculate its own best paths

Link state Routing


Protocols
Link State Routing protocols

are
built around well known algorithm
from graph theory E.W.Dijkstra
shortest path algorithm.
Examples of LSR are:
Open Shortest Path First (OSPF)

The ISOs Intermediate System to


Intermediate System (IS-IS) for IP
DECs DNA Phase V
Novells Netware Link State Protocol
(NLSP)

Autonomous System

Old definition

An autonomous system is a group


of
routers
under
a
common
administrative domain running a
common routing protocol

Contemporary definition

An autonomous system is an
internetwork under a common
administration

Interior-Exterior Gateway
Protocols

Interior Gateway Protocols

Routing Protocols which run within


an Autonomous System are IGPs
IGPs
discover
paths
between
networks

RIP/OSPF/IS-IS

Exterior Gateway Protocols

Routing Protocols that route between


Autonomous System are EGPs
EGPs
discover
paths
between
autonomous systems

BGP4

IGPs-EGPs
AS-1

EG
P
AS-2

IGP

IGP

EG
P

EG
P

AS-3

IGP

Administrative Distances
Diversity of metrics poses problems
in routers running more than one
routing protocol.
Router may learn a route to the
same destination from each of the
protocols
Administrative
distances are the
route sources to determine most
preferred source
Administrative distance is a measure
of believability

Administrative Distances

The administrative distance of


various protocols is as below:
Connected Interface - 0
Static Route
-1
EIGRP summary route - 5
External BGP
- 20
EIGRP
- 90
IGRP
- 100

Administrative Distances
IS-IS
- 115
RIP
- 120
EGP
- 140
External EIGRP - 170
Internal BGP
- 200
Unknown
- 255
OSPF
- 110

The lower the administrative


distance, the more believable
the protocol.

Dynamic Routing Protocol:


RIP & OSPF

Routing Information
Protocol-RIP

Routing Protocol

It is a language a router speaks


with
other
routers
to
share
information about the reachability
and status of the network and
allows the routers to update and
maintain routing tables.

Distance Vector Routing Protocols

Referred to as Bellman-Ford
Fulkerson algorithms.

or

Ford-

Link State Routing Protocols

Referred to as Shortest Path


Distributive Database Protocols.

First

or
22

Where does the RIP stand?


Routes
Static
Distance Vector
Protocols
Dynamic

RIP; IGRP; .

Link State Protocols


OSPF; IS-IS; ..

23

Distance Vector Routing


Protocols
Common Characteristics
-RIP

Neighbors

Routers sharing a common data link.


Periodically send routing updates to all
neighbors by broadcasting their entire routing
tables.

Periodic Updates

A period of time after which entire routing


table updates will be transmitted.
Neighbors receiving these updates glean
the information they need and discard
everything else.
24

RIP Continued

Routes are advertised as vectors of


distance and direction:

Distance is defined in terms of a metric.


Direction is defined in terms of the next hop
router.

Each router learns routes from its


neighbor routers perspective.
Each router then advertises the routes
from its own perspective.
Referred to as Routing by Rumor as
each router depends on its neighbors
for information which the neighbor in
turn might have learned from their
neighbor and so on.
25

Routing Updates
10.1.1.0

10.1.2.0
.1

.2

Routing Table-A
NW
10.1.1.0
10.1.2.0

VIA
HOP
---------0
---------0

10.1.3.0 10.1.2.2

10.1.4.0 10.1.2.2

.2

10.1.3.0
.1

.2

Routing Table-B
NW
10.1.2.0
10.1.3.0

VIA
HOP
---------0
---------0

10.1.1.0 10.1.2.1
10.1.4.0 10.1.3.2

1
1

10.1.4.0
.1

Routing Table-C
NW
10.1.3.0
10.1.4.0

VIA
HOP
---------0
---------0

10.1.2.0 10.1.3.1

10.1.1.0 10.1.3.1

After
exchanging
2
periodic
updates, the network is converged.
26

Routing Updates
10.1.1.0

.2

Routing TableA

.1

NW
VIA
HOP
10.1.1.0
C
0
10.1.2.0
C
0
10.1.3.0 10.1.2.2
1
10.1.4.0
2
10.1.4.0 10.1.2.2
10.1.2.2 UR

10.1.2.0
.2

.1

Routing TableB

NW
10.1.1.0
10.1.2.0
10.1.3.0
10.1.4.0
10.1.4.0

10.1.3.0
.2

VIA
HOP
10.1.2.1 1
C
0
C
0
10.1.3.2
1
10.1.3.2 UR

10.1.4.0
.1

Routing TableC

NW
10.1.1.0
10.1.2.0
10.1.3.0
10.1.4.0
10.1.4.0

VIA
HOP
10.1.3.1 2
10.1.3.1 1
C
0
C
0
C
UR

Router-C in its next scheduled update,


flags the network as unreachable and
passes the information along.
27

Routing Updates
10.1.1.0

.2

Routing TableA

.1

NW
VIA
HOP
10.1.1.0
C
0
10.1.2.0
C
0
10.1.3.0 10.1.2.2
1
10.1.4.0 10.1.2.2
2

10.1.2.0
.2

.1

Routing TableB

NW
10.1.1.0
10.1.2.0
10.1.3.0
10.1.4.0

10.1.3.0
.2

VIA
HOP
10.1.2.1 1
C
0
C
0
10.1.3.2 1

10.1.4.0
.1

Routing TableC

NW
10.1.1.0
10.1.2.0
10.1.3.0
10.1.4.0

VIA
HOP
10.1.3.1 2
10.1.3.1 1
C
0
C
0

Routers-A & B still have entries in the route


table about 10.1.4.0.
The information is no longer valid but there
is no router to inform them of this fact,
thus creating a black-hole in the network.
28

Route Invalidation Timer


10.1.1.0

.2

Routing TableA

NW
VIA HOP TIME
10.1.1.0
C
0 RIT
10.1.2.0
C
0 RIT
10.1.3.0 10.1.2.2 1 RIT
10.1.4.0
2 RIT
0
10.1.4.0 10.1.2.2
10.1.2.2 UR

10.1.2.0
.1

.2

10.1.3.0
.1

Routing TableB

.2

NW
VIA HOP TIME
10.1.1.0 10.1.2.1 1 RIT
10.1.2.0
C
0 RIT
10.1.3.0
C
0 RIT
10.1.4.0
1 RIT
0
10.1.4.0 10.1.3.2
10.1.3.2 UR

10.1.4.0
.1

Routing TableC

NW
VIA HOP TIME
10.1.1.0 10.1.3.1 2 RIT
10.1.2.0 10.1.3.1 1 RIT
10.1.3.0
C
0 RIT
10.1.4.0
C
0 RIT

Another Timer, Garbage Collection or Flush


Timer, 60 Seconds longer than RIT, is set.
On the expiry of which the route entry will
be flushed from the routing table.
29

Reverse Route

At every update period each router


broadcasts its entire table to every
neighbor even to the router from
which it has gathered the earlier
information.
A route pointing back to the router
from which packets were received is
called a reverse route and is waste of
resources.
Reverse route also poses certain
problem in the network like routing
loop.
30

Routing Loop
10.1.1.0

.2

Routing TableA

.1

NW
VIA
HOP
10.1.1.0
C
0
10.1.2.0
C
0
10.1.3.0 10.1.2.2
1
10.1.4.0 10.1.2.2
2

10.1.2.0
.2

.1

Routing TableB

NW
10.1.1.0
10.1.2.0
10.1.3.0
10.1.4.0

10.1.3.0
.2

VIA
HOP
10.1.2.1 1
C
0
C
0
10.1.3.2 1

10.1.4.0
.1

Routing TableC

NW
10.1.1.0
10.1.2.0
10.1.3.0
10.1.4.0
10.1.4.0

VIA
HOP
10.1.3.1 2
10.1.3.1 1
C
0
C
0
10.1.3.1 2

If Router-Bs update reaches Router-C,


before Router-Cs update reaches RouterB.
A packet meant for 10.1.4.0, at B, will
shuttle between Router-B and Router-C.
31

Counting to Infinity
10.1.5.0
D
1
10.1.5.0
D
UR
10.1.5.0
D
5
10.1.5.0
D
9

10.1.5.0
0
10.1.5.0
UR
10.1.5.0
B
4
10.1.5.0
B
8

C 10.1.4. D
10.1.1.
0

10.1.5.
0
10.1.3.0

A 10.1.2. B
0

10.1.5.0
C
10
10.1.5.0
C
6
10.1.5.0
C
UR
10.1.5.0
C
2
10.1.5.0
B
2

and so on up to infinity.
10.1.5.0
A
7
10.1.5.0
A
10.1.5.0
D
10.1.5.0
D

3
UR
1
32

Triggered/Flash Updates

A metric changing for better or for


worse, a router will immediately send
out an update without waiting for its
update timer to expire.
Flash updates include in the update
only
the
networks
that
actually
triggered it, rather than the entire
routing table.
This reduces processing time and the
impact on network bandwidth.
Regular updates may still occur along
with triggered updates.
33

RIP Timers

Update Timer

Route Invalidation Timer

180 Seconds
Timer)

(6

Times

the

Update

Garbage Collection Timer

30 Seconds

240 seconds (60 Seconds longer than


RIT)

Hold Down Timer

180 Seconds
Timer)

(6

Times

the

Update

Open Shortest Path FirstOSPF

Open Shortest Path First..


Developed and recommended IGP by
Internet Engineering Task Force (IFTF)
Replacement for problematic RIP
Link state protocol
Uses Dijkstras Shortest Path First
(SPF) algorithm
Open means, it is not proprietary to
any vendor or organisation
Fast convergence

36

Open Shortest Path First


Support much larger internetworks
Less
susceptible to bad routing
information
All RFCs on OSPF are written by John
Moy

RFC-1131(Version-1)
RFC-1247(Version-2)
RFC-2328(most recent specifications of
Version-2)

37

OSPF Operation..

An OSPF router, when switched on,


maintains
an
interface
data
structure for each OSPF enabled
interface

IP address and mask


Area ID
Process ID (Cisco specific)
Router ID
Network Type
Cost
InfTransDelay
38

OSPF Operation
Functional state of link
Router Priority
Designated Router
Backup Designated Router
Hello Interval
Router Dead Interval
Wait Timer
Rxmt Interval
AuType
Authentication key

39

OSPF operation.

OSPF-speaking routers send Hello packets


out OSPF-enabled interfaces
Two routers sharing a common link, if
agreed on certain parameters specified in
their respective Hello packets, become
neighbors
Adjacencies, virtual point-to-point links,
are formed between some neighboring
routers and depends upon:

Type of routers exchanging hellos


Type of network over which
exchanged

hellos

are

40

OSPF operation
Link State Advertisements (LSAs) i.e.
routers links and their state, are
exchanged between adjacent routers
Each router receiving an LSA from a
neighbor records the LSA in Link
State Database and sends a copy of
the LSA to all of its other neighbors
LSAs are exchanged, until all the
routers build identical Link State
Databases
i.e.
the
link
state
databases have been synchronised

41

OSPF operation.

Each router uses SPF algorithm to


calculate a loop-free graph (SPF Tree)
describing the shortest (lowest cost) path
to every known destination, with itself as
root
Each router builds its router table from its
SPF Tree
After this, in a stable internetwork, all
activities stop except

Hello packets are exchanged, after regular


intervals of 10 seconds (Hello Interval)
between neighbors, as keepalives
LSAs are exchanged every 30 minutes
42

OSPF Areas

Area-1

Area-2
Area-0
Intraarea
Interarea

A single big area with its multiple databases


and complex algorithms put greater demands
on the memory and processors of a router
43

Areas..

An area is a logical grouping of OSPF


routers and links; that divide an OSPF
domain into sub-domains
Routers within an area will have no
detailed knowledge of the topology
outside of their area
Areas are identified by a 32-bit AreaID
AreaID may be expressed either as a
decimal number or in dotted decimal

Area 16 and 0.0.0.16 are equivalent


Area 3232243229 and 192.168.30.29 are
equivalent
44

Areas
AreaID 0 (0.0.0.0) is reserved for
the backbone
The backbone is responsible for
summarising the topographies of
the each area to every other area

Non-backbone areas cannot exchange


packets directly
All
inter-area traffic must pass
through backbone

45

Router Types
Autonomo
usSystem
Boundary
Routers

BG
P

Area-0

Backbone
Routers

Area
Border
Routers

Area-1

BGP

Intern
al
Route
rs

Area-2

46

Router Types..

Internal Routers

Routers whose all interfaces belong to the


same area

Area Border Routers (ABRs)

Connect one or more areas to the


backbone and act as a gateway for interarea traffic
ABR always has at least one interface to
the backbone
ABR sends the summary of the topological
information of its attached areas into the
backbone, which is then propagated to
other areas
47

Router Types

Backbone Routers

Routers with at least one interface attached to


the backbone
All Backbone routers are not ABRs
An internal router whose all interfaces belong
to the area 0 is a backbone router

Autonomous
(ASBR)

System

Boundary

Router

ABSRs are gateways to the external traffic,


injecting routes into the OSPF domain that
were learned (redistributed) from some other
protocol
An ASBR can be located anywhere within the
OSPF autonomous system
It may be an internal, Backbone or ABR
48

49

Das könnte Ihnen auch gefallen