Network engineer must learn-OSPF-Stub area

Thank you for your attention. For
more learning materials/videos for network engineers, click: Join group chat

1. OSPF-Stub function introduction:
By configuring some non-backbone areas at the edge of the AS as stubs, the scale of LSDB and routing table can be reduced, and the need to be transmitted is reduced. Number of routing information
2. OSPF-Stub application scenarios:
OSPF area division can reduce the number of LSAs in the network. For non-backbone areas located on the border of the autonomous system, in order to further reduce the size of the routing table and reduce the number of LSAs, they can be configured as STUB areas.
3. OSPF Stub experimental configuration:
1. Topology diagram Insert picture description here
2. Experimental purpose:
1) As shown in the topology diagram, all routers run OSPF, and the entire autonomous system is divided into 3 areas. Among them, AR1 and AR2 act as ABRs to forward routes between areas, and AR4 acts as an ASBR to import external routes (static routes).
2) It is required to configure Area1 as a stub area to reduce the number of LSAs advertised in this area, but it does not affect the reachability of the route.
3. Configuration ideas:
1) Build the topology map environment and mark the planned IP address
2) Modify the default name of the network device and configure the IP address
3) Configure basic OSPF functions
4) Configure static routing on AR4 and configure it in OSPF introduced
5) arranged Area1 as a Stub area (run Stub command on all routers within Area1), check the OSPF routing information on the AR3
. 6) Do not advertise Type3 LSA to Stub region on AR1, check the OSPF routing on AR3 information.

4. Configuration process:
Step 1: Modify the default name of the network device and configure the IP address
1) Configure the default name and interface IP of the router AR1
sys //Enter the system view mode
Enter system view, return user view with Ctrl+Z.
[Huawei] sysname AR1 //Modify the name of the device
[AR1]int g0/0/0 //Enter interface mode
[AR1-GigabitEthernet0/0/0]ip add 192.168.12.1 24
[AR1-GigabitEthernet0/0/0]int g0/0 /1
[AR1-GigabitEthernet0/0/1]ip add 192.168.13.1 24
2) Configure router AR2 default name and interface IP
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR2
[AR2]int g0 /0/0
[AR2-GigabitEthernet0/0/0]ip add 192.168.12.2 24
[AR2-GigabitEthernet0/0/0]int g0/0/1
[AR2-GigabitEthernet0/0/1]ip add 192.168.24.2 24
3 ) Configure router AR3 default name and interface IP
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR3
[AR3]int g0/0/0
[AR3-GigabitEthernet0/0/0]ip add 192.168.13.3 24
[AR3-GigabitEthernet0/0/0] int g0/0/1
[AR3-GigabitEthernet0/0/1]ip add 192.168.35.3 24
4) Configure router AR4 default name and interface IP
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR4
[ AR4]int g0/0/0
[AR4-GigabitEthernet0/0/0]ip add 192.168.24.4 24
[AR4-GigabitEthernet0/0/0]int g0/0/1
[AR4-GigabitEthernet0/0/1]ip add 192.168 .46.4 24
5) Configure router AR5 default name and interface IP
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR5
[AR5]int g0/0/0
[AR5-GigabitEthernet0/0/0]ip add 192.168.35.5 24
6) Configure router AR6 default name and interface IP
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR6
[AR6]int g0/0 /0
[AR6-GigabitEthernet0/0/0]ip add 192.168.46.6 24
Step 2: Configure basic OSPF functions
1) Configure AR1
[AR1]ospf router-id 1.1.1.1
[AR1-ospf-1]area 0
[AR1- ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]area 1
[AR1-ospf-1-area-0.0.0.1]network 192.168.13.0 0.0 .0.255
2) Configure AR2
[AR2]router id 2.2.2.2
[AR2]ospf
[AR2-ospf-1]area 0
[AR2-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.255
[AR2- ospf-1-area-0.0.0.0]area 2
[AR2-ospf-1-area-0.0.0.2]network 192.168.24.0 0.0.0.255
3)配置AR3
[AR3]ospf router-id 3.3.3.3
[AR3-ospf-1]area 1
[AR3-ospf-1-area-0.0.0.1]network 192.168.35.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.1]network 192.168.13.0 0.0.0.255
4)配置AR4
[AR4]ospf router-id 4.4.4.4
[AR4-ospf-1]area 2
[AR4-ospf-1-area-0.0.0.2]network 192.168.46.0 0.0.0.255
[AR4-ospf-1-area-0.0.0.2]network 192.168.24.0 0.0.0.255
5)配置AR5
[AR5]ospf router-id 5.5.5.5
[AR5-ospf-1]area 1
[AR5-ospf-1-area-0.0.0.1]network 192.168.35.0 0.0.0.255
6)配置AR6
[AR6]ospf router-id 6.6.6.6
[AR6-ospf-1]area 2
[AR6-ospf-1-area-0.0.0.2]network 192.168.46.0 0.0.0.255
Step 3: Configure AR4 to import static routes
1) Configure
[AR4]ip route-static 200.0.0.0 8 null 0 //Use the static route configuration command to discard all packets destined for the network segment 200.0.0.0/8.
Note: The system will automatically Create a NULL0 interface. The NULL0 interface is always in the UP state, but cannot forward data packets, and any network data packets sent to this interface will be discarded. If the next hop to a certain network segment is specified as the NULL0 interface in the static route, any data packets sent to this network segment will be discarded, so the packets that need to be filtered can be sent directly to the NULL0 interface without having to Configure the access control list.
[AR4]ospf
[AR4-ospf-1]import-route static type 1 //Import a static route, the type is the first type of static route
Note: Type 1 external route: when the cost of the external route is equivalent to that of the autonomous system , And the cost of OSPF's own routing is comparable, it can be considered that this type of routing has a higher degree of credibility, and it is configured as Type 1 External.
2) View the ABR/ASBR information of
Insert picture description here
AR3 3) View the OSPF routing table of AR3
Insert picture description here
As shown in the figure above, when the area where AR3 is located is a common area, you can see that there are routes outside the AS in the routing table.
Step 4: Configure Area1 as a stub area
1) Configure AR1
[AR1]ospf
[AR1-ospf-1]area 1
[AR1-ospf-1-area-0.0.0.1]stub
2) Configure AR3
[AR3]ospf
[AR3-ospf-1]area 1
[AR3-ospf-1-area-0.0.0.1]stub
3) Configure AR5
[AR5]ospf
[AR5-ospf-1]area 1
[AR5-ospf-1-area-0.0.0.1]stub
4) View AR3 OSPF routing table
Insert picture description here
As shown in the figure above, when the area where RouterC is located is configured as a stub area, the route outside the AS is no longer visible, and a default route is replaced.
For more learning materials/videos for network engineers, click: Join group chat
Step 5: Configure to prohibit notification of Type3 LSA to Stub area
1) Configure AR1
[AR1]ospf
[AR1-ospf-1]area 1
[AR1-ospf-1-area -0.0.0.1]stub no-summary
2) Verify the configuration results, check the AR3 OSPF routing table
Insert picture description here
as shown in the figure above, after prohibiting the notification of Summary LSAs to the stub area, the routing table entries of the stub router are further reduced, leaving only one route to the outside of the area The default route.
At this point, the OSPF-Stub area configuration experiment is complete.
4. Summary
1. Points to note when configuring OSPF-Stub areas:
1) The backbone area (Area0) cannot be configured as a stub area.
2) If an area is to be configured as a STUB area, all routers in the area must be configured with STUB area attributes.
3) ASBRs cannot exist in the STUB area, that is, routes outside the autonomous system cannot be propagated in the STUB area.
4) There can be no virtual connections in the STUB area
2. OSPF special area Stub and Nssa:
1) Stub area
① It is not allowed to advertise autonomous system external routes, only intra-area routes and inter-area routes are allowed.
②In the STUB area, the scale of the router's routing table and the number of routing information transmissions will be greatly reduced.
③In order to ensure that the routes outside the autonomous system are reachable, the Type3 default route is advertised by the ABR in the area and propagated to the area. All routes to the outside of the autonomous system must pass through the ABR to be advertised.
2) Nssa area
①The NSSA area allows the introduction of autonomous system external routes, and the ASBR advertises Type7 LSAs to the area. ②These Type7 LSAs are converted to Type5 LSAs on the ABR and flooded into the entire OSPF domain.
③The NSSA area also retains the characteristics of the STUB area in the autonomous system.
④The ABR in the area advertises Type7 default routes to the area, and all inter-domain routes must pass through the ABR to be advertised.

Guess you like

Origin blog.csdn.net/ZYJY2020/article/details/112259162