CN114363239A - Method, device, equipment and storage medium for updating routing information - Google Patents

Method, device, equipment and storage medium for updating routing information Download PDF

Info

Publication number
CN114363239A
CN114363239A CN202111658314.7A CN202111658314A CN114363239A CN 114363239 A CN114363239 A CN 114363239A CN 202111658314 A CN202111658314 A CN 202111658314A CN 114363239 A CN114363239 A CN 114363239A
Authority
CN
China
Prior art keywords
routing
node
area
ospf
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111658314.7A
Other languages
Chinese (zh)
Other versions
CN114363239B (en
Inventor
李京河
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Armyfly Technology Co Ltd
Original Assignee
Beijing Armyfly Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Armyfly Technology Co Ltd filed Critical Beijing Armyfly Technology Co Ltd
Priority to CN202111658314.7A priority Critical patent/CN114363239B/en
Publication of CN114363239A publication Critical patent/CN114363239A/en
Application granted granted Critical
Publication of CN114363239B publication Critical patent/CN114363239B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for updating routing information. The routing node applied to the OSPF network comprises the following components: when the node leaves the range of the original OSPF area and moves to the range of a new OSPF area, receiving a hello message sent by a routing node in the new OSPF area as a target message; updating the routing parameters stored locally by the node according to the target routing parameters in the target message; and establishing the neighbor relation between the node and the routing node in the new OSPF area according to the updated routing parameters, and issuing routing information. The technical scheme of the embodiment of the invention realizes that the routing node in the OSPF network can automatically negotiate and join in a new OSPF area after leaving the original OSPF area, thereby meeting the requirement that the routing node in motion accesses the OSPF network.

Description

Method, device, equipment and storage medium for updating routing information
Technical Field
The embodiment of the invention relates to the technical field of routing, in particular to a method, a device, equipment and a storage medium for updating routing information.
Background
Open Shortest Path First (OSPF) is an interior gateway protocol, is used for deciding routing in a single Autonomous System (AS), and is an implementation of a link state routing protocol.
In the prior art, OSPF divides a large autonomous system into several small areas (areas), and a routing node only needs to establish a neighbor relation with other routing nodes in the Area where the routing node is located and share a link state database, without considering the routing of other areas. However, when the location of a routing node changes in a specific scenario, moves away from the original area, and moves into a new area, since the area and the routing parameters of the routing node are preset, if the relevant routing configuration of the new area is different from the relevant routing configuration of the routing node, the routing node cannot join the new area.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for updating routing information, so as to implement that a routing node in an OSPF network can automatically negotiate and join a new OSPF area after leaving an original OSPF area, thereby meeting a requirement that a moving routing node accesses the OSPF network.
In a first aspect, an embodiment of the present invention provides a method for updating routing information, which is applied to a routing node in an OSPF network, and includes:
when the node leaves the range of the original OSPF area and moves to the range of a new OSPF area, receiving a hello message sent by a routing node in the new OSPF area as a target message;
updating the routing parameters stored locally by the node according to the target routing parameters in the target message;
and establishing the neighbor relation between the node and the routing node in the new OSPF area according to the updated routing parameters, and issuing routing information.
Optionally, receiving a hello packet sent by a routing node in a new OSPF area as a target packet includes:
if the new OSPF area is the overlapping area of the plurality of OSPF areas, receiving hello messages sent by routing nodes in the plurality of OSPF areas, and caching the hello messages;
when the message timing processing condition is met, acquiring area identifiers and IP address network segments of a plurality of routing node interfaces from the cached hello message;
and selecting a hello message sent by the routing node in the OSPF region from the cache as a target message according to the region identifiers of the multiple routing node interfaces and the IP address network segment.
Optionally, selecting, from the cache, a hello packet sent by a routing node in an OSPF region as a target packet according to the region identifiers of the multiple routing node interfaces and the IP address network segment, where the method includes:
judging whether a target area identifier which is the same as the area identifier of the node interface exists in the area identifiers of the routing node interfaces;
if yes, the hello message sent by the routing node in the OSPF area corresponding to the target area identification is used as a target message;
if not, selecting a target IP address network segment closest to the IP address network segment of the node interface from the IP address network segments of the plurality of routing node interfaces, and taking a hello message sent by the routing node in the OSPF region corresponding to the target IP address network segment as a target message.
Optionally, updating the routing parameter locally stored by the node according to the target routing parameter in the target packet includes:
analyzing the target message to obtain a target routing parameter; the target routing parameters include: the area identification, the area type, the authentication information, the hello time interval and the death time interval of the routing node interface;
and updating the routing parameters of the node to be consistent with the target routing parameters.
Optionally, establishing a neighbor relationship between the node and a routing node in the new OSPF area according to the updated routing parameter includes:
if the new OSPF area is the overlapping area of multiple OSPF areas, establishing the neighbor relation between the node and each routing node in the OSPF area corresponding to the target message according to the updated routing parameters.
In a second aspect, an embodiment of the present invention further provides a routing information updating apparatus, applied to a routing node in an OSPF network, including:
a message receiving module, configured to receive a hello message sent by a routing node in a new OSPF area as a target message when the node leaves an original OSPF area range and moves to the new OSPF area range;
the parameter updating module is used for updating the routing parameters locally stored by the node according to the target routing parameters in the target message;
and the neighbor establishing module is used for establishing the neighbor relation between the node and the routing node in the new OSPF area according to the updated routing parameters and issuing the routing information.
Optionally, the message receiving module includes:
a cache unit, configured to receive hello packets sent by routing nodes in multiple OSPF areas and perform caching if the new OSPF area is a superposition area of the multiple OSPF areas;
the information acquisition unit is used for acquiring the area identifiers and the IP address network segments of a plurality of routing node interfaces from the cached hello message when the message timing processing condition is met;
and the selecting unit is used for selecting the hello message sent by the routing node in the OSPF area from the cache as a target message according to the area identifiers of the multiple routing node interfaces and the IP address network segment.
Optionally, the selecting unit is specifically configured to:
judging whether the area identifiers of the plurality of routing node interfaces have the target area identifier which is the same as the area identifier of the node interface;
if yes, the hello message sent by the routing node in the OSPF area corresponding to the target area identification is used as a target message;
if not, selecting a target IP address network segment closest to the IP address network segment of the node interface from the IP address network segments of the plurality of routing node interfaces, and taking a hello message sent by the routing node in the OSPF region corresponding to the target IP address network segment as a target message.
In a third aspect, an embodiment of the present invention further provides a routing node device, where the device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the routing information updating method provided by any of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the routing information updating method provided in any embodiment of the present invention.
The technical scheme of the embodiment of the invention is applied to the routing node in the OSPF network, when the node leaves the range of the original OSPF area and moves to the range of a new OSPF area, the hello message sent by the routing node in the new OSPF area is received as a target message; updating the routing parameters stored locally by the node according to the target routing parameters in the target message; according to the updated routing parameters, the neighbor relation between the node and the routing node in the new OSPF area is established, and routing information is issued, so that the problem that the routing node entering the new OSPF area cannot access the OSPF network in the prior art is solved, the routing node in the OSPF network can automatically negotiate and join the new OSPF area after leaving the original OSPF area, and the requirement that the moving routing node accesses the OSPF network is met.
Drawings
FIG. 1a is a topology diagram of an OSPF network in accordance with a first embodiment of the present invention;
fig. 1b is a flowchart of a method for updating routing information according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of a routing information updating apparatus according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a routing node device in the third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1a is a topology diagram of an OSPF network according to a first embodiment of the present invention, and as shown in fig. 1a, the OSPF network is divided into three OSPF areas, namely, a domain 0, a domain 1, and a domain 2. Domain 0 is a backbone area that includes A, B, C backbone routing node devices, where a is an area interior router and B and C are area border routers. Domain 1 is a branch region including routing node devices B, d, e, f, and domain 2 is also a branch region including routing node devices C, g, h, k. In order to avoid loops of routing, routing information is not allowed to be directly distributed to each other between non-backbone areas, and therefore, each branch area must be connected to a backbone area.
If the routing node leaves the original OSPF area and moves to the new OSPF area range in position, for example, the routing node g in fig. 1a leaves the original domain 2 and moves to the range of the domain 1, the node g sends an OSPF hello message regularly in the domain 1 and receives the hello message sent by the routing node of the domain 1. At this time, according to the OSPF protocol, the node g and the routing node in the domain 1 cannot establish a neighbor relation due to different routing configurations, and issue routing information, that is, the node g cannot join the domain 1.
In this embodiment, after the routing node moves away from the original OSPF area and moves into the new OSPF area, the routing node actively adjusts and negotiates that the routing parameter of the node is completely matched with the routing parameter of the routing node in the new OSPF area, so that the node may establish a neighbor relationship with the routing node in the new OSPF area and issue routing information.
Example one
Fig. 1b is a flowchart of a routing information updating method in an embodiment of the present invention, which is applicable to a case where a routing node automatically negotiates to join a new OSPF area after moving from an existing OSPF area to the new OSPF area. Specifically, referring to fig. 1b, the method is applied to a routing node in an OSPF network, and may include the following steps:
step 110, when the node leaves the original OSPF area range and moves to a new OSPF area range, receiving hello message sent by the routing node in the new OSPF area as a target message.
In this embodiment, the node refers to a routing node of an OSPF network that has a location change in a specific scenario, where an original OSPF area is an area to which the node is added before moving, a new OSPF area is an area where the node is located after moving, a hello packet is used to discover and maintain a neighbor relation, and a target packet refers to a hello packet that can be used to adjust a routing parameter of the node. Optionally, the original OSPF area is a backbone area or a branch area in the OSPF network, and the new OSPF area is a branch area in the OSPF network. That is, the node may be originally located in the range of the backbone area or the range of a certain branch area, and is located in the range of another branch area through fast moving, and receives the hello packet periodically sent by the routing node in the new area.
For example, in the routing node g in fig. 1a, the original node is added to the branch area 2, the neighbor relationship is established with the routing nodes C, k, and h in the area 2, and the routing node g is away from the area 2 afterwards, the neighbor relationship with the routing nodes C, k, and h is disconnected, the routing node g moves to the range of the branch area 1, and receives the OSPF hello packet sent by the routing nodes B, d, e, and f in the area 1. At this time, since the routing node g is located only within the range of the area 1, the hello packet sent by the routing node in the area 1 can be used as the target packet for adjusting the parameter.
Optionally, receiving a hello packet sent by a routing node in a new OSPF area as a target packet may include: if the new OSPF area is the overlapping area of the plurality of OSPF areas, receiving hello messages sent by routing nodes in the plurality of OSPF areas, and caching the hello messages; when the message timing processing condition is met, acquiring area identifiers and IP address network segments of a plurality of routing node interfaces from the cached hello message; and selecting a hello message sent by the routing node in the OSPF region from the cache as a target message according to the region identifiers of the multiple routing node interfaces and the IP address network segment.
In this embodiment, if the node is located in the overlapping areas of multiple OSPF areas after moving, the node receives hello packets sent from routing nodes in the multiple OSPF areas while sending hello packets in the overlapping areas of the multiple OSPF areas at regular time. The routing node processes the message at regular time, so that the received hello message can be cached firstly, when the message is processed at regular time, each hello message in the cache is analyzed according to the message format to obtain the area identifier of the OSPF area corresponding to the routing node interface which sends each message and the IP address network segment of the routing node interface, a target area to be added is selected from a plurality of OSPF areas according to the obtained information, and then the hello message sent by one routing node of the target area is selected as the target message from the hello messages sent by the routing nodes of the plurality of OSPF areas.
Optionally, selecting, from the cache, a hello packet sent by a routing node in an OSPF region as a target packet according to the region identifiers and the IP address network segments of the multiple routing node interfaces, where the method includes: judging whether a target area identifier which is the same as the area identifier of the node interface exists in the area identifiers of the routing node interfaces; if yes, the hello message sent by the routing node in the OSPF area corresponding to the target area identification is used as a target message; if not, selecting a target IP address network segment closest to the IP address network segment of the node interface from the IP address network segments of the plurality of routing node interfaces, and taking a hello message sent by the routing node in the OSPF region corresponding to the target IP address network segment as a target message.
In this embodiment, the area identifier of the routing node interface may be used as a first priority matching factor, and the IP address network segment of the routing node interface may be used as a second priority matching factor, so as to select a target area to be added from a plurality of OSPF areas. The obtained area identifiers of the multiple routing node interfaces can be compared with the area identifier of the node interface, the target area identifier which is the same as the area identifier of the node interface is used as the area identifier of the target area to be added into the node, and then a hello message carrying the target area identifier is selected as the target message. If the area identification which is the same as the area identification of the node interface does not exist, comparing the acquired IP address network segments of the plurality of routing node interfaces with the IP address network segment of the node interface, selecting a target IP address network segment which is the same as or closest to the IP address network segment of the node interface as the IP address network segment of the target area to be added into the node, and further selecting a hello message carrying the target IP address network segment as a target message.
It should be noted that the priority of the area identifier and the IP address network segment may be adjusted according to the requirement, and even the matching factor used for selecting the target area to be added may be adjusted according to the requirement.
And step 120, updating the routing parameters locally stored by the node according to the target routing parameters in the target message.
In this embodiment, after the node receives the hello packet, because the routing parameters such as the area identifier and the area type in the hello packet are all in the new OSPF area and are not completely matched with the routing parameters of the node, the node needs to add a policy according to a preset area, refer to the target routing parameters in the target packet, and adjust the consistency between the local routing parameters and the routing nodes in the new OSPF area, so that the node can negotiate with the routing nodes in the new OSPF area successfully to establish a neighbor relationship.
Optionally, updating the routing parameter locally stored by the node according to the target routing parameter in the target packet may include: analyzing the target message to obtain a target routing parameter; the target routing parameters include: the area identification, the area type, the authentication information, the hello time interval and the death time interval of the routing node interface; and updating the routing parameters of the node to be consistent with the target routing parameters.
In this embodiment, the target packet may be subjected to packet analysis according to a packet format of the hello packet, target routing parameters such as a zone identifier, a zone type, authentication information, a hello time interval, a dead time interval, and the like of a routing node interface are extracted from a specified field in the target packet, the target routing parameters are compared with the routing parameters of the node, and the routing parameters in the node that are inconsistent with the target routing parameters are updated by comparing the target routing parameters.
Step 130, according to the updated routing parameters, establishing the neighbor relation between the node and the routing node in the new OSPF area, and issuing the routing information.
In this embodiment, after the local routing parameter is updated by the local node, the hello packet of the updated routing parameter is interactively written into the routing node in the new OSPF area, so as to discover and maintain the neighbor relationship in the new OSPF area. Optionally, if the new OSPF area is a superposition area of multiple OSPF areas, a neighbor relationship between the node and each routing node in the OSPF area corresponding to the target packet is established according to the updated routing parameter. That is, when the node is in the overlapping area of multiple OSPF areas, the node cannot establish a neighbor relation with each OSPF area, but only with the OSPF area corresponding to the selected target packet.
Then, the node sends a Database Description (DD) message to the neighboring routing node to send summary information of each entry of the link state Database of the node to the neighboring routing node, and receives the DD message sent by the neighboring routing node to obtain the summary information of each entry of the link state Database of the neighboring routing node. And comparing the database abstract information at the two sides to find out the difference of the link state databases at the two sides. Then, the node sends a Link-Status request (LSR) message to the neighbor routing node to request detailed information of database entries which the neighbor routing node has but not the node, receives a Link-Status update (LSU) message responded by the neighbor routing node, puts the requested detailed information of the Link Status contained in the LSU message into a local Link Status database, realizes synchronization with the Link Status database of the neighbor routing node, and finally generates and releases routing information according to the synchronized Link Status database.
The technical scheme of the embodiment of the invention is applied to the routing node in the OSPF network, when the node leaves the range of the original OSPF area and moves to the range of a new OSPF area, the hello message sent by the routing node in the new OSPF area is received as a target message; updating the routing parameters stored locally by the node according to the target routing parameters in the target message; according to the updated routing parameters, the neighbor relation between the node and the routing node in the new OSPF area is established, and routing information is issued, so that the problem that the routing node entering the new OSPF area cannot access the OSPF network in the prior art is solved, the routing node in the OSPF network can automatically negotiate and join the new OSPF area after leaving the original OSPF area, and the requirement that the moving routing node accesses the OSPF network is met.
Example two
Fig. 2 is a schematic structural diagram of a routing information updating apparatus in a second embodiment of the present invention, which is applicable to a case where a routing node automatically negotiates to join a new OSPF area after moving from an original OSPF area to the new OSPF area. Specifically, referring to fig. 2, the apparatus is applied to a routing node in an OSPF network, and includes:
a message receiving module 210, configured to receive a hello message sent by a routing node in a new OSPF area as a target message when the node leaves an original OSPF area range and moves to the new OSPF area range;
a parameter updating module 220, configured to update the routing parameter locally stored by the node according to the target routing parameter in the target packet;
the establishing neighbor module 230 is configured to establish a neighbor relationship between the node and a routing node in the new OSPF area according to the updated routing parameter, and issue routing information.
The technical scheme of the embodiment of the invention is applied to the routing node in the OSPF network, when the node leaves the range of the original OSPF area and moves to the range of a new OSPF area, the hello message sent by the routing node in the new OSPF area is received as a target message; updating the routing parameters stored locally by the node according to the target routing parameters in the target message; according to the updated routing parameters, the neighbor relation between the node and the routing node in the new OSPF area is established, and routing information is issued, so that the problem that the routing node entering the new OSPF area cannot access the OSPF network in the prior art is solved, the routing node in the OSPF network can automatically negotiate and join the new OSPF area after leaving the original OSPF area, and the requirement that the moving routing node accesses the OSPF network is met.
Optionally, the message receiving module 210 includes:
a cache unit, configured to receive hello packets sent by routing nodes in multiple OSPF areas and perform caching if the new OSPF area is a superposition area of the multiple OSPF areas;
the information acquisition unit is used for acquiring the area identifiers and the IP address network segments of a plurality of routing node interfaces from the cached hello message when the message timing processing condition is met;
and the selecting unit is used for selecting the hello message sent by the routing node in the OSPF area from the cache as a target message according to the area identifiers of the multiple routing node interfaces and the IP address network segment.
Optionally, the selecting unit is specifically configured to:
judging whether a target area identifier which is the same as the area identifier of the node interface exists in the area identifiers of the routing node interfaces;
if yes, the hello message sent by the routing node in the OSPF area corresponding to the target area identification is used as a target message;
if not, selecting a target IP address network segment closest to the IP address network segment of the node interface from the IP address network segments of the plurality of routing node interfaces, and taking a hello message sent by the routing node in the OSPF region corresponding to the target IP address network segment as a target message.
Optionally, the parameter updating module 220 is configured to:
analyzing the target message to obtain a target routing parameter; the target routing parameters include: the area identification, the area type, the authentication information, the hello time interval and the death time interval of the routing node interface;
and updating the routing parameters of the node to be consistent with the target routing parameters.
Optionally, the neighbor module 230 is established to:
if the new OSPF area is the overlapping area of multiple OSPF areas, establishing the neighbor relation between the node and each routing node in the OSPF area corresponding to the target message according to the updated routing parameters.
The routing information updating device provided by the embodiment of the invention can execute the routing information updating method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a routing node device according to a third embodiment of the present invention. Fig. 3 illustrates a block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention. The device 12 shown in fig. 3 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present invention.
As shown in FIG. 3, device 12 is in the form of a general purpose computing device. The components of device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, and commonly referred to as a "hard drive"). Although not shown in FIG. 3, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with device 12, and/or with any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, to implement the route information updating method provided by the embodiment of the present invention.
Namely: the method for realizing the updating of the routing information is applied to the routing node in the OSPF network and comprises the following steps:
when the node leaves the range of the original OSPF area and moves to the range of a new OSPF area, receiving a hello message sent by a routing node in the new OSPF area as a target message;
updating the routing parameters stored locally by the node according to the target routing parameters in the target message;
and establishing the neighbor relation between the node and the routing node in the new OSPF area according to the updated routing parameters, and issuing routing information.
Example four
The fourth embodiment of the present invention further discloses a computer storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a routing information updating method, and is applied to a routing node in an OSPF network, and the method includes:
when the node leaves the range of the original OSPF area and moves to the range of a new OSPF area, receiving a hello message sent by a routing node in the new OSPF area as a target message;
updating the routing parameters stored locally by the node according to the target routing parameters in the target message;
and establishing the neighbor relation between the node and the routing node in the new OSPF area according to the updated routing parameters, and issuing routing information.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for updating routing information is applied to a routing node in an Open Shortest Path First (OSPF) network, and comprises the following steps:
when the node leaves the range of the original OSPF area and moves to the range of a new OSPF area, receiving a hello message sent by a routing node in the new OSPF area as a target message;
updating the routing parameters stored locally by the node according to the target routing parameters in the target message;
and establishing the neighbor relation between the node and the routing node in the new OSPF area according to the updated routing parameters, and issuing routing information.
2. The method of claim 1 wherein receiving a hello packet sent by a routing node in the new OSPF region as a destination packet comprises:
if the new OSPF area is a superposition area of a plurality of OSPF areas, receiving hello messages sent by routing nodes in the plurality of OSPF areas, and caching the hello messages;
when the message timing processing condition is met, acquiring area identifiers and IP address network segments of a plurality of routing node interfaces from the cached hello message;
and selecting a hello message sent by the routing node in the OSPF region from the cache as a target message according to the region identifiers of the routing node interfaces and the IP address network segments.
3. The method of claim 2, wherein selecting a hello packet sent by a routing node in an OSPF region from the cache as a target packet according to the region identifier and the IP address network segment of the plurality of routing node interfaces comprises:
judging whether the area identifiers of the plurality of routing node interfaces have the target area identifier which is the same as the area identifier of the node interface;
if yes, the hello message sent by the routing node in the OSPF area corresponding to the target area identification is used as a target message;
if not, selecting a target IP address network segment closest to the IP address network segment of the node interface from the IP address network segments of the plurality of routing node interfaces, and taking a hello message sent by the routing node in the OSPF region corresponding to the target IP address network segment as a target message.
4. The method according to claim 1, wherein updating the routing parameter locally stored by the node according to the target routing parameter in the target message comprises:
analyzing the target message to obtain a target routing parameter; the target routing parameters include: the area identification, the area type, the authentication information, the hello time interval and the death time interval of the routing node interface;
and updating the routing parameters of the node to be consistent with the target routing parameters.
5. The method of claim 1, wherein establishing a neighbor relation between the local node and a routing node in the new OSPF area according to the updated routing parameters comprises:
and if the new OSPF area is the overlapped area of the plurality of OSPF areas, establishing the neighbor relation between the node and each routing node in the OSPF area corresponding to the target message according to the updated routing parameters.
6. A routing information updating device applied to a routing node in an OSPF network comprises:
a message receiving module, configured to receive a hello message sent by a routing node in a new OSPF area as a target message when the node leaves an original OSPF area range and moves to the new OSPF area range;
the parameter updating module is used for updating the routing parameters locally stored by the node according to the target routing parameters in the target message;
and the neighbor establishing module is used for establishing the neighbor relation between the node and the routing node in the new OSPF area according to the updated routing parameters and issuing the routing information.
7. The apparatus of claim 6, wherein the message receiving module comprises:
a caching unit, configured to receive hello packets sent by routing nodes in multiple OSPF areas and perform caching if the new OSPF area is a superposition area of the multiple OSPF areas;
the information acquisition unit is used for acquiring the area identifiers and the IP address network segments of a plurality of routing node interfaces from the cached hello message when the message timing processing condition is met;
and the selecting unit is used for selecting the hello message sent by the routing node in the OSPF area from the cache as a target message according to the area identifiers of the plurality of routing node interfaces and the IP address network segment.
8. The apparatus according to claim 7, wherein the selection unit is specifically configured to:
judging whether the area identifiers of the plurality of routing node interfaces have the target area identifier which is the same as the area identifier of the node interface;
if yes, the hello message sent by the routing node in the OSPF area corresponding to the target area identification is used as a target message;
if not, selecting a target IP address network segment closest to the IP address network segment of the node interface from the IP address network segments of the plurality of routing node interfaces, and taking a hello message sent by the routing node in the OSPF region corresponding to the target IP address network segment as a target message.
9. A routing node apparatus, characterized in that the apparatus comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the routing information update method of any of claims 1-5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the routing information updating method according to any one of claims 1 to 5.
CN202111658314.7A 2021-12-30 2021-12-30 Routing information updating method, device, equipment and storage medium Active CN114363239B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111658314.7A CN114363239B (en) 2021-12-30 2021-12-30 Routing information updating method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111658314.7A CN114363239B (en) 2021-12-30 2021-12-30 Routing information updating method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114363239A true CN114363239A (en) 2022-04-15
CN114363239B CN114363239B (en) 2024-02-06

Family

ID=81105377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111658314.7A Active CN114363239B (en) 2021-12-30 2021-12-30 Routing information updating method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114363239B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101523813A (en) * 2006-09-12 2009-09-02 思科技术公司 Method and apparatus for passing routing information among mobile routers
CN102695237A (en) * 2012-01-10 2012-09-26 南京邮电大学 Routing method for supporting random moving mobile sensing network
CN110601985A (en) * 2019-09-17 2019-12-20 北京东土军悦科技有限公司 Interface configuration information switching method, device, equipment and storage medium
CN112671654A (en) * 2020-12-28 2021-04-16 北京东土军悦科技有限公司 Routing information updating method, device, equipment, medium and OSPF network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101523813A (en) * 2006-09-12 2009-09-02 思科技术公司 Method and apparatus for passing routing information among mobile routers
CN102695237A (en) * 2012-01-10 2012-09-26 南京邮电大学 Routing method for supporting random moving mobile sensing network
CN110601985A (en) * 2019-09-17 2019-12-20 北京东土军悦科技有限公司 Interface configuration information switching method, device, equipment and storage medium
CN112671654A (en) * 2020-12-28 2021-04-16 北京东土军悦科技有限公司 Routing information updating method, device, equipment, medium and OSPF network

Also Published As

Publication number Publication date
CN114363239B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
US11290367B2 (en) Hierarchical network configuration
EP3739826B1 (en) Communication method, system and apparatus
US7359393B1 (en) Method and apparatus for border gateway protocol convergence using update groups
US20210036916A1 (en) Switch triggered traffic tracking
US11736397B2 (en) Packet tracing mechanism in a network leveraging SRV6
KR20150113597A (en) Method and apparatus for processing arp packet
JP4789425B2 (en) Route table synchronization method, network device, and route table synchronization program
US11044184B2 (en) Data packet loss detection
CN111010329B (en) Message transmission method and device
US10187286B2 (en) Method and system for tracking network device information in a network switch
CN107682275B (en) Message monitoring method and device
US10862804B2 (en) Redirecting data packets between overlay network and underlay network
US10298672B2 (en) Global contact-point registry for peer network devices
US20160344689A1 (en) Network Management of Devices Residing Behind a Network Device
US20050220098A1 (en) Hierarchical packet processing system and method, relay device and server
CN115225634B (en) Data forwarding method, device and computer program product under virtual network
CN114363239B (en) Routing information updating method, device, equipment and storage medium
US10728150B2 (en) Method and system segregating application traffic in a wide area network
US20160337232A1 (en) Flow-indexing for datapath packet processing
US11509622B2 (en) Facilitating communication between resources in different network environments
CN111800340B (en) Data packet forwarding method and device
CN110266597B (en) Flow control method, device, equipment and storage medium
CN116455616B (en) Method, system, device and medium for synchronizing network security control policies for container drift
EP4203414A1 (en) Service and topology exchange protocol having client-driven active-active repositories with high availability
JP2016171469A (en) Transfer system, transfer device, transfer method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant