Documente Academic
Documente Profesional
Documente Cultură
The configuration file of Router B is the same as that in the previous example, and is
omitted here.
2) Configuration file of Router C
interface Ethernet3/0/0
ip address 172.16.1.1 255.255.255.0
#
#
sysname RouterC
#
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-53
link-protocol ppp
stub-router
area 0.0.0.1
0.0.0.255
0.0.0.255
Configuration file of Router D
erface Ethernet3/0/0
.1 255.255.255.0
nk-protocol ppp
ess 192.168.2.2 255.255.255.0
.0 0.0.0.255
etwork 172.17.1.0 0.0.0.255
route-static 200.0.0.0 8 NULL0
#
4.8.3 Configuring OSPF NSSA Areas
I. Netw
hown in Figure 4-23, all routers run OSPF, and the whole AS is divided into three
r B serve as ABRs to forward the routes between areas.
uter D serves as ASBR to import external routes (static routes).
interface Pos2/0/0
ip address 192.168.1.2 255.255.255.0
#
ospf 1
network 192.168.1.0
network 172.16.1.0
stub
#
return
3)
#
sysname RouterD
#
int
ip address 172.17.1
#
interface Pos2/0/0
li
ip addr
#
ospf 1
import-route static
area 0.0.0.2
network 192.168.2
n
#
ip
return
orking Requirements
As s
areas. Router A and Route
Ro
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-54
configure Area 1 as NSSA area and configure Router C as
nal routes (static routes), and the routing information can be
II. king Diagram
The requirements is to
ASBR to import exter
transmitted correctly inside the AS.
Networ
RouterA
POS1/0/0
Area0
RouterB
RouterD
POS1/0/0
168.0.2/24
POS2/0/0
192.168.2.1/24
POS2/0/0
192.168.2.2/24
POS2/0/0
192.168.1.1/24
Eth3/0/0
172.17.1.1/24
outerC
192.168.1.2/24
172.16.1.1/24
Area2
192.168.0.1/24 192.
R
POS2/0/0
Area1
Eth3/0/0
ASBR
A
NSSA
SBR
g OSPF NSSA areas
III. Configuration Procedures
figuring IP addresses of the interfaces (omitted)
the same as the previous example)
Router D to import static routes (the same as the previous example)
area
area 1
nssa default-route-advertise no-summary
quit
# Configure Router C.
[RouterC-ospf-1] area 1
1] nssa
[RouterC-ospf-1-area-0.0.0.1] quit
Figure 4-23 Configurin
1) Con
2) Configuring OSPF (
3) Configuring
4) Configuring Area 1 as an NSSA
# Configure Router A.
[RouterA] ospf
[RouterA-ospf-1]
[RouterA-ospf-1-area-0.0.0.1]
[RouterA-ospf-1-area-0.0.0.0]
[RouterC] ospf
[RouterC-ospf-1-area-0.0.0.
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-55
Note:
It is recommended that the ABR (refers to Router A here) be configured with the
default-route-advertise no-summary parameter, thus reducing the size of the
router.
Other NSSA routers only need to be configured with the nssa command.
routing table of the NSSA
# View OSPF routing table of Router C.
[RouterC] display ospf routing
OSPF Process 1 with Router ID 172.16.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
0.0.0.0/0 1563 Inter-area 192.168.1.1 192.168.
172.16.1.0/24 1 Stub 172.16.1.1 172.16.1.1 0.0.0.
192.168.1.0/24 1562 Stub 192.168.1.2 172.16.1.1 0.0.0.
0.1 0.0.0.1
1
1
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
t
ting table of Router D.
routing
ID 172.17.1.1
ng Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
172.16.1.0/24 4687 Inter-area 192.168.2.1 192.168.0.2 0.0.0.2
172.17.1.0/24 1 Stub 172.17.1.1 172.17.1.1 0.0.0.2
192.168.1.0/24 4686 Inter-area 192.168.2.1 192.168.0.2 0.0.0.2
192.168.2.0/24 1562 Stub 192.168.2.2 172.17.1.1 0.0.0.2
192.168.0.0/24 3124 Inter-area 192.168.2.1 192.168.0.2 0.0.0.2
Total Nets: 3
[RouterC]
5) Configuring Router C to import static routes
[RouterC] ip route-static 100.0.0.0 8 null 0
[RouterC] ospf
[RouterC-ospf-1] import-route static
[RouterC-ospf-1] qui
# View OSPF rou
[RouterD-ospf-1]dis ospf
OSPF Process 1 with Router
Routi
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-56
Destination Cost Type Tag NextHop AdvRouter
Destination Cost Type Tag NextHop AdvRouter
1 NSSA: 0
Note:
Routing for ASEs
100.0.0.0/8 10 Type2 1 192.168.2.1
192.168.0.1
Routing for NSSAs
Total Nets: 6
Intra Area: 2 Inter Area: 3 ASE:
[RouterD]
You can see an AS external route imported by the NSSA area on Router D.
IV
1) Configuration file of Router A
#
sysname RouterA
#
ip address 192.168.0.1 255.255.255.0
#
interface Pos2/0/0
link-protocol ppp
0
pf 1
rea 0.0.0.1
0.0.0.255
. Configuration Files
interface Pos1/0/0
link-protocol ppp
ip address 192.168.1.1 255.255.255.
#
os
area 0.0.0.0
network 192.168.0.0 0.0.0.255
a
network 192.168.1.0
nssa default-route-advertise no-summary
#
return
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-57
Note:
The configuration files of Router B and Router D are the same as that in the previous
example, and are omitted here.
2) Configuration file of Router C
#
sysname RouterC
terface Ethernet3/0/0
172.16.1.1 255.255.255.0
interface Pos2/0/0
col ppp
#
spf 1
import-route static
etwork 172.16.1.0 0.0.0.255
0.0.0 8 NULL0
4.8.4 Configuring DR Election of OSPF
I. Networking Requirments
4-24the following figure, with the highest priority 100 in the network, Router
R. With the second highest priority, Router C is elected as BDR. The
ter B cannot be elected as DR. The priority of
onfigured and its default value is 1.
#
in
ip address
#
link-proto
ip address 192.168.1.2 255.255.255.0
o
area 0.0.0.1
network 192.168.1.0 0.0.0.255
n
nssa
#
ip route-static 100.
#
return
In Figure
A is elected as D
priority of Router B is 0, and so Rou
Router D is not c
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-58
II. g Diagram
RouterD
Eth1/0/0
1001::2/64
Eth1/0/0
Networkin
RouterB RouterA
1001::1/64
Eth1/0/0
1001::4/64
RouterC
Eth1/0/0
1001::3/64
Figure 4-24 Configuring DR election of OSPF
II
Configuring IP addresses of the interfaces (omitted)
bling OSPF
er id 1.1.1.1
A-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
# Configure Router B.
uterB] interface ethernet 1/0/0
-Ethernet1/0/0] ip address 192.168.1.2 255.255.255.0
outerB-Ethernet1/0/0] ospf dr-priority 0
[RouterB-Ethernet1/0/0] quit
[RouterB] ospf
[RouterB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[RouterC-Ethernet1/0/0] quit
[RouterC] router id 3.3.3.3
[RouterC] ospf
[RouterB-ospf-1] area 0
[RouterB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
I. Configuration Procedures
1)
2) Ena
# Configure Router A.
[RouterA] rout
[RouterA] ospf
[RouterA-ospf-1] area 0
[Router
[Ro
[RouterB
[R
[RouterB] router id 2.2.2.2
[RouterB-ospf-1] area 0
# Configure Router C.
[RouterC] interface ethernet 1/0/0
[RouterC-Ethernet1/0/0] ip address 192.168.1.3 255.255.255.0
[RouterC-Ethernet1/0/0] ospf dr-priority 2
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-59
192.168.1.1
168.1.1(Ethernet6/0/0)'s neighbors
State: Normal
R: 192.168.1.3 MTU: 0
32 sec
n Sequence: [ 0 ]
e: Normal
Nbr is Master Priority: 1
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
: 192.168.1.4 GR State: Normal
is Master Priority: 1
192.168.1.3 MTU: 0
00:03:53
ospf dr-priority 100
# Configure Router D.
[RouterD] interface ethernet 1/0/0
[RouterD-Ethernet1/0/0] ip address 192.168.1.4 255.255.255.0
[RouterD-Ethernet1/0/0] quit
[RouterD] router id 4.4.4.4
[RouterD] ospf
[RouterB-ospf-1] area 0
[RouterB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
# View DR/BDR states.
[RouterA] display ospf peer
OSPF Process 1 with Router ID
Neighbors
Area 0.0.0.0 interface 192.
Router ID: 192.168.1.2 Address: 192.168.1.2 GR
S ate: 2-Way Mode:Nbr is Slave Priority: 1 t
DR: 192.168.1.4 BD
Dead timer due in
Neighbor is up for 00:04:21
Authenticatio
Router ID: 192.168.1.3 Address: 192.168.1.3 GR Stat
State: Full Mode:
Dead timer due in 37 sec
Neighbor is up for 00:04:06
Authentication Sequence: [ 0 ]
Router ID: 192.168.1.4 Address
State: Full Mode:Nbr
DR: 192.168.1.4 BDR:
Dead timer due in 37 sec
Neighbor is up for
Authentication Sequence: [ 0 ]
[RouterA]
3) Configuring DR priorities on the interfaces
# Configure Router A.
[RouterA] interface ethernet 1/0/0
[RouterA-Ethernet1/0/0]
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-60
/0] quit
dr-priority 0
# Configure Router C.
ospf dr-priority 2
quit
iew DR/BDR states.
OSPF Process 1 with Router ID 192.168.1.4
0)'s neighbors
1.1 GR State: Normal
lave Priority: 100
.1.3 MTU: 0
Neighbor is up for 00:11:17
1.2 GR State: Normal
lave Priority: 0
.1.3 MTU: 0
Neighbor is up for 00:11:19
1.3 GR State: Normal
lave Priority: 2
.1.3 MTU: 0
Neighbor is up for 00:11:15
cation Sequence: [ 0 ]
[RouterA-Ethernet1/0
# Configure Router B.
[RouterB] interface ethernet 1/0/0
[RouterB-Ethernet1/0/0] ospf
[RouterB-Ethernet1/0/0] quit
[RouterC] interface ethernet 1/0/0
[RouterC-Ethernet1/0/0]
[RouterC-Ethernet1/0/0]
# V
[RouterD] display ospf peer
Neighbors
Area 0.0.0.0 interface 192.168.1.4(Ethernet6/0/
Router ID: 192.168.1.1 Address: 192.168.
State: Full Mode:Nbr is S
DR: 192.168.1.4 BDR: 192.168
Dead timer due in 31 sec
Authentication Sequence: [ 0 ]
Router ID: 192.168.1.2 Address: 192.168.
State: Full Mode:Nbr is S
DR: 192.168.1.4 BDR: 192.168
Dead timer due in 35 sec
Authentication Sequence: [ 0 ]
Router ID: 192.168.1.3 Address: 192.168.
State: Full Mode:Nbr is S
DR: 192.168.1.4 BDR: 192.168
Dead timer due in 33 sec
Authenti
[RouterD]
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-61
Note:
The DR priorities configured on the interfaces will not take effect instantly.
4) Restarting OSPF processes (omitted)
uration result
1 with Router ID 192.168.1.4
s neighbors
Address: 192.168.1.1 GR State: Normal
State: Full Mode:Nbr is Slave Priority: 100
ress: 192.168.1.2 GR State: Normal
r Priority: 0
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
ress: 192.168.1.3 GR State: Normal
Priority: 2
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
F Process 1 with Router ID 192.168.1.1
Interfaces
Area: 0.0.0.0
5) Viewing the config
# View OSPF neighbor state.
[RouterD] display ospf peer
OSPF Process
Neighbors
Area 0.0.0.0 interface 192.168.1.4(Ethernet6/0/0)'
Router ID: 192.168.1.1
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
Dead timer due in 35 sec
Neighbor is up for 00:07:19
Authentication Sequence: [ 0 ]
Router ID: 192.168.1.2 Add
State: 2-Way Mode:Nbr is Maste
Dead timer due in 35 sec
Neighbor is up for 00:07:19
Authentication Sequence: [ 0 ]
Router ID: 192.168.1.3 Add
State: Full Mode:Nbr is Slave
Dead timer due in 37 sec
Neighbor is up for 00:07:17
Authentication Sequence: [ 0 ]
# View the OSPF interface state.
[RouterA] display ospf interface
OSP
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-62
Type State Cost Pri DR BDR
192.168.1.1 Broadcast DR 1 100 192.168.1.1 192.168.1.3
[RouterB] display ospf interface
192.168.1.2
Address Type State Cost Pri DR BDR
0 192.168.1.1
eighboring
ge LSAs.
they are neither DR nor BDR.
IV
55.255.0
pf 1
ysname RouterB
IP Address
OSPF Process 1 with Router ID
Interfaces
Area: 0.0.0.0
IP
192.168.1.2 Broadcast DROther 1
192.168.1.3
All neighbors are in full state. This indicates that Router A forms n
relationships with all its neighbors. If the neighbor stays 2-Way, it indicates both of
them are not DR or BDR. Thus, they need not to exchan
All other neighbors are DR Others. This indicates that
. Configuration Files
1) Configuration file of Router A
#
sysname RouterA
#
interface Ethernet6/0/0
ip address 192.168.1.1 255.2
ospf dr-priority 100
#
os
area 0.0.0.0
network 192.168.1.0 0.0.0.255
#
return
2) Configuration file of Router B
#
s
#
interface Ethernet6/0/0
ip address 192.168.1.2 255.255.255.0
ospf dr-priority 0
#
ospf 1
area 0.0.0.0
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-63
turn
terface Ethernet6/0/0
168.1.3 255.255.255.0
rea 0.0.0.0
4) Configuration file of Router D
address 192.168.1.4 255.255.255.0
f 1
urn
4.8.5 Example for Configuring OSPF Virtual Links
I. Networking Requirements
4-25, Area 2 does not connect with the backbone area directly. Area 1
ct Area 2 and Area 0. A virtual link is configured
ween Router A and Router B.
network 192.168.1.0 0.0.0.255
#
re
3) Configuration file of Router C
#
sysname RouterC
#
in
ip address 192.
ospf dr-priority 2
#
ospf 1
a
network 192.168.1.0 0.0.0.255
#
return
#
sysname RouterD
#
interface Ethernet6/0/0
ip
#
osp
area 0.0.0.0
network 192.168.1.0 0.0.0.255
#
ret
In Figure
serves as a Transit Area to conne
bet
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-64
II. agram Networking Di
RouterA
POS1/0/0
192.168.1.1/24
RouterB
POS1/0/0
192.168.1.2/24
Eth2/0/0
172.16.1.1/16
Area0
Area2
Area1
Eth2/0/0
10.1.1.1/8
Virtual Link
III. Configuration Procedures
sses of the interfaces (omitted)
onfigure Router A.
] ospf 1 router-id 1.1.1.1
uterA-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
ea-0.0.0.0] quit
uterA-ospf-1] area 1
0.1] network 192.168.1.0 0.0.0.255
ure Router B.
network 192.168.1.0 0.0.0.255
quit
[RouterB-ospf-1] area 2
.0 0.0.255.255
[RouterBospf-1-area-0.0.0.2] quit
outer A.
[RouterA] display ospf routing
s
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.0.0.0/8 1562 Stub 10.1.1.1 1.1.1.1 0.0.0.0
192.168.1.0/24 1562 Stub 192.168.1.1 1.1.1.1 0.0.0.1
Figure 4-25 Configuring OSPF virtual links
1) Configuring IP addre
2) Configuring OSPF
# C
[RouterA
[RouterA-ospf-1] area 0
[Ro
[RouterA-ospf-1-ar
[Ro
[RouterA-ospf-1-area-0.0.
[RouterA-ospf-1-area-0.0.0.1] quit
# Config
[RouterB] ospf 1 router-id 2.2.2.2
[RouterB-ospf-1] area 1
[RouterB-ospf-1-area-0.0.0.1]
[RouterB-ospf-1-area-0.0.0.1]
[RouterBospf-1-area-0.0.0.2] network 172.16.0
# View OSPF routing table of R
OSPF Process 1 with Router ID 1.1.1.1
Routing Table
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-65
Total Nets: 2
Intra Area: 2 Inter Area: 0 ASE: 0 NSSA: 0
Note:
Area 2 does not connect directly to Area 0. Thus, there is no Area 2
routing table of Router A.
route in the
3) Configure the virtual link
[RouterA] ospf
0.0.1] vlink-peer 2.2.2.2
-0.0.0.1] quit
-peer 1.1.1.1
.0.1] quit
ID 1.1.1.1
Tables
Type NextHop AdvRouter Area
0.0.0.0
1.1.1.1 0.0.0.0
92.168.1.1 1.1.1.1 0.0.0.1
IV. Configuration Files
# Configure Router A.
[RouterA-ospf-1] area 1
[RouterA-ospf-1-area-0.
[RouterA-ospf-1-area
# Configure Router B.
[RouterB] ospf 1
[RouterB-ospf-1] area 1
[RouterB-ospf-1-area-0.0.0.1] vlink
[RouterB-ospf-1-area-0.0
# View OSPF routing table of Router A.
[RouterA] display ospf routing
OSPF Process 1 with Router
Routing
Routing for Network
Destination Cost
172.16.1.1/32 1563 Inter-area 192.168.1.2 2.2.2.2
10.0.0.0/8 1562 Stub 10.1.1.1
192.168.1.0/24 1562 Stub 1
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
1) Configuration file of Router A
#
sysname RouterA
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-66
et2/0/0
interface Pos1/0/0
col ppp
ospf 1 router-id 1.1.1.1
area 0.0.0.0
5.255
network 192.168.1.0 0.0.0.255
interface Pos1/0/0
0.0.0.1
0.0.0.255
4.9 Trou
4.9.1 OS t be Established
I.
OSPF neighbors cannot be established.
#
interface Ethern
ip address 10.1.1.1 255.0.0.0
#
link-proto
ip address 192.168.1.1 255.255.255.0
#
network 10.0.0.0 0.255.25
area 0.0.0.1
vlink-peer 2.2.2.2
#
return
2) Configuration file of Router B
#
sysname RouterB
#
interface Ethernet2/0/0
ip address 172.16.1.1 255.255.0.0
#
link-protocol ppp
ip address 192.168.1.2 255.255.255.0
#
ospf 1 router-id 2.2.2.2
area
network 192.168.1.0
vlink-peer 1.1.1.1
area 0.0.0.2
network 172.16.0.0 0.0.255.255
#
return
bleshooting
PF Neighbors Canno
Fault Description
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-67
II. alysis
If both the physical connection and the lower layer protocol are normal, you can
check the OSPF parameters configured on the interface and ensure their
consistency with that of the neighboring routers. The area ID should be the same, as
ment and the mask. However, in P2P networks or the
networks with the virtual links, the network segment and the mask can be different.
network types of the interfaces of two neighboring routers should be the same.
orks, the DR priority of at least one interface should be
III. Troubleshooting
An
well as the network seg
The
For broadcast or NBMA netw
greater than 0.
Step Action
1 View OSPF neighbors using the display ospf peer command.
2 View OSPF interfaces using the display ospf interface command.
3 hysical connection and the lower layer protocol are
mand. If the local router cannot ping through the
remote router, there are some faults in the physical connection and the lower
.
4 Check OSPF timer to make sure that the dead time on one interface should
Hello interval.
ecify neighbors manually using the peer
ip-address command.
t or NBMA networks, the DR priority of at least one interface
eater than 0.
Check whether both the p
correct using the ping com
layer protocol
be at least four times the
5 For NBMA networks, you can sp
6 For broadcas
should be gr
4.9.2 Inco ormation
I.
es of other areas.
II.
s in the backbone area should be connected with each other. If one router is
d two or more areas, at least one of the areas is the backbone area. The
backbone area cannot be configured as a stub area.
The routers in the stub area cannot receive AS external routes. If one area is
configured as a stub area, all routers connected to this area should be configured
with the stub command.
rrect OSPF Routing Inf
Fault Description
OSPF cannot discover rout
Analysis
All area
configure
Operation Manual - IP Routing Volume
Quidway NetEngine20 Series Routers Chapter 4 OSPF Configuration
Huawei Technologies Proprietary
4-68
III. Troubleshooting
No. Action
1 View OSPF neighbors using the display ospf peer command.
2 View OSPF interfaces using the display ospf interface command.
DB is complete using the display ospf lsdb
command.
configured correctly using the display
current-configuration configuration ospf command. If two or more areas
configured with the stub command, at least one of the areas is the
backbone area. However, the backbone area cannot be configured with the
3 Check whether the LS
4 Check whether the areas are
are
stub command.
5 All the routers in one stub area need to be configured with the stub
command.
6 If the virtual link is configured, you can check whether the neighbors are
normal using the display ospf vlink command.