Routing Table - BIL 456-552 Internet Mimarisi

hardsweetlipsΔίκτυα και Επικοινωνίες

28 Οκτ 2013 (πριν από 3 χρόνια και 7 μήνες)

140 εμφανίσεις

TOBB ET
Ü

B
İL
55
2

Internet Architecture

Lecture 0
2


Mehmet Özdem

Routing

Chapter
2

What is a Routing Protocol?



Routing

Protocols

are

used

between

routers

to

determine

paths

and

maintain

routing

tables




Once

the

path

is

determined

a

router

can

route

a

routed

protocol

Routing Categories

IP address of the destination node


Used to identify bits used in routing


IP address of the next hop in the route


Physical interface on the router to reach the next hop


Cost to reach the destination address


Direct (attached to router) / indirect ( reached through
another router


How the route was discovered


Time since the route was updated (in seconds)


Various info on the route


Maximum transmission unit size

Destination

Route Mask/prefix

Next Hop

If Index (port)

Metric/Admin Distance

Route Type

Source of Route

Route Age

MTU

Route Information

Routing

Table

The different types of routing
are:



Static routing



Default routing



Dynamic routing

IP
Routing

Benefits


No

overhead

on

the

router

CPU

No

bandwidth

usage

between

routers

Add

security


Disadvantage

Administrator

must

really

understand

the

internetwork

If

a

network

is

added

to

the

internetwork,the

administrator

has

to

add

a

route

to

it

on

all

routers

Not

feasible

in

large

networks

Static

Routing

Can only use default routing on stub networks

• Stub networks are those with only one exit path out of the
network

• The only routers that are considered to be in a stub
network are R1 and R3

Default

Routing

Classful

Routing

Overview



Classful routing protocols do not include the subnet mask
with the route advertisement




Within the same network, consistency of the subnet
masks is assumed.




Summary routes are exchanged between foreign
networks.




Example of classful routeing protocols



RIP Version 1



IGRP



Classless

Routing

Overview



Classless routing protocols include the subnet mask with
the route advertisement




Classless routing protocols support variable
-
length subnet
masking (VLSM) and subnetting



Example of classless routing protocols:


RIP version 2


EIGRP


OSPF


IS IS


12


Distance Vector


RIPv1


RIPv2


IGRP



Link State


OSPF


Types

of
Routing

Protocols


Distance Vector

•Updates frequently

•Each router is "aware" only of its immediate neighbors

•Slow convergence

•Prone to routing loops

•Easy to configure


Link State

•Updates are event triggered

•Each router is "aware" of all other routers in the "area"

•Fast convergence

•Less subject to routing loops

•More difficult to configure


Distance Vector vs. Link State

14


Each Router shares its knowledge of the entire network
-

send all collected info
to neighbors


Periodically sends info to neighbors only


Info shared at regular intervals
-

usually 30 secs

Distance Vector

Distance

Vector

cnt

There

are

two

distance

vector

protocols
,
both

uses

different

metric



RIP

Hops



IGRP
--
Composite

(
bandwidth
,
delay
,
load
,
MTU
and

reliability
)

17

18

Net ID

Cost

Next
Hop

Net ID
-

Final destination of the packet

Cost


Number of Hops

Next Hop
-

Next router

A routing table with the following entries is created

19

A sends it routing table to B , B to C and A etc.

20


Tables are updated based on the information received
from the neighbors.


On hop added to the contents of the received table


If duplications in the table shortest route is chosen

21

5
5

1

6
6

1

C’s table

0
8

1

6
6

1

5
5

1

1
4

1

Receives from B

Receives from D

14

2

08

2

55

1

66

1

C’s updated table

B

D

22

23

When a router receives an update information


1
-

If the received route not in the table

add


2
-

If it is in the table


a) next hop the same then replace
-

new info valid



b) next hop not the same



new hop count smaller


replace


New hop count > = do nothing



24

25



This

type

of

routing

protocol

requires

each

router

to

maintain

at

least

a

partial

map

of

the

network
.



When

a

network

link

changes

state,

a

notification,

called

a

link

state

advertisement

(LSA)

is

flooded

throughout

the

network
.

All

the

routers

note

the

change,

and

re
-
compute

their

routes

accordingly
.




This

method

is

more

reliable,

easier

to

debug

and

less

bandwidth
-
intensive

than

Distance
-
Vector
.

It

is

also

more

complex

and

more

compute
-

and

memory
-
intensive
.

OSPF

is

a

link

state

routing

protocol
.


Link
State

Protocols

26

27


Cost is different from each router to network


It is zero for network to router


Based on security, traffic, link state etc.



The cost is calculated for routers only
-

applied as it
leaves the router

28

29

When a router floods the network with information
about its neighbors it is said to be advertising


The basis of this process is a short packet called link
state packet

Advertiser

Network

Cost

Neighbor

A

14

1

B

A

78

3

F

30

31

This database is saved and used to calculate the routing table

32

Having formed this database each router applies an
algorithm called Dijkstra’s algorithm to the link state
database.


This algorithm calculates the shortest path between
two points on a network using a graph made up of
nodes and arcs.


Notes may be the routers or networks. Arcs are
connections


Cost is applied only to the arc from router to network

33

Costs in Dijkstra’s algorithm

34

The algorithm calculates the shortest path tree



Identify the root


the router itself


Attach all the neighbors
-

arcs are temporary


Ones with the lowest cost made permanent


Identify the nodes that can be reached from this node


Repeat until each node becomes permanent part of the
tree.

35

36

37

Link State Routing Table for router A

Dynamic Routing Protocols

RIP


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

remote

network


It

has

a

maximum

allowable

hop

count

of

15


AD

is

120


Bellman
-
ford

algorithm


Works

well

in

small

networks,but

it’s

inefficien
t
to

large

networks




RIP

version1

uses

only

classful

routing,which

means

that

all

d
evices

in

the

network

must

use

the

same

subnet

mask


RIP

version2

does

send

subnetmask

information

with

the

route

updates.This

is

called

classless

routing

OSPF


OSPF is an open standards routing protocol


This works by using the
Dijkstra

algorithm


OSPF provides the following features:


Minimizes routing update traffic


Allows scalability (e.g. RIP is limited to 15 hops)


Has unlimited hop count


Supports VLSM/CIDR


Allows multi
-
vendor deployment (open standard)


There are two types of Packets


Hello


LSA’s




When router A starts it send Hello packet


uses 224.0.0.5



Hello packets are received by all neighbors



B will write A’s name in its neighbor table



C also process the same way


OSPF Hello Packets


Small frequently issued packets


Discover neighbours and negotiate "adjacencies"


Verify continued availability of adjacent
neighbours


Hello packets and Link State Advertisements
(LSAs) build and maintain the topological
database


Hello packets are addressed to 224.0.0.5.


LSA’s


An

OSPF

data

packet

containing

link

state

and

routing

information

that

is

shared

among

OSPF

routers


LSAs

are

shared

only

with

routers

with

whom

it

has

formed

adjacencies


LSA

packets

are

used

to

update

and

maintain

the

topology

database


Link state


There are three type of tables


Neighbor


Topology


Routing


Tables

Neighbor

Table



Contain

information

about

the

neighbors


Neighbor

is

a

router

which

shares

a

link

on

same

network


Another

relationship

is

adjacency


Not

necessarily

all

neighbors


LSA

update

s

are

only

when

adjacency

is

established


Topology

Table


Contain

information

about

all

network

and

path

to

reach

any

network


All

LSA’s

are

entered

into

topology

table


When

topology

changes

LSA’s

are

generated

and

send

new

LSA’s


On

topology

table

an

algorith

m

is

run

to

create

a

shortest

path

,this

algorithm

is

known

as

SPF

or

dijkstraalgorithm


Routing Table


Also

know
n
s

as

forwarding

database


Generated

when

an

algorithm

is

run

on

the

topology

database


Routing

table

for

each

router

is

unique


OSPF Terminology


Link


Router ID


Neighbours


Adjacency


OSPF Area


Backbone area


Internal routers


Area Border Router (ABR)


Autonomous System Boundary Router (ASBR)


Link


A

network

or

router

interface

assigned

to

a

given

network


Link(interface)

will

have

"state“

information

associated

with

it


Status(up

or

down)


IP

Address


Network

type(e.g.

FastEthernet)


Bandwidth


Addresses

of

other

routers

attached

to

this

interface



Router ID


The

RouterID

(RID)

is

an

IP

address

used

to

identify

the

router



RouterID

is choosen
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.


You

can

manually

assign

the

routerID.


The

RID

interface

MUST

always

be

up,

therefore

loopbacks

are

preferred


Neighbours


Neighbours

are

two

or

more

routers

that

have

an

interface

on

a

common

network


E.g.

Two

routers

connected

on

a

serial

link


E.g.

S
everal

routers

connected

on

a

common

Ethernet

or

Framerelay

network


Communication

takes

place

between/among

neighbours


Neighbours

form"adjacencies"


OSPF Design


Each router connects to the backbone called area 0, or the backbone area.


Routers that connect other areas to the backbone within an AS are called
Area Border Routers (ABRs). 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 Areas


An

OSPF

area

is

a

grouping

of

contiguous

networks

and

routers


Share

a

common

areaID


A

router

can

be

a

member

of

more

than

one

area(area

border

router)


All

routers

in

the

same

are

a

have

the

same

topology

database


When

multiple

areas

exist,

there

must

always

be

an

area0

(the

backbone)

to

which

other

are

as

connect


Pros / Cons


Note

that

OSPF

is

a

more

sophisticated

routing

protocol


Converges

rapidly

and

accurately


Can

use

a

metric

calculation

that

effectively

selects

the

"best“

route(s)

primarily

based

on

bandwidth,although

an

OSPF

cost

can

be

administratively

assigned


Use

of

OSPF

requires


More

powerful

routing

hardware


More

detailed

knowledge

by

the

administrator,especially

when

large

multi
-
area

networks

are

used