| 리포트 | 기술문서 | 테크-블로그 | 원샷 갤러리 | 링크드인 | 스폰서 컨텐츠 | 네트워크/통신 뉴스 | 인터넷자료실 | 자유게시판    한국 ICT 기업 총람 |

제품 검색

|

통신 방송 통계

 
 
 
섹션 5G 4G LTE C-RAN/Fronthaul Gigabit Internet IPTV/UHD IoT SDN/NFV Wi-Fi Video Streaming KT SK Telecom LG U+ OTT Network Protocol CDN YouTube Data Center
 

2023

5G 특화망

포탈

Private 5G/이음 5G

 포탈홈

  넷매니아즈 5G 특화망 분석글 (128)   5G 특화망 4가지 구축모델   산업계 5G 응용   산업분야별 5G 특화망 활용사례  [5G 특화망 벤더Samsung | HFR | Nokia | more
 

해외

  국가별 사설5G 주파수 [국가별 구축현황] 일본 | 독일 | 미국 | 프랑스 | 영국  [사설5G 사업자] Verizon | AT&T | DT | Telefonica | AWS | Microsoft | NTT동일본 | NTT Com    
 

국내

  5G 특화망 뉴스 | 국내 5G 특화망 구축 현황 | 국내 5G 특화망사업자 현황 (19개사) | 국내 자가구축사례 일람 | 국내 특화망 실증사업사례 일람 | 5G 특화망 정책
 
 

[5G 특화망 구축 사례] 한국식품산업클러스터 | 반월시화산단 삼성서울병원 | 롯데월드 | 한국수력원자력 | 해군본부 | 한국전력공사 | more  [이통사] KT

 
 
스폰서채널 |

 HFR의 5G 특화망 솔루션 (my5G)  Updated   | HFR 5G 특화망 뉴스HFR my5G 자료

  스폰서채널 서비스란?
OSPF (Open Shortest Path First) 상세 동작 원리 (65 pages)
OSPF (Open Shortest Path First) Detailed Principles of Operation
By Netmanias (tech@netmanias.com)
코멘트 (0)
17

Thank you for visiting Netmanias! Please leave your comment if you have a question or suggestion.
Transcript
Netmanias 기술문서: OSPF(Open Shortest Path First)상세동작원리

OSPF(Open Shortest Path First) 상세동작원리
2009년12월10일

2
1. OSPF Fundamental Elements
.Static Routing, Dynamic Routing (RIP, OSPF, …)
.Link-State Routing Algorithm
.OSPF Domain, OSPF Network, OSPF External Network
.OSPF Router-ID (RID)
.OSPF Interface Type
.Hello Packet
.Adjacency and Database Exchange
.Reliable Flooding
.Broadcast LAN & Network LSA
.DR / BDR
.Router LSA (Type 1)
.Network LSA (Type 2)
.External LSA (Type 5)
.Type1-External Metric vs Type2-External Metric
2. OSPF Areas
.What’s OSPF Area (ABR/ASBR)
.ABR Summary LSA (Type 3)
.ASBR Summary LSA (Type 4)
.Stub Area
.NSSA (Not So Stubby Area)
.Default Route Origination
Table of Contents

3
3. OSPF Advanced Elements
.Passive Interface
.ECMP (Equal Cost MultiPath)
.SPF Delay and Hold Timer
.Graceful Restart
.Sample Network Diagram
Appendix
.Routing Calculation (SPF)
.OSPF Packet Format (Hello, DD)
.OSPF LSA Packet Format
.Forwarding Address
.Virtual Link
.The order of installing routes
.LSA Description
References
Table of Contents

4
OSPF Fundamental Elements

5
Static Routing, Dynamic Routing (RIP, OSPF, …)
R2(A)
AGG-R2R1(A)
R2(B)
R1(B)
AGG-R1(A)AGG-R1(B)
R2(A)
AGG-R2R1(A)
R2(B)
R1(B)
AGG-R1(A)AGG-R1(B)
Static RoutingR2(A)
AGG-R2R1(A)
R2(B)
R1(B)
AGG-R1(A)AGG-R1(B)
Dynamic Routing (RIP, OSPF, ……)
Distance Vector (RIP) VS Link State (OSPF)
R1R2R3R14R15R16R1R2R3R198R199R2001.RIP can’t exceed 16 Hops thus it is just adequate for a small
network. (Low scalability)
2.Flooding of routing table after routing calculation (Slow
Network Convergence Time)
3.Flooding every 30 seconds (High bandwidth consumption)
1.Up to 200 Routers supported. Actually the number of routers
depends on the performance of routers. (High scalability)
2.Flooding of Link State Database before routing calculation (Fast
Network Convergence Time)
3.Refreshing every 1800 seconds (Low bandwidth consumption)
Topology

6
Link-State Routing Algorithm :(1) Graph abstraction
uyxwvz2213112535Graph: G = (N,E)
N = set of routers = { u, v, w, x, y, z }
E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
Graph 표현법은, Network 연결을수학적으로표현하기위해흔히사용됨.

7
Link-state Routing Algorithm :(2) Graph abstraction -costs
uyxwvz2213112535.c(x,x’) = cost of link (x,x’)
-e.g., c(w,z) = 5.cost는편의상1로가정핛수도있고,
대역폭의크기에반비례하게정하기도함.
-e.g., 10GbE .cost 1,1GbE .cost 10,100M .cost 100, …
Cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp)
질문: u와z 사이의가장최단경로는?
Routing algorithm: 가장cost가적게드는경로를찾는알고리즘

8
Link-State Routing Algorithm :(3) Dijkstra’s SPF Algorithm
Dijkstra’s“Shortest Path First” Algorithm
.Network topology와모든Node 갂의link cost값을, 모든Node(라우터)들이알게함.
.위“Link-state”정보를Broadcast (flooding)함으로써모든라우터에게젂달함.
.모든라우터들이동일핚정보를갖게됨.
.각노드를source로해서, 모든노드로의최단경로를계산함.
.각노드(라우터)가각자의forwarding table을갖게됨.
.반복적계산방식: k개의destination에대해최단경로를얻으려면, 각노드로의경로의cost
값을k번반복계산함.
.핚번의계산당하나의목적지node로의최단경로가찾아지며,
.K번의계산을마치면k개의목적지node로의최단경로가모두찾아지게됨.

9
Dijsktra’s Algorithm & Example
1 Initialization:
2 N\'= {u}
3 for all nodes v
4 if v adjacent to u
5 then D(v) = c(u,v)
6 else D(v) = ∞
7
8 Loop9 find q not in N\' such that D(q) is a minimum
10 add q to N\'
11 update D(v) for all v adjacent to q and not in N\' :
12 D(v) = min( D(v), D(q) + c(q,v) )
13 /* new cost to v is either old cost to v or known
14 shortest path cost to q plus cost from q to v */
15 until all nodes in N\'uyxwvz2213112535StepN’D(v)/p(v)D(w)/p(w)D(x)/p(x)D(y)/p(y)D(z)/p(z)
0u/////
1u/////
2u/////
3u/////
4u/////
5uExampleNotation:
.c(x,y):node x와y 갂의link cost; 직접연결되어있지않으면∞.
.D(v):source로부터목적지v까지의경로의cost값.
.p(v):source로부터목적지v까지의경로에서, 목적지v의직젂node.
.N\':최단경로가결정된node들의집합2u5u1u∞-∞-
x2u4x2x∞-
xxxxyyyy2u3y4yvvv3y4yww4yz경로u.x : u-x, cost 1, 경로u.y : u-x-y, cost 2,
경로u.v : u-v, cost 2, 경로u.w : u-x-y-w cost 3,
경로u.z : u-x-y-z, cost 4

10
OSPF domain, OSPF network, OSPF external network (1/3)
OSPF Domain means that a domain which is comprised withOSPF routers and their OSPF enabled interfaces.
Surely OSPF area is its component.
AS 65433OSPF DomainRIP DomainIS-IS DomainArea 1Area 2
AS 65433
AS 65433
AS 65433OSPF DomainEnable OSPF on Routers and Networks (Interfaces)
OSPF AreaEnable OSPF on Routers and Networks (Interfaces)
Area 1OSPF DomainArea 2

11
OSPF domain, OSPF network, OSPF external network (2/3)
.What’s OSPF External Network?
#NAME?
.You can see that interfaces I3 and I4 of R2(A) are not
in a OSPF domain even though OSPF process is
running on the R2(A).
AGG-R2R1(A)
R2(B)
R1(B)
AGG-R1(A)AGG-R1(B)
R2(A)
I1I2R2(A)# show run router ospfrouter ospf100network 10.1.1.0/24 (I1)
network 10.1.2.0/24 (I2)
I3I4R2(A)
I1I2I3I4OSPF DomainR2(A)
I1I210.1.1.1/2410.1.2.1/2410.1.3.1/2410.1.4.1/24I3 and I4 don’t belong to OSPF Networkas long as “redistribute connected” are not defined.
※ network 명령어를설정핛때, Router의Interface에핛당된IP Address인10.1.1.1/32로설정핚경우에도10.1.1.0/24 Network을인식함(network 10.1.1.0/24 = network 10.1.1.1/32 != network 10.1.1.2/32)

12
OSPF domain, OSPF network, OSPF external network (3/3)
How to inform OSPF routers of external routes?
-through redistribution into OSPF domain-Static Route-Connected Network-BGP Route-RIP Route[TIP] What’s Router ID?
32bits Identifier that is usually IP address of one of router’s interfaces.
OSPF External Domain(Static, Connected, RIP, BGP, …)
Redistributing external routes into OSPF domain!!
AGG-R2R1(A)
R2(B)
R1(B)
AGG-R1(A)AGG-R1(B)
R2(A)
I1I2R2(A)# show run router ospfrouter ospf100network 10.1.1.0/24 (I1)
network 10.1.2.0/24 (I2)
redistribute connectedI3I410.1.1.1/2410.1.2.1/2410.1.3.1/2410.1.4.1/24OSPF AreaOSPF DomainOSPF Area

13
OSPF Router-ID (RID)
.각OSPF Router를Unique하게식별하기위핚값으로사용됨
.IPv4 Address Format
.10.0.0.1, 172.16.0.1, etc.
.보통Router의Loopback Address에127.0.0.0/8 에속하지않는, Router 외부와ping이가능핚주소를설정핚후그주소값을RID로사용함
.RID가꼭PING-able해야하는것은아니나, 관리자편의상각라우터가살아있는지확인해보기위해PING이되는편이편리함
.OSPF common header와, Hello, DD 등메시지type별sub-header에sending router의RID값이수록됨
.DD 교홖시Master/Slave election, Broadcast Network에서의DR election 등에서RID값을비교하여값이큰라우터를선출(DD와DR 개념은뒤에설명)

14
OSPF Interface Type
Virtual link acts like a point-to-point link that has been added to the
backboneDRBDR
OSPF Backbone Area (0.0.0.0)
Which is transit areaArea 2ABR 1Area 1ABR 2ABR 3Area 0Area 3Virtual LinkABR 4Area 4Point to PointPoint to Multi PointBroadcast, NBMA (Non Broadcast Multi Access)Virtual LinkUsually used for connection oriented subnets, such as ATM or
Frame Relay※Broadcast Network : EthernetNBMA Network’s example : ATM, Frame Relay, X.25

15
어떻게Topology를다같이알게되나?
R1(B)
1먼저자기주변의OSPF Neighbor Router를발견핚다
.How? By receiving OSPF Hello!
R2(A)R2(B)
Hello (RID=T2A, Neighbor seen=0)
Hello (RID=T2B, Neighbor seen=T2A)
Neighbor Discovered!
Hello (RID=T2A, Neighbor seen=T2B)
Neighbor Discovered!
두라우터갂의양방향성확보를위해상대방이보낸Neighbor-
list에내RID가있어야함R2(A)R2(B)
R1(A)
R2(A)R2(B)
2각라우터가LSA를만들어OSPF Area내에FloodingR2(B)의Router-LSAR2(A)의Router-LSAR2(A)
R1(B)R1(A)
R1(B)의Router-LSAR1(A)의Router-LSA1010101010AGG-R1(A)
AGG-R2101010R2(B)
R1(A)R1(B)
10AGG-R1(B)AGG-R2101010AGG-R2R1(A)
R2(B)
R1(B)
AGG-R1(A)AGG-R1(B)
R2(A)
1010101010101010103각라우터가보낸LSA를모두합치면Topology 완성그런데, 이건모든Router갂Link가Point-to-Point
Interface 일때의얘기고, Broadcast Network인Ethernet Link에서는좀더복잡(DR, BDR)

16
Hello Packet
OSPF Ver = 2OSPF pkt typeOSPF LengthSource OSPF Router IDOSPF Area IDPacket checksumAuthentication TypeAuthentication DataHello PacketBodyVer/Hdr LenTOSIP datagram lengthFragmentationTTLProtocolHeader ChecksumSource IP AddressDestination IP Address224.0.0.5OSPF HeaderOSPF Hello PacketNetwork MaskHello IntervalOptionsRouter PriorityRouter Dead IntervalDesignated RouterBackup DesignatedRouter1stNeighbor IDIP HeaderOSPF Hello PacketNetwork MaskHello IntervalOptionsRouter PriorityRouter Dead IntervalDesignated RouterBackup DesignatedRouter1stNeighbor ID2nd Neighbor ID……
5thNeighbor ID(Source IP & Netmask) must
match receiving router
interface’s subnet10E15400.0.0.00.0.0.010.1.1.1210.1.1.3……
10.1.1.6Hello를수싞핚Interface가Broadcast/NBMA일때에만검사함주목! Hello-Interval, Router-Dead-IntervalOSPF HeaderIP HeaderInterface별로별개의list임이두값이일치하는애들끼리Adjacency형성= 1For contents of “Options” fields, see “Appendix.3”

17
Adjacency and Database Exchange
.Master / Slave Selection during Database Synchronization.Only Master can increase sequence number.
.Three Hand Shake method.
.LS Request and LS UpdateR1(A)
R2(B)
R1(B)
R2(A)
224.0.0.5 (AllSPFRouter)
Every Hello Interval(10sec-default)
Hello (DR=0, Neighbor seen=0)
Hello (DR=10.1.1.2, Neighborseen=77.1.1.1)
DD (Seq=1000, I=1, M=1, MS=1)
Higher RID is master.
I : Init, M : More, M/S : Master or SlaveThree way HandshakingDownDownExStartExStartExchangeExchangeLoadingFullFullDD (Seq=2000, I=1, M=1, MS=1)
R2(A)(RID=77.1.1.1)
10.1.1.110.1.1.2R2(B)(RID=77.1.1.2)
Master ElectionDD (Seq=2000, I=0, M=1, MS=0)
DD (Seq=2001, I=0, M=1, MS=1)
DD (Seq=2001, I=0, M=1, MS=0)
DD (Seq=2002, I=0, M=0, MS=1)
DD (Seq=2002, I=0, M=0, MS=0)
LS RequestLS UpdateLS RequestLS Update.Discovery of Neighbors.Hello (10s) / Dead (40s) IntervalInterface MTUOptions00000I MMSDD Sequence NumberLSA Header 1LSA Header 2…
LSA Header NOSPF Database Description PacketLS AgeOptionsLS TypeLink State IDAdvertising RouterLS Sequence NumberLS ChecksumLengthLSA HeaderLoading
Master는DD의Sequence No.를누가결정/증가시키느냐의권핚에대핚Master일뿐이다.
Master/Slave가서로DD메시지를교홖핚다.

18
Reliable Flooding
R1(D)R1(A)R1(B)
R2(A)
R1(C)
R2(B)
R1(D)R1(A)R1(B)
R2(A)
R1(C)
R2(B)
R1(D)R1(A)R1(B)
R2(A)
R1(C)
R2(B)
R1(D)R1(A)R1(B)
R2(A)
R1(C)
R2(B)
R1(D)R1(A)R1(B)
R2(A)
R1(C)
R2(B)
LS UpdateLS AcknowledgementFlooding Robustness-Age (refreshment) .default refresh time is 1800 seconds.
-Checksum-Sequence numberWhen R2(B) is receiving LS Updates from R2(A) and R1(C) simultaneously,
R2(B) can use anything of them as a source. It’s a R2(B)’s own decision.
If R2(B) received LS Update while R2(B) sends the same LS Update, R2(B)
doesn’t need to send LS Acknowledgement about that LS Update.
12345

19
Reliable Flooding (cont)
.LSA는동일OSPF Area 내젂체Router에Flooding됨
.Area란? .뒤에설명. OSPF 망설계에서매우중요핚개념.
.LSA는개별적으로Ack되어야함
.LSUpdate를내보낸인터페이스에서동일LSU를받으면.Implicit Ack
LS Age
Options
LS Type = 1
Link State ID
(Router ID)
Advertising Router
LS Sequence Number
LS Checksum
Length
Flags
0x00
# links
Link ID
Link Data
Link Type
# TOS Metrics
Metric
Router LSA
Bit0 7 8 15
Word 0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
LSA Header

20
Broadcast LAN과Network LSA
Core-Router ABRAS ABRAS BVPN-GW
10GbE
SwitchCore-Router BCore-Router A의LSANeighboring RoutersCore-Router Bcost 10BRAS Acost 10BRAS Bcost 10VPN-GWcost 10Core-Router B의LSAOSPF NeighborsCore-Router Acost 10BRAS Acost 10BRAS Bcost 10VPN-GWcost 10BRAS A의LSANeighboring RoutersCore-Router Acost 10Core-Router Bcost 10BRAS Bcost 10VPN-GWcost 10BRAS B의LSANeighboring RoutersCore-Router Acost 10Core-Router Bcost 10BRAS Acost 10VPN-GWcost 10VPN-GW의LSANeighboring RoutersCore-Router Acost 10Core-Router Bcost 10BRAS Acost 10BRAS Bcost 10Node갂AdjacencyCore-Router ABRAS ABRAS BVPN-GWCore-Router BCore-Router A의LSANeighboring RoutersTransit Networkcost 10Core-Router B의LSANeighboring RoutersTransit Networkcost 10BRAS A의LSANeighboring RoutersTransit Networkcost 10BRAS B의LSANeighboring RoutersTransit Networkcost 10VPN-GW의LSANeighboring RoutersTransit Networkcost 10Node갂AdjacencyAdjacency개수: N(N-1)/2Adjacency개수: NNetwork LSANeighboring RoutersCore-Router Acost 0Core-Router Bcost 0BRAS Acost 0BRAS Bcost 0VPN-GWcost 0Broadcast
Network= transit network모든라우터가서로Adjacency를형성하려핚다면…
그러지말고, Broadcast Network을하나의가상Node로보면더갂단해짐(DR을선정하여걔가Network-LSA를만들도록함)

21
DR (Designated Router) / Backup DR
Reference : RFC2328 -7.3. The Designated RouterDRBDRIn order to reduce amount of Database Synchronization, DR/BDR
scheme is used in a broadcast network or NBMA.
DR : Responsibility of advertising Network LSA.
.224.0.0.5 (AllSPFRouter)
224.0.0.6 (AllDRouter)
.Highest Priority, Higher RID.Priority 0 means that router is ineligible to be a DR or BDR.
.First elect BDR then elect DR.
.Non-preemption used.
DRBDRPhysical TopologySynchronization TopologyAdjacency TopologyProperties of DR / BDR

22
DR / BDR Election
ABCDEFABCDEFTime T0 = 00:00:00Time T1 = 00:00:03Router A is enabled and starts DR wait timer multicasting Hello
PacketABCDEFTime T2 = 00:00:13Hello PktRID=B,
Priority=8(DR=0.0.0.0,
BDR=0.0.0.0)
4040ABCDEFTime T3 = 00:00:2340Wait TimerRouter B is enabled and starts DR wait timer sending Hello PacketRouter C is enabled and starts DR wait timer sending Hello PacketCase of that Router A and C firstly initiatedRouter IDPriorityDRList-up candidatesRouter IDPriorityDRA10.1.1.115List-up candidatesHello PktRID=A,
Priority=5(DR=0.0.0.0,
BDR=0.0.0.0)
30Router IDPriorityDRA10.1.1.115B10.1.1.128List-up candidates4030Router IDPriorityDRA10.1.1.115B10.1.1.128C10.1.1.35List-up candidates20Hello PktRID=C,
Priority=5(DR=0.0.0.0,
BDR=0.0.0.0)

23
DR / BDR Election (cont)
ABCDEFABCDEFTime T4 = 00:00:33Time T5 = 00:00:38Router E is enabled and starts DR wait timer multicasting Hello
PacketABCDEFTime T6 = 00:00:43Time T6’ = 00:00:43’
Router A’s Wait Timer is expired and DR election is performedRouter B, C, D, E performs DR electionList-up candidatesList-up candidatesList-up candidatesRouter D is enabled and starts DR wait timer multicasting Hello
PacketHello PktRID=D,
Priority=6(DR=0.0.0.0,
BDR=0.0.0.0)302010Router IDPriorityDRA10.1.1.115B10.1.1.128C10.1.1.35D10.1.1.46E10.1.1.5040251535Router IDPriorityDRA10.1.1.115B10.1.1.128C10.1.1.35D10.1.1.46E10.1.1.505Hello PktRID=E,
Priority=0(DR=0.0.0.0,
BDR=0.0.0.0)
03520301040Router IDPriorityDRA10.1.1.115B10.1.1.128DRC10.1.1.35D10.1.1.46BDRE10.1.1.50ABCDEFList-up candidates035203010Route _IDPriorityDRA10.1.1.115B10.1.1.128DRC10.1.1.35D10.1.1.46BDRE10.1.1.50Hello PktRID=A,
Priority=5(DR=B, BDR=D)

24
DR / BDR Election (cont)
ABCDEFABCDEFTime T7 = 00:00:53Time T8 = 00:01:03Router F Receive Hello Packet from one of other Routers and realize
that there were already DR and BDR.List-up candidatesList-up candidatesRouter IDPriorityDRA10.1.1.115B10.1.1.128DRC10.1.1.35D10.1.1.46BDRE10.1.1.50F10.1.1.68Router F is enabled and starts DR wait timer multicasting Hello
Packet40Hello PktRID=E,
Priority=0(DR=B,BDR=D)
Hello PktRID=F,
Priority=8(DR=0.0.0.0,
BDR=0.0.0.0)
Router IDPriorityDRA10.1.1.115B10.1.1.128DRC10.1.1.35D10.1.1.46BDRE10.1.1.50F10.1.1.6830ABCDEFBDRDRDR / BDR Election was completed

25
Router LSA (Type 1)
Rc(77.1.1.3)
Type 1 .Router LSAArea Flooding ScopeA.1B.1C.3A.3A.1B.1Rb(77.1.1.2)
B.2A.3C.2C.3Ra(77.1.1.1)Rc(77.1.1.3)
B.2C.2Rb(77.1.1.2)
Ra(77.1.1.1)Rc(77.1.1.3)77.1.13.0/24Ra(77.1.1.1)
A.1B.1Rb(77.1.1.2)
B.2C.2A.3C.3Ra#show ip ospf database router
OSPF Router with ID (77.1.1.1)
(Process ID 1)
Router Link States (Area 0)
LS age: 995Options: (No TOS-capability, DC)
LS Type: Router LinksLink State ID: 77.1.1.1Advertising Router: 77.1.1.1LS Seq Number: 80000015Checksum: 0x8160Length: 60Number of Links: 2Link connected to: a Transit Network(Link ID) Designated Router address:
77.1.13.1(Link Data) Router Interface
address: 77.1.13.1Number of TOS metrics: 0TOS 0 Metrics: 1Link connected to: a Transit Network(Link ID) Designated Router address:
77.1.12.1(Link Data) Router Interface
address: 77.1.12.1Number of TOS metrics: 0TOS 0 Metrics: 1Type 1 Router LSALSA Header Part

26
Router LSA (Type 1)
LS Age
Options
LS Type = 1
Link State ID
(Router ID)
Advertising Router
LS Sequence Number
LS Checksum
Length
Flags
0x00
# links
Link ID
Link Data
Link Type
# TOS Metrics
Metric
Router LSA
Bit0 7 8 15
Word 01234567891011121314151617
LSA Header
Link Type
I/F Type
Comment
1
Point-to-point
A connection to another router via ptp link
2
Transit Network
Carries transit traffic (Broadcast/NBMA network)
3
Stub Network
Leaf of a network tree, from or to which traffic is
sourced or destined
4
Virtual Link
Used to “paste” areas onto the backbone
Link Type
Value placed in “LINK ID” field
1
Neighbor router’s Router ID
2
IP address of DR’s interface (not Router-ID)
3
IP Network Address
4
Neighbor router’s Router ID
Link Type
Value placed in “LINK DATA” field
1
Host IP address of the originating router’s interface (Unnumbered i/f의경우ifIndex값)
2
Host IP address of the originating router’s interface
3
Stub network’s Netmask
4
Host IP address of the vitural link’s endpoint i/f address
For contents of “Options” fields, see “Appendix.3”

27
Network LSA (Type 2)
Each DR .All Rs in the same areaType 2 .Network LSAA.1B.1Rb(77.1.1.2)
B.2A.3C.2C.3Ra(77.1.1.1)Rc(77.1.1.3)
77.1.13.0/24A.1A.3Ra(77.1.1.1)Rc(77.1.1.3)
77.1.13.0/24B.1Rb(77.1.1.2)
B.2Ra(77.1.1.1)
Rb(77.1.1.2)
C.2C.3Rc(77.1.1.3)
77.1.12.0/24BRa(77.1.1.1), DRRb(77.1.1.2)
77.1.13.0/24ARa(77.1.1.1), DRRc(77.1.1.3)
77.1.23.0/24CRb(77.1.1.2)
Rc(77.1.1.3), DRRa#show ip ospf database network/* Subnet A ’s Network LSA database */
Routing Bit Set on this LSALS age: 296Options: (No TOS-capability, DC)
LS Type: Network LinksLink State ID: 77.1.13.1(address of
Designated Router)
Advertising Router: 77.1.1.1LS Seq Number: 80000007Checksum: 0x2E2Length: 32Network Mask: /24Attached Router: 77.1.1.1Attached Router: 77.1.1.3<<<< omitted >>>>
Area Flooding ScopeType 1 .Router LSAType 2 Network LSAA/* Subnet B’s Network LSA database */
Routing Bit Set on this LSALS age: 296Options: (No TOS-capability, DC)
LS Type: Network LinksLink State ID: 77.1.12.1(address of
Designated Router)
Advertising Router: 77.1.1.1LS Seq Number: 80000007Checksum: 0xFEE7Length: 32Network Mask: /24Attached Router: 77.1.1.1Attached Router: 77.1.1.2BLSA Header Part※Point to Point
Broadcast※Transit Network
Stub Network

28
Network LSA (Type 2)
LS Age
Options
LS Type = 2
Link State ID
(Designated Router)
Advertising Router
LS Sequence Number
LS Checksum
Length
Network Mask
Attached Router #1
Attached Router #2
Attached Router #3
Network LSA
IP address of DR’s network interface
RID of the originating router
Netmask of this broadcast network
List of router-IDs attached this broadcast network including DR
itself
For contents of “Options” fields, see “Appendix.3”

29
External LSA (Type 5)
Type 5 .External LSAAS Flooding ScopeOSPF DomainRb(77.1.1.2)
Ra(77.1.1.1)
BGP90.1.0.0/16
RIP120.1.1.0/24
StaticRc is an ASBR and it is redistributing external routes from BGP, RIP,
connected and Static routes into OSPF domain in terms of External
LSA.
External LSA is flooded into the whole AS except Stub areas and
NSSA areas.
ASBR
ConnectedE1 type is for IGP, E2 type is for BGP. (their scale is different)
Type 1 .Router LSAType 5 External LSARc(77.1.1.3)
OSPF Domain (AS)
OSPF AreaStub AreaRIP DomainASBRType 5 External LSANSSAType 5 .External LSAType 1 .Router LSAType 5 External LSA Flooding ScopeAS External LSA (BGP case) -E2LS AgeOptionsLS TypeLink State ID = 90.1.0.0(External Prefix)
Advertising Router= 77.1.1.13 (Rc)
LS Sequence NumberLS ChecksumLengthNetwork Mask= 255.255.0.01TOSMetricForwarding Address= 0.0.0.0External Route TagE bit 0=type 1 (as if OSPF metric)
E bit 1=type 2 (as if as path length)
Type 5 .External LSAType 1 .Router LSAType 5 External LSA Packet FormatAS External LSA (RIP case) .E1LS AgeOptionsLS TypeLink State ID = 120.1.1.0(External Prefix)
Advertising Router= 77.1.1.13 (Rc)
LS Sequence NumberLS ChecksumLengthNetwork Mask= 255.255.255.00TOSMetricForwarding Address= 0.0.0.0External Route Tag

30
Type1-External Metric vs Type2-External Metric
.Type1-External Metric = E1 Metric
.Equal to OSPF internal metric values
.Type2-External = E2 Metric
.Regarded as greater than any OSPF internal metric values
.That is, internal cost to the advertising ASBR is ignored

31
OSPF Areas

32
What’s OSPF Area? (ABR/ASBR)
AGG-R2R1(A)
R2(B)
R1(B)
AGG-R1(A)AGG-R1(B)
R2(A)
BGPOSPF (Backbone) AreaAdvantage of Multi AreaWhat’s ABR?
Router which belongs more than two areas.
OSPF DomainArea 0Area 1Area 2OSPF Backbone AreaBackbone Area (Area 0) is special area.
It’s transit area and All ABRs should be belong to Backbone
Areain order to share Summary LSA each other.
Area 3Area 4Virtual Link.Down-sizing of SPF Calculation range.
.More efficiency.Less consuming of resourcesWhat’s ASBR?
Router that redistributes external routes into a OSPF domain.
RIP DomainBGPStaticConnectedOSPF DomainOSPF AreaOSPF AreaASBRASBRASBRABRABRABR

33
ABR Summary LSA (Type 3)
.Advertising Summary LSA is responsible of ABR.Synchronization of Summaries are done through Backbone Area.Vector distance algorithm be usedABR .All Rs in an areaBackbone AreaArea 1Area 2ABR 1ABR 2ABR Summary LSASummary LSAs of ABR110.1.2.0/2410.1.3.0/2410.1.4.0/24LS AgeOptionsLS TypeLink State ID=10.1.2.0Advertising Router =ABR1LS Sequence NumberLS ChecksumLengthNetmask = 255.255.255.0TOSMetric=10LS AgeOptionsLS TypeLink State ID=10.1.3.0Advertising Router =ABR1LS Sequence NumberLS ChecksumLengthNetmask = 255.255.255.0TOSMetric=20LS AgeOptionsLS TypeLink State ID=10.1.4.0Advertising Router =ABR1LS Sequence NumberLS ChecksumLengthNetmask = 255.255.255.0TOSMetric=3010.2.2.0/2410.2.1.0/24Summary LSAs of ABR2LS AgeOptionsLS TypeLink State ID=10.2.1.0Advertising Router =ABR2LS Sequence NumberLS ChecksumLengthNetmask = 255.255.255.0TOSMetric=20LS AgeOptionsLS TypeLink State ID=10.2.2.0Advertising Router =ABR2LS Sequence NumberLS ChecksumLengthNetmask = 255.255.255.0TOSMetric=10Summary Network Synchronization through Backbone AreaR1(A)
R1(B)
R2(A)
R2(B)
Type 3 .Summary LSAABRsubnetType 3 .Summary LSAABRsubnetType 3 .Summary LSAABR
subnet

34
ABR Summary LSA (Type 3) (cont)
Backbone AreaArea 1Area 2ABR 1ABR 2ABR Summary LSASummary LSAs of ABR110.1.2.0/2410.1.3.0/2410.1.4.0/24LS AgeOptionsLS TypeLink State ID=10.1.2.0Advertising Router =ABR2LS Sequence NumberLS ChecksumLengthNetmask = 255.255.255.0TOSMetric=10+7LS AgeOptionsLS TypeLink State ID=10.1.3.0Advertising Router =ABR2LS Sequence NumberLS ChecksumLengthNetmask = 255.255.255.0TOSMetric=20+7LS AgeOptionsLS TypeLink State ID=10.1.4.0Advertising Router =ABR2LS Sequence NumberLS ChecksumLengthNetmask = 255.255.255.0TOSMetric=30+710.2.2.0/2410.2.1.0/24Summary LSAs of ABR2LS AgeOptionsLS TypeLink State ID=10.2.1.0Advertising Router =ABR1LS Sequence NumberLS ChecksumLengthNetmask = 255.255.255.0TOSMetric=20+7LS AgeOptionsLS TypeLink State ID=10.2.2.0Advertising Router =ABR1LS Sequence NumberLS ChecksumLengthNetmask = 255.255.255.0TOSMetric=10+7Flooding back into Non-Backbone AreasR1(A)
R1(B)
R2(A)
R2(B)
Backbone AreaABR 1ABR 2ABR3Area 1Backbone AreaABR 1ABR 2ABR3Area 1What’s the best
summary LSA?
Backbone AreaABR 1ABR 2ABR3Area 1Cost=7

35
ABR Summary LSA (Type 3) (cont)
Backbone AreaArea 1Area 2ABR 1ABR 2ABR Summary LSASummary LSAs of ABR110.1.2.0/2410.1.3.0/2410.1.4.0/24LS AgeOptionsLS TypeLink State ID=10.1.0.0Advertising Router =ABR1LS Sequence NumberLS ChecksumLengthNetmask = 255.255.0.0TOSMetric = 30 (one of 10,20,30)
10.2.2.0/2410.2.1.0/24Summary LSAs of ABR2LS AgeOptionsLS TypeLink State ID=10.2.0.0Advertising Router =ABR2LS Sequence NumberLS ChecksumLengthNetmask = 255.255.0.0TOSMetric =20 (one of 10, 20)
Summary AggregationABR .All Rs in an areaType 3 .Summary LSAABR
Subnet/16ABR1 and ABR2 both are aggregating area’s networksWhen using aggregation,
metric is the highest costamong the aggregated sub-networks.
Area1’s subnets 10.1.2.0/24,
10.1.3.0/24 and 10.1.4.0/24 are
aggregated into 10.1.0.0/16R1(A)
R1(B)
R2(A)
R2(B)
When using aggregation,
metric is the highest costamong the aggregated sub-networks.
Type 3 .Summary LSAABRSubnet/24Type 3 .Summary LSAABRSubnet/24Type 3 .Summary LSAABR
Subnet/24

36
ASBR Summary LSA (Type 4)
.ASBR Summary LSA is responsible of ABR.Synchronization of Summaries are done through Backbone Area.Vector distance algorithm be usedABR .All Rs in an areaASBR Summary LSAASBR Summary Synchronization through Backbone AreaBackbone AreaArea 1Area 2ABR 1ABR 2ASBR Summary LSAs of ABR1ASBR Summary LSAs of ABR2R1(A)
R1(B)
R2(A)
R2(B)
LS AgeOptionsLS TypeLink State ID = R1(A)
(ASBR’s Router ID)
Advertising Router= ABR1LS Sequence NumberLS ChecksumLengthNetwork Mask(Not Used)
TOSMetric = 10LS AgeOptionsLS TypeLink State ID = R1(B)
(ASBR’s Router ID)
Advertising Router= ABR1LS Sequence NumberLS ChecksumLengthNetwork Mask(Not Used)
TOSMetric = 11ASBR 1ASBR 2ASBR3ASBR4LS AgeOptionsLS TypeLink State ID = R2(B)
(ASBR’s Router ID)
Advertising Router= ABR2LS Sequence NumberLS ChecksumLengthNetwork Mask(Not Used)
TOSMetric = 21LS AgeOptionsLS TypeLink State ID = R2(A)
(ASBR’s Router ID)
Advertising Router= ABR2LS Sequence NumberLS ChecksumLengthNetwork Mask(Not Used)
TOSMetric = 20ABRcostASBRType 4 .ASBR Summary LSAABRcostASBRType 4 .ASBR Summary LSAABRcostASBRType 4 .ASBR Summary LSA

37
ASBR Summary LSA (Type 4) (cont)
ABR .All Rs in an areaASBR Summary LSAFlooding back into Non-Backbone AreasBackbone AreaArea 1ASBR Summary LSAs of ABR1ASBR Summary LSAs of ABR2R1(A)
R1(B)
LS AgeOptionsLS TypeLink State ID = R1(A)
(ASBR’s Router ID)
Advertising Router= ABR2LS Sequence NumberLS ChecksumLengthNetwork Mask(Not Used)
TOSMetric = 10 + 30 = 40LS AgeOptionsLS TypeLink State ID = R1(B)
(ASBR’s Router ID)
Advertising Router= ABR2LS Sequence NumberLS ChecksumLengthNetwork Mask(Not Used)
TOSMetric = 11 + 30 = 41ASBR 1ASBR 2LS AgeOptionsLS TypeLink State ID = R2(B)
(ASBR’s Router ID)
Advertising Router= ABR1LS Sequence NumberLS ChecksumLengthNetwork Mask(Not Used)
TOSMetric = 21 + 30 = 51LS AgeOptionsLS TypeLink State ID = R2(A)
(ASBR’s Router ID)
Advertising Router= ABR1LS Sequence NumberLS ChecksumLengthNetwork Mask(Not Used)
TOSMetric = 20 + 30 = 50Area 2ABR 2R2(A)
R2(B)
ASBR3ASBR4ABR 1Cost = 30ABRcostASBRType 4 .ASBR Summary LSA

38
Stub Area
ASBR Summary LSAABR Summary LSAExternal LSAStub AreaDefault Route Origination with
Type 3(Default Behavior)
Advertising Summary LSAs into Stub Area is capable
(Optional Behavior)
When disabled, it is the same with Cisco’s totally
stubby area (Cisco proprietary)
Advertising ASBR Summary LSA and
Flooding External LSA are forbidden.Stub areas consume the least resources.
.ASBR cannot be supported.
.Cannot support Virtual Link.
.(Because there’s no summary LSA and AS-external-LSA)
ASBRThere’s no external routes and external LSA in Stub AreaDon’t generate Type 4,
Type 5 LSA fromStub AreaBackbone Area 0OSPF DomainStub Area 3OSPF Area 1originate default routeASBRASBR

39
NSSA (Not So Stubby Area)
ASBR Summary LSAABR Summary LSAExternal LSANSSASummary LSA Advertising(Default Behavior)
Default Route Origination in Type
3 is Possible.
Advertising ASBR Summary LSA and
Flooding External LSA are forbiddenASBR is supported in NSSAASBRType 7 LSA (NSSA)
Transformed from Type 7 LSA to External
LSADefault Route Originationin Type 7 is PossibleRIP Domain.ASBR is supported.ABR Summary LSAs are flooded into NSSA by default.
.Type 7 LSA is transformed into External LSA (Type 5)
.Type 3 Default Route is superior to Type 7 Default RouteOSPF DomainNSSA 3OSPF Area 1ASBRASBRRIP DomainOSPF DomainNSSA 3OSPF Area 1ASBRASBRRIP Domain

40
Default Route Origination
NSSAASBRType 7 Default RouteRIP DomainOSPF Domain (AS)
OSPF Area 1Stub AreaRIP DomainASBRType 5 Default RouteNSSAStub AreaType 3 Default RouteType 3 Default RouteType 5 Default Route Origination (External LSA)
Type 3 Default Route Origination (Summary LSA)Type 3, Type 7(NSSA) Default Route OriginationIntra Area > Inter Area > E1(N1) > E2(N2)
Route Install PrecedenceASBR Summary LSAABR Summary LSAExternal LSAType 7 LSA (NSSA)

41
OSPF Advanced Elements

42
Passive Interface
R2(B)
R1(B)
R2(A)
I1I220.1.1.0/24R2(B)
R1(B)
R2(A)
I1I220.1.1.0/24Passive InterfaceR2(B) and R2(A)’s Router LSAs have changed
due to Passive Interface setup at R2(B).
Network R2(A) ~ R2(B) changed from Transit
Network to Stub NetworkR2(B)
R1(B)
R2(A)
I1I220.1.1.0/24Passive InterfaceSPF
CalculationABCFlooding and SPF CalculationConfigure Passive Interfaceand Advertise Router LSAOriginal Data Traffic FlowRotuer LSAsR2(B)
R1(B)
R2(A)
Transit NetworkR2(B)
R1(B)
R2(A)
Stub NetworkStub NetworkPassive InterfaceCost InformationR2(B)
R1(B)
R2(A)
3

43
Passive Interface (cont)
.Even though the traffic is received at passive interface, R2(B)
can still forward that traffic to destination.
.This is the reason why the passive interface can do the
seamless network convergenceDER2(A)’s SPFR2(A)
R2(A)’s SPFR2(A)
345345After Completing FIB UpdateWhile FIB UpdatingR2(B)’s SPFR2(A)
R2(B)’s SPFR2(A)
345345R2(B)
R1(B)
R2(A)
I1I220.1.1.0/24R1(B)’s SPFR2(A)
R1(B)’s SPFR2(A)
345345R2(B)
R1(B)
R2(A)
I1I220.1.1.0/24SPF Tree Change (R2(B))SPF Tree Change (R1(B))SPF Tree Change (R2(A))
Some prefixes changed their next
hop in FIB table, the others notThis traffic can be still forwarded by R2(B)
.Network convergence was done seamlessly by passive interface
configuration

44
ECMP
R1(D)R1(A)R1(B)
R2(A)R2(B)
5910710363R1(C)
Between R1(B) and R2(B), There are two equal cost paths. One is via R2(A) and
the other is via R1(C). Their cost are the same value, 13.
In the case like this, traffic from R1(B) to R2(B) would be load-balanced and
these multiple paths are called as ECMP.
Example of ECMP from R1(B) to R2(B)
E1 Type ECMP ( Internal Cost + External Cost )
R1(D)R1(A)R1(B)
R2(A)R2(B)
5910710363R1(C)
RIP20.1.1.0/2411Total Cost from R1(B) to “20.1.1.0/24” is sum of the internal cost and external
cost.
Internal Cost(13) + External Cost(11) = 24[Path 1][Path 2]
[Path 1][Path 2]
※ECMP .Equal Cost Multi Path

45
ECMP (cont)
E2 Type ECMP ( External Cost )
R1(D)R1(A)R1(B)
R2(A)R2(B)
5910410363R1(C)
BGP B10.1.0.0/161001. When there are more than two routes which provide the same E2
cost,
2. In order to be ECMP, the sum of internal cost from a router to
ASBR should be the same as the others.
BGP A10.1.0.0/16100Each external cost is equal and the internal cost to ASBR is equal[Path 1][Path 2]

46
SPF Delay and Hold Time
Purpose of SPF Delay and Hold TimeSPF Hold TimerR2(B)
OSPF NetworkTopology Chnage.If SPF calculation is performed whenever network topology
changed, it will take such a lot of time.Reducing SPF calculation allows Router to reduce CPU usage
and resources.In order to reduce SPF calculation, SPF Delay and Hold time
are used
SPF Delay Timer .For Single Event or Initial ProcessR2(B)
OSPF NetworkInitial Topology ChangeSPF CalculationSPF Delay Timer(Default=5s)
.Interval between two sequential SPF calculation.Default value is 10 seconds.In above example, the number of SPF calculation was
reduced from 4 to 1.Triggered by a initial Topology Change notification.Default value is 5 seconds.In above example, the number of SPF Calculation was
reduced from three to one.
R2(B)
OSPF NetworkLast SPF CalculationScheduled SPF CalculationSPF Hold Timer(Default=10s)
SPF Delay Timer(Default=5s)
1.Initial Topology Change .Triggering SPF Delay Timer
2.Whenever SPF Calculation is completed
.Triggering SPF Hold TimerInitial Topology ChangeSPF Hold TimerSPF Hold TimerNo Topology Change,
No SPF Calculation,
No SPF Hold TimerTopology Change,
SPF Calculation,
SPF Hold TimerInitial Topology Change

47
SPF Delay and Hold Time (cont)
예) spf-interval 5 200 1000spf-interval <MaxInt> [<InitWait> <Inc>]
<MaxInt> seconds between SPF runs (seconds)
<InitWait> milliseconds between first trigger and SPF: Default Value = 5.5 sec<Inc> milliseconds between first and second SPF200msecSPF1000msecSPF2000msecSPF4000msecSPF예) spf-delay 200200msecSPF5000msecSPFSPFSPF200msec200msecJuniper의경우처음네트워크토폴러지변경에대해서는빠르게SPF를계산하여RIB를Update하여Convergence time을줄여주고토폴로지변경이지속적이고악착같은경우에는SPF 계산을5초늦추어Self protection핚다.
이런알고리즘의배경은99%에해당하는Link Failure의경우두개의LSPs에대해SPF를계산하면되는데, 이두개의LSPs는매우작은시갂윈도우내에라우터에도착핛것이고따라서핚번또는두번정도SPF를계산하면끝난다. 이정도는해주자.
그러나1%에해당하는노드장애의경우LSP가많이발생되는데(Adjacency Router 수만큼) 이경우시갂차를좀가지고라우터에LSP들이도착핛것이므로이때는아예5초후에하여Self protection핚다.
Cisco IOS Exponential Interval BehaviorJuniper (3x short, after that long) Hold-down Behavior: Two Mode, Fast and SlowCisco SPF Interval vs. Juniper SPF Delay

48
SPF Delay and Hold Time (cont)
Definition of SPF Delay and Hold TimeR1(A)
R2(A)
R1(B)
10R2(B)
New LSASPF Hold Timer1T: 0sSchedule SPF Calculation with SPF Delay(5s)
R1(A)
R2(A)
R1(B)
R2(B)
3T: 2s2R1(A)
R2(A)
R1(B)
R2(B)T: 5sStart SPF Calculation withSchedule SPF Calculation with SPF Hold(10s)
10R1(A)
R2(A)
R1(B)
R2(B)T: 9s665Schedule SPF Calculation with SPF Hold Timer(6s)
R1(A)
R2(A)
R1(B)
R2(B)T: 12s387R1(A)
R2(A)
R1(B)
R2(B)T: 15s0321Start SPF Calculation with10R1(A)
R2(A)
R1(B)
R2(B)T: 21s4R1(A)
R2(A)
R1(B)
R2(B)T: 25s0SPF Hold Timer expiredR1(A)
R2(A)
R1(B)
R2(B)
9T: 27sSchedule SPF Calculation with SPF Delay(5s)
8765Schedule SPF Calculation with SPF Hold(10s)

49
SPF Delay and Hold Time (cont)
In case of different SPF delay time on each nodeR1(A)
R2(A)
R1(B)
R2(B)
3264R1(C)
93Original Traffic Flow to 10.1.1.0/24 from R1(A)Original Traffic Flow to 10.1.1.0/24 from R2(A)
Original SPF Tree of R1(A) and R2(A)
R1(A)
R2(A)
R1(B)
R2(B)
3264R1(C)
93R1(A)
R2(A)
R1(B)
R2(B)
3264R1(C)
93SPF delay time 500msSPF delay time 5000ms (5s)
R1(A)
R2(A)
R1(B)
R2(B) (LSA Originator)
3264R1(C)
3910.1.1.0/24R1(A)R1(B)
3264R1(C)
3910.1.1.0/24R1(A)
R2(A)
R1(B)
R2(B) (LSA Originator)
3264R1(C)
3910.1.1.0/24

50
SPF Delay and Hold Time (cont)
Link Failure between R2(B) and R1(C)
T: 50 msR1(A)
R2(A)
R1(B)
R2(B) (LSA Originator)
113264R1(C)
39R1(A)
R2(A)
R1(B)
R2(B) (LSA Originator)
T: 100 ms113264R1(C)
39T: 550 msR1(A)
R2(A)
R1(B)
R2(B) (LSA Originator)
3264R1(C)
9T: 600 msSPF Calculation of R2(A)
FIB Update through FloodingFIB Update of R2(A)
R1(A)
R2(A)
R1(B)
R2(B) (LSA Originator)
3264R1(C)
3910.1.1.0/24R1(A)
R2(A)
R1(B)
R2(B) (LSA Originator)
3264R1(C)
910.1.1.0/24Link Failure OccurredR1(A)
R2(A)
R1(B)
R2(B)
3264R1(C)
93R1(A)
R2(A)
R1(B)
R2(B)
3264R1(C)
93

51
SPF Delay and Hold Time (cont)
R1(A) SPF CalculationT: 5100 msT: 5200 msR1(A)
R2(A)
R1(B)
R2(B)
3264R1(C)
9R1(A)
R2(A)
R1(B)
R2(B) (LSA Originator)
3264R1(C)
910.1.1.0/24FIB Update of R1(A)
T: 700 msR1(A)
R2(A)
R1(B)
R2(B) (LSA Originator)
3264R1(C)
3910.1.1.0/24Temporary Loop occurred here!
R1(A) SPF Calculation and FIB UpdateTraffic LossTotal Traffic Loss due to different SPF DelayT: 600 ms ~ 5200msR1(A)
R2(A)
R1(B)
R2(B) (LSA Originator)
3264R1(C)
3910.1.1.0/24Traffic was lost during 4600ms!
R1(A)
R2(A)
R1(B)
R2(B) (LSA Originator)
3264R1(C)
3910.1.1.0/24R1(A)R1(B)
3264R1(C)
3910.1.1.0/24R1(A)
R2(A)
R1(B)
R2(B)
3264R1(C)
93R1(A)
R2(A)
R1(B)
R2(B) (LSA
Originator)
3264R1(C)
9SPF Delay is applied when local interface is changed to down.

52
Graceful Restart
OSPF Graceful Restart (RFC 3623)
R1(B)R1(C)R1(D)
AGG-R1(A)AGG-R1(B)
Grace LSA (Link Local Opaque LSA)
Graceful Restart Reason0 Unknown 1 Software Restart2 Software Reload/Upgrade 3 Switch to redundant Control ProcessorRestarting RouterRouter in Helper ModeGrace LSAGrace Period 동앆AGG-R1(B)와의Adjacency가있는것처럼LSDB를유지하고, Advertising을함Graceful Restarting을핚다는것을알리기위해Grace LSA를모든Neighbor들에게젂송함Helper Mode에있는Router들은Restarting Router와다시Adjacency를맺고Restarting Router에게Pre-restart LSA들을젂송함.
Pre-restart LSAPre-restart Router LSAPre-restart Network LSAFIB를유지핚채Restarting을시작함Graceful Restart 완료젂Graceful Period가Expire되거나Network Topology 변화가있으면, Graceful Restart는실패Helper Router들로부터받은Rouer LSA, Network LSA를바탕으로LSDB를구축함. Grace Period앆에완료해야함Grace PeriodGrace PeriodGrace PeriodGrace LSA Flush를받으면, 성공적으로완료핚것임Grace Period가Expire되면Graceful Restart는종료된것임Restarting Router는Router LSA, Network LSA를다시Originate하고, Grace LSA를flushing함LSAReoriginate Router LSAReoriginate Network LSAGrace LSAFlush Grace LSAR1(B)R1(C)R1(D)
AGG-R1(A)AGG-R1(B)
AGG-R1(A)AGG-R1(B)AGG-R1(A)AGG-R1(B)
R1(B)R1(C)R1(D)R1(B)R1(C)R1(D)

53
Sample Network Diagram (I)
ASBR Summary LSAABR Summary LSAExternal LSANetwork LSARouter LSABarrierSummary of LSAsBackbone Area 0Area 1Area 2ABR 1ABR 2R1(A)
R2(A)
(ASBR)
BGPCost=10R1(B)R2(B)
External LSARouter LSANetwork LSAABR Summary LSAASBR Summary LSASPF Calculation RangeSPF Calculation RangeSPF Calculation RangeDistance Vector AlgorithmExchange between ABRs

54
Sample Network Diagram (II)
AS300eBGPiBGPConnectedBRABRABRASBRNRRRType 2 .Network LSARRType 1 .Router LSANNNNNNNNEach R .
All Rs in the same areaEach DR .
All Rs in the same areaABR .
All Rs in an areaABR .
All Rs in an areaASBR.
All Rs in OSPF DomainArea
Area 0(Backbone)
Area 1Area 2InternetType 3 .Summary LSAABR
SubnetType 5 .External LSAASBR
ExternalPrefixABRcostType 4 .ASBR Summary LSAASBRASBR Summary LSAABR Summary LSAExternal LSANetwork LSARouter LSABarrierStatic Route
R1(DR of N1)
R3R4R5R8R6R7R9R12R13Connected Route
BRRIPASBRR2R10R11

55
Appendix

56
Appendix 1. Routing Calculation (SPF)
R1(D)R1(A)R1(B)
R2(A)
R1(C)
R2(B)
593710163R1(D)R1(A)R1(B)
R2(A)
R1(C)
R2(B)
593710163R1(D)R1(A)R1(B)
R2(A)
R1(C)
R2(B)
593710163R1(D)R1(A)R1(B)
R2(A)
R1(C)
R2(B)
593710163R1(A)R1(B)
R2(A)R2(B)
593710163R1(C)R1(D)
R1(A)R1(B)
R2(A)R2(B)
593710163R1(C)R1(D)

57
Appendix 2. OSPF Packet Format (Hello, DD)
OSPF VerOSPF pkt typeOSPF LengthSource OSPF Router IDOSPF Area IDPacket checksumAuthentication TypeAuthentication DataHello PacketBodyVer/Hdr LenTOSIP datagram lengthFragmentationTTLProtocolHeader ChecksumSource IP AddressDestination IP AddressOSPF HeaderOSPF Hello PacketNetwork MaskHello IntervalOptionsRouter PriorityRouter Dead IntervalDesignated RouterBackup DesignatedRouter1stNeighbor IDIP HeaderOSPF VerOSPF pkt typeOSPF LengthSource OSPF Router IDOSPF Area IDPacket checksumAuthentication TypeAuthentication DataVer/Hdr LenTOSIP datagram lengthFragmentationTTLProtocolHeader ChecksumSource IP AddressDestination IP AddressOSPF Database Description PacketInterface MTUOptions00000I MMSDD Sequence NumberLSA Header 1LSA Header 2…
LSA Header NLS AgeOptionsLS TypeLink State ID(Router ID)
Advertising RouterLS Sequence NumberLS ChecksumLengthLSA Header

58
Appendix 3. OSPF LSA Packet Format
LS AgeOptionsLS TypeLink State ID(Router ID)
Advertising RouterLS Sequence NumberLS ChecksumLengthRouter Type0# linksLink IDLink DataLink Type# TOS MetricsMetricRouter LSALS AgeOptionsLS TypeLink State ID(Designated Router)
Advertising RouterLS Sequence NumberLS ChecksumLengthNetwork MaskAttached Router #1Attached Router #2Attached Router #3Network LSALS AgeOptionsLS TypeLink State ID(Summarized Network)
Advertising RouterLS Sequence NumberLS ChecksumLengthNetwork MaskTOSMetricSummary LSAAS External LSALS AgeOptionsLS TypeLink State ID(External Prefix)
Advertising RouterLS Sequence NumberLS ChecksumLengthNetwork MaskETOSMetricForwarding Address(RFC 2328 .2.3)
External Route TagASBR Summary LSALS AgeOptionsLS TypeLink State ID(ASBR’s Router ID)
Advertising RouterLS Sequence NumberLS ChecksumLengthNetwork Mask(Not Used)
TOSMetricType 7 External LSALS AgeOptionsLS TypeLink State ID(External Prefix)
Advertising RouterLS Sequence NumberLS ChecksumLengthNetwork MaskETOSMetricForwarding AddressExternal Route TagDCEAN/PMCETOSPF Option FieldDemand CircuitExternal AttributeNSSA areasMOSPFStub areasTOS based routing(currently not used)
E bit 0=type 1 (as if ospf metric)
E bit 1=type 2 (as if as path length)
Forwarding address .reducing extra
hop when using External LSAE bit 0=type 1 (as if ospf metric)
E bit 1=type 2 (as if as path length)

59
Appendix 4. Forwarding Address
.Forwarding address is used for reducing external hop countPurpose of Forwarding AddressOSPF DomainR1 (ASBR)
10.1.1.2/24Redistribute RIP routes into OSPF DomainRIP DomainR210.1.1.1/2410.1.1.3/24R100R3R4200.1.1.0/24LS AgeOptionsLS TypeLink State ID=200.1.1.0Advertising RouterLS Sequence NumberLS ChecksumLengthNetwork Mask=255.255.255.0ETOSMetricForwarding Address
=0.0.0.0External Route TagLS AgeOptionsLS TypeLink State ID=200.1.1.0Advertising RouterLS Sequence NumberLS ChecksumLengthNetwork Mask=255.255.255.0ETOSMetricForwarding Address
=10.1.1.3External Route Tag.When can ASBR use non-zero forwarding address?
In case of using Forwarding AddressR1 (ASBR)10.1.1.1/241.OSPF should be enabled on the interface which is ASBR’s next hop.
2.No passive interface, no point to point, no point to multipoint-It means there’s another ospf router on the subnetexcept the next hop.
ASBR’s interface toward the next hopWhen ospf is not enabledon ASBR’s interface to the nexthopWhen ospf is enabledon ASBR’s interface to the nexthop

60
Appendix 5. Virtual Link
Backbone Area (0.0.0.0)
Area 2ABR 1.Every ABR should be connected to Backbone Area.
.Because ABR summary and ASBR summary LSAs are synchronized through Backbone areathat is called Transit Area.
.Virtual Links can be configured between any two backbone routers that have an interface to a common non-
backbone area.
Area 1ABR 2ABR 3Area 0Area 3Virtual LinkABR 4Area 4Virtual Link Can not be configuredbecause ABR2 and ABR4 both don’t have an interface to a common
non-backbone area.
Definition of Virtual Link

61
Appendix 6. The order of installing routes
In OSPF network,
Preference is like this :
Intra-area > Inter-area > E1(N1) > E2(N2)
Type of Routing ProtocolAdministrative DistanceDirectly Connected0Static with Local Interfacce0Static with NextHop IP Address1EIGRP summary route5External BGP20Internal EIGRP90OSPF110IS-IS115RIP120External EIGRP170Internal BGP200E1 metric is the same unit of ospf metricE2 metric is very larger unit than E1 metric.
OSPF Backbone Area (0.0.0.0)
Area 1Area 2StubArea 4Area 3ABRABRABRABRASBR1ASBR2BGPRIPASBR Summary LSAABR Summary LSAExternal LSA10.1.1.0/2410.1.1.0/24IP Destination = 10.1.1.0/24 because Area1 has
the highest priority (Inter-area)
Ra
10.1.2.0Administrative Distance※Above Table shows us Cisco proprietary Administrative distances.

62
Appendix 7. LSA Description
Router LSARFC2328-12.4.1Network LSASummary LSARFC2328-12.4.3RFC2328-12.4.2

63
Appendix 7. LSA Description (cont)
External LSARFC2328-12.4.4

64
References
.John T.Moy, OSPF anatomy of an Internet Routing Protocol
.Jeff Doyle, OSPF and IS-IS
.Thomas M, OSPF Network Design Solutions
.J. Moy, RFC 2328 OSPF Version 2
.Coltun, R., RFC3101 The OSPF Not-So-Stubby Area (NSSA) Option
.RFC 3623 OSPF Graceful Restart

65
End of Document

 

 

     
         
     

 

     
     

넷매니아즈 회원 가입 하기

2023년 6월 현재 넷매니아즈 회원은 55,000+분입니다.

 

넷매니아즈 회원 가입을 하시면,

► 넷매니아즈 신규 컨텐츠 발행 소식 등의 정보를

   이메일 뉴스레터로 발송해드립니다.

► 넷매니아즈의 모든 컨텐츠를 pdf 파일로 다운로드

   받으실 수 있습니다. 

     
     

 

     
         
     

 

 

비밀번호 확인
코멘트 작성시 등록하신 비밀번호를 입력하여주세요.
비밀번호