ospf practice guide

41
NE Series Routers OSPF Protocol Features Practice Guide

Upload: delgado08

Post on 16-Jan-2016

14 views

Category:

Documents


1 download

DESCRIPTION

OSPF

TRANSCRIPT

Page 1: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Page 2: OSPF Practice Guide
Page 3: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide Table of Contents

Confidential Information of Huawei. No Spreading without Permission

i

Table of Contents

Experiment Description ....................................................................................................................1

Experiment Description ................................................................................................................1

Experiment Objectives .................................................................................................................1

Experiment Tasks ........................................................................................................................1

Relevant Materials .......................................................................................................................1

Chapter 1 OSPF Single-area Experiment Guide .............................................................................2

1.1 Networking and Service Description ......................................................................................2

1.2 Command Line List ................................................................................................................2

1.3 Configuration Flow .................................................................................................................3

1.4 Configuration Procedure ........................................................................................................3

1.5 Result Verification ..................................................................................................................3

1.6 FAQ ........................................................................................................................................6

1.7 Configuration Reference ........................................................................................................7

1.7.1 Configure the Port .......................................................................................................7

1.7.2 OSPF Configuration ....................................................................................................8

Chapter 2 OSPF Multi-area Experiment Guide ............................................................................ 10

2.1 Networking and Service Description ................................................................................... 10

2.2 Command Line List ............................................................................................................. 10

2.3 Configuration Flow .............................................................................................................. 11

2.4 Configuration Procedure ..................................................................................................... 11

2.5 Result Verification ............................................................................................................... 11

2.6 FAQ ..................................................................................................................................... 14

2.7 Configuration Reference ..................................................................................................... 14

2.7.1 Configure the Port .................................................................................................... 14

2.7.2 OSPF Configuration ................................................................................................. 15

Chapter 3 OSPF Route Aggregration Configuration Guide ....................................................... 17

3.1 Networking and Service Introduction: ................................................................................. 17

3.2 Command Line List ............................................................................................................. 17

3.3 Configuration Flow .............................................................................................................. 18

3.4 Configuration Procedure ..................................................................................................... 18

3.5 Result Verification ............................................................................................................... 18

3.6 Configuration Reference ..................................................................................................... 19

3.6.1 Configure the Port .................................................................................................... 19

3.6.2 OSPF Configuration ................................................................................................. 20

Chapter 4 Experiment Guide to OSPF Electing DR/BDR ............................................................ 21

4.1 Networking and Service Description ................................................................................... 21

4.2 Command Line List ............................................................................................................. 21

4.3 Configuration Flow .............................................................................................................. 22

4.4 Configuration Procedure ..................................................................................................... 22

4.5 Result Verification ............................................................................................................... 22

4.6 FAQ ..................................................................................................................................... 24

4.7 Configuration Reference ..................................................................................................... 24

4.7.1 Configure the Port .................................................................................................... 24

4.7.2 OSPF Configuration ................................................................................................. 24

Chapter 5 Area Authentication Configuration Guide .................................................................. 26

5.1 Networking and Service Description ................................................................................... 26

5.2 Command Line List ............................................................................................................. 26

5.3 Configuration Flow .............................................................................................................. 27

5.4 Configuration Procedure ..................................................................................................... 27

5.5 Result Verification ............................................................................................................... 28

Page 4: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide Table of Contents

Confidential Information of Huawei. No Spreading without Permission

ii

5.6 Configuration Reference ..................................................................................................... 29

5.6.1 Configure the Port .................................................................................................... 29

5.6.2 OSPF Configuration ................................................................................................. 29

Chapter 6 STUB Area Configuration Guide ................................................................................. 31

6.1 Networking and Service Introduction .................................................................................. 31

6.2 Command Line List ............................................................................................................. 31

6.3 Configuration Procedure ..................................................................................................... 32

6.4 Result Verification ............................................................................................................... 32

6.4.1 Before Configuration: ............................................................................................... 32

6.4.2 After Configuring Area 1 to Stub .............................................................................. 32

6.5 Configuration Reference ..................................................................................................... 34

6.5.1 Configure the Port .................................................................................................... 34

6.5.2 OSPF Configuration ................................................................................................. 35

6.5.3 Configure stub area .................................................................................................. 36

Page 5: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to the

text that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

1

Experiment Description

Experiment Description

This experiment guide introduces the configuration methods and configuration procedure of the basic services of OSPF protocol, and covers the currently prevalent technologies of OSPF. It is designed to help you understand the configuration methods and configuration procedure of the basic services of OSPF.

Experiment Objectives

� Understand configuration procedures of different applications of OSPF � Get familiar with the configuration commands of relevant applications of OSPF

Experiment Tasks

� Configure OSPF area � Configure OSPF area � OSPF route aggregation configuration � Configure DR/BDR election � Configure area authentication � STUB area configuration � Configure NSSA area

Relevant Materials

� VRP Operation Manual

Page 6: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

2

Chapter 1 OSPF Single-area Experiment Guide

1.1 Networking and Service Description

� 4 routers RTA, RTB, RTC and RTD run the OSPF concurrently, and belong to the same area, i.e., Area 0.

� By running OSPF, communication between routers is implemented.

1.2 Command Line List

Table 1-1

Operation Version Command

Configure Router ID VRP 3.30 router id router-id

VRP 5.10 router id router-id

Enable OSPF and Enter the OSPF View

VRP 3.30 ospf [ process-id ] [ router-id router-id ]

VRP 5.10 ospf [ process-id ] [ router-id router-id ]

Enter OSPF Area view VRP 3.30 Area area-id

VRP 5.10 Area area-id

Run OSPF protocol on the specified network segment

VRP 3.30 network ip-address wildcard-mask

VRP 5.10 network ip-address wildcard-mask

Page 7: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

3

1.3 Configuration Flow

Figure 1-1

1.4 Configuration Procedure

1) Specify the router ID

In system-view, specify a router ID. Generally, the Loopback address is used as a router ID.

2) Run OSPF

In system-view, run OSPF, and adopt the default OSPF process 1.

3) Create an area

In the OSPF view, create a backbone area: Area 0.

4) Declare the network

In the Area view, declare the corresponding network. Different routers declare different networks. For example, 10.1.1.0 and 192.2.2.0 are declared on the router RTB.

1.5 Result Verification

1) The networks of each device can access each other (as tested via the “ping” command)

[RTA]ping -a 1.1.1.1 3.3.3.3

PING 3.3.3.3: 56 data bytes, press CTRL_C to break

Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=254 time=29 ms

Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=254 time=29 ms

Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=254 time=29 ms

Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=254 time=28 ms

Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=254 time=28 ms

--3.30.30.3 ping statistics--

5 packet(s) transmitted

5 packet(s) received

0.00% packet loss

round-trip min/avg/max = 28/28/3 ms

Page 8: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

4

2) Use the “display ip routing-table” command to check the routing table. [RTA]display ip routing-table

Routing Tables: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

2.2.2.2/32 OSPF 10 2 10.1.1.2 Ethernet0/0

3.3.3.3/32 OSPF 10 1564 10.1.1.2 Ethernet0/0 192.1.1.2 Serial2/0

4.4.4.4/32 OSPF 10 1563 192.1.1.2 Serial2/0

10.1.1.0/30 DIRECT 0 0 10.1.1.1 Ethernet0/0

10.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

10.2.2.0/30 OSPF 10 1563 192.1.1.2 Serial2/0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.1.1.0/30 DIRECT 0 0 192.1.1.1 Serial2/0

192.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.1.1.2/32 DIRECT 0 0 192.1.1.2 Serial2/0

192.2.2.0/30 OSPF 10 1563 10.1.1.2 Ethernet0/0

[RTB]display ip routing-table

Routing Tables: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 OSPF 10 2 10.1.1.1 Ethernet0/0

2.2.2.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0

3.3.3.3/32 OSPF 10 1563 192.2.2.1 Serial2/0 4.4.4.4/32 OSPF 10 1564 10.1.1.1 Ethernet0/0

192.2.2.1 Serial2/0

10.1.1.0/30 DIRECT 0 0 10.1.1.2 Ethernet0/0

10.1.1.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0

10.2.2.0/30 OSPF 10 1563 192.2.2.1 Serial2/0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.1.1.0/30 OSPF 10 1563 10.1.1.1 Ethernet0/0

192.2.2.0/30 DIRECT 0 0 192.2.2.2 Serial2/0

192.2.2.1/32 DIRECT 0 0 192.2.2.1 Serial2/0

192.2.2.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0

[RTC]display ip routing-table

Routing Tables: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 OSPF 10 1564 10.2.2.1 Ethernet0/0 192.2.2.2 Serial2/0 2.2.2.2/32 OSPF 10 1563 192.2.2.2 Serial2/0

3.3.3.3/32 DIRECT 0 0 127.0.0.1 InLoopBack0

4.4.4.4/32 OSPF 10 2 10.2.2.1 Ethernet0/0 10.1.1.0/30 OSPF 10 1563 192.2.2.2 Serial2/0

10.2.2.0/30 DIRECT 0 0 10.2.2.2 Ethernet0/0

10.2.2.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.1.1.0/30 OSPF 10 1563 10.2.2.1 Ethernet0/0

192.2.2.0/30 DIRECT 0 0 192.2.2.1 Serial2/0

192.2.2.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.2.2.2/32 DIRECT 0 0 192.2.2.2 Serial2/0

[RTD]display ip routing-table

Routing Tables: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 OSPF 10 1563 192.1.1.1 Serial2/0

2.2.2.2/32 OSPF 10 1564 10.2.2.2 Ethernet0/0

192.1.1.1 Serial2/0 3.3.3.3/32 OSPF 10 2 10.2.2.2 Ethernet0/0

4.4.4.4/32 DIRECT 0 0 127.0.0.1 InLoopBack0

10.1.1.0/30 OSPF 10 1563 192.1.1.1 Serial2/0

Page 9: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

5

10.2.2.0/30 DIRECT 0 0 10.2.2.1 Ethernet0/0

10.2.2.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.1.1.0/30 DIRECT 0 0 192.1.1.2 Serial2/0

192.1.1.1/32 DIRECT 0 0 192.1.1.1 Serial2/0

192.1.1.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.2.2.0/30 OSPF 10 1563 10.2.2.2 Ethernet0/0

���� Note:

Each channel of router learns other route information through OSPF and provide interconnection of network. From the routing table, we can see that the OSPF can support equivalent routes. For example, on the RTD, the data that reaches 2.2.2.2/32 can be sent to 10.2.2.2, or sent to 192.1.1.1.

3) Use the “display ospf routing” command to check 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 AdvRouter Area

10.1.1.0/30 1 Net 10.1.1.1 1.1.1.1 0.0.0.0

192.2.2.0/30 1563 Stub 10.1.1.2 2.2.2.2 0.0.0.0

2.2.2.2/32 2 Stub 10.1.1.2 2.2.2.2 0.0.0.0

1.1.1.1/32 1 Stub 1.1.1.1 1.1.1.1 0.0.0.0

192.1.1.0/30 1562 Stub 192.1.1.1 1.1.1.1 0.0.0.0

10.2.2.0/30 1563 Net 192.1.1.2 3.3.3.3 0.0.0.0

4.4.4.4/32 1563 Stub 192.1.1.2 4.4.4.4 0.0.0.0

3.3.3.3/32 1564 Stub 192.1.1.2 3.3.3.3 0.0.0.0

10.1.1.2

Total Nets: 8

Intra Area: 8 Inter Area: 0 ASE: 0 NSSA: 0

4) Use the “display ospf lsdb” command to check the link state database. [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 Where

Stub 192.2.2.0 2.2.2.2 149 24 0 0 SpfTree

Stub 2.2.2.2 2.2.2.2 136 24 0 0 SpfTree

Stub 4.4.4.4 4.4.4.4 162 24 0 0 SpfTree

Stub 192.1.1.0 1.1.1.1 162 24 0 0 SpfTree

Stub 1.1.1.1 1.1.1.1 125 24 0 0 SpfTree

Stub 3.3.3.3 3.3.3.3 149 24 0 0 SpfTree

Rtr 2.2.2.2 2.2.2.2 137 72 80000009 0 Clist

Rtr 4.4.4.4 4.4.4.4 163 72 80000009 0 Clist

Rtr 1.1.1.1 1.1.1.1 125 72 80000009 0 SpfTree

Rtr 3.3.3.3 3.3.3.3 151 72 80000009 0 Clist

Net 10.1.1.1 1.1.1.1 241 32 80000001 0 SpfTree

Net 10.2.2.2 3.3.3.3 189 32 80000001 0 SpfTree

���� Note:

The OSPF describes the network topology of an area through the correct LSA. Note that each database type represents a different type of LSA in the OSPF. Listed below are common LAS types: Stub: LSA of route connected to an end network. (Note: End network refers to edge network, and is not the same concept as Stub area.) Rtr: Router LSA Net: Network LSA Snet: Network summary LSA

Page 10: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

6

ASB: Border router summary LSA of autonomous system ASE: External LSA of autonomous system

NSSA: External LSA of NSSA

5) Use the “display ospf brief” command to check the summary information of OSPF; [RTA]display ospf brief

OSPF Process 1 with Router ID 1.1.1.1

OSPF Protocol Information

RouterID: 1.1.1.1

Spf-schedule-interval: 5

Routing preference: Inter/Intra: 10 External: 150

Default ASE parameters: Metric: 1 Tag: 1 Type: 2

SPF computation count: 10

Area Count: 1 Nssa Area Count: 0

Area 0.0.0.0:

Authtype: none Flags: <>

SPF scheduled: <>

Interface 10.1.1.1 (Ethernet0/0)

Cost: 1 State: DR Type: Broadcast Priority: 1

Designated Router: 10.1.1.1 Backup Designated Router: 10.1.1.2 Timers : Hello 10,Dead 40,Poll 40,Retransmit 5,Transmit Delay 1

Interface 192.1.1.1 (Serial2/0) --> 192.1.1.2

Cost: 1562 State: PtoP Type: PointToPoint

Priority: 1

Timers : Hello 10,Dead 40,Poll 40,Retransmit 5,Transmit Delay 1

Interface 1.1.1.1 (LoopBack0) --> 1.1.1.1

Cost: 1 State: PtoP Type: PointToPoint

Priority: 1

Timers : Hello 10,Dead 40,Poll 40,Retransmit 5,Transmit Delay 1

���� Note:

The “display ospf brief” command can be used to check all OSPF-related information except routing information, e.g., neighbor information, network type, DR/BDR, Hello time, and so on. It is one of the frequently used commands for detecting error. Other router-related information can also be viewed via the above commands, which is not described here

any further.

1.6 FAQ

Q: What does neighbor relationship mean in the OSPF?

A: Neighbor means the router on the same network link.

Q: What does neighboring relationship in OSPF?

A: Neighboring relationship is based on the neighbor relationship. When two neighbors have synchronized the OSPF database, a neighboring relationship is developed between them.

Q: How many network types are supported by OSPF?

Page 11: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

7

A: P2P, P2MP, NBMA and Broadcast. In addition, in the NBMA network, the neighbor relationship needs to be created manually.

Q: Does equivalent router exist in the current networking diagram? How many equivalent routes are supported by VRP3.30? How many equivalent routes are supported by VRP5.10 as a maximum?

A: Yes, it exists. The VRP3.30 supports a maximum of 3 equivalent routes, and the VRP5.10 supports a maximum of 6 equivalent routes.

1.7 Configuration Reference

1.7.1 Configure the Port

I. Configure RTA

<Quidway>system-view

[Quidway]sysname RTA

[RTA]interface loopback 0

[RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255

[RTA-LoopBack0]quit

[RTA]interface ethernet 0/0

[RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252

[RTA-Ethernet0/0]quit

[RTA]interface serial 2/0

[RTA-Serial2/0]ip address 192.1.1.1 255.255.255.252

[RTA-Serial2/0]quit

II. Configure RTB

<Quidway>system-view

[Quidway]sysname RTB

[RTB]interface loopback 0

[RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255

[RTB-LoopBack0]quit

[RTB]interface Ethernet 0/0

[RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252

[RTB-Ethernet0/0]quit

[RTB]interface serial 2/0

[RTB-Serial2/0]ip address 192.2.2.2 255.255.255.252

[RTB-Serial2/0]quit

III. Configure RTC

<Quidway>system-view

[Quidway]sysname RTC

[RTC]interface loopback 0

[RTC-LoopBack0]ip address 3.3.3.3 255.255.255.255

[RTC-LoopBack0]quit

[RTC]interface Ethernet 0/0

[RTC-Ethernet2/0]ip address 10.2.2.2 255.255.255.252

[RTC-Ethernet2/0]quit

[RTC]interface serial 2/0

[RTC-Serial2/0]ip address 192.2.2.1 255.255.255.252

[RTC-Serial2/0]quit

IV. Configure RTD

<Quidway>system-view

[Quidway]sysname RTD

Page 12: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

8

[RTD]interface loopback 0

[RTD-LoopBack0]ip address 4.4.4.4 255.255.255.255

[RTD-LoopBack0]quit

[RTD]interface ethernet 0/0

[RTD-Ethernet0/0]ip address 10.2.2.1 255.255.255.252

[RTD-Ethernet0/0]quit

[RTD]interface serial 2/0

[RTD-Serial2/0]ip address 192.1.1.2 255.255.255.252

[RTD-Serial2/0]quit

1.7.2 OSPF Configuration

I. Configure RTA

1) Specify Router ID [RTA]router id 1.1.1.1

2) Run OSPF [RTA]ospf 1

3) Create area 0 [RTA-ospf-1]area 0

4) Declare network in the area 0 view [RTA-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3

[RTA-ospf-1-area-0.0.0.0]network 192.1.1.0 0.0.0.3

[RTA-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0

II. Configure RTB

1) Specify Router ID [RTB]router id 2.2.2.2

2) Run OSPF [RTB]ospf 1

3) Create area 0 [RTB-ospf-1]area 0

4) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3

[RTB-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3

[RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0

III. Configure RTC

1) Specify Router ID [RTC]router id 3.3.3.3

2) Run OSPF [RTC]ospf 1

3) Create area 0 [RTC-ospf-1]area 0

4) Declare network in the area 0 view [RTC-ospf-1-area-0.0.0.0]network 10.2.2.0 0.0.0.3

[RTC-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3

[RTC-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0

Page 13: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

9

IV. Configure RTD

1) Specify Router ID [RTD]router id 4.4.4.4

2) Run OSPF [RTD]ospf 1

3) Create area 0 [RTD-ospf-1]area 0

4) Declare network in the area 0 view [RTD-ospf-1-area-0.0.0.0]network 10.2.2.0 0.0.0.3

[RTD-ospf-1-area-0.0.0.0]network 192.1.1.0 0.0.0.3

[RTD-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0

Page 14: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

10

Chapter 2 OSPF Multi-area Experiment Guide

2.1 Networking and Service Description

Figure 2-1

� Four routers RTA, RTB, RTC and RTD run the OSPF concurrently. As shown in the figure, RTA and RTB belong to area 1, RTB and RTC belong to area 0, and RTC and RTD belong to area 2 (Note: The 10.1.1.2/30 of RTA belongs to area 1, and the 10.2.2.2/30 of RTC belongs to area 2)

� The four routers use their respective loopback as their respective router ID.

2.2 Command Line List

Table 2-1

Operation Version Command

Configure Router ID VRP 3.30 router id router-id

VRP 5.10 router id router-id

Enable OSPF and Enter the OSPF View

VRP 3.30 ospf [ process-id ] [ router-id router-id ]

VRP 5.10 ospf [ process-id ] [ router-id router-id ]

Enter OSPF Area view VRP 3.30 area area-id

VRP 5.10 area area-id

Run the OSPF protocol in the specified network segment

VRP 3.30 network ip-address wildcard-mask

VRP 5.10 network ip-address wildcard-mask

Page 15: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to the

text that you want to appear here.Error! Use the

Home tab to apply 标题标题标题标题 1 to the text that you

want to appear here.

Confidential Information of Huawei. No Spreading without Permission

11

2.3 Configuration Flow

Figure 2-2

2.4 Configuration Procedure

1) Specify Router ID

In system-view, specify a router ID. Generally, the Loopback address is used as router ID.

2) Run OSPF

In system-view, run OSPF. Adopt the default OSPF process 1.

3) Create an area

In the OSPF view, create the correseponding area. Different routers have different area codes. For example, area 0 and area 1 should be created on router B.

4) Declare network

Declare the network in the corresponding area view. Different routers declare different networks. For example, area 0 of router RTB should only declare 192.2.2.0.

2.5 Result Verification

1) Use the “Ping” or “Tracert” command to detect the connectivity of the network; [RTA]ping 10.2.2.1 PING 10.2.2.1: 56 data bytes, press CTRL_C to break

Reply from 10.2.2.1: bytes=56 Sequence=1 ttl=253 time=30 ms

Reply from 10.2.2.1: bytes=56 Sequence=2 ttl=253 time=29 ms

Reply from 10.2.2.1: bytes=56 Sequence=3 ttl=253 time=29 ms

Reply from 10.2.2.1: bytes=56 Sequence=4 ttl=253 time=29 ms

Reply from 10.2.2.1: bytes=56 Sequence=5 ttl=253 time=28 ms

--10.20.20.1 ping statistics--

5 packet(s) transmitted

5 packet(s) received

0.00% packet loss

round-trip min/avg/max = 28/29/3 ms

Page 16: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

12

[RTA]tracert 10.2.2.1

traceroute to 10.2.2.1(10.2.2.1) 30 hops max,40 bytes packet

1 10.1.1.2 10 ms 2 ms 2 ms

2 192.2.2.1 20 ms 19 ms 20 ms

3 10.2.2.1 30 ms 20 ms 20 ms

2) Use the “display ip routing-table” command to check the routing table. [RTA]display ip routing-table

Routing Table: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

2.2.2.2/32 OSPF 10 2 10.1.1.2 Ethernet0/0

3.3.3.3/32 OSPF 10 1564 10.1.1.2 Ethernet0/0

4.4.4.4/32 OSPF 10 1565 10.1.1.2 Ethernet0/0

10.1.1.0/30 DIRECT 0 0 10.1.1.1 Ethernet0/0

10.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

10.2.2.0/30 OSPF 10 1564 10.1.1.2 Ethernet0/0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.2.2.0/30 OSPF 10 1563 10.1.1.2 Ethernet0/0

[RTB]display ip routing-table

Routing Table: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 OSPF 10 2 10.1.1.1 Ethernet0/0

2.2.2.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0

3.3.3.3/32 OSPF 10 1563 192.2.2.1 Serial2/0

4.4.4.4/32 OSPF 10 1564 192.2.2.1 Serial2/0

10.1.1.0/30 DIRECT 0 0 10.1.1.2 Ethernet0/0

10.1.1.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0

10.2.2.0/30 OSPF 10 1563 192.2.2.1 Serial2/0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.2.2.0/30 DIRECT 0 0 192.2.2.2 Serial2/0

192.2.2.1/32 DIRECT 0 0 192.2.2.1 Serial2/0

192.2.2.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0

[RTC]display ip routing-table

Routing Table: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 OSPF 10 1564 192.2.2.2 Serial2/0

2.2.2.2/32 OSPF 10 1563 192.2.2.2 Serial2/0

3.3.3.3/32 DIRECT 0 0 127.0.0.1 InLoopBack0

4.4.4.4/32 OSPF 10 2 10.2.2.1 Ethernet0/0

10.1.1.0/30 OSPF 10 1563 192.2.2.2 Serial2/0

10.2.2.0/30 DIRECT 0 0 10.2.2.2 Ethernet0/0

10.2.2.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.2.2.0/30 DIRECT 0 0 192.2.2.1 Serial2/0

192.2.2.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.2.2.2/32 DIRECT 0 0 192.2.2.2 Serial2/0

[RTD]display ip routing-table

Routing Table: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 OSPF 10 1565 10.2.2.2 Ethernet0/0

2.2.2.2/32 OSPF 10 1564 10.2.2.2 Ethernet0/0

3.3.3.3/32 OSPF 10 2 10.2.2.2 Ethernet0/0

4.4.4.4/32 DIRECT 0 0 127.0.0.1 InLoopBack0

10.1.1.0/30 OSPF 10 1564 10.2.2.2 Ethernet0/0

10.2.2.0/30 DIRECT 0 0 10.2.2.1 Ethernet0/0

10.2.2.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

Page 17: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to the

text that you want to appear here.Error! Use the

Home tab to apply 标题标题标题标题 1 to the text that you

want to appear here.

Confidential Information of Huawei. No Spreading without Permission

13

192.2.2.0/30 OSPF 10 1563 10.2.2.2 Ethernet0/0

���� Note:

As compared with a single area, the result is exactly the same. Each router learns the routing information of each other by running OSPF to provide connectivity for the network.

3) Use the “display ospf lsdb” command to check the link state database. In addition, other commands can be used to check the OSPF-related information.

[RTA]dis ospf lsdb

OSPF Process 1 with Router ID 1.1.1.1 Link State Database

Area: 0.0.0.1

Type LinkState ID AdvRouter Age Len Sequence Metric Where

Stub 1.1.1.1 1.1.1.1 1055 24 0 0 SpfTree

Rtr 2.2.2.2 2.2.2.2 1062 36 80000004 0 SpfTree

Rtr 1.1.1.1 1.1.1.1 1055 48 80000007 0 SpfTree

Net 10.1.1.1 1.1.1.1 1055 32 80000002 0 SpfTree

SNet 2.2.2.2 2.2.2.2 941 28 80000002 1 Uninitialized

SNet 4.4.4.4 2.2.2.2 940 28 80000001 1564 Uninitialized

SNet 3.3.3.3 2.2.2.2 941 28 80000002 1563 Uninitialized

SNet 192.2.2.0 2.2.2.2 941 28 80000002 1562 Uninitialized

SNet 10.2.2.0 2.2.2.2 941 28 80000002 1563 Uninitialized

[RTB]display ospf lsdb

OSPF Process 1 with Router ID 2.2.2.2

Link State Database

Area: 0.0.0.0

Type LinkState ID AdvRouter Age Len Sequence Metric Where

Stub 2.2.2.2 2.2.2.2 1266 24 0 0 SpfTree

Stub 192.2.2.0 2.2.2.2 1203 24 0 0 SpfTree

Stub 3.3.3.3 3.3.3.3 1203 24 0 0 SpfTree

Rtr 2.2.2.2 2.2.2.2 183 60 8000000b 0 SpfTree

Rtr 4.4.4.4 4.4.4.4 1376 60 80000009 0 Uninitialized

Rtr 1.1.1.1 1.1.1.1 1375 60 80000007 0 Uninitialized

Rtr 3.3.3.3 3.3.3.3 184 60 8000000a 0 SpfTree

Net 10.2.2.1 4.4.4.4 1968 32 80000002 0 Uninitialized

SNet 4.4.4.4 3.3.3.3 1073 28 80000002 2 Uninitialized

SNet 10.1.1.0 2.2.2.2 1135 28 80000002 1 Inter List

SNet 1.1.1.1 2.2.2.2 1135 28 80000002 2 Inter List

SNet 10.2.2.0 3.3.3.3 1073 28 80000003 1 Uninitialized

Area: 0.0.0.1

Type LinkState ID AdvRouter Age Len Sequence Metric Where

Stub 1.1.1.1 1.1.1.1 1251 24 0 0 SpfTree

Rtr 2.2.2.2 2.2.2.2 183 36 80000005 0 SpfTree

Rtr 1.1.1.1 1.1.1.1 184 48 80000008 0 Clist

Net 10.1.1.1 1.1.1.1 184 32 80000003 0 SpfTree

SNet 2.2.2.2 2.2.2.2 1135 28 80000002 1 Inter List

SNet 4.4.4.4 2.2.2.2 1135 28 80000001 1564 Inter List

SNet 3.3.3.3 2.2.2.2 1135 28 80000002 1563 Inter List

SNet 192.2.2.0 2.2.2.2 1135 28 80000002 1562 Inter List

SNet 10.2.2.0 2.2.2.2 1135 28 80000002 1563 Inter List

���� Note:

By comparing the LSDB of RTA and the LSDB of RTB, we can see that the ABR router, i.e., RTB, needs to maintain the LSDB of two areas: area 1 and area 0.

Page 18: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

14

2.6 FAQ

Q: Why are many external areas divided in the OSPF?

A: In order to reduce the calculation amount of SPF.

Q: Why can SPF calculation amount be reduced by setting up many areas?

A: Since the area division is used to divide the planar network into many hierarchical netowrks, the size of the topology data table is reduced. When the network changes, the SPF calculation is only specific to the changed area, so the SPF calculation amount is reduced.

2.7 Configuration Reference

2.7.1 Configure the Port

I. Configure RTA

<Quidway>system-view

[Quidway]sysname RTA

[RTA]interface loopback 0

[RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255

[RTA-LoopBack0]quit

[RTA]interface ethernet 0/0

[RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252

[RTA-Ethernet0/0]quit

II. Configure RTB

<Quidway>system-view

[Quidway]sysname RTB

[RTB]interface loopback 0

[RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255

[RTB-LoopBack0]quit

[RTB]interface Ethernet 0/0

[RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252

[RTB-Ethernet0/0]quit

[RTB]interface serial 2/0

[RTB-Serial2/0]ip address 192.2.2.2 255.255.255.252

[RTB-Serial2/0]quit

III. Configure RTC

<Quidway>system-view

[Quidway]sysname RTC

[RTC]interface loopback 0

[RTC-LoopBack0]ip address 3.3.3.3 255.255.255.255

[RTC-LoopBack0]quit

[RTC]interface Ethernet 0/0

[RTC-Ethernet2/0]ip address 10.2.2.2 255.255.255.252

[RTC-Ethernet2/0]quit

[RTC]interface serial 2/0

[RTC-Serial2/0]ip address 192.2.2.1 255.255.255.252

[RTC-Serial2/0]quit

IV. Configure RTD

<Quidway>system-view

Page 19: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to the

text that you want to appear here.Error! Use the

Home tab to apply 标题标题标题标题 1 to the text that you

want to appear here.

Confidential Information of Huawei. No Spreading without Permission

15

[Quidway]sysname RTD

[RTD]interface loopback 0

[RTD-LoopBack0]ip address 4.4.4.4 255.255.255.255

[RTD-LoopBack0]quit

[RTD]interface ethernet 0/0

[RTD-Ethernet0/0]ip address 10.2.2.1 255.255.255.252

[RTD-Ethernet0/0]quit

2.7.2 OSPF Configuration

I. Configure RTA

1) Specify Router ID [RTA]router id 1.1.1.1

2) Run OSPF [RTA]ospf 1

3) Create area 1 [RTA-ospf-1]area 1

4) Declare network in the area 1 view [RTA-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3

[RTA-ospf-1-area-0.0.0.1]network 1.1.1.1 0.0.0.0

II. Configure RTB

1) Specify Router ID [RTB]router id 2.2.2.2

2) Run OSPF [RTB]ospf 1

3) Create area 0 [RTB-ospf-1]area 0

4) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3

[RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0

5) Create area 1 [RTB-ospf-1]area 1

6) Declare network in the area 1 view [RTB-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3

III. Configure RTC

1) Specify Router ID [RTC]router id 3.3.3.3

2) Run OSPF [RTC]ospf 1

3) Create area 0 [RTC-ospf-1]area 0

4) Declare network in the area 0 view [RTC-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3

[RTC-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0

Page 20: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

16

5) Create area 2 [RTC-ospf-1]area 2

6) Declare network in the area 2 view [RTC-ospf-1-area-0.0.0.2]network 10.2.2.0 0.0.0.3

IV. Configure Router D

1) Specify Router ID [RTD]router id 4.4.4.4

2) Run OSPF [RTD]ospf 1

3) Create area 2 [RTD-ospf-1]area 2

4) Declare network in the area 2 view [RTD-ospf-1-area-0.0.0.2]network 10.2.2.0 0.0.0.3

[RTD-ospf-1-area-0.0.0.2]network 4.4.4.4 0.0.0.0

Page 21: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to the

text that you want to appear here.Error! Use the

Home tab to apply 标题标题标题标题 1 to the text that you

want to appear here.

Confidential Information of Huawei. No Spreading without Permission

17

Chapter 3 OSPF Route Aggregration Configuration Guide

3.1 Networking and Service Introduction:

RRRR

L0: 1.1.1.1/32 L0: 3.3.3.3/32

10.1.1.0/30 192.2.2.0/30

RTA RTC

.2.1

RR.2 .1

Area 1 Area 0

L0: 2.2.2.2/32

L1: 110.1.1.2/32

L2: 110.1.1.1/32 RTB

RRRR

L0: 1.1.1.1/32 L0: 3.3.3.3/32

10.1.1.0/30 192.2.2.0/30

RTA RTC

.2.1

RR.2 .1

Area 1 Area 0

L0: 2.2.2.2/32

L1: 110.1.1.2/32

L2: 110.1.1.1/32 RTB

Figure 3-1

� On the basis of multi-area routing experiment, add L1 and L2 interfaces on the RTA, and enable OSPF. Perform route aggregration on the RTB.The route seen on RTC is the converged route.

3.2 Command Line List

Table 3-1

Operation Version Command

Configure the Route Summarization of OSPF Area

VRP 3.30 abr-summary ip-address mask [ advertise | not-advertise ]

VRP 5.10 abr-summary ip-address mask [ advertise | not-advertise | cost cost ]

Page 22: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

18

3.3 Configuration Flow

Figure 3-2

3.4 Configuration Procedure

1) Configure interfaces.

The RTA creates two interface addresses: L1: 110.1.1.1/32 and L2:110.1.1.2/32.

2) Declare network

In the area 1 view of RTA, declare the network corresponding to the newly created interface.

3) Configure aggregration on the ABR

Configure route aggregration of 110.1.1.0/24 in the area 1 view of RTB.

3.5 Result Verification

1) The L1-L2 route of RTA displayed on RTC is a convergent route.

Before aggregration:

[RTC]display ip routing-table

Routing Table: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 OSPF 10 1564 192.2.2.2 Serial2/0

2.2.2.2/32 OSPF 10 1563 192.2.2.2 Serial2/0

3.3.3.3/32 DIRECT 0 0 127.0.0.1 InLoopBack0

10.1.1.0/30 OSPF 10 1563 192.2.2.2 Serial2/0

110.1.1.1/32 OSPF 10 1564 192.2.2.2 Serial2/0

110.1.1.2/32 OSPF 10 1564 192.2.2.2 Serial2/0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.2.2.0/30 DIRECT 0 0 192.2.2.1 Serial2/0

192.2.2.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.2.2.2/32 DIRECT 0 0 192.2.2.2 Serial2/0

After aggregration:

Page 23: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to the

text that you want to appear here.Error! Use the

Home tab to apply 标题标题标题标题 1 to the text that you

want to appear here.

Confidential Information of Huawei. No Spreading without Permission

19

[RTC]display ip routing-table

Routing Table: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 OSPF 10 1564 192.2.2.2 Serial2/0

2.2.2.2/32 OSPF 10 1563 192.2.2.2 Serial2/0

3.3.3.3/32 DIRECT 0 0 127.0.0.1 InLoopBack0

10.1.1.0/30 OSPF 10 1563 192.2.2.2 Serial2/0

110.1.1.0/24 OSPF 10 1564 192.2.2.2 Serial2/0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.2.2.0/30 DIRECT 0 0 192.2.2.1 Serial2/0

192.2.2.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.2.2.2/32 DIRECT 0 0 192.2.2.2 Serial2/0

3.6 Configuration Reference

3.6.1 Configure the Port

I. Configure RTA

<Quidway>system-view

[Quidway]sysname RTA

[RTA]interface loopback 0

[RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255

[RTA-LoopBack0]quit

[RTA]interface loopback 1

[RTA-LoopBack1]ip address 110.1.1.1 255.255.255.255

[RTA-LoopBack1]quit

[RTA]interface loopback 2

[RTA-LoopBack2]ip add 110.1.1.2 255.255.255.255

[RTA-LoopBack2]quit

[RTA]interface ethernet 0/0

[RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252

[RTA-Ethernet0/0]quit

II. Configure RTB

<Quidway>system-view

[Quidway]sysname RTB

[RTB]interface loopback 0

[RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255

[RTB-LoopBack0]quit

[RTB]interface Ethernet 0/0

[RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252

[RTB-Ethernet0/0]quit

[RTB]interface serial 2/0

[RTB-Serial2/0]ip address 192.2.2.2 255.255.255.252

[RTB-Serial2/0]quit

III. Configure RTC

<Quidway>system-view

[Quidway]sysname RTC

[RTC]interface loopback 0

[RTC-LoopBack0]ip address 3.3.3.3 255.255.255.255

[RTC-LoopBack0]quit

[RTC]interface serial 2/0

[RTC-Serial2/0]ip address 192.2.2.1 255.255.255.252

[RTC-Serial2/0]quit

Page 24: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.Error! Use the Home tab to apply

标题标题标题标题 1 to the text that you want to

appear here.

Confidential Information of Huawei. No Spreading without Permission

20

3.6.2 OSPF Configuration

I. Configure RTA

1) Specify Router ID [RTA]router id 1.1.1.1

2) Run OSPF [RTA]ospf 1

3) Create area 1 [RTA-ospf-1]area 1

4) Declare network in the area 1 view [RTA-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3

[RTA-ospf-1-area-0.0.0.1]network 1.1.1.1 0.0.0.0

[RTA-ospf-1-area-0.0.0.1]network 110.1.1.1 0.0.0.0

[RTA-ospf-1-area-0.0.0.1]network 110.1.1.2 0.0.0.0

II. Configure RTB

1) Specify Router ID [RTB]router id 2.2.2.2

2) Run OSPF [RTB]ospf 1

3) Create area 0 [RTB-ospf-1]area 0

4) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3

[RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0

5) Create area 1 [RTB-ospf-1]area 1

6) Declare network in the area 1 view [RTB-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3

7) RTB performs route aggregration on area 1. [RTB-ospf-1-area-0.0.0.1]abr-summary 110.1.1.0 255.255.255.0 advertise

III. Configure RTC

1) Specify Router ID [RTC]router id 3.3.3.3

2) Run OSPF [RTC]ospf 1

3) Create area 0 [RTC-ospf-1]area 0

4) Declare network in the area 0 view [RTC-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3

[RTC-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0

Page 25: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear here.Error!

Use the Home tab to apply 标题标题标题标题 1 to the text

that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

21

Chapter 4 Experiment Guide to OSPF Electing DR/BDR

4.1 Networking and Service Description

Figure 4-1

� Two routers run OSPF concurrently, and are connected via Ethernet. Change the DR priority of RTB to 100, and make it become a DR router in the network.

4.2 Command Line List

Table 4-1

Operation Version Command

Configure Router ID VRP 3.30 router id router-id

VRP 5.10 router id router-id

Enable OSPF and Enter the OSPF View

VRP 3.30 ospf [ process-id ] [ router-id router-id ]

VRP 5.10 ospf [ process-id ] [ router-id router-id ]

Enter OSPF Area view VRP 3.30 area area-id

VRP 5.10 area area-id

Run OSPF protocol in the specified network segment

VRP 3.30 network ip-address wildcard-mask

VRP 5.10 network ip-address wildcard-mask

Configure the interface with a priority for DR election

VRP 3.30 ospf dr-priority priority_number

VRP 5.10 ospf dr-priority priority_number

Page 26: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear

here.Error! Use the Home tab to apply 标题标题标题标题1 to the text that you want to appear here.

华为技术有限公司 版权所有, 未经许可不得扩散

22

4.3 Configuration Flow

Figure 4-2

4.4 Configuration Procedure

1) Specify the Router ID

In system-view, specify a router ID. Generally, the Loopback address is used as router ID.

2) Set DR priorityof OSPF

In the Port view, Change the DR priority of RTB to 100.

3) Run OSPF

In system-view, run OSPF, and adopt the default OSPF process 1.

4) Create an area

In the OSPF view, create area 0.

5) Declare network

In the corresponding Area view, declare the network.

4.5 Result Verification

1) Use the “display ospf brief” command to check the summary information of the router OSPF.

[RTA]display ospf brief

OSPF Process 1 with Router ID 1.1.1.1

OSPF Protocol Information

RouterID: 1.1.1.1

Spf-schedule-interval: 5

Routing preference: Inter/Intra: 10 External: 150

Default ASE parameters: Metric: 1 Tag: 1 Type: 2

Page 27: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear here.Error!

Use the Home tab to apply 标题标题标题标题 1 to the text

that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

23

SPF computation count: 11

Area Count: 1 Nssa Area Count: 0

Area 0.0.0.0:

Authtype: none Flags: <>

SPF scheduled: <>

Interface: 10.1.1.1 (Ethernet0/0) Cost: 1 State: BackupDR Type: Broadcast

Priority: 1 Designated Router: 10.1.1.2 Backup Designated Router: 10.1.1.1

Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1

Interface: 1.1.1.1 (LoopBack0) --> 1.1.1.1

Cost: 1 State: PtoP Type: PointToPoint

Priority: 1

Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1

[RTB]display ospf brief

OSPF Process 1 with Router ID 2.2.2.2

OSPF Protocol Information

RouterID: 2.2.2.2

Spf-schedule-interval: 5

Routing preference: Inter/Intra: 10 External: 150

Default ASE parameters: Metric: 1 Tag: 1 Type: 2

SPF computation count: 10

Area Count: 1 Nssa Area Count: 0

Area 0.0.0.0:

Authtype: none Flags: <>

SPF scheduled: <>

Interface: 10.1.1.2 (Ethernet0/0)

Cost: 1 State: DR Type: Broadcast Priority: 100 Designated Router: 10.1.1.2 Backup Designated Router: 10.1.1.1

Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1

Interface: 2.2.2.2 (LoopBack0) --> 2.2.2.2

Cost: 1 State: PtoP Type: PointToPoint

Priority: 1

Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1

���� Note:

As seen from the above information, the current RTB is the DR router in the network, and its preference level is 100. But RTA is the BDR router in the network, and its preference level is the default value 1.

The DR election is decided by two parameters: DR priority and router ID.

The value range of DR priority is 0-255. Value 0 means no participation in the DR/BDR election. Namely, the router is always “DROther”, and the DR priority of each router is 1. Between routers, this parameter will be compared first to decide the DR. The higher the value, the better.

Router ID: The router ID must exist if the router needs to run the OSPF protocol. If no ID is configured, the system will select one from the IP addresses of the current interface as the router ID. If the DR priorityis the same, the routers will compare the value of router ID to decide the DR. The lower the router ID value, the better.

Page 28: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear

here.Error! Use the Home tab to apply 标题标题标题标题1 to the text that you want to appear here.

华为技术有限公司 版权所有, 未经许可不得扩散

24

4.6 FAQ

Q: What is DR/BDR? What are their functions?

A: In order for each router to broadcast the local state information to the whole autonomous system, many neighboring relationships should be set up between the routers. This way, the route change of any router will be transferred repeatedly, and the bandwidth resources will be wasted. In order to solve the problem, OSPF defines the "Designated Router" (DR). All the routers only need to transmit information to the DR for broadcasting the network link states. The router being the DR in its segment is not specified manually.

Q: In the current network, the DR priority of RTB is 100, the DR priority of RTA is 1. Now we change the DR priorityl of RTA to 200. Will it be changed to DR immediately?

A: No. The DR mechanism in the OSPF is on a lifelong basis. Unless the DR is disconnected, the BDR will not be changed to DR. Once the BDR is changed to DR, the OSPF network will not perform BDR election for DR any longer.

4.7 Configuration Reference

4.7.1 Configure the Port

I. Configure RTA

<Quidway>system-view

[Quidway]sysname RTA

[RTA]interface loopback 0

[RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255

[RTA-LoopBack0]quit

[RTA]interface ethernet 0/0

[RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252

[RTA-Ethernet0/0]quit

II. Configure RTB

<Quidway>system-view

[Quidway]sysname RTB

[RTB]interface loopback 0

[RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255

[RTB-LoopBack0]quit

[RTB]interface Ethernet 0/0

[RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252

[RTB-Ethernet0/0]quit

4.7.2 OSPF Configuration

I. Configure RTA

1) Specify the router ID [RTA]router id 1.1.1.1

2) Run OSPF [RTA]ospf 1

Page 29: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear here.Error!

Use the Home tab to apply 标题标题标题标题 1 to the text

that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

25

3) Create area 0 [RTA-ospf-1]area 0

4) Declare network in the area 0 view [RTA-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3

[RTA-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0

II. Configure RTB

1) Specify the router ID [RTB]router id 2.2.2.2

2) Setting priority [RTB-Ethernet0/0]ospf dr-priority 100

3) Run the OSPF [RTB]ospf 1

4) Create area 0 [RTB-ospf-1]area 0

5) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3

[RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0

NOTE: After you complete the configuration, maybe you can find RTA is the DR. In this case, you should reset the ospf process on RTA and RTB, to let the system votes DR again.

Page 30: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear

here.Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

26

Chapter 5 Area Authentication Configuration Guide

5.1 Networking and Service Description

Figure 5-1

� Run OSPF on RTA and RTB, and learn the loopback address of the opposite party.

� Use the Simple and Cipher authentication methods on the RTA to perform regional authentication for RTB.

5.2 Command Line List

Table 5-1

Operation Version Command

Configure Router ID VRP 3.30 router id router-id

VRP 5.10 router id router-id

Enable OSPF and Enter the OSPF View

VRP 3.30 ospf [ process-id ] [ router-id router-id ]

VRP 5.10 ospf [ process-id ] [ router-id router-id ]

Enter OSPF Area view VRP 3.30 Area area-id

VRP 5.10 Area area-id

Run the OSPF protocol in the specified network segment

VRP 3.30 network ip-address wildcard-mask

VRP 5.10 network ip-address wildcard-mask

Configure the area to support authentication type

VRP 3.30 authentication-mode { simple | md5 }

VRP 5.10 authentication-mode { simple | md5 | hmac-md5 }

Specify a password for OSPF simple text authentication

VRP 3.30 ospf authentication-mode simple password

VRP 5.10 ospf authentication-mode simple [ plain | cipher ] password

Specify the key-id and key for VRP 3.30 ospf authentication-mode md5 key_id key

Page 31: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear

here.Error! Use the Home tab to apply 标题标题标题标题1 to the text that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

27

Operation Version Command

OSPF MD5 authentication VRP 5.10

ospf authentication-mode { md5 | hmac-md5 } key-id [ plain | cipher ] password

5.3 Configuration Flow

Figure 5-2

5.4 Configuration Procedure

1) Authoring indication: [ List the steps required for completing the experiment, and provide necessary description on each step. The description should help the learner understand services more easily. Give the relevant parameters when giving the configuration description (e.g., IP address, key and name listed below). Try to make the configuration data normative, and avoid configuration conflict.]

2) Specify the router ID

In system-view, specify a router ID. Generally, the Loopback address is used as a router ID.

3) Run the OSPF

In system-view, run the OSPF. Apply the default OSPF process 1.

4) Create an area

In OSPF view, create area 0.

5) Declare network

In the Area view, declare the corresponding network, e.g., declare two networks 1.1.1.1 and 10.1.1.1 on the RTA.

6) Run the area authentication

Page 32: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear

here.Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

28

In the Area view, run the area authentication.

7) Authenticate use of port

Under the corresponding port, apply the authentication mechanism and configure a password.

5.5 Result Verification

1) Use the “display ip routing-table” command to compare the routing table information before and after RTA authentication.

When no authentication:

[RTA]display ip routing-table

Routing Tables: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

2.2.2.2/32 OSPF 10 2 10.1.1.2 Ethernet0/0

10.1.1.0/30 DIRECT 0 0 10.1.1.1 Ethernet0/0

10.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

Completing the configuration of authentication on RTA ,but do not configure

authentication on RTB ,you can’t find the route toward 2.2.2.2/32.

[RTA]display ip routing-table

Routing Tables: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

10.1.1.0/30 DIRECT 0 0 10.1.1.1 Ethernet0/0

10.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

���� Note:

If the authentication fails, the neighbor relationship cannot be established, and the previously learned route 2.2.2.2 cannot be deleted from the routing table due to timeout.

2) Then use the “display ospf error” command to check the error information. When enable authentication on RTA, but don’t enable it on RTB,you can find

errors occurred.

[RTA]display ospf error

OSPF Process 1 with Router ID 1.1.1.1

OSPF packet error statistics:

0: IP received my own packet 0: OSPF wrong packet type

0: OSPF wrong version 0: OSPF wrong checksum

0: OSPF wrong area id 0: OSPF area mismatch

0: OSPF wrong virtual link 15: OSPF wrong authentication type

0: OSPF wrong authentication key 0: OSPF too small packet

0: OSPF packet size > ip length 0: OSPF transmit error

0: OSPF interface down 0: OSPF unknown neighbor

0: HELLO: netmask mismatch 0: HELLO: hello timer mismatch

0: HELLO: dead timer mismatch 0: HELLO: extern option mismatch

0: HELLO: router id confusion 0: HELLO: virtual neighbor unknown

0: HELLO: NBMA neighbor unknown 0: DD: neighbor state low

0: DD: router id confusion 0: DD: extern option mismatch

0: DD: unknown LSA type 0: LS ACK: neighbor state low

0: LS ACK: wrong ack 0: LS ACK: duplicate ack

0: LS ACK: unknown LSA type 0: LS REQ: neighbor state low

0: LS REQ: empty request 0: LS REQ: wrong request

0: LS UPD: neighbor state low 0: LS UPD: newer self-generate LSA

Page 33: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear

here.Error! Use the Home tab to apply 标题标题标题标题1 to the text that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

29

0: LS UPD: LSA checksum wrong 0: LS UPD: received less recent LSA

0: LS UPD: unknown LSA type 0: OSPF routing: next hop not exist

0: DD: MTU option mismatch 0: ROUTETYPE: wrong type value

0: OPQ-9 : out of flooding scope 0: OPQ-10 : out of flooding scope

0: OPQ-11 : out of flooding scope

���� Note:

From the error information, we can see that the error lies in mismatch of authentication type.

5.6 Configuration Reference

5.6.1 Configure the Port

I. Configure RTA

<Quidway>system-view

[Quidway]sysname RTA

[RTA]interface loopback 0

[RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255

[RTA-LoopBack0]quit

[RTA]interface ethernet 0/0

[RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252

[RTA-Ethernet0/0]quit

II. Configure RTB

<Quidway>system-view

[Quidway]sysname RTB

[RTB]interface loopback 0

[RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255

[RTB-LoopBack0]quit

[RTB]interface Ethernet 0/0

[RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252

[RTB-Ethernet0/0]quit

5.6.2 OSPF Configuration

I. Configure RTA

1) Specify the router ID [RTA]router id 1.1.1.1

2) Run the OSPF [RTA]ospf 1

3) Create area 0 [RTA-ospf-1]area 0

4) Declare network in the area 0 view [RTA-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3

[RTA-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0

5) Run the area authentication [RTA-ospf-1-area-0.0.0.0]authentication-mode md5

6) Authenticate use of port [RTA-Ethernet0/0]ospf authentication-mode md5 1 huawei

Page 34: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear

here.Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

30

II. Configure RTB

1) Specify the router ID [RTB]router id 2.2.2.2

2) Run the OSPF [RTB]ospf 1

3) Create area 0 [RTB-ospf-1]area 0

4) Declare network in the area 0 view [RTB-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.3

[RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0

5) Run the area authentication [RTB-ospf-1-area-0.0.0.0]authentication-mode md5

6) Authenticate use of port [RTB-Ethernet0/0]ospf authentication-mode md5 1 huawei

Page 35: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear here.Error!

Use the Home tab to apply 标题标题标题标题 1 to the text

that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

31

Chapter 6 STUB Area Configuration Guide

6.1 Networking and Service Introduction

Figure 6-1

� On the basis of introducing the external route to the multi-area OSPF, configure area 1 to STUB area.

� The Stub area is a special type of OSPF area, which does not receive or disseminate type-5 LSA (AS-external-LSAs). For the network that generates plenty of type-5 LSA, such processing mode can shorten the LSDB of the router in the Stub area effectively, and relieve the occupation of SPF computation for the router resources. Generally, the Stub area is located at the border of the autonomous system.

� To ensure that the packets from the Stub area to the autonomous system can be forwarded correctly, the ABR of the Stub area will release a default route to this area, and only disseminates packets in this area.

� Creat vlan 2 and vlan 3 on switch, on RTD configures static routes towards vlan2 and vlan 3. On ospf view import static these static routes.

6.2 Command Line List

Table 6-1

Operation Version Command

Configure an area to be the STUB VRP 3.30 stub [ no-summary ]

Page 36: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear

here.Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

32

area VRP 5.10 stub [ no-summary ]

Configure the cost of the default route transmitted by OSPF to the STUB area

VRP 3.30 default-cost value

VRP 5.10 default-cost value

6.3 Configuration Procedure

1) Configure area 1 to stub

6.4 Result Verification

6.4.1 Before Configuration:

Display the lsdb and routing-table of RTA before configure stub area.

[RTA]display ospf lsdb

OSPF Process 1 with Router ID 1.1.1.1

Link State Database

Area: 0.0.0.1

Type LinkState ID AdvRouter Age Len Sequence Metric Where

Stub 1.1.1.1 1.1.1.1 1661 24 0 0 SpfTree

Rtr 2.2.2.2 2.2.2.2 1651 36 80000008 0 SpfTree

Rtr 1.1.1.1 1.1.1.1 1661 48 8000000b 0 SpfTree

Net 10.1.1.1 1.1.1.1 1661 32 80000006 0 SpfTree

SNet 2.2.2.2 2.2.2.2 1644 28 80000005 1 Uninitialized

SNet 4.4.4.4 2.2.2.2 1644 28 80000004 1564 Uninitialized

SNet 3.3.3.3 2.2.2.2 1644 28 80000005 1563 Uninitialized

SNet 192.2.2.0 2.2.2.2 1644 28 80000005 1562 Uninitialized

SNet 10.2.2.0 2.2.2.2 1644 28 80000005 1563 Uninitialized

ASB 4.4.4.4 2.2.2.2 323 28 80000001 1563 Uninitialized

AS External Database: Type LinkState ID AdvRouter Age Len Sequence Metric Where

ASE 110.1.1.0 4.4.4.4 326 36 80000001 1 Uninitialized ASE 110.1.2.0 4.4.4.4 326 36 80000001 1 Uninitialized

[RTA]display ip routing-table

Routing Table: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

1.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

2.2.2.2/32 OSPF 10 2 10.1.1.2 Ethernet0/0

3.3.3.3/32 OSPF 10 1564 10.1.1.2 Ethernet0/0

4.4.4.4/32 OSPF 10 1565 10.1.1.2 Ethernet0/0

10.1.1.0/30 DIRECT 0 0 10.1.1.1 Ethernet0/0

10.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

10.2.2.0/30 OSPF 10 1564 10.1.1.2 Ethernet0/0

110.1.1.0/24 O_ASE 150 1 10.1.1.2 Ethernet0/0

110.1.2.0/24 O_ASE 150 1 10.1.1.2 Ethernet0/0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.2.2.0/30 OSPF 10 1563 10.1.1.2 Ethernet0/0

6.4.2 After Configuring Area 1 to Stub

Page 37: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear here.Error!

Use the Home tab to apply 标题标题标题标题 1 to the text

that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

33

Notes: The following information describe the different results of the commands “stub” and “stub no-summary” These are the results when you use the command “ [RTA-ospf-1-area-0.0.0.1]stub [RTB-ospf-1-area-0.0.0.1]stub”

[RTA]display ospf lsdb

OSPF Process 1 with Router ID 1.1.1.1

Link State Database

Area: 0.0.0.1

Type LinkState ID AdvRouter Age Len Sequence Metric Where

Stub 1.1.1.1 1.1.1.1 96 24 0 0 SpfTree

Rtr 2.2.2.2 2.2.2.2 91 36 8000001a 0 SpfTree

Rtr 1.1.1.1 1.1.1.1 96 48 8000001b 0 SpfTree

Net 10.1.1.2 2.2.2.2 91 32 80000002 0 SpfTree

SNet 0.0.0.0 2.2.2.2 111 28 80000002 1 Uninitialized SNet 2.2.2.2 2.2.2.2 107 28 80000001 1 Uninitialized

SNet 4.4.4.4 2.2.2.2 107 28 80000001 1564 Uninitialized SNet 3.3.3.3 2.2.2.2 107 28 80000001 1563 Uninitialized

SNet 192.2.2.0 2.2.2.2 111 28 80000002 1562 Uninitialized SNet 10.2.2.0 2.2.2.2 107 28 80000001 1563 Uninitialized

[RTA]display ip routing-table

Routing Table: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

0.0.0.0/0 OSPF 10 2 10.1.1.2 Ethernet0/0

1.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

2.2.2.2/32 OSPF 10 2 10.1.1.2 Ethernet0/0

3.3.3.3/32 OSPF 10 1564 10.1.1.2 Ethernet0/0

4.4.4.4/32 OSPF 10 1565 10.1.1.2 Ethernet0/0

10.1.1.0/30 DIRECT 0 0 10.1.1.1 Ethernet0/0

10.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

10.2.2.0/30 OSPF 10 1564 10.1.1.2 Ethernet0/0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

192.2.2.0/30 OSPF 10 1563 10.1.1.2 Ethernet0/0

���� Note:

1.If you still find AS External Database on RTA, reset ospf process on RTA.

2.The default route of RTA is type-3 LSA and is generated by ABR-RTB.

3. Take a look at the routing table of RTA: The external route disappears, and a new default route appears,

but inter-area routes still exist.

4.In order to further shorten the lsdb and the routing table, use the no-summary parameter on the

ABR-RTB.

These are the results when you use the command “ [RTA-ospf-1-area-0.0.0.1]stub [RTB-ospf-1-area-0.0.0.1] stub no-summary ”

[RTA]display ospf lsdb

Page 38: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear

here.Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

34

OSPF Process 1 with Router ID 1.1.1.1

Link State Database

Area: 0.0.0.1

Type LinkState ID AdvRouter Age Len Sequence Metric Where

Stub 1.1.1.1 1.1.1.1 65 24 0 0 SpfTree

Rtr 2.2.2.2 2.2.2.2 60 36 8000001f 0 SpfTree

Rtr 1.1.1.1 1.1.1.1 65 48 80000007 0 SpfTree

Net 10.1.1.1 1.1.1.1 65 32 80000002 0 SpfTree

SNet 0.0.0.0 2.2.2.2 69 28 80000004 1 Uninitialized

[RTA]display ip routing-table

Routing Table: public net

Destination/Mask Protocol Pre Cost Nexthop Interface

0.0.0.0/0 OSPF 10 2 10.1.1.2 Ethernet0/0

1.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

10.1.1.0/30 DIRECT 0 0 10.1.1.1 Ethernet0/0

10.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0

6.5 Configuration Reference

6.5.1 Configure the Port

I. Configure RTA

<Quidway>system-view

[Quidway]sysname RTA

[RTA]interface loopback 0

[RTA-LoopBack0]ip address 1.1.1.1 255.255.255.255

[RTA-LoopBack0]quit

[RTA]interface ethernet 0/0

[RTA-Ethernet0/0]ip address 10.1.1.1 255.255.255.252

[RTA-Ethernet0/0]quit

II. Configure RTB

<Quidway>system-view

[Quidway]sysname RTB

[RTB]interface loopback 0

[RTB-LoopBack0]ip address 2.2.2.2 255.255.255.255

[RTB-LoopBack0]quit

[RTB]interface Ethernet 0/0

[RTB-Ethernet0/0]ip address 10.1.1.2 255.255.255.252

[RTB-Ethernet0/0]quit

[RTB]interface serial 2/0

[RTB-Serial2/0]ip address 192.2.2.2 255.255.255.252

[RTB-Serial2/0]quit

III. Configure RTC

<Quidway>system-view

[Quidway]sysname RTC

[RTC]interface loopback 0

[RTC-LoopBack0]ip address 3.3.3.3 255.255.255.255

[RTC-LoopBack0]quit

[RTC]interface Ethernet 0/0

[RTC-Ethernet2/0]ip address 10.2.2.2 255.255.255.252

[RTC-Ethernet2/0]quit

[RTC]interface serial 2/0

Page 39: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear here.Error!

Use the Home tab to apply 标题标题标题标题 1 to the text

that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

35

[RTC-Serial2/0]ip address 192.2.2.1 255.255.255.252

[RTC-Serial2/0]quit

IV. Configure RTD

<Quidway>system-view

[Quidway]sysname RTD

[RTD]interface loopback 0

[RTD-LoopBack0]ip address 4.4.4.4 255.255.255.255

[RTD-LoopBack0]quit

[RTD]interface ethernet 0/0

[RTD-Ethernet0/0]ip address 10.2.2.1 255.255.255.252

[RTD-Ethernet0/0]quit

[RTD]interface ethernet 0/1

[RTD-Ethernet0/1]ip address 10.3.3.1 255.255.255.252

[RTD-Ethernet0/1]quit

V. Configure switch

[Quidway]sysname switch

[switch]vlan 2

[switch-vlan2]quit

[switch]vlan 3

[switch-vlan3]quit

[switch]interface vlan 1

[switch-Vlan-interface1]ip address 10.3.3.2 255.255.255.252

[switch-Vlan-interface1]quit

[switch]interface vlan 2

[switch-Vlan-interface2]ip address 110.1.1.1 255.255.255.0

[switch-Vlan-interface2]quit

[switch]interface vlan 3

[switch-Vlan-interface3]ip address 110.1.2.1 255.255.255.0

[switch]ip route-static 0.0.0.0 0.0.0.0 10.3.3.1

6.5.2 OSPF Configuration

I. Configure RTA

1) Specify Router ID [RTA]router id 1.1.1.1

2) Run OSPF [RTA]ospf 1

3) Create area 1 [RTA-ospf-1]area 1

4) Declare network in the area 1 view [RTA-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3

[RTA-ospf-1-area-0.0.0.1]network 1.1.1.1 0.0.0.0

II. Configure RTB

1) Specify Router ID [RTB]router id 2.2.2.2

2) Run OSPF [RTB]ospf 1

3) Create area 0 [RTB-ospf-1]area 0

4) Declare network in the area 0 view

Page 40: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear

here.Error! Use the Home tab to apply 标题标题标题标题

1 to the text that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

36

[RTB-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3

[RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0

5) Create area 1 [RTB-ospf-1]area 1

6) Declare network in the area 1 view [RTB-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.3

III. Configure RTC

1) Specify Router ID [RTC]router id 3.3.3.3

2) Run OSPF [RTC]ospf 1

3) Create area 0 [RTC-ospf-1]area 0

4) Declare network in the area 0 view [RTC-ospf-1-area-0.0.0.0]network 192.2.2.0 0.0.0.3

[RTC-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0

5) Create area 2 [RTC-ospf-1]area 2

6) Declare network in the area 2 view [RTC-ospf-1-area-0.0.0.2]network 10.2.2.0 0.0.0.3

IV. Configure Router D

1) Specify Router ID [RTD]router id 4.4.4.4

2) Run OSPF [RTD]ospf 1

3) Create area 2 [RTD-ospf-1]area 2

4) Declare network in the area 2 view [RTD-ospf-1-area-0.0.0.2]network 10.2.2.0 0.0.0.3

[RTD-ospf-1-area-0.0.0.2]network 4.4.4.4 0.0.0.0

5) Configure static routes towords vlan 2 and vlan 3 [RTD]ip route-static 110.1.1.0 255.255.255.0 10.3.3.2

[RTD]ip route-static 110.1.2.0 255.255.255.0 10.3.3.2

6) On ospf view import these static routes [RTD-ospf-1]import-route static

6.5.3 Configure stub area

I. Set area 1 of RTA to Stub

[RTA-ospf-1-area-0.0.0.1]stub

Page 41: OSPF Practice Guide

NE Series Routers OSPF Protocol Features Practice Guide

Error! Use the Home tab to apply 标题标题标题标题 1 to

the text that you want to appear here.Error!

Use the Home tab to apply 标题标题标题标题 1 to the text

that you want to appear here.

Confidential Information of Huawei. No Spreading without Permission

37

II. Set area 1 of RTB to stub. Since RTB is ABR, set stub no-summary

[RTB-ospf-1-area-0.0.0.1]stub no-summary