Comprehensive Experiment of OSPF Area Planning

Experimental requirements

insert image description here
1. R4 is the ISP, and only IP addresses can be configured on it; R4 and all other directly connected devices use public IP
2, R3-R5/6/7 are MGRE environment, R3 is the central site
3, the IP address of the entire OSPF environment is 172.16.0.0/16
4. All devices can access the R4 loopback
5. Reduce the amount of LSA updates, speed up convergence, and ensure update security
6. The entire network is reachable

Experimental procedure

1 Planning IP address

Division idea:
According to the question, area 0 is required to be the public network, and there are a total of 8 network cables in the remaining area,
so the total network segment needs 2^3=8.
When dividing by 3 bits, we can first divide the divided network segment. Allocate IPs to users and backbone links. This division can prevent address waste and facilitate future IP address changes.

172.16.0.0/16  2^3=8>=8借三位划分
以区域0为例划分网段。
172.16.0.0/19
	继续借五位给用户网段划分
172.16.0.0/24——用户
	借到29or30位给骨干链路划分
172.16.0.0/29——骨干链路若是MA网络掩码为29
172.16.0.0/30——骨干链路若是P2P网络掩码为30
172.16.32.0/19——A1
172.16.64.0/19——A2
172.16.96.0/19——A3
172.16.128.0/19——A4
172.16.160.0/19——RIP
继续借一位划分
172.16.160.0/20
172.16.176.0/20
192.168.1.192/19预留
192.168.1.224/19预留

After drawing, as shown in the figure
insert image description here

2. First configure the area0 public network environment, let the public Netcom

[r4]int s3/0/1
[r4-Serial3/0/1]ip address 45.1.1.2 24
[R4]int s4/0/0
[r4-Serial4/0/0]ip address 46.1.1.2 24
[R4]int s4/0/1
[R4-Serial4/0/1]ip address 47.1.1.1 24
[R4]int s4/0/0   
[R4-Serial4/0/0]ip address 34.1.1.2 24
[R4]int LoopBack 0
[R4-LoopBack0]ip address 4.4.4.4 24

[R3]int s4/0/0
[R3-Serial4/0/0]ip address 34.1.1.1 24

[R5]int s4/0/0
[R5-Serial4/0/0]ip address 45.1.1.1 24
[R5]int LoopBack 0
[R5-LoopBack0]ip address 172.16.5.1 24

[R6]int s4/0/1
[R6-Serial4/0/1]ip address 56.1.1.1 24
[R6]int LoopBack 0
[R6-LoopBack0]ip address 172.16.6.1 24

[R7]int s4/0/1
[R7-Serial4/0/0]ip address 47.1.1.1 24
[R7]int LoopBack 0
[R7-LoopBack0]ip address 172.16.7.1 24

insert image description here

The underlying public network must be connected (R3/5/6/7 can access each other) - the default points to R4

[R3]ip route-static 0.0.0.0 0 34.1.1.2
[R5]ip route-static 0.0.0.0 0 45.1.1.2
[R6]ip route-static 0.0.0.0 0 46.1.1.2
[R7]ip route-static 0.0.0.0 0 47.1.1.2

Verify - can ping each other.
insert image description here

3. Build the MGRE environment

Make AR3 the central site
insert image description here

Branch site R5/6/7 (take r5 as an example)
insert image description here

Check whether the routers between the public and private networks can be pinged.
insert image description here

4. Configuration Protocol

Use the ospf protocol to make the entire public network reachable.
Take R5 as an example

[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.0.255
[r5-ospf-1-area-0.0.0.0]network 172.16.5.0 0.0.0.255

5. Check whether the neighbor relationship can be established normally

In MGRE, R3/5/6/7 cannot all establish neighbors, because the tunnel port works by default using point-to-point, and the working mode needs to be changed.
Modify the working mode to broadcast , and need to change R3/5/6/7 to the same.
Intervene in the DR/BDR election
center to the site structure to control the DR in the center, so R3 is required to be the DR, and R5/6/7 is required to give up election

[R3]int t0/0/0
[R3]-Tunnel0/0/0]ospf network-type broadcast 

[R5]int t0/0/0
[R5]-Tunnel0/0/0]ospf network-type broadcast 
[R5]-Tunnel0/0/0]ospf dr-priority 0

[R6]int t0/0/0
[R6]-Tunnel0/0/0]ospf network-type broadcast 
[R6]-Tunnel0/0/0]ospf dr-priority 0

[R7]int t0/0/0
[R7]-Tunnel0/0/0]ospf network-type broadcast 
[R7]-Tunnel0/0/0]ospf dr-priority 0

6. Solve the routing of irregular areas.

Because the routes of the A4 area and RIP are irregular areas, the backbone area cannot learn their routes, so we need to use the method of multi-process bidirectional redistribution to solve the problem.
Solution:
import RIP first

[R12]ospf 1
[R12-ospf-1]import-route  rip
[R12]rip 1
[R12-rip-1]version 2
[R12-rip-1]undo summary
[R12-rip-1]import-route ospf 1

Split the R9 process into two processes and republish it.

[R9]ospf 1
[R9-ospf-1]import-route ospf  2
[R9-ospf-2]import-route ospf  1

insert image description here

7. Reduce LSA (summary/special area)

7.1) Do the summarization first, and aggregate the non-backbone areas into one route and send it to the backbone area

For R5, type 3 routes represent area 1/2/3, type 5 routes represent area 4 and RIP, and area1/2/3 are summarized first

[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.252.0

[R6]ospf 1
[R6-ospf-1]area 2
[R6-ospf-1-area-0.0.0.2]abr-summary 172.16.64.0 255.255.252.0

[R7]ospf 1
[R7-ospf-1]area 3
[R7-ospf-1-area-0.0.0.3]abr-summary 172.16.96.0 255.255.252.0

[R12]ospf 1
[R12-ospf-1]asbr-summary 172.16.160.0 255.255.224.0

[R9]ospf 1
[R9-ospf-1]asbr-summary 172.16.128.0 255.255.252.0

Go to R5 to see the effect
insert image description here

7.2) Tuning special areas

Because R1 is neither the backbone area, nor can virtual links be configured, nor does ASBR exist, so R1 should be adjusted to be fully deployed in the stub area.

[1] Allocate
area1 in a complete stub area. If the area1 is adjusted to a complete stub area, R1/2 will not learn type 3/4/5 routes at all, and will be changed to type 3 by default.

[R1]ospf 1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]stub 

[R2]ospf 1
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]stub 

[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]stub no-summary 

Because R2 and R3 are neither backbone areas, nor can virtual links be configured, but ASBRs exist, R2 and R3 should be adjusted to incomplete stub areas.
[2] Area 2 deploys complete NSSA—(do not learn all on the left, and a 7 category on the right is passed to area0 by default)

[R6]ospf 1
[R6-ospf-1]area 2
[R6-ospf-1-area-0.0.0.2]nssa no-summary

[R11]ospf 1
[R11-ospf-1]area 2
[R11-ospf-1-area-0.0.0.2]nssa 

[R12]ospf 1
[R12-ospf-1]area 2
[R12-ospf-1-area-0.0.0.2]nssa 

【3】area3 is adjusted to full NSSA——(the configuration is the same as above)
A type 3 default appears
in R9 At this time, R9 can re-issue a default to R10

[R9]ospf 2
[R9-ospf-2]default-route-advertise

8. Configure an empty interface to prevent loops

Configure a null interface on each router that is summarizing

[r3]ip route-static 172.16.32.0 19 NULL 0

[r6]ip route-static 172.16.64.0 19 NULL 0

[r7]ip route-static 172.16.96.0 19 NULL 0

[r9]ip route-static 172.16.128.0 19 NULL 0

[r12]ip route-static 172.16.160.0 19 NULL 0

9.R3/6/7 do nat

Take R3 as an example

[R3]acl 2000
[R3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R3]int s4/0/0
[r3-Serial4/0/0]nat outbound 2000

R6/7 configuration is the same.
test connectivity
insert image description here

Guess you like

Origin blog.csdn.net/m0_46467017/article/details/122530198