Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

OSPF Protocol and its Application

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

OSPF (Open Shortest Path First Open shortest path first) is an internal gateway protocol (inteiror geteway protocol, referred to as IGP), which is used to make routing decisions in a single autonomous system. OSPF is a link-state routing protocol.

OSPF establishes a link-state database by advertising the status of network interfaces between routers to generate the shortest path tree, and each OSPF uses these shortest paths to construct routing tables.

In short, OSPF is: 1. OSPF is a common network

2. OSPF has no network restrictions.

3. OSPF supports hierarchical network design (layer 2)

Divided into two layers: backbone area (area 0)

Non-backbone area (area non-0)

In the OSPF network, all non-backbone areas must be connected to the backbone areas.

The process of establishing the routing table:

1. Set up neighbor-neighbor table

Through the negotiation of parameters, the establishment conditions of neighbors are met.

Command: switch#show ip ospf neighbor / / View adjacency table

Neighbor: any device that appears in this table becomes a neighbor

Adjacency: can be adjacency only if the state is full (the databases on both sides must be identical)

Some parameters in the table:

Neighbor ID: OSPF router ID of the peer device

Pri (priority): priority of the peer device, default is 1

State/role: status and role of peer device

The status of state can be divided into the following categories:

1. Down indicates that the neighbor relationship is over.

2. Initialization status of init, indicating receipt of an OSPF packet sent by the other party

3. Attempt this status can only be seen in unicast.

4. Two-way two-way communication status, indicating that the OSPF packet sent by the other party contains its own information.

5. The main purpose of the initialization state of exstart exchange is to determine the master-slave relationship in the exchange process, so as to realize that the communication state is stable and reliable in the later exchange process.

6. Exchange exchange state, in which the synchronization of the database is carried out, essentially exchanging only the directory of the database.

7. Loading loading status, which loads the real entries of both databases.

8. Full is completely adjacent to each other, and the contents of the databases of both sides are exactly the same.

2. Form the database LSDB (link-state database)

What the table contains are database entries

That is, LSA (link-state advertisment) link-state advertisement

3. Calculate the route-routing table

Each OSPF router will calculate the route through the SPF algorithm based on the LSA in the database, thus forming the final routing table.

Message type of OSPF

Hello: used to establish, maintain and dismantle neighbor relationships

The message is sent periodically, the sending interval is 10s, and the neighbor survival time is 40s. The transmission interval of non-broadcast network is 30s, and the survival time of neighbors is 120s.

DBD: Database Description, data description message, used to exchange preparations before synchronizing the database.

LSU: link-state update, which contains LSA

LSAck: link-state acknowledgement message to ensure reliable transmission of LSA

LSR: link-state request

Configuration commands:

Router (config) # router ospf 1 / / enable ospf process 1

Router (config) # router-id 1.1.1.1 / / give router an id number

Router (config) # network 192.168.1.0 0.0.255 area 0

Check out some commands related to OSPF:

Router#show ip router ospf / / View the OSPF routing table

Router#show ip ospf database / / View OSPF database

Router#show ip neighbor / / View adjacency table

Router#show ip protocol / / View the dynamic routing protocols running on the current device

Router#show ip ospf / / View OSPF related information

Liu Pengfei QQ905058582

Welcome to exchange

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report