Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Huawei-configure OSPF to realize discontiguous area network communication

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

If there are discontiguous areas in the network, how to achieve communication? Today, I will give you a brief account.

Experiment name: small company case-configuring OSPF to realize discontinuous area network communication experiment purpose: configure OSPF to realize the communication function experiment topology of discontinuous area network:

Address planning: device IP address and mask PC1192.168.10.1/24PC2192.168.60.1/24PC3192.168.50.1/24 device port IP address and mask region R1GI 0ax 0max 0192.168.12.1 12R1GI 24 area 12R1GI 0max 1192.168.16.1 12R2GI 0max 2192.168.10.254 12R2GI 0max 24 area 12R2GI 0max 0 / 1192.168.23.2Accord 24 region 0R3GI 0Uniqr 0192.168.23.3 0R3GI 24 region 45R6GI 0pex 1192.168.334. 3xxxxxx3x3xxxx3xx3xxx3xxxx3x3xxxxxx3xxxxx3xxxxxxx3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3x3xxxx3x3x3xx3xxxx3x3xxxxxx3x3xxxxxxxxxxxx3xxxxxxxxxxxxxxx3xxxxx3xxxx3x3xxxxxxx3x3x24 area 0R4GI 0mm0192.168.34.4 0R4GI 0max 1192.168.45.4, 24 area / 24 area 16R6GI 0ram 0ram 1192.168.60.254Accord 24 region 16 experimental steps:

a. Configure the device IP address

PC:

Pc1:

Pc2:

Pc3:

Router:

R1:

System-view\ enter the system view

Enter system view, return user view with Ctrl+Z.

[Huawei] sysname R1\ change name

[R1] interface GigabitEthernet 0Compact 0ram0\ entry port

[R1-GigabitEthernet0/0/0] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/0 is not shutdown.

[R1-GigabitEthernet0/0/0] ip address 192.168.12.1 255.255.255.0\ configure IP and mask

[R1-GigabitEthernet0/0/0] int gi 0Uniple 1\ entry port

[R1-GigabitEthernet0/0/1] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/1 is not shutdown.

[R1-GigabitEthernet0/0/1] ip address 192.168.16.1 255.255.255.0\ configure IP and mask

[R1-GigabitEthernet0/0/1] int gi 0ram 0ram 2\ entry port

[R1-GigabitEthernet0/0/2] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/2 is not shutdown.

[R1-GigabitEthernet0/0/2] ip address 192.168.10.254 255.255.255.0\ configure IP and mask

[R1-GigabitEthernet0/0/2] quit\ exit

[R1]

R2:

System-view\\ enter the system view

Enter system view, return user view with Ctrl+Z.

[Huawei] sysname R2\ change the name

[R2] interface GigabitEthernet 0ramram0\ entry port

[R2-GigabitEthernet0/0/0] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/0 is not shutdown.

[R2-GigabitEthernet0/0/0] ip address 192.168.12.2 255.255.255.0\ configure IP and mask

[R2-GigabitEthernet0/0/0] int gi 0Uniple 1\ entry port

[R2-GigabitEthernet0/0/1] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/1 is not shutdown.

[R2-GigabitEthernet0/0/1] ip address 192.168.23.2 255.255.255.0\ configure IP and mask

[R2-GigabitEthernet0/0/1] quit\ exit

R3:

System-view\ enter the system view

Enter system view, return user view with Ctrl+Z.

[Huawei] sysname R3\ change name

[R3] interface GigabitEthernet 0ram 0ram 0\ entry port

[R3-GigabitEthernet0/0/0] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/0 is not shutdown.\

[R3-GigabitEthernet0/0/0] ip address 192.168.23.3 255.255.255.0\ configure IP and mask

[R3-GigabitEthernet0/0/0] int gi 0Uniple 1\ entry port

[R3-GigabitEthernet0/0/1] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/1 is not shutdown.\

[R3-GigabitEthernet0/0/1] ip address 192.168.34.3 255.255.255.0\ configure IP and mask

[R3-GigabitEthernet0/0/1] quit\ exit

R4:

System-view\ enter the system view

Enter system view, return user view with Ctrl+Z.

[Huawei] sysname R4\ change name

[R4] interface GigabitEthernet 0ram 0ram 0\ entry port

[R4-GigabitEthernet0/0/0] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/0 is not shutdown.

[R4-GigabitEthernet0/0/0] ip address 192.168.34.4 255.255.255.0\ configure IP and mask

[R4-GigabitEthernet0/0/0] int gi 0Uniple 1\ entry port

[R4-GigabitEthernet0/0/1] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/1 is not shutdown.

[R4-GigabitEthernet0/0/1] ip address 192.168.45.4 255.255.255.0\ configure IP and mask

[R4-GigabitEthernet0/0/1] quit\ exit

R5:

System-view\ enter the system view

Enter system view, return user view with Ctrl+Z.

[Huawei] sysname R5\ change the name

[R5] interface GigabitEthernet 0ram 0ram 0\ entry port

[R5-GigabitEthernet0/0/0] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/0 is not shutdown.

[R5-GigabitEthernet0/0/0] ip address 192.168.45.5 255.255.255.0\ configure IP and mask

[R5-GigabitEthernet0/0/0] int gi 0Uniple 1\ entry port

[R5-GigabitEthernet0/0/1] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/1 is not shutdown.

[R5-GigabitEthernet0/0/1] ip address 192.168.50.254 255.255.255.0\ configure IP and mask

[R5-GigabitEthernet0/0/1] quit\ exit

R6:

System-view\ enter the system view

Enter system view, return user view with Ctrl+Z.

[Huawei] sysname R6\ change name

[R6] interface GigabitEthernet 0ram 0ram 0\ entry port

[R6-GigabitEthernet0/0/0] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/0 is not shutdown.

[R6-GigabitEthernet0/0/0] ip address 192.168.16.6 255.255.255.0\ configure IP and mask

[R6-GigabitEthernet0/0/0] int gi 0Uniple 1\ entry port

[R6-GigabitEthernet0/0/1] undo shutdown\ Open the port

Info: Interface GigabitEthernet0/0/1 is not shutdown.

[R6-GigabitEthernet0/0/1] ip address 192.168.60.254 255.255.255.0\ configure IP and mask

[R6-GigabitEthernet0/0/1] quit\ exit

b. After configuring the IP address, I began to configure OSPF. I divided the non-backbone areas into ordinary areas and special areas, which will be shown in later articles. Today, the special areas are divided into ordinary areas). Among them, the area between R1 and R2 is the area between 12primeR1 and R6, and the area between R4 and R4 is the backbone area. The area between R4 and R5 is region 45.

When configuring ospf, the first step is to enter ospf, start process 1, default is 1, and then configure the region. Each RID declares to its own region to establish adjacency, as shown below:

R1:

[r] ospf 1 router-id 1.1.1.1\ create the process and name the RID used by OSPF

[R1-ospf-1] area 16\ application area

[R1-ospf-1-area-0.0.0.16] network 192.168.16.1 0.0.0.0\ precisely declare the network segment

[R1-ospf-1-area-0.0.0.12] network 192.168.10.254 0.0.0.0\ precisely declare the network segment

[R1-ospf-1-area-0.0.0.16] quit\ exit

[R1-ospf-1] area 12\ application area

[R1-ospf-1-area-0.0.0.12] network 192.168.12.1 0.0.0.0\ precisely declare the network segment

[R1-ospf-1-area-0.0.0.12] quit\ exit

[R1-ospf-1] quit\ exit

R2:

[R2] ospf 1 router-id 2.2.2.2\ create the process and name the RID used by OSPF

[R2-ospf-1] area 12\ application area

[R2-ospf-1-area-0.0.0.12] network 192.168.12.2 0.0.0.0\ accurately declares the network segment

[R2-ospf-1-area-0.0.0.12] quit\ exit

[R2-ospf-1] area 0\ application area

[R2-ospf-1-area-0.0.0.0] network 192.168.23.2 0.0.0.0\ accurately declares the network segment

[R2-ospf-1-area-0.0.0.0] quit\ exit

R3:

[R3] ospf 1 router-id 3.3.3.3\ create the process and name the RID used by OSPF

[R3-ospf-1] area 0\ application area

[R3-ospf-1-area-0.0.0.0] network 192.168.23.3 0.0.0.0\ accurately declare the network segment

[R3-ospf-1-area-0.0.0.0] network 192.168.34.3 0.0.0.0\ accurately declare the network segment

[R3-ospf-1-area-0.0.0.0] quit\ exit

R4:

[R4] ospf 1 router-id 4.4.4.4\ create a process and name the RID actually used by OSPF

[R4-ospf-1] area 0\ application area

[R4-ospf-1-area-0.0.0.0] network 192.168.34.4 0.0.0.0\ precisely declare the network segment

[R4-ospf-1-area-0.0.0.0] [R4-ospf-1] area 45\

[R4-ospf-1-area-0.0.0.45] network 192.168.45.4 0.0.0.0\ accurately declares the network segment

[R4-ospf-1-area-0.0.0.45] quit\ exit

R5:

[R5] ospf 1 router-id 5.5.5.5\ create the process and name the RID used by OSPF

[R5-ospf-1] area 45\ application area

[R5-ospf-1-area-0.0.0.45] network 192.168.45.5 0.0.0.0\ precisely declare the network segment

R5-ospf-1-area-0.0.0.45] network 192.168.50.254 0.0.0.0\ precisely declare the network segment

[R5-ospf-1-area-0.0.0.45] quit\ exit

[R5-ospf-1] quit\ exit

R6:

[R6] ospf 1 router-id 6.6.6.6\ create a process and name the RID used by OSPF

[R6-ospf-1] area 16\ application area

[R6-ospf-1-area-0.0.0.16] network 192.168.16.6 0.0.0.0\ precisely declare the network segment

[R6-ospf-1-area-0.0.0.16] network 192.168.60.254 0.0.0.0\ accurately declare the network segment

[R6-ospf-1-area-0.0.0.16] quit\ exit

c. At this point, let's verify that the adjacency has been established:

R1:

R2:

R3:

R4:

R5:

R6:

d. Through verification, we can confirm that each adjacency has been successfully established, but since R1 is not an ABR (only ABR has the ability to route between different areas), and the areas where R1 and R6 are located are not contiguous areas (continuous areas mean that backbone and non-backbone areas are connected, while areas 12 and 16 are non-backbone areas), we need to find a way to make R1 an ABR. Only in this way can routing and communication in discontiguous areas be realized.

To sum up, there are two ways:

-construct an ABR so that the route for this non-backbone area exists as an internal route in other areas 1. # on routers connecting multiple non-backbone areas, an OSPF neighbor relationship with area 0 is established by re-linking a "physical link" (a continuous area can be achieved by directly adding a network cable between R1 and R3), but in practice, sometimes some old networks are not new ones, so we can't build them casually.

two。 Make R1 an ABR by creating a virtual link (in this case, a contiguous area, directly connecting the backbone and non-backbone areas). The steps are as follows:

& R1:

R1:

[R1] ospf 1\ create ospf process 1

[R1-ospf-1] area 12\ application area

[R1-ospf-1-area-0.0.0.12] vlink-peer 2.2.2.2\

[R1-ospf-1-area-0.0.0.12] quit\ exit

& R2:

[R2] ospf 1\ create ospf process 1

[R2-ospf-1] area 12\ application area

[R2-ospf-1-area-0.0.0.12] vlink-peer 1.1.1.1\

[R1-ospf-1-area-0.0.0.12] quit\ exit

& look at the local OSFP neighbor relationships established over virtual links at this time:

& Test whether to achieve discontinuous area communication

Pc1:

Pc2:

The OSPF neighbor relationship established through the virtual link always belongs to area 0; the establishment of the virtual link needs to rely on the area where the underlying real link is located to transmit OSPF packets (hello, etc.). Therefore, if the underlying "traversal / transmission area" is unstable, it will lead to the instability of the upper "virtual link", which will affect the stability of the backbone area of the whole network. Therefore, this approach is generally not recommended, and if it has to be used, it is only a temporary solution.

-. Build different OSPF processes so that routes are delivered in the form of external routes. The main operation steps are as follows: first abolish the adjacency between process 1 and R6 (delete the declaration of R1 to area 16 in process 1), and then establish an adjacency relationship with R6 through process 10 (establish a new process 10, announce to area 16). In process 10, process 1 is introduced as an external route, and in process 1, process 10 is introduced as an external route.

& abolish the adjacency with R6 through process 1 (delete the declaration of area 16 in process 1)

[R1] ospf 1

[R1-ospf-1] area 16 application area

[R1-ospf-1-area-0.0.0.16] undo network 192.168.16.1 0.0.0.0

& establish process 10 and establish adjacency with R6 through process 10

[R1] ospf 10

[R1-ospf-10] area 16 application area

[R1-ospf-10-area-0.0.0.16] network 192.168.16.1 0.0.0.0

& in process 10, import (redistribute) process 1 as an external route

[R1] ospf 10

[R1-ospf-10] import-route ospf 1

& in process 1, import (redistribute) process 8 as if it were unrouted

[R1] ospf 1

[R1-ospf-1] import-route ospf 10

View traffic in discontiguous areas

PC1:

PC2:

I hope you can learn the method of communication in discontinuous areas through my experiments. If there are any deficiencies in beginners, please give us a lot of advice. Thank you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 224

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report