HC120115001 OSPF Intra-Area Routing

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

OSPF Intra-Area Routing

Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.


Foreword
 This topic is about how OSPF calculates intra-area routes, including how to
use Router-LSAs and Network-LSAs to describe topologies and routes, and
how to build a shortest path tree (SPT).

age 2 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Objectives
 Upon completion of this section, you will be able to:
 Be familiar with the Router-LSA contents and functions
 Be familiar with the Network-LSA contents and functions
 Understand the shortest path first (SPF) algorithm

age 3 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. Router-LSA
2. Network-LSA
3. SPF Calculation

age 4 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
A Router-LSA Describing a Point-to-Point Interface

RID 1.1.1.1 RID 3.3.3.3

10.1.13.0/24
RTA RTC

<RTA>display ospf lsdb router self-originate

Type : Router //LSA type


Ls id : 1.1.1.1 //Link state ID
Adv rtr : 1.1.1.1 //ID of the router that generates the LSA

* Link ID: 3.3.3.3 //ID of the neighbor router


Topology Data : 10.1.13.1 //IP address of the router interface that advertises the LSA
Link Type: P-2-P
information
Metric : 48
* Link ID: 10.1.13.0 //IP address of this stub network
Data : 255.255.255.0 //Subnet mask of this stub network
Link Type: StubNet
Routing
Metric : 48 //Cost value
information
Priority : Low

age 5 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
A Router-LSA Describing a Broadcast or an NBMA
Interface
RID 2.2.2.2
RTB

DR
10.1.235.0/24
RID 3.3.3.3 RID 4.4.4.4

RTC RTE

<RTC>display ospf lsdb router self-originate

Type : Router //LSA type


Ls id : 3.3.3.3 //Link state ID
Adv rtr : 3.3.3.3 //ID of the router that generates the LSA

* Link ID: 10.1.235.2 //Interface IP address of a designated router


Topology Data : 10.1.235.3 //IP address of the router interface that advertises the LSA
information Link Type: TransNet
Metric : 1

 Question: Where is the network ID or subnet mask?


age 7 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. Router-LSA
2. Network-LSA
3. SPF Calculation

age 8 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
A Network-LSA Describing a Broadcast or
an NBMA Network

<RTB>display ospf lsdb network self-originate

OSPF Process 1 with Router ID 2.2.2.2


Area: 0.0.0.0
Link State Database

Type : Network //LSA type


Ls id : 10.1.235.2 //Interface IP address of the DR
Adv rtr : 2.2.2.2 //Router ID of the DR
Topology and Net mask : 255.255.255.0 //Subnet mask
routing Priority : Low
information Attached Router 2.2.2.2 //A list of routers connected to this
network
Attached Router 3.3.3.3
Attached Router 5.5.5.5

age 9 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
LSDB in an OSPF Area
RTA RTB
10.1.12.0/24

10.1.24.0/24

10.1.13.0/24

10.1.235.0/24 RTD
10.1.45.0/24

RTC RTE
<RTA>display ospf lsdb

OSPF Process 1 with Router ID 1.1.1.1


Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 4.4.4.4 4.4.4.4 1436 72 80000007 48
Router 2.2.2.2 2.2.2.2 1305 72 80000019 1
Router 1.1.1.1 1.1.1.1 1304 60 80000007 1
Router 5.5.5.5 5.5.5.5 1326 60 80000017 1
Router 3.3.3.3 3.3.3.3 1325 60 8000000F 1
Network 10.1.235.2 2.2.2.2 1326 36 80000004 0
Network 10.1.12.2 2.2.2.2 1305 32 80000001 0

age 10 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. Router-LSA
2. Network-LSA
3. SPF Calculation

age 11 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
SPF Algorithm
 Phase 1: Create a shortest path tre
e (SPT).
 Create an SPT on the basis of topol
ogy information in Router-LSAs an
d Network-LSAs.
 Phase 2: Calculate an optimal route
.
 Calculate an optimal route on the b
asis of the SPT and the routing info
rmation in Router-LSAs and Networ
k-LSAs.
age 12 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Creating an SPT (1)
<RTA>display ospf lsdb router self-
originate
Total Cost
Parent
Candidate for
Type : Router Node
Candidate
Ls id : 1.1.1.1
Adv rtr : 1.1.1.1 10.1.12.2 1 1.1.1.1
* Link ID: 10.1.12.2 3.3.3.3 48 1.1.1.1
Data : 10.1.12.1
Link Type: TransNet
Metric : 1
* Link ID: 3.3.3.3
Data : 10.1.13.1 1.1.1.1 RTA
Link Type: P-2-P 1
Metric : 48
* Link ID: 10.1.13.0
Data : 255.255.255.0
Link Type: StubNet DR :
Metric : 48 10.1.12.2
Priority : Low

age 13 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Creating an SPT (2)

<RTA>display ospf lsdb network 10.1.12.2 Total Cost


Parent
Candidate for
Node
Type : Network Candidate
Ls id : 10.1.12.2
3.3.3.3 48 1.1.1.1
Adv rtr : 2.2.2.2
2.2.2.2 1+0 10.1.12.2
Net mask : 255.255.255.0
Priority : Low
Attached Router 2.2.2.2 RTA
1.1.1.1
Attached Router 1.1.1.1
1

DR :
10.1.12.2 0

2.2.2.2 RTB

age 14 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Creating an SPT (3)
<RTA>display ospf lsdb router 2.2.2.2
Total Cost
Parent
Candidate for
Type : Router Candidate
Node
Ls id : 2.2.2.2
Adv rtr : 2.2.2.2 3.3.3.3 48 1.1.1.1
* Link ID: 10.1.12.2
10.1.235.2 1+0+1 2.2.2.2
Data : 10.1.12.2
Link Type: TransNet 4.4.4.4 1 + 0 + 48 2.2.2.2
Metric : 1
* Link ID: 10.1.235.2
Data : 10.1.235.2
Link Type: TransNet 1.1.1.1 RTA
Metric : 1 1
* Link ID: 4.4.4.4
Data : 10.1.24.2 DR :
Link Type: P-2-P 10.1.12.2 0
Metric : 48
* Link ID: 10.1.24.0 2.2.2.2 RTB
Data : 255.255.255.0 1
Link Type: StubNet
Metric : 48
DR :
Priority : Low
10.1.235.2

age 15 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Creating an SPT (4)
Total Cost for Parent
Candidate
Candidate Node
3.3.3.3 48 1.1.1.1

<RTA>display ospf lsdb network 4.4.4.4 1 + 48 2.2.2.2


10.1.235.2 3.3.3.3 1+0+1+0 10.1.235.2
5.5.5.5 1+0+1+0 10.1.235.2
Type : Network
Ls id : 10.1.235.2
Adv rtr : 2.2.2.2 RTA
1.1.1.1
1
Net mask : 255.255.255.0
Priority : Low
Attached Router 2.2.2.2 DR : 10.1.12.2
0
Attached Router 3.3.3.3
Attached Router 5.5.5.5 RTB
2.2.2.2
1

DR :
10.1.235.2 0 0

3.3.3.3 5.5.5.5

age 16 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Creating an SPT (5)

Total Cost for Parent


<RTA>display ospf lsdb router 3.3.3.3 Candidate
Candidate Node

Type : Router 4.4.4.4 1 + 48 2.2.2.2


Ls id : 3.3.3.3
Adv rtr : 3.3.3.3 1.1.1.1 RTA
* Link ID: 10.1.235.2 1
Data : 10.1.235.3
Link Type: TransNet
DR : 10.1.12.2
Metric : 1
0
* Link ID: 1.1.1.1
Data : 10.1.13.3 2.2.2.2 RTB
Link Type: P-2-P 1
Metric : 48
* Link ID: 10.1.13.0
Data : 255.255.255.0 DR :
10.1.235.2 0 0
Link Type: StubNet
Metric : 48
3.3.3.3 5.5.5.5
Priority : Low

age 17 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Creating an SPT (6)

<RTA>display ospf lsdb router 5.5.5.5 Candidate


Total Cost for Parent
Candidate Node
Type : Router 4.4.4.4 1 + 48 2.2.2.2
Ls id : 5.5.5.5
1+0+1+0+
Adv rtr : 5.5.5.5 4.4.4.4 5.5.5.5
48
* Link ID: 10.1.235.2
Data : 10.1.235.5 1.1.1.1 RTA
Link Type: TransNet 1
Metric : 1
* Link ID: 4.4.4.4 DR :
Data : 10.1.45.5 10.1.12.2 0
Link Type: P-2-P
Metric : 48 2.2.2.2 RTB
* Link ID: 10.1.45.0 1 48
Data : 255.255.255.0
Link Type: StubNet DR :
Metric : 48 10.1.235.2 0 0
Priority : Low 4.4.4.4
3.3.3.3 5.5.5.5

age 18 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Optimal Route Calculation
 Picks up the routing information from LSAs of all nodes in the SPT.
 Starts with the root in the same sequence as they were added to the SPT.
* Link ID: 10.1.13.0
Data : 255.255.255.0
Link Type: StubNet
① Metric : 48
RTA Priority : Low

1.1.1.1 Type : Network


1 Ls id : 10.1.12.2
Adv rtr : 2.2.2.2
Type : Network ② Net mask : 255.255.255.0
Ls id : 10.1.235.2 DR : 10.1.12.2
Adv rtr : 2.2.2.2 0
Net mask : 255.255.255.0 RTB * Link ID: 10.1.24.0
③ Data : 255.255.255.0
2.2.2.2 Link Type: StubNet
④ 1 48 Metric : 48
Priority : Low

DR : 4.4.4.4
0 0 * Link ID: 10.1.45.0
10.1.235.2 ⑤ Data : 255.255.255.0
Link Type: StubNet
3.3.3.3 5.5.5.5 Metric : 48
Priority : Low

age 19 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Viewing the OSPF Routing Table
<RTA>display ospf routing

OSPF Process 1 with Router ID 1.1.1.1


Routing Tables

Routing for Network


Destination Cost Type NextHop AdvRoute Area
10.1.12.0/24 1 Transit 10.1.12.1 1.1.1.1 0.0.0.0
10.1.13.0/24 48 Stub 10.1.13.1 1.1.1.1 0.0.0.0
10.1.24.0/24 49 Stub 10.1.12.2 2.2.2.2 0.0.0.0
10.1.45.0/24 50 Stub 10.1.12.2 5.5.5.5 0.0.0.0
10.1.235.0/24 2 Transit 10.1.12.2 2.2.2.2 0.0.0.0

Total Nets: 5
Intra Area: 5 Inter Area: 0 ASE: 0 NSSA: 0

age 20 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Example for Configuring a Single Area OSP
F Network
ospf 1 router-id 1.1.1.1 ospf 1 router-id 2.2.2.2
area 0 area 0
network 10.1.12.0 0.0.0.255 network 10.1.12.0 0.0.0.255
network 10.1.13.0 0.0.0.255 network 10.1.24.0 0.0.0.255
network 10.1.235.0 0.0.0.255
RTA RTB
10.1.12.0/24

10.1.24.0/24

10.1.13.0/24

10.1.235.0/24 RTD ospf 1 router-id 4.4.4.4


10.1.45.0/24 area 0
network 10.1.24.0 0.0.0.255
network 10.1.45.0 0.0.0.255
RTC RTE
ospf 1 router-id 3.3.3.3
area 0 ospf 1 router-id 5.5.5.5
network 10.1.13.0 0.0.0.255 area 0
network 10.1.235.0 0.0.0.255 network 10.1.45.0 0.0.0.255
network 10.1.235.0 0.0.0.255

age 21 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Viewing OSPF Neighbor Status

<RTA>display ospf peer brief

OSPF Process 1 with Router ID 1.1.1.1


Peer Statistic Information
------------------------------------------------------------------------------------------------------------
Area Id Interface Neighbor id State
0.0.0.0 GigabitEthernet0/0/0 2.2.2.2 Full
0.0.0.0 Serial1/0/0 3.3.3.3 Full
------------------------------------------------------------------------------------------------------------

age 22 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Quiz
1. What types of links can be described by a Router-LSA?
2. Will an OSPF-derived route be certainly installed into a router's routing table?

age 23 Copyright © 2019 Huawei Technologies Co., Ltd. All rights reserved.
Thank You
www.huawei.com

You might also like