Professional Documents
Culture Documents
NE Series Routers
www.huawei.com
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page1
Objectives
Upon completion of this course, you will be able to:
Describe the meanings and functions of OSPF configuration
parameters
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page2
Contents
1. OSPF Overview
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page3
Contents
1. OSPF Overview
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page4
Basic Characteristics of OSPF
Supporting Classless Inter-Domain Routing (CIDR)
Fast convergence
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page5
Route Calculation Using the Link State
Algorithm
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page6
Self-Test Question About OSPF Overview
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page7
Contents
1. OSPF Overview
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page8
AS (Autonomous System)
In OSPF, an AS refers to a group of routers that exchange
routing information by running the same routing protocol.
OSPF
In this example, all the routers run OSPF and belong to the
same AS.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page9
Router ID
A router ID is a 32-bit integer that uniquely identifies an
OSPF router in an AS. The format of a router ID is the same
as that of an IP address.
[~HUAWEI]router id 1.1.1.1
[~HUAWEI]commit
[~HUAWEI]display router id
RouterID:1.1.1.1
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page12
OSPF Area (1/2)
Area 1
Area 4
Area 0 is Backbone area ,
for ABR at least one Area 0
interface belongs to Area
0.
Area 2
Area 3
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page13
OSPF Area (2/2)
Area 1
Area 4
Area 0
Area 2
Area 3
[~HUAWEI]ospf
[~HUAWEI-ospf-1]area 2
[~HUAWEI-ospf-1-area-0.0.0.2]network 12.1.1.0 0.0.0.3
[~HUAWEI-ospf-1-area-0.0.0.2]commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page14
OSPF Router Roles
BR
ASBR
Area 1
Area 2
ABR ABR
IR
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page15
Self-Test Questions About OSPF Basic
Concepts
1. In the OSPF routing domain, ( ) uniquely identifies an
OSPF router.
A. Area ID
B. AS ID
C. Router ID
D. Cost
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page16
Self-Test Questions About OSPF Basic
Concepts
2.Which of the following statements about the backbone area
are true in an OSPF network? ( )
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page17
Self-Test Questions About OSPF Basic
Concepts
3. In the OSPF routing domain, the router importing external
routes is called ( ).
A. ABR
B. BR
C. ASBR
D. IR
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page18
Contents
1. OSPF Overview
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page19
Contents
3. OSPF Route Calculation
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page20
OSPF Packet Types
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page21
OSPF Packet Header Authentication-
Interface Authentication
Configure simple password
"huawei"
Area 1
Loopback0 E0/0 E0/0 Loopback0
1.1.1.1/32 2.2.2.2/32
RTA RTB
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page22
OSPF Packet Header Authentication-
Area Authentication
Configure simple password
"huawei"
Area 1
Loopback0 E0/0 E0/0 Loopback0
1.1.1.1/32 2.2.2.2/32
RTA RTB
[~RTA-ospf-1-area-0.0.0.1]authentication-mode
simple plain huawei
[~RTA-ospf-1-area-0.0.0.1]commit
[~RTB-ospf-1-area-0.0.0.1]authentication-mode
simple plain huawei
[~RTB-ospf-1-area-0.0.0.1]commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page23
Contents
3. OSPF Route Calculation
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page24
What Is Neighbor? What Is Adjacency?
I have 3
neighbors
RTA
10.1.1.1
10.1.1.2
Ethernet
10.1.1.3 10.1.1.4
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page25
What Are the OSPF Network Types?-P2P
and Broadcast
Broadcast Network
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page26
What Are the OSPF Network Types?-
NBMA
VPI/VCI=0/102 VPI/VCI=0/103
10.1.1.1
Full meshed
ATM network
ATM
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page27
What Are the OSPF Network Types?-
P2MP
10.1.1.1
Non-full meshed frame
relay network
FR
Point-to-MultiPoint
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page28
Default Network Types Corresponding to
Common Link Layer Protocols
Broadcast Ethernet
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page29
DR and BDR
RTA
10.1.1.1 10.1.1.2
Ethernet
10.1.1.3 10.1.1.4
BDR DR
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page30
DR Election and BDR Election
Instead of being manually specified, the DR and BDR are
elected among all the routers on the local network segment.
The DR priority of a router interface determines the eligibility
of the interface in the DR election and BDR election.
10.1.1.3
120
90 10.1.1.2
Ethernet 100
10.1.1.1
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page31
DR Election and BDR Election
DR election and BDR election takes time and affects the speed of OSPF
route convergence. During the actual OSPF application, the broadcast
network and NBMA network types are often changed to the P2P type to
prevent the election of the DR or BDR. The following command is used to
change the network type of an OSPF network interface:
[~RTB-Ethernet0/0] ospf network-type p2p
[~RTB-Ethernet0/0] commit
The following figure describes whether adjacencies are established with
neighbors for different network types:
Network Type Establish Adjacency with Neighbor or not
Point-to-Point Neighbors always become adjacent
Point-to-MultiPoint Neighbors always become adjacent
DR is always adjacent to all the other routers including BDR;
Broadcast BDR is always adjacent to all the other routers including DR;
NBMA Routers whose interface state is DROther is adjacent to only
DR and BDR.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page32
Establishment of Neighbor Relationship (1/3)
Neighbor relationship establishment on a
broadcast network:
Router id
Router id 2.2.2.2
1.1.1.1
RTA RTB
Down Down
1 Hello (one-way)
Init
2 Hello (two-way)
Two-way
3 Hello (two-way)
Two-way
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page33
Establishment of Neighbor Relationship (2/3)
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page34
Establishment of Neighbor Relationship (3/3)
Neighbor relationship establishment on a P2P network:
Router id
Router id 2.2.2.2
1.1.1.1
RTA RTB
Down Down
1 Hello
Init
2 Hello
Init
No DR or BDR needs to be elected on a P2P link, P2MP
link, or virtual link.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page35
Contents
3. OSPF Route Calculation
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page36
Adjacency Establishment Process
(1/2)
Router id Router id Master
1.1.1.1 2.2.2.2
Adjacency relationship
RTA RTB
1 DD, Seq=552A, I, M, MS
ExStart
2 DD, Seq=5528, I, M, MS
ExStart Exchange ExStart
3 DD, Seq=5528
Exchange ExStart Exchange
4 DD, Seq=5529, MS
Exchange Exchange
5 DD, Seq=5529
Exchange Exchange Full
Exchange Loading
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page37
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page38
Adjacency Establishment Process
(2/2)
Router id Router id
1.1.1.1 2.2.2.2
Adjacency relationship
RTA RTB
7 LS Request
Loading Full
8 LS Update
Loading Full Full
9 LS Ack
Full Full
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page39
Check Neighbor State of OSPF
Router
<RTA>display ospf peer
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page40
LSDB Synchronization
Synchronized LSDBs are the basis for proper OSPF route
calculation. When an adjacency is established, an OSPF router
completes the LSDB synchronization with the adjacent router.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page41
Contents
3. OSPF Route Calculation
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page42
What Is An LSA?
LSA Type LSA Name LSA Description
Generated by each router. Describing the collected states of the
1 Router-LSA router’s interfaces, flooded only within the area where this LSA is
generated.
ASBR
- Generated by ABR. Describing routes to ASBRs, flooded within the
4
Summary-LSA area where this LSA is generated.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page43
Intra-Area Route Calculation
Area 1
Router-LSA Network-LSA
DR
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page44
Inter-Area Route Calculation
Area 1
Area 0
N1
ABR
Router-LSA Network-Summary-LSA
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page45
External Route Calculation (1/2)
Area 1
Area 0
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page46
External Route Calculation (2/2)
RTB
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page47
Route Calculation in Special Areas-Stub
Area (1/3)
Area 0
Flood AS-external LSA
Area 1
RTB
Area 2
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page48
Route Calculation in Special Areas-Stub
Area (2/3)
Area 1 Area 0
RTA RTB RTC RTD
10.1.1.0/30 10.2.1.0/30 10.3.1.0/30
.1 .2 .1 .2 .1 .2
Stub Area
Loopback0
10.4.1.1/24
Configure a static to
10.4.1.0/24 on RTC and
import it to OSPF
[~RTA-ospf-1-area-0.0.0.1] stub
[~RTA-ospf-1-area-0.0.0.1] commit
[~RTB-ospf-1-area-0.0.0.1] stub
[~RTB-ospf-1-area-0.0.0.1] commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page49
Route Calculation in Special Areas-Stub
Area (3/3)
<RTA>display ospf lsdb
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 2.2.2.2 2.2.2.2 165 36 80000004 1
Router 1.1.1.1 1.1.1.1 165 36 80000003 1
Network 10.1.1.2 2.2.2.2 166 32 80000001 0
Sum-Net 0.0.0.0 2.2.2.2 228 28 80000001 1
Sum-Net 10.2.1.0 2.2.2.2 228 28 80000001 1
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page50
Route Calculation in Special Areas-Total
Stub Area (1/2)
Area 1 Area 0
RTA RTB RTC RTD
10.1.1.0/30 10.2.1.0/30 10.3.1.0/30
.1 .2 .1 .2 .1 .2
Stub Area
Loopback0
10.4.1.1/24
Configure a static to
10.4.1.0/24 on RTC and
import it to OSPF
[~RTA-ospf-1-area-0.0.0.1] stub
[~RTA-ospf-1-area-0.0.0.1] commit
[~RTB-ospf-1-area-0.0.0.1] stub no-summary
[~RTB-ospf-1-area-0.0.0.1] commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page51
Route Calculation in Special Areas-Total
Stub Area (2/2)
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 2.2.2.2 2.2.2.2 10 36 80000008 1
Router 1.1.1.1 1.1.1.1 10 36 80000008 1
Network 10.1.1.1 1.1.1.1 14 32 80000001 0
Sum-Net 0.0.0.0 2.2.2.2 550 28 80000001 1
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page52
Route Calculation in Special Areas- Not
So Stubby Area (NSSA)
Transform type 7
LSA into type 5 Configure the static
LSA route to10.4.1.0/24
Area 1
Area 0
NSSA
RTA RTC RTD
10.1.1.0/24 10.2.1.0/24 10.3.1.0/24
.1 .2 .1 .2 .1 .2
RTB
Loopback0
10.4.1.1/24
[~RTB-ospf-1-area-0.0.0.1] nssa
[~RTB-ospf-1-area-0.0.0.1] commit
[~RTC-ospf-1-area-0.0.0.1] nssa
[~RTC-ospf-1-area-0.0.0.1] commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page53
OSPF Route Aggregation-Route
Aggregation on ABR
19.1.1.0/24
RouterB 19.1.2.0/24
19.1.0.0/16 19.1.3.0/24
ABR ABR
….
Area 19
[~RouterA-ospf-1-area-0.0.0.19]abr-summary
19.1.0.0 255.255.0.0
[~RouterA-ospf-1-area-0.0.0.19]commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page54
OSPF Route Aggregation-Route
Aggregation on ASBR
19.1.1.0/24
RouterB 19.1.2.0/24
19.1.0.0/16 19.1.3.0/24
ABR ABR
….
19.1.0.0/1
ASBR Area 19
6
[~RouterB-ospf-1]asbr-summary 19.1.0.0
255.255.0.0
[~RouterB-ospf-1]commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page55
Self-Test Questions About OSPF Route
Calculation
1. Which of the following OSPF protocol packets contains
detailed information about the router link state? ( )
A. LSR
B. LSU
C. Router LSA
D. AS-External LSA
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page56
Self-Test Questions About OSPF Route
Calculation
2. Which of the following two routers can establish adjacency
relationships? ( )
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page57
Self-Test Questions About OSPF Route
Calculation
3. ( ) indicates a stable neighbor relationship and ( )
indicates a stable adjacency relationship after neighbor and
adjacency relationships are established and the LSDB is
synchronized.
A. Exchange
B. Full
C. 2-Way
D. Init
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page58
Self-Test Questions About OSPF Route
Calculation
4. OSPF calculates routes in an area based on ( ), calculates
routes between different areas based on ( ), and calculates
routes outside an area based on ( ).
A. Type 1 LSA
B. Type 2 LSA
C. Type 3 LSA
D. Type 4 LSA
E. Type 5 LSA
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page59
Contents
1. OSPF Overview
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page60
Typical Scenario of OSPF Application on
MAN
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page61
Configuration Example-Topology
Description
LO: 1.1.1.1/32 10.1.1.0/30 LO: 2.2.2.2/32
CR1 CR2
Area0
Area1 Area2
AR1 AR2
LO: 3.3.3.3/32 LO: 4.4.4.4/32
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page63
OSPF Basic Configuration-Configuration on
CR1
LO: 1.1.1.1/32 10.1.1.0/30 LO: 2.2.2.2/32
CR1 CR2
Area0
The configurations
Area1 Area2 of CR2 is similar to
CR1.
[~CR1]router
AR1 id 1.1.1.1 AR2
[~CR1]ospf
LO: 3.3.3.3/32 LO: 4.4.4.4/32
[~CR1-ospf-1]area 1
[~CR1-ospf-1-area-0.0.0.1]network 20.1.1.0 0.0.0.3
[~CR1-ospf-1-area-0.0.0.1]quit
[~CR1-ospf-1]area 2
[~CR1-ospf-1-area-0.0.0.2]network 30.1.1.0 0.0.0.3
[~CR1-ospf-1]area 0
[~CR1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3
[~CR1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[~CR1-ospf-1-area-0.0.0.0]commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page64
OSPF Basic Configuration-Configuration
on AR1
LO: 1.1.1.1/32 10.1.1.0/30 LO: 2.2.2.2/32
CR1 CR2
Area0
The configurations
Area1 Area2 of AR2 is similar to
AR1.
AR1 AR2
LO: 3.3.3.3/32 LO: 4.4.4.4/32
[~AR1]router id 3.3.3.3
[~AR1]ospf
[~AR1-ospf-1]area 1
[~AR1-ospf-1-area-0.0.0.1]network 3.3.3.3 0.0.0.0
[~AR1-ospf-1-area-0.0.0.1]network 20.1.1.0 0.0.0.3
[~AR1-ospf-1-area-0.0.0.1]network 21.1.1.0 0.0.0.3
[~AR1-ospf-1-area-0.0.0.1]commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page65
Basic Configuration-Check the Information
About OSPF Neighbor State
<AR1>display ospf peer
OSPF Process 1 with Router ID 3.3.3.3
Neighbors
Area 0.0.0.1 interface 20.1.1.1(Ethernet0/0/0)'s neighbors
Router ID: 1.1.1.1 Address: 20.1.1.2
State: Full Mode:Nbr is Slave Priority: 1
DR: 20.1.1.1 BDR: 20.1.1.2 MTU: 0
Dead timer due in 34 sec
Retrans timer interval: 5
Neighbor is up for 00:19:45
Authentication Sequence: [ 0 ]
Neighbors
Area 0.0.0.1 interface 21.1.1.1(Ethernet0/0/1)'s neighbors
Router ID: 2.2.2.2 Address: 21.1.1.2
State: Full Mode:Nbr is Slave Priority: 1
DR: 21.1.1.1 BDR: 21.1.1.2 MTU: 0
Dead timer due in 33 sec
Retrans timer interval: 5
Neighbor is up for 00:06:21
Authentication Sequence: [ 0 ]
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page66
Basic Configuration-Check IP Routing
Table
<AR1>display ip routing-table
Route Flags: R - relay, D - download to fib
--------------------------------------------------------------------------
Routing Tables: _public_
Destinations : 13 Routes : 15
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 OSPF 10 1 D 20.1.1.2 Ethernet0/0/0
2.2.2.2/32 OSPF 10 1 D 21.1.1.2 Ethernet0/0/1
3.3.3.3/32 Direct 0 0 D 127.0.0.1 InLoopBack0
4.4.4.4/32 OSPF 10 2 D 21.1.1.2 Ethernet0/0/1
OSPF 10 2 D 20.1.1.2 Ethernet0/0/0
10.1.1.0/30 OSPF 10 2 D 20.1.1.2 Ethernet0/0/0
OSPF 10 2 D 21.1.1.2 Ethernet0/0/1
20.1.1.0/30 Direct 0 0 D 20.1.1.1 Ethernet0/0/0
20.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
21.1.1.0/30 Direct 0 0 D 21.1.1.1 Ethernet0/0/1
21.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
30.1.1.0/30 OSPF 10 2 D 20.1.1.2 Ethernet0/0/0
31.1.1.0/30 OSPF 10 2 D 21.1.1.2 Ethernet0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page67
OSPF Route Redistribution Configuration
CR1 CR2
Area0
Area1 Area2
AR1 AR2
LO: 3.3.3.3/32 LO: 4.4.4.4/32
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page68
OSPF Route Redistribution Configuration-
Configuration of AR1
LO: 1.1.1.1/32 10.1.1.0/30 LO: 2.2.2.2/32
CR1 CR2
Area0
Area1 Area2
AR1 AR2
LO: 3.3.3.3/32 LO: 4.4.4.4/32
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page69
OSPF Route Redistribution Configuration-
IP Routing Table of AR1
<AR1>display ip routing-table
Route Flags: R - relay, D - download to fib
--------------------------------------------------------------------------
Routing Tables: _public_
Destinations : 16 Routes : 18
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 OSPF 10 1 D 20.1.1.2 Ethernet0/0/0
……
31.1.1.0/30 OSPF 10 2 D 21.1.1.2 Ethernet0/0/1
100.1.1.0/24 Static 60 0 D 0.0.0.0 NULL0
100.1.2.0/24 Static 60 0 D 0.0.0.0 NULL0
100.1.3.0/24 Static 60 0 D 0.0.0.0 NULL0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page70
OSPF Route Redistribution Configuration-
IP Routing Table of AR2
<AR2>display ip routing-table
Route Flags: R - relay, D - download to fib
--------------------------------------------------------------------------
Routing Tables: _public_
Destinations : 16 Routes : 21
Destination/Mask Proto Pre Cost Flags NextHop Interface
……
31.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
100.1.1.0/24 O_ASE 150 1 D 30.1.1.1 Ethernet0/0/1
O_ASE 150 1 D 31.1.1.1 Ethernet0/0/0
100.1.2.0/24 O_ASE 150 1 D 30.1.1.1 Ethernet0/0/1
O_ASE 150 1 D 31.1.1.1 Ethernet0/0/0
100.1.3.0/24 O_ASE 150 1 D 30.1.1.1 Ethernet0/0/1
O_ASE 150 1 D 31.1.1.1 Ethernet0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page71
OSPF Route Aggregation Configuration
LO: 1.1.1.1/32 10.1.1.0/30 LO: 2.2.2.2/32
CR1 CR2
Area0
Area1 Area2
AR1 AR2
LO: 3.3.3.3/32 LO: 4.4.4.4/32
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page73
OSPF Special Area Configuration-NSSA
Area Configuration (1/7)
Configuring Tasks: On the MAN, it is required that AR2 redistribute the
static routes to user networks, instead of receiving any external route
redistributed by CRs. Therefore, area 2 is configured as an NSSA.
CR1 CR2
Area0
Area1 Area2
AR1 AR2
LO: 3.3.3.3/32 LO: 4.4.4.4/32
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page74
OSPF Special Area Configuration-NSSA
Area Configuration (2/7)
NSSA Configuration on CR2:
LO: 1.1.1.1/32 10.1.1.0/30 LO: 2.2.2.2/32
CR1 CR2
Area0
Area1 Area2
AR1 AR2
LO: 3.3.3.3/32 LO: 4.4.4.4/32
[~CR2]ospf
[~CR2-ospf-1]area 2
[~CR2-ospf-1-area-0.0.0.2]nssa
[~CR2-ospf-1-area-0.0.0.2]commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page75
OSPF Special Area Configuration-NSSA
Area Configuration (3/7)
NSSA Configuration on AR2:
LO: 1.1.1.1/32 10.1.1.0/30 LO: 2.2.2.2/32
CR1 CR2
Area0
Area1 Area2
AR1 AR2
LO: 3.3.3.3/32 LO: 4.4.4.4/32
[~AR2]ospf
[~AR2-ospf-1]area 2
[~AR2-ospf-1-area-0.0.0.2]nssa
[~AR2-ospf-1-area-0.0.0.2]commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page76
OSPF Special Area Configuration-NSSA
Area Configuration (4/7)
IP routing table information on AR2:
<AR2>display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------
Routing Tables: _public_
Destinations : 15 Routes : 18
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 O_NSSA 150 1 D 31.1.1.1 Ethernet0/0/0
O_NSSA 150 1 D 30.1.1.1 Ethernet0/0/1
1.1.1.1/32 OSPF 10 1 D 30.1.1.1 Ethernet0/0/1
……
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
200.1.1.0/24 Static 60 0 D 0.0.0.0 NULL0
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page77
OSPF Special Area Configuration-NSSA
Area Configuration (5/7)
On AR2, redistribute the static routes to user networks:
LO: 1.1.1.1/32 10.1.1.0/30 LO: 2.2.2.2/32
CR1 CR2
Area0
Area1 Area2
AR1 AR2
LO: 3.3.3.3/32 LO: 4.4.4.4/32
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page78
OSPF Special Area Configuration-NSSA
Area Configuration (6/7)
IP routing table of CR2:
<CR2>display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------
Routing Tables: _public_
Destinations : 16 Routes : 16
……
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
200.1.1.0/24 O_NSSA 150 1 D 31.1.1.2 Ethernet0/0/0
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page79
OSPF Special Area Configuration-NSSA
Area Configuration (7/7)
IP routing table of AR2:
<AR1>display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------
Routing Tables: _public_
Destinations : 17 Routes : 18
……
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
200.1.1.0/24 O_ASE 150 1 D 21.1.1.2 Ethernet0/0/1
O_ASE 150 1 D 20.1.1.2 Ethernet0/0/0
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page80
OSPF Network Security Configuration
(1/2)
Configure OSPF interface authentication on NE series routers by
using the interconnection between AR1 and CR1:
LO: 1.1.1.1/32 10.1.1.0/30 LO: 2.2.2.2/32
CR1 CR2
Area0
[~CR1-Ethernet0/0/0]ospf
Area1 authentication-mode
Area2 md5 100
cipher huawei
[~CR1-Ethernet0/0/0]commit
AR1 AR2
LO: 3.3.3.3/32 LO: 4.4.4.4/32
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page81
OSPF Network Security Configuration
(2/2)
OSPF neighbor information on CR1:
<CR1>display ospf peer
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Neighbors
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page82
Modification of OSPF Interface Costs (1/3)
CR1 CR2
Area0
Area1 Area2
AR1 AR2
LO: 3.3.3.3/32 LO: 4.4.4.4/32
[~AR1]interface Ethernet0/0/0
[~AR1-Ethernet0/0/0]ospf cost 100
[~AR1-Ethernet0/0/0]quit
[~AR1]interface Ethernet 0/0/1
[~AR1-Ethernet0/0/1]ospf cost 200
[~AR1-Ethernet0/0/1]commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page83
Modification of OSPF Interface Costs (2/3)
IP Routing table information on AR1 (before the cost modification):
<AR1>display ip routing-table
Route Flags: R - relay, D - download to fib
--------------------------------------------------------------------------
Routing Tables: _public_
Destinations : 17 Routes : 20
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 OSPF 10 1 D 20.1.1.2 Ethernet0/0/0
2.2.2.2/32 OSPF 10 1 D 21.1.1.2 Ethernet0/0/1
3.3.3.3/32 Direct 0 0 D 127.0.0.1 InLoopBack0
4.4.4.4/32 OSPF 10 2 D 21.1.1.2 Ethernet0/0/1
OSPF 10 2 D 20.1.1.2 Ethernet0/0/0
10.1.1.0/30 OSPF 10 2 D 20.1.1.2 Ethernet0/0/0
OSPF 10 2 D 21.1.1.2 Ethernet0/0/1
……
30.1.1.0/30 OSPF 10 2 D 20.1.1.2 Ethernet0/0/0
31.1.1.0/30 OSPF 10 2 D 21.1.1.2 Ethernet0/0/1
……
200.1.1.0/24 O_ASE 150 1 D 21.1.1.2 Ethernet0/0/1
O_ASE 150 1 D 20.1.1.2 Ethernet0/0/0
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page84
Modification of OSPF Interface Costs (3/3)
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page85
OSPF Fast Convergence Configuration
(1/3)
Configuration of CR1:
CR1 CR2
Area0
Area1 Area2
[~CR1]interface
AR1 Ethernet0/0/0 AR2
[~CR1-Ethernet0/0/0]ospf
LO: 3.3.3.3/32 network-type p2p
LO: 4.4.4.4/32
[~CR1]interface Ethernet0/0/0
[~CR1-Ethernet0/0/0]ospf timer hello 3
[~CR1-Ethernet0/0/0]commit
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page86
OSPF Fast Convergence Configuration
(2/3)
Configuration of AR1:
LO: 1.1.1.1/32
[~AR1]interface Ethernet0/0/0
10.1.1.0/30 LO: 2.2.2.2/32
[~AR1-Ethernet0/0/0]ospf network-type p2p
CR1
[~AR1]interface Ethernet0/0/0 CR2
Area0
[~AR1-Ethernet0/0/0]ospf timer hello 3
[~AR1-Ethernet0/0/0]commit
Area1 Area2
AR1 AR2
LO: 3.3.3.3/32 LO: 4.4.4.4/32
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page87
OSPF Fast Convergence Configuration
(3/3)
OSPF neighbor information on AR1:
<AR1>display ospf peer
OSPF Process 1 with Router ID 3.3.3.3
Neighbors
Area 0.0.0.1 interface 20.1.1.1(Ethernet0/0/0)'s neighbors
Router ID: 1.1.1.1 Address: 20.1.1.2
State: Full Mode:Nbr is Slave Priority: 1
DR: None BDR: None MTU: 0
Dead timer due in 8 sec
Retrans timer interval: 4
Neighbor is up for 00:01:17
Authentication Sequence: [ 15488]
Neighbors
Area 0.0.0.1 interface 21.1.1.1(Ethernet0/0/1)'s neighbors
Router ID: 2.2.2.2 Address: 21.1.1.2
State: Full Mode:Nbr is Slave Priority: 1
DR: 21.1.1.1 BDR: 21.1.1.2 MTU: 0
Dead timer due in 35 sec
Retrans timer interval: 4
Neighbor is up for 04:18:16
Authentication Sequence: [ 0 ]
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page88
Contents
1. OSPF Overview
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page89
Hands-on Practice-Topology Description
LO: 1.1.1.1/32 10.1.1.0/30 LO: 2.2.2.2/32
CR CR2
1 Area0
Area1 Area2
AR AR2
1 LO: 3.3.3.3/32 LO: 4.4.4.4/32
Loopback1: 100.1.1.1/32 Loopback1: 200.1.1.1/32
Loopback2: 100.1.1.2/32 Loopback2: 200.1.1.2/32
Loopback3: 100.1.1.3/32 Loopback3: 200.1.1.3/32
Configure OSPF for the preceding topology, where the user
networks connected to the ARs are simulated by using
Loopback1, Loopback2, and Loopback3.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page90
Hands-on Tasks
Task Description
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page91
Summary
The contents of this course are as follows:
OSPF overview and basic concepts
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page92
Thank you
www.huawei.com