routing john kristoff - depaul university · c is lowest path cost in tent, place c in path, exame...

38
TDC375 Winter 2002 John Kristoff - DePaul University 1 Network Protocols Routing

Upload: haduong

Post on 21-Nov-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

1

Net

wor

k P

roto

cols

Rou

ting

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

2

IP r

outin

g

Per

form

ed b

y ro

uter

s

Tab

le (

info

rmat

ion

base

) dr

iven

For

war

ding

dec

isio

n on

a h

op-b

y-ho

p ba

sis

Rou

te d

eter

min

ed b

y de

stin

atio

n IP

add

ress

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

3

Bas

ic IP

forw

ardi

ng p

roce

ss

For

an

IP d

atag

ram

rec

eive

d on

an

inte

rfac

e

Rem

ove

laye

r 2

info

rmat

ion

Ext

ract

des

tinat

ion

IP a

ddre

ss (D

)

Fin

d be

st m

atch

for

(D)

in th

e ro

utin

g ta

ble

Ext

ract

fow

ardi

ng a

ddre

ss (F

) fo

r ne

xt h

op

Cre

ate

laye

r 2

info

rmat

ion

Sen

d da

tagr

am to

(F

)

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

4

IP r

outin

g ta

bles

Sin

ce e

ach

entr

y in

a r

outin

g ta

ble

repr

esen

ts

an IP

net

wor

k, th

e si

ze o

f the

rou

ting

tabl

e is

pr

opor

tiona

l to

the

num

ber

of IP

net

wor

ks

know

n th

roug

hout

the

entir

e in

tern

etw

ork.

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

5

IP r

outin

g ta

ble

illus

trat

ed

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

6

Gen

erat

ing

rout

ing

tabl

es

Man

ually

Sim

ple

for

smal

l, si

ngle

pat

h ne

twor

ks

Doe

s no

t sca

le w

ell

Use

ful f

or p

erm

anen

t rou

te e

ntrie

s

Dyn

amic

ally

Allo

ws

quic

k re

-rou

ting

arou

nd fa

iled

node

s/lin

ks

Use

ful f

or la

rge

mul

ti-pa

th n

etw

orks

Cat

astr

ophi

c, d

istr

ibut

ed fa

ilure

s ar

e po

ssib

le

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

7

IP r

outin

g ill

ustr

ated

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

8

IP r

outin

g ill

ustr

ated

(co

ntin

ued)

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

9

Rou

ting

met

rics

Sho

rtes

t/lon

gest

hop

pat

h

Low

est/h

ighe

st c

ost p

ath

Low

est/h

ighe

st r

elia

bilit

y

Bes

t/wor

st la

tenc

y

Pol

icy

deci

sion

s

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

10

Som

e te

rmin

olog

y

Aut

onom

ous

syst

em (

AS

)

A n

etw

ork

or s

et o

f net

wor

ks th

at is

ad

min

istr

ated

by

a si

ngle

ent

ity

Inte

rior

gate

way

pro

toco

ls (

IGP

)

Rou

ting

prot

ocol

use

d w

ithin

an

AS

Ext

erio

r ga

tew

ay p

roto

cols

(E

GP

)

Rou

ting

prot

ocol

use

d be

twee

n A

Ses

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

11

Dis

tanc

e ve

ctor

rou

ting

Eac

h no

de m

aint

ains

dis

tanc

e to

des

tinat

ion

e.g.

4 h

ops

to n

etw

ork

XY

Z, 2

hop

s to

AB

C

Per

iodi

cally

adv

ertis

e at

tach

ed n

etw

orks

out

ea

ch li

nk

Lear

n fr

om o

ther

rou

ter

adve

rtis

emen

ts

Adv

ertis

e le

arne

d ro

utes

Als

o kn

own

as B

ellm

an-F

ord

afte

r in

vent

ors

of th

e al

gorit

hm

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

12

Dis

tanc

e ve

ctor

illu

stra

ted

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

13

Dis

tanc

e ve

ctor

illu

stra

ted

(con

tinue

d)

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

14

Dis

tanc

e ve

ctor

illu

stra

ted

(con

verg

ed)

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

15

Pro

blem

s w

ith d

ista

nce

vect

or

Con

verg

ence

tim

e ca

n be

slo

w

Als

o kn

own

as th

e co

unt t

o in

finity

pro

blem

Wha

t hap

pens

whe

n lin

k to

A fa

ils?

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

16

Sol

ving

cou

nt to

infin

ity

Hol

d do

wn

Adv

ertis

e in

finity

for

rout

e an

d w

ait a

per

iod

of

time

befo

re s

witc

hing

rou

tes.

Hop

e th

at n

ews

of

the

dow

ned

link

will

spr

ead

fast

eno

ugh.

Klu

dge.

Rep

ort t

he e

ntire

pat

h

Gua

rant

ees

no lo

ops,

but

exp

ensi

ve.

Spl

it ho

rizon

Do

not a

dver

tise

rout

e to

a n

eigh

bor

if yo

u re

ceiv

ed r

oute

from

that

nei

ghbo

r. N

ot fo

olpr

oof.

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

17

Oth

er d

ista

nce

vect

or

impr

ovem

ents

Trig

gere

d up

date

s

Adv

ertis

e ch

ange

s im

med

iate

ly.

May

cau

se

rout

e fla

ppin

g, b

ut g

ener

ally

a g

ood

thin

g to

do.

Poi

son

reve

rse

Use

d w

ith s

plit

horiz

on, a

dver

tise

infin

ity r

athe

r th

an n

othi

ng a

t all.

DU

AL

Som

ewha

t lik

e ho

ld d

own.

Can

sw

itch

path

s if

new

dis

tanc

e is

low

er.

Suf

ficie

ntly

com

plex

.

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

18

Rou

ting

info

rmat

ion

prot

ocol

(R

IP)

Sta

ndar

dize

d in

RF

C 1

058

and

2453

The

late

r de

fines

RIP

v2 fo

r im

prov

emen

ts

Ver

y si

mpl

e

Slo

w c

onve

rgen

ce ti

me

UD

P b

road

cast

eve

ry 3

0 se

cond

s (d

efau

lt)

Rou

te ti

mes

out

afte

r 18

0 se

cond

s (d

efau

lt)

Wid

ely

used

as

an IG

P (

RIP

v2 p

artic

ular

y)

15 h

op li

mit

(any

gre

ater

equ

als

infin

ity)

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

19

RIP

ver

sion

2 (

RIP

v2)

Mos

t im

port

ant n

ew fe

atur

e w

as to

incl

ude

the

subn

et m

ask

with

the

adve

rtis

ed r

oute

Nee

ded

to s

uppo

rt c

lass

less

add

ress

ing

Sup

port

for

auth

entic

atio

n

Use

s IP

mul

ticas

t des

tinat

ion

addr

ess

Rou

te ta

g op

tion

For

inte

ract

ion

with

ext

erna

l gat

eway

pro

toco

ls

Nex

t-ho

p op

tion

Nex

t-ho

p ro

uter

ass

ocia

ted

with

adv

ertis

emen

t

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

20

RIP

v1 p

acke

t for

mat

Packet format:

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| command (1) | version (1) | must be zero (2) |

+---------------+---------------+-------------------------------+

| |

~ RIP Entry (20) ~

| |

+---------------+---------------+---------------+---------------+

A RIPv1 entry has the following format:

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| address family identifier (2) | must be zero (2) |

+-------------------------------+-------------------------------+

| IPv4 address (4) |

+---------------------------------------------------------------+

| must be zero (4) |

+---------------------------------------------------------------+

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

21

RIP

v2 p

acke

t for

mat

Packet format is the same, RIPv2 entry format is:

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Address Family Identifier (2) | Route Tag (2) |

+-------------------------------+-------------------------------+

| IP Address (4) |

+---------------------------------------------------------------+

| Subnet Mask (4) |

+---------------------------------------------------------------+

| Next Hop (4) |

+---------------------------------------------------------------+

| Metric (4) |

+---------------------------------------------------------------+

Authentication uses one entry of the format:

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Command (1) | Version (1) | unused |

+---------------+---------------+-------------------------------+

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

22

Link

sta

te r

outin

g

All

rout

ers

have

com

plet

e ne

twor

k to

polo

gy

info

rmat

ion

(dat

abas

e) w

ithin

thei

r are

a

Link

sta

te p

acke

ts a

re fl

oode

d to

all

area

rou

ters

Eac

h ro

uter

com

pute

s its

ow

n op

timal

pat

h to

a

dest

inat

ion

netw

ork

Con

verg

ence

tim

e is

ver

y sh

ort

Pro

toco

l com

plex

ity is

hig

h

Ens

ures

a lo

op fr

ee e

nviro

nmen

t

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

23

Link

sta

te r

outin

g ill

ustr

ated

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

24

Link

sta

te r

outin

g da

taba

ses

Link

sta

te d

atab

ase

Con

tain

s la

test

link

sta

te p

acke

t fro

m e

ach

rout

er

PA

TH

(pe

rman

ent)

dat

abas

e

Con

tain

s (r

oute

r ID

/pat

h co

st/fo

rwar

ding

dire

ctio

n)

trip

les

TE

NT

(te

ntat

ive)

dat

abas

e

Sam

e st

ruct

ure

as P

AT

H, i

ts e

ntrie

s m

ay b

e ca

ndid

ates

to m

ove

into

PA

TH

For

war

ding

dat

abas

e

Con

tain

s ID

and

forw

ardi

ng d

irect

ion

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

25

Dijk

stra

's a

lgor

ithm

Sta

rt w

ith s

elf a

s ro

ot o

f the

tree

(my

ID, p

ath

cost

0, f

orw

ardi

ng d

irect

ion

0) in

P

AT

H

For

eac

h no

de in

PA

TH

, exa

min

e its

LS

P

and

plac

e th

ose

neig

hbor

s in

TE

NT

if n

ot

alre

ady

in P

AT

H o

r T

EN

T

If T

EN

T is

em

pty,

exi

t, ot

herw

ise

find

ID w

ith

low

est p

ath

cost

and

in T

EN

T a

nd m

ove

it to

P

AT

H

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

26

Dijk

stra

's a

lgor

ithm

illu

stra

ted

1. S

tart

with

A, p

ut A

in P

AT

H, e

xam

ine

A's

LS

P, a

dd B

and

D to

TE

NT

2. B

is lo

wes

t pat

h co

st in

TE

NT

, pla

ce B

in P

AT

H, e

xam

ine

B's

LS

P, p

ut C

,E in

TE

NT

3. D

is lo

wes

t pat

h co

st in

TE

NT

, pla

ce D

in P

AT

H, e

xam

ine

D's

LS

P, f

ound

bet

ter

E p

ath

4. C

is lo

wes

t pat

h co

st in

TE

NT

, pla

ce C

in P

AT

H, e

xam

e C

's L

SP

, fou

nd b

ette

r E

pat

h ag

ain

5. E

is lo

wes

t pat

h co

st in

TE

NT

, pla

ce E

in P

AT

H, e

xam

ine

E's

LS

P (

no b

ette

r pa

ths)

6. T

EN

T is

em

pty,

term

inat

e

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

27

Ope

n sh

orte

st p

ath

first

(O

SP

F)

Sta

ndar

dize

d as

RF

C 2

328

(OS

PF

v2)

Com

plex

Sup

port

s m

ultip

le r

outin

g m

etric

s (t

houg

h ra

rely

use

d)

Allo

ws

2 tie

r hi

erar

chy

for

scal

abili

ty

Effi

cien

t

Goo

d co

nver

genc

e pr

oper

ties

Run

s di

rect

ly o

ver

IP

Rec

omm

ende

d IG

P b

y th

e IE

TF

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

28

OS

PF

pac

kets

Hel

lo

Link

mai

nten

ance

Exc

hang

e

Initi

al e

xcha

nge

of r

outin

g ta

bles

Flo

odin

g

Incr

emen

tal r

outin

g up

date

s

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

29

OS

PF

dat

abas

e re

cord

s

Rou

ter

links

Sum

mar

izes

link

s fr

om a

dver

tisin

g ro

uter

Net

wor

k lin

ks

Tra

nsit

netw

orks

(br

oadc

ast a

nd n

on-b

road

cast

)

Sum

mar

y lin

ks

Sum

mar

y in

fo a

dver

tised

by

area

bor

der

rout

ers

Ext

erna

l lin

ks

Impo

rted

rou

ters

, typ

ical

ly fr

om a

EG

P

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

30

Com

mon

OS

PF

hea

der

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Version # | Type | Packet length |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Router ID |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Area ID |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Checksum | AuType |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Authentication |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Authentication |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

31

Inte

rdom

ain

rout

ing

Rou

ting

dom

ains

are

inde

pend

ently

fund

ed

Rou

ting

dom

ains

do

not t

rust

eac

h ot

her

Rou

ting

dom

ains

may

hav

e di

ffere

nt p

olic

ies

Sta

tic r

outin

g

EG

P -

firs

t int

erdo

mai

n ro

utin

g pr

otoc

ol

BG

P -

cur

rent

pat

h ve

ctor

rou

ting

prot

ocol

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

32

Bor

der

gate

way

pro

toco

l (B

GP

)

Cur

rent

ver

sion

4 s

tand

ardi

zed

in R

FC

177

1

Run

s ov

er T

CP

Seq

uenc

e of

AS

num

bers

com

pris

es p

ath

Sel

ect r

oute

bas

ed o

n pr

efer

ence

s of

pat

h(s)

Can

edi

t pat

h in

rou

te a

dver

tisem

ents

Can

sel

ectiv

ely

adve

rtis

e pa

ths/

rout

es

E-B

GP

ver

sus

I-B

GP

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

33

BG

P a

ttrib

utes

Des

crib

e ro

utes

in B

GP

upd

ates

Con

fusi

ng d

escr

iptio

ns

e.g.

Wel

l kno

wn

attr

ibut

es m

ust b

e su

ppor

ted

e.g.

Man

dato

ry m

ust b

e pr

esen

t in

the

upda

te

Exa

mpl

es

AS

pat

h

Com

mun

ity

Unr

each

able

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

34

Con

fede

ratio

ns

Gro

up o

f AS

s th

at a

ppea

r as

a s

ingl

e A

S

A fo

rm o

f agg

rega

tion

May

sim

plify

rou

ting

polic

ies

e.g.

Don

't go

thro

ugh

conf

eder

atio

n X

rat

her

than

sp

ecify

ing

each

AS

in th

e co

nfed

erat

ion

Sub

-opt

imal

rou

ting

may

res

ult

Mul

tiple

AS

s in

a p

ath

vect

or a

ppea

r as

a lo

op

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

35

Mes

sage

type

s

Ope

n

Firs

t mes

sage

whe

n ne

ighb

ors

com

e up

Upd

ate

Con

tain

s ro

utin

g in

form

atio

n

Not

ifica

tion

Fin

al m

essa

ge ju

st b

efor

e lin

k is

dis

conn

ecte

d

Kee

paliv

e

Rea

ssur

es r

each

abili

ty in

abs

ence

of u

pdat

es

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

36

Rou

te d

ampe

ning

Rou

tes

that

osc

illat

e rip

ple

thro

ugh

Inte

rnet

Con

sum

es C

PU

and

cau

ses

inst

abili

ty

Uns

tabl

e (f

lapp

ing)

rou

tes

are

pena

lized

For

som

e pe

riod

of ti

me

rout

e is

sur

pres

sed

Sup

ress

ion

time

can

incr

ease

to a

max

imum

Sup

ress

ion

of r

oute

s re

sults

in lo

st c

onne

ctiv

ity

Big

ger/

impo

rtan

t net

bloc

ks d

ampe

n sl

owly

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

37

Sam

ple

Cis

co B

GP

con

figur

atio

n

Router bgp 12345

bgp log-neighbor-changes

network 128.160.0.0 mask 255.255.0.0

neighbor 36.5.1.1 remote-as 54321

neighbor 36.5.1.1 description E-BGP peer with XYZ corp.

neighbor 36.5.1.1 password as54321password

neighbor 36.5.1.1 version 4

neighbor 36.5.1.1 prefix-list invalid in

neighbor 36.5.1.1 prefix-list announce out

ip prefix-list invalid seq 10 deny 0.0.0.0/8 le 32

ip prefix-list invalid seq 20 deny 10.0.0.0/8 le 32

ip prefix-list invalid seq 30 deny 127.0.0.0/8 le 32

...

ip prefix-list announce seq 10 permit 128.160.0.0/16

ip prefix-list announce seq 20 deny 0.0.0.0/0 le 32

TD

C37

5 W

inte

r 20

02Jo

hn K

risto

ff -

DeP

aul U

nive

rsity

38

Fin

al th

ough

ts

Rou

ting

prot

ocol

s w

ork

fine

99.9

9% o

f the

tim

e, b

ut w

hen

they

don

't, fa

ilure

s ar

e ge

nera

lly c

atas

trop

hic

Tro

uble

shoo

ting

com

plex

rou

ting

prob

lem

s ca

n m

ake

your

bra

in h

urt

Gen

eral

ly th

e on

ly n

eces

sary

inte

llige

nce

that

is

req

uire

d in

the

netw

ork

is IP

rou

ting

Inte

rnet

pee

ring

is a

fun

issu

e to

exp

lore