You are on page 1of 22

Open Shortest Path First

(OSPF)

http://www.lNE.com

III
Rllahow i:p' oapf inte'rface
In terf·aee P'll) Area

ce
Cost
ti4

'i
S'tate,

brief IP Adore's B,/M!u!,k 10 1 13 1/:24-

Nbrs 'Etc
1/1 2/2 (}/O

SaO/I FaO/O

1 l

1 ,2

to

1.14';. 1/24

10 1.1 1/24
R2lsb(lW i:p ospf interf!1ce I:ntel:: f·a-ere PI]) Area bri'ef
I:P Addres $,/Muk. 1,0 1 24!:i 2/24

llL 1

1'211' IDIIt

LOOP
State
lID~ ID'E :LOQ(P

Cost
64
1 ill

lIbr!!!

F'/e

S~O/O
F<iO/a

I
ill

0
1

10 1_23 .,2l2.4
'JLO 1_2

1/1 1/1
(ll/O

1 R31shcw

2l2·4,

ill' Qsp,f
?ID
]I,

int@Ffa~@1 Area.

c:riEif
.lI!.P A.aJdEH
is .sIMa,s k ill 1 23 :31:U 111 1.13 :3/2.4 '1.0 1.3 3/24,

In t."II: !aClB

C:ost.

st.aw

Nb.i::.s

:FJ'IC

FaOIO
Sel/2

1
1
1

1
m.

1 1'81
m.

BDR
P2P
.LOO(P

1/1 1/1 0 /[1


1

R41ahow i1' oapf interface

bd,ef Ip Adld~'iS s IMask 10 1 245 ·4,124 rn 1.4, 4/:24, 10 1 146 ,4/,24

SeOIO
lLQ)Ql!2

Int.ElE'tac:e

PIl'! m
m.

Area

Cos,t,

U
lI!
m,

PaOlO

,2 br'h~,f

State, Nb,z;s 1/1 :LOO'P O'/~ WR 2/2


BDR

I'ie

R51sb(lW i:p os~f interf<!Jce In teitf·aee P'l]) Area L~O ! 0

SeG/O
In t.eu:::f',<lCl@

liP' MOre,s S/Ma1S k 10 1 5 5/24, ][.0 1_24'5 5/24

Cos,t
ill

State, Nb:!::l5 ftC


:LOO'P IDrl'l:.

64

Qi/D 2'/2

lI:f' k:lIdr@,ss/M<ist

C:05.t;

L::iIO
FilJllCl
Fa.O!i

I ]1.2 ill

,2 :2

HI 1- 6 ',/24, 1[1 1.14IiS,. 6124 HI 1- 60 6/2.4

r
l! 1

St;:a·w :1.00P

Nbil::S

F'/e

0 /0
1

~)RQTH 2/2 IDR 0/0

R1# router ospf 1 network 10.1.1.1 0.0.0.0 area 2 network 10.1.13.1 0.0.0.0 area 1 network 10.1.146.1 0.0.0.0 area 2 R2# router ospf 1 network 10.1.2.2 0.0.0.0 area 1 network 10.1.23.2 0.0.0.0 area 1 network 10.1.245.2 0.0.0.0 area 0 R3# router ospf 1 network 10.1.3.3 0.0.0.0 area 1 network 10.1.13.3 0.0.0.0 area 1 network 10.1.23.3 0.0.0.0 area 1

R4# router ospf 1 network 10.1.4.4 0.0.0.0 area 2 network 10.1.146.4 0.0.0.0 area 2 network 10.1.245.4 0.0.0.0 area 0 R5# router ospf 1 network 10.1.5.5 0.0.0.0 area 0 network 10.1.245.5 0.0.0.0 area 0 neighbor 10.1.245.2 neighbor 10.1.245.4 redistribute connected subnets R6# router ospf 1 network 10.1.6.6 0.0.0.0 area 2 network 10.1.60.6 0.0.0.0 area 2 network 10.1.146.6 0.0.0.0 area 2

N!I!i,i!~D!IC'

ID

lO.t.3.) 1O.l.,' . .41


Hl.il..ti.6

E'ri Q

S1!ilil:.EI

Dead Timt!I

.Aliliu85i1i1

I.n. t.@ E .fIII (H!I

1
1

FULL! RIL.L./OOR

001: 00: .3'1

001:00::31
00:(10:30

10.1.13:,3 HI. 1. 14116. '"


10. ill • Hi6 . ti,

SeI:'i dO /1. FastEthe:rnetO/O


F;I!II5 t.Etll!8,rRB

FULL/DRO'l1iHER.

t.O

I Cl

R21 sbow .i:p 'O!!5P f.' neighbo.r Na,ig:liilo;l; ID P~.i Stat. 1(l.i1..5.3 1 FiJ:JLL/DR HI_'!L:3i_3 1 FULL/mn'!:.

Dlililili.d T.1ws

em: ': 01:

Ad~giS!I

5.3

10 .1. .2~.5. !5

001: Oil: .lID

HI. l_23. 3

Inbil~fa!C81 :S:e.~i dO / (I Fa.~ the rnenl:OI 0 t.ll!:

R3i s~@·w ip ~~pf


Ne·i 9iMl 01:'

nsiqhbor
PEi S1:,iI;lil

:E:D

DBad

'l'~

.Ad.~BSS

.[ntiiiiE.fae&

HI. 1.2.:2'
1I:1.l ..1.1

1
(I

roLL/DR
m.LL/

00:00:36
00:00:39 Dead Time
001: 01 :019 OJ): 00; ~.2 OOd!!!): 33

10.1.23·.2'
10.111..13.1

Fa.st'B'the ~~etO I a Sililz.iaJ.l/2

R4 h:how i:~ Oll:p:t' nel.vh..bor 'Ne·i 91ihrCoE m Pri State


10.l ..5..S 10. :!I. ,1. 11

Alddress

1
1
1

roLL/DR
FULI./DR
Fi!'JLl./DRO'i~ER.

an.

Inter.faoe
Sedal.Q10
F~ ~ tIU;;h@
:r~1l!i t.O 10 F'a.stE the rnet(!! 10

1.241!L 5

1O.n... 6. ,6

10. m . U'ti .1 10.1,,146.6

as Is.be'., ip OSi.P f n.iq'l:lbcf Ne,ig!bti or m Pri. St,~.'te


10.1. ..2.2:
lO.il..4..~ 1 ro.LL/DRO'HIE·R

DeO!!ld Ti:me

00: 01: .lS


00: 01 :4,[1

Ad.dl:re ~~: 10. 1.24151..2


10 .1 ... .s, 4 U

Inter.fa.Qe

Se I:.i allO/ C
Sa:r i lI.,UI/ 0

:roLLlmcR

'NeiglhtH:U;

R61 ahow i:p oaplf ne ighbo.J;" m l'l!:'i Stat. 10_1.1"l 1 FULL/DR


1

Dead T.il!l.lll

Ald:t:b:lIss
10

00:00:311
001: 00: .39

.a. .VH'L 1

HI. 1.146.4

InUllrf'acGl F as t.Etl.IJE!i I:'nert.O F~1!i tEtb.e rnetO

Ia I0


Rl .hCJW ip ospt ci&~u.
OSi'E'Router
JtgutAlr

I
f\oUtAaC L nk State. with
LuUc

(Area

2)
Cbec:k.& Link

.LD (10.1.1 1) Statea (Area 1)

(Proce.&6 In

I.ink count

ADV Router

Link m count:

AfJV Router

Age

geqt

Cbecklium L1nlt

10.1 1.1 10 1 4.4 10.1 6.6

a o

_.1 1 ... 4

1173 1 73
17,6 Stal. (Aha 2) Age

10 ~.6 6 •t Ln

0.80000004 0~80000003 0&80000004

OxOO 4'~ 2
Ox001E21 3

OxOOntE2

lO.l.l.t 10 1.2 2 10.1.3 3

10.1 1.1 10.1 2.2 10.1 3.3


• to t. ok S

177 1788 1786

Ox 0000003 OxOOC ~8 2 OxB0000006 OIOD~tS 2 O~ 0000005 O~004 4 ..


-)

i. .. lt n

It)

~V

Route~

w.

10.1 1.4 .1
(Area ~

10 ~ 1 1

1~73

Soeqj Ox80000oo3
(lU'e. 2)

Cho 0.001140

ry Net. L nit SU~s


tnlc V RoutAc

10 1.23 2

10.1 2.2

,sa

S qlt

Ch

c:

um Link W
ADV

0.80000002

O~00CC25

s~·
L1nt

10.1 2.2

10.1 3.3
RoutAc J,q

10

o'

Router
44

Age

-r

~J

10 1 1 10 1. 4 4 10.1 •• S 101.6.6 10 1. D.O 10 1.146.0 10 1 245.0

10.1 2.' 10.1.2.2


10.1 2.2

qt

1S4
-546

10.1 2.2 10.1.2.:2 10.1 2.2 10.1 2.2


~UI:IIIIarY
ASS LuUc

~S. ~S4'
154 1546 79~
States

0 000000. 0_80000002 Ox80000002 0_80000002 0.80000002 O_SOOOCOOl o 8000 002


(Acea 1)

O~OO r 0_00S424 OxOO~ 3' Ox00943F OxOO'Cl7 OxOuBC~1 OxOO D7S

Cbct.:k£

10.1 10.1 10.1 10.1

S.~ 13.~ 23.0 245.0

10

44

10 _ 4 4
..0 1.4.4

044

1522 1 22
1522
1 22

1!20

SeqM Cheek5 0.80000002 0"OOC4U Ox800000020)(00991C 0.800000020.00854D OXS0000002 OxOOFCC2

1~75
L it Sblt:ea Aq

Ox80-00002 OxOO OD4 Ox80000002 ()xOOS3P4


(A.J:ea 2)

S
Link ID

ry

ADV Router

10 1 S.

10.1.4 4

829

Seqt c~eOOOOOOl

CheCI.II

OxOC'F~4

Link II> 10.1 S !

AfJV Router 10 I 2 '1

Age

Seqi

CheCksum

Link

ID

330

Ox8000000

0.008 4£

10.1 '0.0

ADV Router 10 55

Age

58

Seqt ChecJui 1'ag Ox80 00001 OxOO ~ro 0

R2#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, 0 - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type If N2 - OSPF NSSA external type 2 El - OSPF external type I, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-I, L2 - IS-IS 1evel-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set

o c o o o o o

IA IA

IA

o E2 OIA
C

o IA

10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks 10.1.13.0/24 [110/782] via 10.1.23.3, 00:22:36, FastEthernetO/O 10.1.2.0/24 is directly connected, LoopbackO 10.1.6.6/32 [110/66] via 10.1.245.4, 00:22:36, SerialO/O 10.1.5.5/32 [110/65] via 10.1.245.5, 00:22:36, SerialO/O 10.1.4.4/32 [110/65] via 10.1.245.4, 00:22:36, SerialO/O 10.1.3.3/32 [110/2] via 10.1.23.3, 00:22:36, FastEthernetO/O 10.1.1.1/32 [110/66] via 10.1.245.4, 00:22:36, SerialO/O 10.1.23.0/24 is directly connected, FastEthernetO/O 10.1.60.0/24 [110/66] via 10.1.245.4, 00:22:37, SerialO/O 10.1.50.0/24 [110/20] via 10.1.245.5, 00:22:37, SerialO/O 10.1.146.0/24 [110/65] via 10.1.245.4, 00:22:37, SerialO/O 10.1.245.0/24 is directly connected, Seria10/0

LS

ag;e:

UIOi1:

QpUo;n,a: (N'~ 'I'OS-_pliblHty. DCl U! 'rjJ!@ ~ hlllib!!'iI:' Linklll L.i[lk State m: 10,,1,.3.] I,dv'.!II:'t.i. illl!iI lI:~taJ:: LO'.1.3 . oil L5 5eq' Huml:H!~: 11<1:10 t'lOi' M

cn.cl;.Ul:II~
~~r
Lbk

'DxABiIi

.I.eIlt]iCh : ~.2

~~ Llft~.'

c~llIn • .c~ ta. III "1'111 .11.11;. NiIII'tM.iorlk • (Link. :I;bJ ne,i.o;na ~ RolI.t.er ~I:S~,: (Link 'l:i,lIJt.l!Jl "lout.B~ l.nI2NIr.i!BOIIi ~!l5: ~r Q!Il: TOO me!tri~: 0 TOS,

10. L :2:3 .2 ][0. L .2.1. ~

lHilIt.rl~s.

LilK ~(m1I:e;t;ted!

to.

eJ!Io!:;.h.eJ:

~"Ut:.e!1!:

(po i:n.t -~"'f'OiJr.l1!:.)

(tbk

tq.j(;hbod~Plo1JJtle.!r II:I: 10.1.,1,1 (Link n<!!.ta) Rm,l,tJe,cr. .In1;i.e,~:f.. .ee ~l!!I.!;!: 10 .1. U .. .3 N~r O'f TOB !I!!II'tr:ic.; I) TO\!, C!! !Met~i<:!=-; 7St
Link. I!:~nl\~~ «0: ~ S~ NetwQrk. U.:I.:n..1t rDt NiiWOi:'k/iU!:mii,t.fI'~~; 10. ,1 H. (Link Dili'tIi j HlII,.t,liIol:'k II'st; 255.255., 2.55,. 0 M ~:!: of w.!i _·cr!!.c .• ; I) T'OS Cil iMitIU:!cs; 781

Iin

(I

Lmk ~.O.iUUl'l:::t.edi to· a :5,t~ N~tw,g:d;. (U.n...1t Illl '~ablo!;'k./I"'llll-luil't. l'I~~; 101.1.:3, l (Link !:la.tao) Ret.-'!Il1l'.rk Mals.k.: :il ~S • ::il S~ , :il5S. ;;l S5 R~~ ,~t ~ m.~ic.; I) ~iD5, [!I IMetil:'lICIli' lI.

R3#show

~p ospf database

network

10.1.23.2 (Process ID 1)

OSPF Router with ID (10.1.3.3) Net Link States (Area 1)

Routing Bit Set on this LSA LS age: 151 Options: .(No TOS-capability, DC) LS Type: Network Links Link State ID: 10.1.23.2 (address of Designated Advertising Router: 10.1.2.2 LS Seq Number: 80000004 Checksum: OxBC27 Length: 32 etwork Mask: /24 Attached Router: 10.1.2.2 Attached Router: 10.1.3.3

Router)

R3#show

ip ospf database

summary

10.1.245.0 (Process 1D 1)

OSPF Router with 1D (10.1.3.3) Summary Net Link States

(Area 1)

Routing Bit Set on this LSA LS age: 165 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links (Network) Link State 1D: 10.1.245.0 (summary Network Advertising Router: 10.1.2.2 LS Seq Number: 80000004 Checksum: Ox6980 Length: 28 Network Mask: /24 TOS: 0 Metric: 64

Number)


R3#show ~p ospf database asbr-summary 10.1.5.5

OSPF Router with ID (10.1.3.3) Summary ASB Link States

(Process ID 1)

(Area 1)

Routing Bit Set on this LSA LS age: 671 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links (AS Boundary Router) Link State ID: 10.1.5.5 (AS Boundary Router address) Advertising Router: 10.1.2.2 LS Seq Number: 80000002 Checksum: Ox874F Length: 28 Network Mask: /0 TOS: 0 Metric: 64

R3#show

ip ospf database OSPF Router Type-S

exte nal 10.1.50.0 with 10 (10.1.3.3) S External (Process 10 1)

Link States

Rou ing Bit Set on th·s LSA LS age: 130 Options: ( 0 TOS-capabil~ty, DC) LS Type: AS Exte~nal Lin Link State 10: 10.1.50.0 (External Network Number) Advertising Router: 10.1.5.5 LS Seq umber: 80000002 Checksum: Ox8BCl Length: 36 Network a k: /24 Metric Type. 2 (Larger than any link state path) TOS: 0 Metr1C: 20 Forward Address: 0.0.0.0 External Route Tag: 0

R3#show ip route 10.1.2.2 Routing entry for 10.1.2.2/32 K."lown via "ospf 1", distance 110, metric 2, type intra area Last update from 10.1.23.2 on FastEthernetO/O, 00:39:04 ago Ro ting Descriptor B1ocks~ * 10.1.23.2, from 10.1.2.2, 00:39:04 ago, via FastEthernetO/O Route metric is 2, traffic share count is 1 R3#show ip route 10.1.245.0 Routing entry for 10.1.245.0/24 Known via "ospf 1", distance 110, metric 65, type inter area Last update from 10.1.23.2 on FastEthernetO/O, 00:39:06 ago Routing Descriptor Blocks: * 10.1.23.2, from 10.1.2.2, 00:39:06 ago, via FastEthernetO/O Route metric is 65, traffic share count is R3#show ip route 10.1.50.0 Routing entry for 10.1.50.0/24 Known via "ospf 1", distance 110, metric 20, type extern 2, forward Last update from 10.1.23.2 on FastEthernetO/O, 00:39:09 ago Routing Descriptor Blocks: * 10.1.23.2, from 10.1.5.5, 00:39:09 ago, via FastEthernetO/O Route metric is 20, traffic share count is 1

metric

65

z
"It
0

:5
>
C!
ci ci

llOO 10.1.6.~

R2s Unk To Area 0 Goes Down. All Inter-Area Connectivity To Area 1 Is Lost.

FaO/1 FaOIO

....
....

"!

Area 2
FaOIO

FaOIO

110.1.146.0/24 VLAN 146 ]

r 10.1.245.0124

FaO/O

I 10.1.13.0124

Area 1
IlOO 10.1.3.3124

S1/2

Area 0
FaOIO
[10".1.23.0/24 VlAN 231

CoO

!'!! 0
ci U!

..
j >
~ ci

IloO
FaO/1

10.1.6m4

With Virtual-link Configured Between R1 and R4, Traffic Can Be Rerouted Via Area 2.

""'
FaOIO

10.1.50.0/24 VLAN 5

[ 10.1.245.0124

FaO/O

Area 1

Area 0
FaOIO
[ 10.1.23.0/24 VLAN

231

1#
router ospf 1 area 2 vir~ual-link 10.1.4.4

#
router ospf 1 area 2 virtual-Link 10.1.1.1

R1 show ip ospf neighbor


Nel.ghbor

ID

10.1.4.4 0.1.3.3 0.1.6.6 R4#show

O. 1 .4 . '4

Pri 0 0 1 1

State
FULL/

Dead Time

Address

/
FULL/BDR FULL/OROTHER

00'00:32 00.00:38 00:00:35

10.1.146.4 10.1.13.3 10.1.146.4 10 . .146.6

Interface OSPF VLO Sere 1011


F tEth rn tOIO Fa tEthernetO/O

ip ospf neighbor
10

Ne1ghbor 10.1.1.1 10.1.5.5 10. .1.1 10.1.6.6

Pri 0 1
1

State

Dead Tl.IIle

FULL/ FULL/DR FULL/DR FULL/DROTHER

00:01:45 00:00:37 00:00:38

Address 10.1.146.1 10.1.245.5 10,1.146.1 10.1.146.6

Interface OSPF VLO Ser::" 10/0 F tEth rnetO/O FastEth rn tOIO

Rllshow ip ospf vircual-links V~rtual Link OSPF VLO to roueer 10.1.4.4 is up Run 8d nd circu~t DoNotAqe LSA allowed Trans~t are 2, v~a ~terlace FastEthernetO/O, Cost of us~ng 1 Trans t Delay 8 1 .ec. Stat. POrNT_TO_POINT, Timer intervals configured, Bello 10, Dead 40, W~t 40, Retransmit 5 B 110 due ~n 00 00.07 Adjacency state FULL (Hello suppressed) Index 1/4. r@transm1ssion queue length 0, number of retransmass~on 0 First OxO(O)/OxO{O) Next OxO(O)/OxO(O) Last retran. .aion scan length 0, lDil.Xim 0 Last retransmission scan ~e is 0 ms@c, CIaX.t.mUDl as 0 msec

1.

1.

RlI.how ip oapt int rtac. OSPF_VLO is up, line protocol .t.s up Internet Addre s 10.1.146.1/24, Area 0 Process 10 1, Rout.r ID 10 1 1.1, Network Typ VIRTUAL_LINK, Cost: Configured as demand circuit Run as demand circu.t.t. DoNotAge LSA llow d Transmit Delay is 1 sec, State POINT_TO_POINT, Timer .t.neervals configured, Hello 10, Dead 40, Wa1t CO, Retransmit oob-resync ~meout 40 Bello due in 00.00·06 Supports Link-local Siqnal~ng (LLS) Index 1/4, flood queue length 0 Next OxO(O)/OxO{O) Last flood scan length 1S 1, max;mum 1S 1 Last flood sc n tim is 0 maec, max1mum 1S 0 msec Neighbor Count is 1, Adjacent neJ.ghbor count is 1 Adjacent with ne~ghbor 10.1.4 4 (Hello suppressed) Suppre •• h 110 for 1 n•.t.ghbor(s) <output ouu.tted>

I
• Less topology info & less routing info means lower resource utilization • OSPF areas add scalability by hiding topology information, but they don't hide reachability information • NLRI can be reduced in OSP implementing
- Summarization - Stub areas

by

• OSPF supports two types of summaries


- Internal Summarization xternal Summarization (Type-3 LSAs) (Type-5 & 7 SAs)

• Unlike RIPv2, E GRP, and BGP, OSPF summarization (aggregation) cannot be performed at arbitrary places in the topology
- Internal summarization - External summarization only on ABRs only on ASBRs

• Configured only on ABRs • Takes intra-area (0) routes and summarizes them into inter-area (0 IA) routes as they move between areas · area [source area-id] range [network] [mask] • Automatically generates route to NullO

• Configured only on ASBRs


• Takes routes external to OSPF domain and summarizes them as OSPF external

routes (E1/ 2/N1/ 2) when redistributed • summary-address [network]


[mask]

• Automatica Iy generates routes to

uliO

U)

>

~ ~--IiI~

<'!

c:i

c:i

...

...

FaO/1

FaOIO

Area 2

Fa 0/0

10.1.146.0/24 VLAN 146

110.1.50.0124 VLA

51

[10.1.245.01241

FaO/O

Lol2 10.1.32.3124 L03310.1.33.3124 L03410.1.l4.3124 LolS10.1.3S.3124 [ LoO 10.1.3.31241

Area 0 Area 1
FaOlO r 10.1.23.0124 VLAN 23

s
R2B :m:~i;;!I1.U:er ospf 1 swea l!. l!:anqE: lD .1., 3:2 , 0;255 ,,255 • .252,. CI

Itll
in.te,r£;a!!:;Je 1.oopbaek:32 ip' add~es$ 10.,1. ,3,2 .3,255.255" lI!"p,OBPf' ,n.s.'tw,o,:d: point- to-P'Q!1lI.t
1

2'55 . '0'

! inrterfaee Loopbaek3,3, ip add:ress 101.1 . .3.3.3. 255.,2,55,,255,


iF!' osp£
l'le:t'WIo!ri.

po.in't-'to-p'O,illt.

!
lnrbe,r£,8Ice (,o,o,pbae:t3,4,

ip' address

10, 1. 34.J

2SS.2 55 .25§ . 0'

i,p' ospf ~nelt,w,ol:'k point.-to-po,int ! ,in,teri'acE:' Loopback3S :!!.p address 10 .1. 35, .J, .255 '.2.S~ .255. 0 iF Qspf p!et""Q~k pgilillt.~'tQ=PQi»t,
I

route,]:

osp:f 1

fietwor.k

'lD.1 ~],2. ,], '0,.0.0.

(II

a.:m::ea 1

8etw-ork ~D.1.. 33~3, [1,0,. D • II) ,uea. 1 nel'tNol[',k 10. 1. 34 . 3, CI.0 .0 . 01 ,area: I

netw-orklO.l.lS.3

0.0.0,0

aJ:;'oa 1

You might also like