OSPF link state routing protocol-topology map experiment

Open Shortest Path First (OSPF) is a widely used dynamic routing protocol. It belongs to the link state routing protocol. It has fast route change convergence speed, no routing loops, and supports variable length subnet masks ( VLSM) and summary, hierarchical area division and other advantages. After the OSPF protocol is used in the network, most of the routes will be calculated and generated by the OSPF protocol, without manual configuration by the network administrator. When the network topology changes, the protocol can automatically calculate and correct routes, which greatly facilitates network management.

Experimental topology diagram:

Insert picture description here

Solution diagram idea:

**The whole OSPF topology map is divided into four areas, namely:
R6→R1 is the other area of ​​AS, rip area
R1→R3 is the non-backbone area, area 1
R3→R4 is the backbone area, area 0
R4→R5 is the non-backbone area area 2 The area
enables routers in the ospf area to obtain the IP address of the router in the rip area; enables the router in the rip area to obtain the IP address of the router in the ospf area
. The cost of introducing rip1 into ospf is 5 (set it randomly): import -route rip 1 type 1 cost 5
Introduce ospf 1 in rip 1 (cost value can also be set): import-route ospf 1 (cost * )

Experimental steps:

Rip area:
R6: sys
[Huawei]sys R6
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add 16.0.0.6 24
[R6-GigabitEthernet0/0/0]un sh
[R6-GigabitEthernet0 /0/0]int loo 0 ##Enter the address pool
[R6-LoopBack0]ip add 6.6.6.6 32 ###Set the address pool ip
[R6-LoopBack0]q
[R6]rip 1 ####Enter rip 1
[ R6-rip-1]v 2 ####Version 2
[R6-rip-1]network 16.0.0.0 ##Network interface address 16.0.0.0
[R6-rip-1]network 6.0.0.0 ##Network address 16.0. 0.0


R1:sys
[Huawei]sys R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 16.0.0.1 24
[R1-GigabitEthernet0/0/0]un sh
[R1-GigabitEthernet0/0/ 0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 12.0.0.1 24
[R1-GigabitEthernet0/0/1]un sh
[R1-GigabitEthernet0/0/1]int loo 0
[R1-LoopBack0 ]ip add 1.1.1.1 32
[R1-LoopBack0]q
[R1]rip 1 ###Enter rip 1
[R1-rip-1]v 2 ####Version 2
[R1-rip-1]network 16.0.0.0 ##Interface network number
[R1-rip-1]q
[R1]ospf 1 router-id 1.1.1.1 ##Enter ospf designated id
[R1-ospf-1]a 1 ######Enter area 1
[R1 -ospf-1-area-0.0.0.1]network 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.1]network 12.0.0.0 0.0.0.255
(remember that ospf has a reverse mask)


R2:sys
[Huawei]sys R2
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 12.0.0.2 24
[R2-GigabitEthernet0/0/1]un sh
[R2-GigabitEthernet0/0/1]int g0/0/2
[R2-GigabitEthernet0/0/2]ip add 23.0.0.2 24
[R2-GigabitEthernet0/0/2]un sh
[R2-GigabitEthernet0/0/2]int loo 0
[R2-LoopBack0]ip add 2.2.2.2 32
[R2-LoopBack0]q
[R2]ospf 1 router-id 2.2.2.2 ###进入ospf 指定id
[R2-ospf-1]a 1 #####进入area 1
[R2-ospf-1-area-0.0.0.1]network 12.0.0.0 0.0.0.255
[R2-ospf-1-area-0.0.0.1]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.1]network 23.0.0.0 0.0.0.255


R3:sys
[Huawei]sys R3
[R3]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add 23.0.0.3 24
[R3-GigabitEthernet0/0/2]un sh
[R3-GigabitEthernet0/0/2]int g0/0/3
[R3-GigabitEthernet0/0/3]ip add 34.0.0.3 24
[R3-GigabitEthernet0/0/3]un sh
[R3-GigabitEthernet0/0/3]int loo 0
[R3-LoopBack0]ip add 3.3.3.3 32
[R3-LoopBack0]q
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]a 1
[R3-ospf-1-area-0.0.0.1]network 23.0.0.0 0.0.0.255
[R3-ospf-1-area-0.0.0.1]q
[R3-ospf-1]a 0
[R3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 34.0.0.0 0.0.0.255
( 边界路由器设置,区分area 1 和 area 2 )


R4:sys
[Huawei]sys R4
[R4]int g0/0/3
[R4-GigabitEthernet0/0/3]ip add 34.0.0.4 24
[R4-GigabitEthernet0/0/3]un sh
[R4-GigabitEthernet0/0/3]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 45.0.0.4 24
[R4-GigabitEthernet0/0/0]un sh
[R4-GigabitEthernet0/0/0]int loo 0
[R4-LoopBack0]ip add 4.4.4.4 32
[R4-LoopBack0]q
[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]a 0
[R4-ospf-1-area-0.0.0.0]network 34.0.0.0 0.0.0.255
[R4-ospf-1-area-0.0.0.0]q
[R4-ospf-1]a 2
[R4-ospf-1-area-0.0.0.2]network 4.4.4.4 0.0.0.0
[R4-ospf-1-area-0.0.0.2]network 45.0.0.0 0.0.0.255


R5:sys
[Huawei]sys R5
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 45.0.0.5 24
[R5-GigabitEthernet0/0/0]un sh
[R5-GigabitEthernet0/0/0]int loo 0
[R5-LoopBack0]ip add 5.5.5.5 32
[R5-LoopBack0]q
[R5]ospf 1 router-id 5.5.5.5
[R5-ospf-1]a 2
[R5-ospf-1-area-0.0.0.2]network 5.5.5.5 0.0.0.0
[R5-ospf-1-area-0.0.0.2]network 45.0.0.0 0.0.0.255


Experimental results:

After the routers dis ip routing-table, it is found that:
1. R6 in the Rip area does not have the address of each router in the ospf area, but R1 as the border router of the ASBR has the address of R6.
2. All routers in the ospf area do not have R6 routing addresses.
Then in the system view in R1:
enter ospf 1 and
enter import-route rip 1 type 1 cost 5
again after each router dis ip routing-table, it is found that each route has R6 The address and cost value have also changed.
Then in the system view in R1:
enter rip 1 and
enter import-route ospf 1 cost 7
again dis ip routing-table R6 also found that R6 also has the addresses of the routes in the ospf area

The experiment was successful

########################

Like the one you like

Guess you like

Origin blog.csdn.net/XCsuperman/article/details/107075485