Professional Documents
Culture Documents
10 OSPF Basics
10 OSPF Basics
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and the
customer. All or part of the products, services and features described in this document may not be within the
purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information, and
recommendations in this document are provided "AS IS" without warranties, guarantees or representations of any
kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the preparation
of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this
document do not constitute a warranty of any kind, express or implied.
Website: https://e.huawei.com/
Huawei Certification System
Huawei Certification follows the "platform + ecosystem" development strategy, which is a new
collaborative architecture of ICT infrastructure based on "Cloud-Pipe-Terminal". Huawei has set up
a complete certification system consisting of three categories: ICT infrastructure certification,
platform and service certification, and ICT vertical certification. It is the only certification system
that covers all ICT technical fields in the industry. Huawei offers three levels of certification:
Huawei Certified ICT Associate (HCIA), Huawei Certified ICT Professional (HCIP), and Huawei
Certified ICT Expert (HCIE). Huawei Certification covers all ICT fields and adapts to the industry
trend of ICT convergence. With its leading talent development system and certification standards,
it is committed to fostering new ICT talent in the digital era, and building a sound ICT talent
ecosystem.
Huawei Certified ICT Associate-Datacom (HCIA-Datacom) is designed for Huawei's frontline
engineers and anyone who want to understand Huawei's datacom products and technologies. The
HCIA-Datacom certification covers routing and switching principles, basic WLAN principles,
network security basics, network management and O&M basics, SDN and programmability and
automation basics.
The Huawei certification system introduces the industry, fosters innovation, and imparts cutting-
edge datacom knowledge.
Contents
1 OSPF Basics
1.1 Foreword
Static routes are manually configured. If a network topology changes, static routes have to be
manually adjusted, which restricts the large-scale application of static routes on the live network.
Dynamic routing protocols are widely used on live networks because of their high flexibility, high
reliability, and easy scalability. The Open Shortest Path First (OSPF) protocol is a widely used dynamic
routing protocol.
This course describes basic concepts, working mechanism, and basic configurations of OSPF.
1.2 Objectives
On completion of this course, you will be able to:
⚫ Describe the advantages and classification of dynamic routing protocols.
⚫ Describe basic OSPF concepts and usage scenarios.
⚫ Describe the working mechanism of OSPF.
⚫ Implement basic OSPF configurations.
⚫ OSPF Process 1 with Router ID 1.1.1.1: The local OSPF process ID is 1, and the local OSPF router
ID is 1.1.1.1.
⚫ Area ID of the neighboring OSPF router.
⚫ Address: address of the neighbor interface.
⚫ GR State: GR status after OSPF GR is enabled. GR is an optimized function. The default value is
Normal.
⚫ State: neighbor status. In normal cases, after LSDB synchronization is complete, the neighbor
stably stays in the Full state.
⚫ Mode: whether the local device is the master or backup device during link status information
exchange.
⚫ Priority: priority of the neighboring router. The priority is used for DR election.
⚫ DR: designated router.
⚫ BDR: backup designated router.
⚫ MTU: MTU of a neighbor interface.
⚫ Retrans timer interval: interval (in seconds) at which LSAs are retransmitted.
⚫ Authentication Sequence: authentication sequence number.
⚫ A typical example is a PPP link. When an interface uses PPP encapsulation, the default network
type of the OSPF interface is P2P.
Broadcast Multiple Access (BMA)
The process-id parameter specifies an OSPF process. The default process ID is 1. OSPF supports
multiple processes. Multiple OSPF processes can separately run on the same device. The router-id
command is used to manually specify the ID of a device. If no ID is specified, the system automatically
selects the IP address of an interface as the device ID.
Step 2 (OSPF view) Create an OSPF area and enter the OSPF area view.
The area command creates an OSPF area and displays the OSPF area view.
The area-id value can be a decimal integer or in dotted decimal notation. If the value is an integer, it
ranges from 0 to 4294967295.
Step 3 (OSPF area view) Specify the interface that runs OSPF.
The network command specifies the interface that runs OSPF and the area to which the interface
belongs. The network-address parameter specifies the network segment address of the interface. The
wildcard-mask parameter is the wildcard of an IP address, which is equivalent to the reverse mask of
OSPF Basics Page 19
the IP address (0 is converted to 1, and 1 to 0). For example, 0.0.0.255 indicates that the mask length
is 24 bits.
The ospf cost command sets a cost for an OSPF interface. By default, OSPF automatically calculates
the cost of an interface based on the interface bandwidth. The cost value is an integer ranging from 1
to 65535.
The bandwidth-reference command sets a bandwidth reference value that is used to calculate
interface costs. The value ranges from 1 to 2147483648, in Mbit/s. The default value is 100 Mbit/s.
The ospf dr-priority command sets a priority for an interface that participates in DR election. A larger
value indicates a higher priority. The value ranges from 0 to 255.
Configuring OSPF
Verification
1.6 Quiz
1. (Single) Which of the following statements about OSPF is incorrect? ( )
A. OSPF Hello packets are sent every 10s by default.
B. In OSPF, non-backbone areas must be connected to backbone areas.
C. The highest adjacency status is 2-way.
D. During DR/BDR election, priority 0 indicates that the DR/BDR is not elected.
2. (Multiple) Two routers run OSPF, but the neighbor relationship cannot be established. Which of
the following are possible causes? ( )
A. The router IDs are the same.
B. Interface IP addresses are not in the same network segment.
C. Different regions
D. OSPF processes at both ends are not in the same process.
3. (Multiple) Which of the following network types require DR and BDR for OSPF? ( )
A. BMA
B. P2P
C. NBMA
D. NBMA
4. (Multiple) In the process of establishing OSPF neighbor relationships and adjacencies, which of
the following states are stable? ( )
A. Exstart
B. Two-way
C. Exchange
D. Full
5. (Multiple) In which of the following situation will the establishment of adjacencies between
routers be triggered? ( )
A. Two routers on a point-to-point link
OSPF Basics Page 23
1.7 Summary
OSPF is a widely used routing protocol on the live network. This presentation describes basic concepts,
application scenarios, and basic configurations of OSPF.
The router ID, area, OSPF neighbor table, LSDB table, and OSPF routing table are basic OSPF concepts.
Describe the establishment of OSPF neighbor relationships and adjacencies, which helps you better
understand the link-state routing protocol.
OSPF has more interesting details, such as LSA types, the SPF calculation process, and the OSPF special
area. For more OSPF information, please continue your Huawei HCIP-Datacom certification courses.