The link status update (LSU) packet is used for OSPF route update. An LSU packet may contain 11 types of link status notifications (LSA). The difference between the terms "link status update (LSU)" and "link status notification (LSA)" is sometimes difficult to distinguish. Sometimes they can be used interchangeably. One LSU contains one or more LSAs. either of these two terms can be used to indicate the link status information transmitted by the OSPF router.
The following are 11 LAS types:
OSPF Algorithm
Each OSPF router maintains a link status database, including the LSA from all other routers. Once the router receives all the LSA and establishes its local link status database, OSPF uses Dijkstra's shortest path priority (SPF) algorithm to create an SPF tree. Then, fill the IP route table with the optimal path to each network based on the SPF tree.
Management Distance: The Management Distance (AD) of OSPF is "110 ".
Authentication:
Like other routing protocols, OSPF can also be configured for identity authentication. It is a good practice to authenticate the transmitted route information. This ensures that the router only accepts the route information sent from other routers with the same password and authentication information.
Basic OSPF Configuration
Router ospf command:
Process-id is a number between 1 and 65535, which is selected by the network administrator. Process-id is valid only locally. This means that the value does not need to be matched when the router is adjacent.
Configuration method:
R1 # conf t
R1 (config) # router ospf 1
R1 (config-router )#
Network command
The network commands in ospf have the same functions as those in other IGP routing protocols:
L any interface on the router that meets the network address in the network command will be enabled to send and receive OSPF packets.
L this network (or subnet) will be included in the OSPF route update.
Router (config-router) # network-address wildcard-mask arew.ea-id
Area-id indicates the OSPF area. The OSPF area is a group of routers that share link status information. The connection status database of all OSPF routers in the same region must have the same link status information, which is achieved by flooding their respective link statuses to all other routers in the region. ("0" is the backbone area)
OSPF router ID
Confirm vro ID
The OSPF router ID uniquely identifies each router in the OSPF route area. The Cisco router determines the router ID according to the following three conditions:
L use the IP address configured through the OSPF router-id command.
L if the router-id is not configured, the router selects the highest IP address of all its loopback interfaces.
L if the loopback interface is not configured, the router selects the highest active IP address for all its physical interfaces.
OSPF router-id command
Router (config) # router ospf process-id // enter the OSPF Configuration Mode
Router (config-router) # router-id ip-address // configure Router-id
Modify vro ID
Run the: Router # clear ip ospf process command to restart the OSPF process and modify the desired Router-id.
Duplicate vro ID
When two routers in the same OSPF route domain have the same router ID, the router cannot be routed normally. If the router IDs of the two adjacent routers are the same, no adjacent relationship can be established. When a duplicate OSPF router ID is displayed, IOS displays a message similar to the following:
% OSPF-4-DUP_RTRID1: Detected router with duplicate router ID
Verify Router-id: Use show ip protocols for verification.
Verify OSPF
The show ip ospf neighbor command can be used to verify OSPF adjacent relationships and eliminate corresponding faults.
This command displays the following output for each neighbor:
L Neighbor ID-the router ID of the adjacent router.
L Pri-OSPF priority of this interface.
L State-the OSPF status of this interface. The FULL status indicates that the router and its neighbors have the same OSPF link status database.
L Dead Time-the Time that the router waits for the device to send the Hello packet before declaring the neighbor to the down (unavailable) state. This value is reset when the interface receives the Hello packet.
L Address-IP Address of the interface that the neighbor uses to directly connect to the vro.
L Interface-This router is used to establish an Interface adjacent to this neighbor.
L
In the following circumstances, the two routers do not establish OSPF adjacent relationships:
L The subnet mask does not match, so the two routers are in different networks.
L OSPF Hello timer or Dead timer does not match.
L The OSPF network type does not match.
L OSPF network commands with missing or incorrect information exist.
Other powerful OSPF troubleshooting Commands include:
Show ip protocols
It can be used to quickly verify key OSPF configuration information, including the OSPF process ID, router ID, the network being advertised by the router, the neighbor sending an update to the router, and the default Management Distance.
Show ip ospf
The command can also be used to check the OSPF process ID and router ID. In addition, the OSPF region information and the time when the SPF algorithm was last calculated can be displayed.
Each time the router receives new information about the topology, it must re-run the SPF algorithm, which occupies a lot of CPU resources. The following information is the output using show ip ospf.
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
The network in which the status changes back and forth between up and down is called the link instability. If the link is unstable, OSPF routers in the region will continue to recalculate the SPF algorithm and thus fail to converge correctly. To minimize this problem, the router will wait 5 seconds (5000 milliseconds) to run the SPF algorithm after receiving an LSU. This prevents the router from continuing to run the SPF algorithm. There is also a retention time of 10 seconds (10000 milliseconds. After the router runs the SPF algorithm once, it will wait 10 seconds to run the algorithm again.
Show ip ospf interface
This command is used to verify the shortest method of the Hello interval and Dead interval. Cost is the overhead value.
Check Route table
The show ip route command can be used to check whether the router is sending and receiving routes through OSPF. The O at the beginning of each route indicates that the route source is OSPF.
OSPF Metric
The OSPF metric is called overhead. RFC 2328 has the following description: "overhead is associated with the output end of each router interface. The system administrator can configure this overhead. The lower the overhead, the more likely this interface will be used to forward data traffic ."
Cisco IOS uses the cumulative bandwidth of the outgoing interface from the router to the destination network as the overhead value.
The figure below shows the default OSPF overhead of various interfaces.
Reference bandwidth
The reference bandwidth is the 8 power of 10 by default, that is, 100,000,000 bps, that is, 100 Mbps. This enables interfaces with bandwidth equal to or greater than 100 Mbps to have the same OSPF overhead of 1.
You can use the OSPF command auto-cost reference-bandwidth to modify the reference bandwidth value. If you need to use this command, we recommend that you use it on all routers at the same time to make OSPF route measurement consistent.
Accumulated OSPF overhead
The OSPF route overhead is the cumulative overhead value from the router to the destination network. (That is, the overhead values of all paths from the source address to the target address are added)
Modify link overhead
The bandwidth interface command or the ip ospf cost interface command can be used to achieve this goal-to make OSPF use accurate values when determining the optimal route. (Both ends must be changed)
Router (config-if) # bandwidth-kbps // modify the bandwidth parameters of the interface.
Router (config-if) # ip ospf cost "add a number" // The command sets the link overhead to a specific value and removes the computing process.