OSPF is an internal gateway routing protocol, which is a link-state protocol.
Internal Gateway Protocol (IGP): An intra-zone running protocol.
External Gateway Protocol (EGP): an agreement between a zone and an area.
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Routers running RIP protocols only need to save a single routing table, while the OSPF routing protocol route requires three tables to be saved.
1. Neighbor List: Lists all neighboring routers that the router has built every day
2. Link state database (LSDB): Lists information for other routers on the network
3. Routing table: Lists the best path to reach each connected network through the SPF algorithm. SPF Shortest Path First algorithm//
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Regional
A set of logical OSPF routers with the same zone ID, all routers in the zone have the same link-state database.
In an OSPF configuration, zones are defined on each interface, respectively.
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
OSPF area
Backbone area: Area0, which is used to connect all other areas within the autonomous system. Responsible for inter-region routing information dissemination.
Non-backbone area
-----------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
Router ID
The IP address that uniquely identifies the router in the OSPF area
Router Selection rules
1. First, select the router loopback interface
2. If there is no loopback interface, select the maximum IP address in the physical port
3. You can use the Router-id command to specify Rouer-id
Rouer-id's role is to select Dr and BDR.
---------------------------------------------------------------------------
------------------------------------------------------------------------------
Election of Dr and BDR
1.routerid Largest router selected as DR, second largest for BDR
2. Manually select, configure the Router-id, if the router priority is set to 0, it will not participate in the DR and bdr elections.
The priority of a router can affect an electoral process, but it cannot force the replacement of existing Dr and BDR.
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
Multicast address for OSPF
224.0.0.5
224.0.0.6
----------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
OSPF Packets
Hosted in IP packets, using protocol number 89
Types of OSPF Packages
1.Hello package: For discovering and maintaining neighborhood relationships, electing Dr and BDR
2. Database Description Package (DBD): Used to send information to a neighbor to synchronize the link state database
3. Link status Request Packet (LSR): Sent after the router receives a DBD containing new information for requesting more detailed information
4. Link State Update package (LSU): Send link State advertisement (LSA) after receiving LSR, one LSU packet may contain several LSA
5. Link Status Confirmation Package (Lsack): confirmed on receipt of LSU, each LSA needs to confirm separately
------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
OSPF state
1.Down status
2.Init initialization status: Receive Hello Packet
3.2-way Status: Select two maximum Router-id routers
4.Exstart Status: Confirm the DR and BDR, then the DR and Bdr will send a DBD data description packet sent via 224.0.0.6.
5.echange status: After receiving the DBD packet, the lsack message
6.loading Status: LSR Request package and LSU update package
7.Full status
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
OSPF divides the network into four different types
1. Dot to point Network multicast
2. Broadcast multi-access network multicast
3. Non-broadcast multi-access network single-advertisement delivery
4. Point-to-multipoint network multicast
--------------------------------------------------------------------------------------------------------------- -------------
----------------------------------------------------------------------------------------------------------
OSPF features
1. Adaptable to large-scale networks
2. Fast convergence rate of routing changes
3. No routing ring
4. Support variable eldest son net Vlsm
5. Support for Regional division
6. Send the Protocol at the multicast address
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
Configuration of OSPF
In the global mode
router OSPF ID//Start Ospf,id is a process that can run multiple ospf//
Create a loopback interface and configure IP address IP address to 1.1.1.1
Router-id 1.1.1.1
Network 192.168.10.0 0.0.0.255 area0//Declaration of direct connected segments and areas//
Network 1.1.1.1 0.0.0.0 Area 0//Proclamation router-id//
IP priority order//Modify interface precedence//
IP OSPF cost//Modify the value of the interface//
show ip OSPF//view OSPF configuration//
Show ip OSPF neihnbor//View neighbor's information//
OSPF simple configuration and rationale