OSPF multi-area principle and configuration
- 1. Reasons for OSPF multi-area
- Two, OSPF three kinds of traffic
- Three, OSPF router type
- Four, OSPF area type
- Five, OSPF link state database
- Six, OSPF link status notification
- Seven, the router selects the routing purpose
- Eight, configuration commands
- -----------Stub area configuration command-----------
- ----- Complete peripheral area configuration commands
- --------- Non-pure peripheral area configuration commands
- Verify command
- View LSA commands
1. Reasons for OSPF multi-area
1. Improve the scalability of the network
2. Fast convergence
Note: Area 0 is the backbone area, and Area 1 is the non-backbone area
Two, OSPF three kinds of traffic
(1) Intra-Area Traffic
1. The traffic formed by the exchange of data packets between routers in a single area
(2) Inter-Area Traffic
1. The traffic formed by the exchange of data packets between routers in different areas
(3), External Traffic
1. The traffic formed by the exchange of data packets between routers in the OSPF area and routers outside the OSPF area or in another autonomous system
Three, OSPF router type
1. Internal router
2. Area border router (ABR)
3. Autonomous system border router (ASBR) (a router used to connect to another AS system)
Four, OSPF area type
(1) OSPF area type
1. Backbone area Area 0
2. Non-backbone area-----Different according to the type of routing that can be learned
Standard area
Stub area
Totally stubby area
Non-pure stubby area (NSSA)
(2) Functions of each router
1. ABR: Aggregate the link status information of Area 1 and send it to Area 0, and aggregate the link status information of other areas and send it to Area 1.
2. ASBR: Responsible for injecting external routes into the OSPF network
Five, OSPF link state database
(1) Composition of a link state database
1. Each router has created a database composed of each interface, corresponding adjacent nodes and interface speed
2. Each entry in the link state database is called LSA (Link State Advertisement), and there are six common types of LSA Types of
Six, OSPF link status notification
(1) Type of Link State Announcement (LSA)
(B), the peripheral area and the complete area
1. Peripheral area and completely unstemmed area
: An area that meets the following conditions
—there is only one default route as the exit of its area
—the area cannot be used as a virtual link traversal area—
there is no autonomous system border router ASBR in the stub area (stub area)—not the
backbone area Area 0
2. The peripheral area
-No LSA4, 5, 7 notification
3. Complete peripheral area
---- Except for a default route advertisement of LSA3, there is no advertisement of LSA3, 4, 5, 7
4. Impure peripheral area
----No LSA7 notification
Seven, the router selects the routing purpose
(1) The router only adds the optimal routing entry to the routing table
(2) Basis for selecting routing entries
1. Management distance (that is, priority)
2. Measurement value
(Three), load balancing routing entries
OIA 3.3.3.3 [110/3] via 40.0.0.1, 00:41:13, FastEthernet1/0
[110/3] via 10.0.0.2, 00:41:13, FastEthernet0/0
Eight, configuration commands
The role of the stub area and the complete stub area: its main purpose is to reduce the LSA entries and routing entries in the area, and reduce the occupation of the device CPU and memory; the ABR in the stub area and the complete stub area will automatically generate a default route and advertise to the stub area Or completely in the peripheral area.
-----------Stub area configuration command-----------
No LSA4, 5, 7 notification
ABR configuration
[R4]ospf 1
[R4-ospf-1]area 2
[R4-ospf-1-area-0.0.0.2]network xxxx xxxx ###Declare the directly connected network segment first, then configure
[R4-ospf-1-area -0.0.0.2]stub
Intra-area routing configuration
[R5]ospf 1
[R5-ospf-1]area 2
[R5-ospf-1-area-0.0.0.2]network xxxx xxxx ##Declare the directly connected network segment first, and then configure
[R5-ospf-1-area- 0.0.0.2] stub
[R5]display ip routing-table ###At this time, the route in the stub area will display a default route to the external area
----- Complete peripheral area configuration commands
ABR configuration
Except for a default route advertisement of LSA3, there is no advertisement of LSA3, 4, 5, 7
[R4]ospf 1
[R4-ospf-1] area 2
[R4-ospf-1]network xxxx xxxx ##Declare the directly connected network segment first ,With
[R4-ospf-1-area-0.0.0.2] stub no-summary
Intra-area routing configuration
[R5] ospf 1
[R5-ospf-1] area 2
[R5-ospf-1]network xxxx xxxx ##Declare the directly connected network segment first, then configure
[R5-ospf-1-area-0.0.0.2]stub
[ R5] display ip routing-table ##At this time, the route in the completely stub area will display a default route to other areas except this area
--------- Non-pure peripheral area configuration commands
ABR and intra-area routing configuration
[R4]ospf 1
[R4-ospf-1] area 1
[R4-ospf-1]network xxxx xxxx ##Declare the directly connected network segment first, and then configure the reverse mask
[R4-ospf-1-area-0.0.0.1 ]nssa
-------- OSPE route redistribution configuration command
[R1]rip 1 ###Configuration rip
[R1-rip-1] version 2
[R1-rip-1] undo summary
[R1-rip-1] network 11.0.0.0
[R1-rip-1] import-routle ospf 1 cost 3
------Inject the ospf protocol into rip for route redistribution, the path type defaults to path type 2 (external cost), and the cost cost is 3 (the metric value for rip is the number of hops), in rip Redistribute ospf to specify the cost value
[R1-rip-1] ospf 1
[R1-ospf-1] import-route rip 1 type 1 cost 1
------Inject the external rip protocol into OSPF for route redistribution , Use path type 1 (internal cost + external cost), cost cost is 1 (CoST=100M/BW)
[r1-ospf-1]default-route-advertise always ##fospf redistribution default route
[r2-ospf-1] import-route direct ###ospf redistribution direct route
[r2-ospf-1]import-route static ##fospf redistribute static routes
Verify command
display ospf 1 peer brief ###View the brief information of the OSPF neighbor table
display ospf 1 peer ##Check the detailed information of the OSPF table
display ospf 1 brief ##View the relevant information of OSPF1 on the local device
display ip routing-table ## View OSPE routes in the routing table (determine the type and attributes of the router)
display ospf routing
display ospf interface GigabitEthernet 0/0/0
View LSA commands
[Huawei] dis ospf lsdb router
[Huawei] dis ospf lsdb network
[Huawei] dis ospf lsdb summary
[Huawei] dis ospf lsdb asbr
[Huawei] dis ospf lsdb ase
[Huawei] dis ospf lsdb nssa
Modify the interface priority set of OSPF routing, the default value is 1
[R1]int g0/0/0
[R1-GigabitEtherneto/0/0]ospf dr-priority 10
Modify the cost value of the OSPF routing interface, the default value is 1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ospf cost 99