Got it

Brief summary of the OSPF protocol

Latest reply: Dec 29, 2018 09:19:31 1284 2 9 0 1

Brief summary of the OSPF protocol
Open Shortest Path First (OSPF) is an internal gateway protocol (Interior Gateway Protocol,
IGP is short for Interior Gateway Protocol (IGP). It is used to determine routes in a autonomous system (AS).

OSPF protocol number 89
It is not applicable to any transport layer protocol to ensure its reliability. It has a built-in reliable transmission protocol. Use classless codes to support VLSM and non-continuous networks.
Dijkstra algorithm
Certification: Plain text and MD5
Multicast 224.0.0.5 (all SPF routes) 224.0.0.6 (DR and BDR)
Management distance: 110

LSA link status notification
LSDB link status database

Neighbor table: Discovers and sets up a neighbor relationship.
Topology Table -Setting Up a DBD
Routing table: Calculates the optimal path to each router based on the SPF algorithm.
Four types of routers in OSPF
1. Internal router: Routers in the same area of all ports maintain a link state database.
2. Backbone router: A router that has a port connected to the backbone area.
3. The regional border router (ABR): has a router connected to a multi-area port, and is generally used as an egress of an area. ABRs are connected to each other.
A link state database is established in the connected area to send the route summary information of the connected area to the backbone area, and the ABR in the backbone area is negative.
It is responsible for sending the information to each area.
4. An autonomous system border router (ASBR): has at least one router that is connected to an external autonomous domain network (such as a non-OSPF network) port, and is responsible for transferring non-OSPF network information to an OSPF network.

Five types of OSPF packets
1. Hello packet
1. Discover neighbors.
2. Before becoming a neighbor, you must negotiate some parameters in the Hello packet. By default, the hello interval is 10s and the dead interval is four times.
The 3.Hello packet plays the role of keepalive between neighbors.
4. Bidirectional communication between neighbors is allowed.
5. The DR and BDR are elected on the NBMA(Nonbroadcast Multi-access) network.
The Hello Packet file contains the following information:
1. RID of the source router
2. Area ID of the source router
3. Mask of the source router interface
4. Authentication type and authentication information of the interface on the source router
5. Interval for sending Hello packets on the interface of the source router
6. Invalid interval of the source router interface
7. Priority
IP address of the 8.DR/BDR interface
9. Five flags (flag bit)
10. RIDs of all neighbors of the source router
2. Database description DD (also called DBD) data packet
1. The first DD packet is used to elect the master router (master and slave). The master router with the highest router ID is elected as the master router.
2. In a virtual link, the MTU field must be set to 0.
3. The link state requests the LSR packet to request the LSA in the DD of the peer.
This message is sent when some routing database information is lost or outdated.
4. Link status update LSU packets are used to implement LSA flooding.
5. The LSACK packet is used to acknowledge each LSA and the LSACK is sent to acknowledge the LSU.


Note the following when selecting the DR and BDR: The DR and BDR need to be elected only on the MA and NBMA networks.
1. The 0 priority is not involved in the election.
2. The router with the highest priority is the DR.
3. If the priorities are the same, the router ID is the DR. Router ID The maximum IP address of the loopback interface is used. If no loopback interface is available, use the maximum IP address of the actual interface.
4. By default, the priority is 1.
5. Note that when the DR/BDR is elected on the network and a new router with a higher priority is available, the DR/BDR is not re-elected.
After the 6.DR/BDR election is complete, DRother only establishes adjacencies with DR/BDR. All routers send Hello packets to AllSPFRouters.
Address 224.0.0.5 so that they can track the information of other neighbors, that is, the DR floods update packet to 224.0.0.5;DRother and only multicast.
Update packet to AllDRouter address 224.0.0.6. Only DR/BDR listens to this address.
7. The BDR is elected first and the DR is elected.
The priority of 8.ID is as follows: Maximum IP address of the route id>loopback address>route interface

Indicates the status of an OSPF router before it is completely adjacent. Generally, the value is not 2.
1.Down: initialization status, indicating that no data packet is received from the neighbor.
2.Attempt: is applicable only to NBMA networks. In NBMA networks, neighbors are manually specified. In this state, routers use HelloInterval.
Replaces PollInterval to send Hello packets.
3.Init: indicates that Hello packets are received in DeadInterval, but 2-Way communication is not established, and only unidirectional communication is established.
4.two-way: A bidirectional session is set up. The DR and BDR are elected in the 2-way state. The 2-way state is maintained between DROther.
Indicates the initial state of 5.ExStart: information exchange. In this state, the local router and the neighbor establish the Master/Slave relationship and determine the DD.
Sequence Number: The router with the highest RID interface becomes the master router. The master router sends LSAs first.
6.Exchange: information exchange status. The local router sends the database description packet to the neighbor.
7.Loading: information loading status. The local router and the neighbor exchange LSAs.
8.Full: adjacency status. This adjacency occurs in Router LSAs and Network LSA.

Common LSA
Type 1 LSA: Router LSA indicates the status and cost of a link connected to a router. It is flooded only in the local area.
Type 2 LSA: Network LSA is generated by the DR. No network LSA exists if no DR is available. The LSA is flooded only in the local area.
Network summary LSAs of Type 3 LSAs are generated by ABRs and advertised to other areas. Type 3 LSAs are flooded only in one area and ABR.
The generates Type 3 LSAs and floods them to other areas. The // summary LSA does not carry any detailed routing topology information but advertises only the network prefix.
Class 4 LSA ASBR summary LSAs are used to advertise ASBR information.
External LSAs of Type 5 LSAs describe the routes outside the OSPF area and are advertised by the ASBR.
Type 7 LSA NSSA external LSAs are used to advertise the OSPF external routes imported from the NSSA. The ABR converts the seven types of LSAs into five types of external LSAs.

OSPF area
Backbone area area0 area
All internal and external routes that are allowed in the standard area
External routes (Type 5 and Type 4) are not allowed in the stub area.
External routes and summarized routes are not allowed in the stub area (3.4.5 class).
Stub feature 1. One or more ABRs exist in the area.
2. All routers in the stub area need to be configured with stub area features.
3. No ASBR exists in the area.
4. The region cannot be a region 0.
5. There is no virtual link traversal in this area.
External routes (4.5 types) are not accepted in the NSSA area.
External routes and summarized routes are not accepted in the complete last (NSSA) area (3.4.5 class).
NSSA Type-1.5 is prohibited from entering the NSSA.
2. ASBRs are allowed in this area.
3. The ASBR in the area imports external routes to generate Type 7 LSAs.
4. The 7 types of propagation in this area are converted from ABRs to 5 types.

Network Type
Point-to-point (P2P) types are usually encapsulated using PPP or HDLC.
OSPF can automatically detect neighbors.
The multicast address 224.0.0.5 is used to send packets.
The broadcast multi-channel access network is usually used on the LAN, Ethernet, or token ring.
Type of the interface for OSPF to automatically discover neighbors
The DR and BDR need to be elected.
The DR sends the multicast 224.0.0.5 and receives the 224.0.0.6.
By default, the interval at which Hello packets are sent is 10s dead, and the interval is 40s.
Non-broadcast multi-access network NBMA supports multiple routers but does not have the broadcast capability.
Commonly used ATM, X.25, and FR
The neighbor cannot be automatically discovered.
The DR and BDR need to be elected.
By default, the interval at which Hello packets are sent is 30s dead, and the interval is 120 seconds.
Point-to-multipoint network type. In this environment, you need to manually specify the network type.
The DR and BDR do not need to be elected. Only one subnet is used.
Automatically discovers neighbors by sending multicast packets.
By default, the interval for sending Hello packets is 30s dead, and the interval is 120 seconds.

Virtual links need to be used when the virtual link (Virtual Link) is in the following two situations:
1. Connect to a backbone area through a non -backbone area.
2. Connecting a part of the backbone area of a segment through a non -backbone area.
A virtual link is a logical tunnel. The rules for configuring a virtual link are as follows:
1. Virtual links must be configured between two ABRs.
2. The area that the virtual link passes through is called Transit Area, which must have complete routing information.
3. Transit Area cannot be Stub Area..
4. Do not use virtual links as much as possible, which increases the complexity of the network and increases the difficulty of troubleshooting.

The OSPF protocol has the following advantages:

1. Fast convergence. OSPF is a real LOOP-FREE routing protocol. Derived from its algorithm itself -link state and shortest path tree algorithm

2. Region division? The concept of regional (Area) division is proposed. After the autonomous system is divided into different areas, the summary of routing information between areas is greatly improved.
The number of routing information that needs to be transferred is reduced, and the routing information does not increase sharply with the expansion of the network scale.

3. Overhead control The cost of the protocol is controlled to the minimum. The purpose is as follows:
It is used to discover and maintain the neighbor relationship. It is a periodically sent Hello packet that does not contain routing information, which is very short. The packet that contains routing information is triggered to be updated.
The is sent only when the route changes. To enhance the robustness of the protocol, the retransmits the message every 30 minutes.

4. On a broadcast network, multicast addresses (not broadcast addresses) are used to send packets, reducing interference to other network devices that do not run OSPF.

5. In various multi-access networks (broadcast network and non-broadcast multiple access), the number of route exchanges (synchronization) between routers on the same network segment is reduced from O(N×N) to O(N) by electing a designated router (DR).

6. The OSPF protocol puts forward the concept of stub area so that the stub area does not propagate the imported ASE route.

7. The ABR (area border router) supports route aggregation to further reduce inter-area routing information transmission.

8. In the point-to-point interface type, configure the on-demand number attribute (OSPF over On Demand Circuits) so that OSPF does not send packets periodically.
Hello packets and periodically updated routing information is sent only when the network topology changes.

9. The route is trusted. By strictly dividing the route level (four levels in total), a more reliable route selection is provided.

10. High security and good security. OSPF supports interface-based plain text and MD5 authentication.

11. Wide adaptability: OSPF is applicable to networks of various scales, and a maximum of thousands of devices can be deployed.

(2) Major Defects of OSPF

The disadvantages of the OSPF protocol are as follows:

The configuration is complex. Due to network area division and network attribute complexity, network analysts need to have a high level of network knowledge for configuration and management.
OSPF network
The route load balancing capability is weak. ?OSPF can be based on the interface rate? Connection reliability information, automatic generation of interface route priorities, but on the
In the routes with different priorities of the same destination, OSPF selects only the forwarding with a higher priority. In the routes with different priorities, load balancing cannot be implemented. Only phase
The same priority can achieve load balancing. Unlike EIGRP, traffic can be automatically matched based on priorities.


Rectify the OSPF fault.

1. The OSPF neighbor list is empty.
1. The router interface is not involved in the OSPF process.
2. Layer 1 and layer 2 faults
3. The router interface is set to the ospf passive mode.
4. The ospf hello data packets are intercepted by the access list.
5. The IP subnet and subnet mask of the two ends of the broadcast link do not match.
6. The value of the hello/dead interval field in the Hello packet sent by the OSPF neighbor does not match.
7. The authentication type does not match.
8. The authentication key does not match.
9. The area ID does not match.
10. The options in the stub/NSSA area do not match.
11. Attempt to use the secondary IP interface to establish an OSPF adjacency interface. Use the one-arm routing technology to divide sub-interfaces.
12. The asynchronous interface of the router is used to establish the OSPF neighbor relationship. The asynchronous interface must be activated before being used.

2. The OSPF neighbor router stays in the Attempt state.
This fault occurs only on the OSPF router that is configured with the neighbor command in the NBMA environment.
1. The neighbor configuration is incorrect.
2. The IP unicast connectivity in the NBMA environment is damaged.
1. The mapping of the frame relay or ATM switch is incorrect DLDC or VPI/VCI.
(2) The access list destroys the unicast connectivity.
(3) The IP address in the packet header of the unicast OSPF packet is translated using NAT.

3. The OSPF neighbor router stays in Init state.
1. One of the OSPF neighbors is configured with an access list to intercept ospf hello packets in a single direction.
2. The multicast connectivity is interrupted unidirectionally (protocol filter is enabled on the C6500 switch).
3. Enable OSPF authentication in one direction.
4. The fame-rely map/dialer map command contains the broadcast keyword.
5. The Layer 2 fault causes the loss of Hello packets.

4. The OSPF neighbor router stays in the 2-way state.
Cause: Set the OSPF priority of all routers to 0.

5. The OSPF neighbor router is in the exstart/exchange state.
1. The MTU values of OSPF neighbor routers do not match.
2. The router IDs of OSPF neighbors conflict.
3. The interface cannot send packets whose length exceeds the MTU.
4. The IP unicast connectivity is damaged.
1. The mapping between the FR or ATM switch and the DLDC or VPI/VCI is incorrect.
(2) The access list destroys the unicast connectivity.
(3) The IP address in the packet header of the unicast OSPF packet is translated using NAT.
5. The OSPF network type of the PRI and BRI dial-up interfaces is point-to-point.

5. The OSPF neighbor relationship is in the loading state.
1. The MTU value does not match.
2. The LSR packet is damaged.


OSPF advertises faults.
1. OSPF does not advertise routes.
1. The interface is involved in the OSPF process.
2. The interface is faulty.
3. The master IP address and secondary ip of the same router are located in different areas. In this case, the secondary ip is not advertised.

2. The ABR does not advertise summarized routes.
1. Configure the common area as the totally nssa area.
2. The ABR is not connected to the 0 in the area.
3. The regional 0 cannot be connected.

3. OSPF routers do not advertise external routes.
1. Configure the common OSPF area as a stub area or a nssa area, and configure the normal area as a stub area. After the Rip redistribution is performed, convert the stub area to the NSSA area //. Change the route entry of RIP routes from Type 7 LSAs to 5 LSAs.
2. NSSA ABR can convert 7 types to 5 types.

4. ASBRs do not advertise default routes.
1. The default-information originate command is not configured on the ASBR.
2. The default-information originate command is run on the ASBR, but there is no default route in the routing table.
3. Common areas are configured as stub areas.

5. OSPF route redistribution fault
1. OSPF does not advertise external routers.
1. The router ospf command redistribure on the ASBR does not contain the keyword subnets.
2. The distribute-list command in the outbound direction of the ASBR prevents external routes from being advertised.

  • x
  • convention:

4am
Created Dec 29, 2018 08:09:40

Looking very complicated, it takes time to read.
View more
  • x
  • convention:

chouhao
Created Dec 29, 2018 09:19:31

from this case, I learned the Brief summary of the OSPF protocol.thanks for sharing, we learned a lot from this good case.wish you can share much about this product.
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.