当前位置:网站首页>OSPF comprehensive experiment
OSPF comprehensive experiment
2022-07-04 10:20:00 【Attiude】
OSPF Comprehensive experiment
About OSPF Irregular region problem
1、 Away from the backbone of the non backbone
2、 Discontinuous backbone
Better solution :
Multi process bidirectional republication ;
ospf Multi process : Multiple processes on a router , Each process has its own database , Calculate routing entries independently , And calculate all that are not shared ; Finally, all the best paths are loaded into the same routing table ;
An interface of a router can only work in one process ;
It can be used to solve irregular areas , Work irregular locations in different processes , Realize separation , Then we use the republishing technology to share the routing table ; It solves the problems of poor route selection and resource occupation
OSPF Optimize – Reduce LSA Update quantity of
1、 Summary — Reduce the number of routing entries in the backbone area
2、 Special area -- Reduce the number of routing entries in non backbone areas
【1】 Summary --OSPF The protocol does not support interface summary , In an area , Topological information is transmitted between adjacency , Cannot summarize ; Therefore, it can only be summarized at the boundary equipment of interactive routing
**1) Inter domain routing summary –** Between regions ABR On , Perform summary configuration when interacting with inter area routing entries
[r2]ospf 1
[r2-ospf-1]area 1 Locally through this area 1/2 class LSA Calculated route , It can be summarized and passed to other areas
[r2-ospf-1-area-0.0.0.1]abr-summary 3.3.0.0 255.255.252.0
2) Extraterritorial routing summary -–ASBR The external routing entries are passed through the republication protocol , Share to OSPF When in the agreement, you can summarize
【2】 Special area – It is used to reduce the cost of each non backbone area LSA Number
Cannot be a backbone area , Virtual link cannot be configured
[1] At the same time, it cannot exist ASBR
**1) The terminal area –** Refuse 4/5 Class LSA; The backbone area is connected by this area ABR Post a message to this area 3 Class
notes : All routers in this area need to configure this command
2) Completely peripheral area Based on the peripheral region , Further reject 3 Class LSA; Keep only one 3 Class
First, configure all routers in the whole area as the end area ; Then only in the area connecting the backbone ABR Complete configuration on the
[2] There is ASBR
1)NSSA Incomplete ending area – This area will reject 4/5 class LSA, The backbone area is connected by this area ABR Post a message to this area 7 Class ; In this area ASBR When importing extraterritorial routes , be based on 7 Class import , Then connect the backbone through this area ABR When passing to the backbone area , Convert to 5 Class enters the backbone area ;
NSSA The point of design , Not to reduce... In this area ASBR The resulting extraterritorial route , But other parts of the network ASBR The resulting extraterritorial route ;
2) complete NSSA — stay NSSA On the basis of , Further reject 3 class LSA To enter , The backbone area is connected by this area ABR Post a message to this area 3 Class
First, configure the area as NSSA Area , After that, only the backbone is connected in this area ABR Complete configuration on the
Bear in mind :NSSA And completely NSSA Working environment , You need to consider ISP( Operator, ) The position of , Otherwise, the loop may appear
The experimental requirements :
1.R4 by ISP, Can only be configured on it IP Address ;R4 Use public with all other directly connected devices IP Address ;
2.R3-R5/6/7 by MGRE Environmental Science ,R3 For the central site ;
3. Whole OSPF Environmental Science IP The address is 172.16.0.0/16;
4. All devices are accessible R4 The loopback of ;
5. Reduce LSA Update quantity of , Speed up convergence , To ensure the security of updates ;
6. Network wide accessibility !
The topology :

IP planning :
172.16.0.0/16
Because there are six areas , So will IP Divided into 6 Net segment ,2^3=8, Among them, some sub network segments are further divided ,P2P Backbone links 、MA Allocate appropriate network segments on backbone links and other routers
172.16.0.0/16
need 6 Regions
172.16.0.0/19 area0
172.16.0.0/25 172.168.0.128/25 172.168.1.0/25 172.168.1.128…
172.16.0.0/25 p2p Backbone links 172.16.0.0/30 172.16.0.4/30…
172.16.0.128/25 MA Backbone links 172.16.0.128、29 172.16.0.136/29…
172.16.32.0/19
172.16.64.0/19
172.16.96.0/19
172.16.128.0/19
172.16.160.0/19
172.16.192.0/19
172.16.224.0/19
First configure area0 Area
1、 First configure the interface IP
[r3-GigabitEthernet0/0/1]ip add 34.1.1.1 24
[r4-GigabitEthernet0/0/0]ip add 34.1.1.2 24
[r4-GigabitEthernet0/0/1]ip add 45.1.1.2 24
[r4-GigabitEthernet0/0/2]ip add 46.1.1.2 24
[r4-GigabitEthernet4/0/0]ip add 47.1.1.2 24
[r5-GigabitEthernet0/0/0]ip add 45.1.1.1 24
[r6-GigabitEthernet0/0/0]ip add 46.1.1.1 24
[r7-GigabitEthernet0/0/0]ip add 47.1.1.1 24
2、 Configure the default route
[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
With r4 For the central site , To configure mgre
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 172.16.0.129 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source 34.1.1.1
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]ip add 172.16.0.129 29
[r5]int t0/0/0
[r5-Tunnel0/0/0]ip add 172.16.0.130 29
[r5-Tunnel0/0/0]tunnel-protocol gre p
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source g0/0/0
[r5-Tunnel0/0/0]nhrp ent 172.16.0.129 34.1.1.1 register
[r5-Tunnel0/0/0]nhrp network-id 100
[r6]int t0/0/0
[r6-Tunnel0/0/0]ip add 172.16.0.131 29
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source g0/0/0
[r6-Tunnel0/0/0]nhrp entry 172.16.0.129 34.1..1.1 register
[r6-Tunnel0/0/0]nhrp network-id 100
[r7]int t0/0/0
[r7-Tunnel0/0/0]ip add 172.16.0.132 29
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp
[r7-Tunnel0/0/0]source g0/0/0
[r7-Tunnel0/0/0]nhrp entry 172.16.0.129 34.1.1.1 register
[r7-Tunnel0/0/0]nhrp network-id 100
test
stay r3 On ping R5/R6/R7 The private address of 
stay R3,R5,R6,R7 Do on nat
[r5]acl 2000
[r5-acl-basic-2000]rule permit source any
[r5-acl-basic-2000]int g0/0/0
[r5-GigabitEthernet0/0/0]nat outbound 2000
rest 3 The same goes for Taiwan
test :
Configure interface IP And loopback interface
area0
r1
r2:
r3:
area2:
r6
R11:
R12:
area3
R7:
R8:
R9:
area4:
R9:
R10:
area5
R12
start-up OSPF agreement , And configuration Area 0/1/2/3/4 Area ; As well as the configuration rip agreement
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]network 172.16.0.0 0.0.255.255
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 1
[r2-ospf-1-area-0.0.0.1] network 172.16.0.0 0.0.255.255
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]net 172.16.32.0 0.0.3.255
[r3-ospf-1-area-0.0.0.1]area 0
[r3-ospf-1-area-0.0.0.0]net 172.16.0.129 0.0.0.0
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.1.255
[r6-ospf-1-area-0.0.0.1]area 2
[r6-ospf-1-area-0.0.0.2]net 172.16.64.1 0.0.0.0
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.3.255
[r7-ospf-1-area-0.0.0.0]area 3
[r7-ospf-1-area-0.0.0.3]net 172.16.96.1 0.0.0.0
[r8]ospf 1 router-id 8.8.8.8
[r8-ospf-1]area 3
[r8-ospf-1-area-0.0.0.3]net 172.16.0.0 0.0.255.255
[r9]ospf 1 router-id 9.9.9.9
[r9-ospf-1]area 3
[r9-ospf-1-area-0.0.0.3]network 172.16.96.6 0.0.0.0
[r9-ospf-1-area-0.0.0.3]area 4
[r9-ospf-1-area-0.0.0.4]net 172.16.128.0 0.0.1.255
[r10]ospf 1 router-id
[r10]ospf 1 router-id 10.10.10.10
[r10-ospf-1]area 4
[r10-ospf-1-area-0.0.0.4]net 172.16.0.0 0.0.255.255
[r11]ospf 1 router-id 11.11.11.11
[r11-ospf-1]area 2
[r11-ospf-1-area-0.0.0.2]net 172.16.0.0 0.0.255.255
[r12]ospf 1 router-id 12.12.12.12
[r12-ospf-1]area 2
[r12-ospf-1-area-0.0.0.2]net 172.16.64.6 0.0.0.0
[r12]rip 1
[r12-rip-1]v 2
[r12-rip-1]net 172.16.0.0
take RIP Republish to OSPF in ;
[R12]ospf 1
[R12-ospf-1]import-route rip 1
Check whether the neighborhood relationship is established :
modify MGRE Interface network type of environment , And will R5、6、7 Of dr-priority Change it to 0
[R3]interface Tunnel 0/0/0
[R3-Tunnel0/0/0]ospf network-type broadcast
[R5]interface Tunnel 0/0/0
[R5-Tunnel0/0/0]ospf network-type broadcast
[R5-Tunnel0/0/0]ospf dr-priority 0
test ;
At this point, all protocols are configured , Start testing ;
Check neighbors in key locations ;
r3 Neighbor relationship table 
r6 Neighbor relationship table 
r7 Neighbor relationship table 
r9 Neighbor relationship table 
solve area 3 and area 4 Communication problems ( It is generally recommended to republish );
[R9]undo ospf 1
Warning: The OSPF process will be deleted. Continue? [Y/N]:y
[R9]ospf 1 router-id 9.9.9.9
[R9-ospf-1]area 3
[R9-ospf-1-area-0.0.0.3]network 172.16.96.6 0.0.0.0
[R9-ospf-1-area-0.0.0.3]ospf 2
[R9-ospf-2]area 4
[R9-ospf-2-area-0.0.0.4]net 172.16.128.0 0.0.0.255
Now our OSPF 1 It's equivalent to the original Area 3,OSPF 2 It's equivalent to the original Area 4;
Then we will OSPF 2 Republish to OSPF 1 Just go to the middle ! There is no need to republish in both directions , Because in the end, just give OSPF 2 Issue a default !
[R9]ospf 1
[R9-ospf-1]import-route ospf 2
Look at the neighborhood table :
View the link status database :
R5 Link state database :
Next , We reduce lsa Update quantity of , For its in each area abr Summary on
[r3]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.224.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.224.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.224.0
[r9]ospf 1
[r9-ospf-1]asbr-summary 172.16.128.0 255.255.224.0
[r12]ospf 1
[r12-ospf-1]asbr-summary 172.16.160.0 255.255.224.0
Now in the backbone area LSDB It has been reduced to the minimum ;
Then configure special areas , To continue to alleviate :
Area 1 Can be a stub Area :
[R1]ospf 1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]stub
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]stub
[R3-ospf-1-area-0.0.0.1]stub no-summary
see R5 The aggregated routing information on :
Area 2 Can be a nssa Area :
[R6-ospf-1-area-0.0.0.2]nssa
[R11-ospf-1-area-0.0.0.2]nssa
[R12-ospf-1-area-0.0.0.2]nssa

Area 2 Can become completely nssa Area :
[R6-ospf-1-area-0.0.0.2]nssa no-summary
Three types of lsa default :
[R7-ospf-1-area-0.0.0.3]nssa no-summary
[R8-ospf-1-area-0.0.0.3]nssa
[R9-ospf-1-area-0.0.0.3]nssa
Solution area 4 Communication with other regions , Give area 4 Drop the default route ;
[R9-ospf-2]default-route-advertise
We go back to R5 Check out ospf The routing , It is found that the number of routes is greatly reduced .
Achieve the ultimate goal !
边栏推荐
- Occasional pit compiled by idea
- system design
- leetcode729. My schedule 1
- Application of safety monitoring in zhizhilu Denggan reservoir area
- Latex learning insertion number - list of filled dots, bars, numbers
- Exercise 8-7 string sorting (20 points)
- Mmclassification annotation file generation
- Kotlin set operation summary
- 用数据告诉你高考最难的省份是哪里!
- Kotlin:集合使用
猜你喜欢

Hands on deep learning (33) -- style transfer

Online troubleshooting

Latex error: missing delimiter (. Inserted) {\xi \left( {p,{p_q}} \right)} \right|}}

Occasional pit compiled by idea

Safety reinforcement learning based on linear function approximation safe RL with linear function approximation translation 1

Devop basic command

leetcode842. Split the array into Fibonacci sequences

Hands on deep learning (44) -- seq2seq principle and Implementation

Hands on deep learning (III) -- Torch Operation (sorting out documents in detail)

六月份阶段性大总结之Doris/Clickhouse/Hudi一网打尽
随机推荐
The time difference between the past time and the present time of uniapp processing, such as just, a few minutes ago, a few hours ago, a few months ago
Exercise 7-4 find out the elements that are not common to two arrays (20 points)
Debug:==42==ERROR: AddressSanitizer: heap-buffer-overflow on address
System.currentTimeMillis() 和 System.nanoTime() 哪个更快?别用错了!
AUTOSAR从入门到精通100讲(106)-域控制器中的SOA
Hands on deep learning (33) -- style transfer
How web pages interact with applets
2021-08-10 character pointer
【Day2】 convolutional-neural-networks
Reasons and solutions for the 8-hour difference in mongodb data date display
按键精灵跑商学习-商品数量、价格提醒、判断背包
Latex insert picture, insert formula
Three schemes of ZK double machine room
leetcode1229. Schedule the meeting
libmysqlclient. so. 20: cannot open shared object file: No such file or directory
C language pointer classic interview question - the first bullet
Kotlin set operation summary
Hands on deep learning (45) -- bundle search
Kotlin 集合操作汇总
Hands on deep learning (43) -- machine translation and its data construction