CN112671654A - Routing information updating method, device, equipment, medium and OSPF network - Google Patents

Routing information updating method, device, equipment, medium and OSPF network Download PDF

Info

Publication number
CN112671654A
CN112671654A CN202011583383.1A CN202011583383A CN112671654A CN 112671654 A CN112671654 A CN 112671654A CN 202011583383 A CN202011583383 A CN 202011583383A CN 112671654 A CN112671654 A CN 112671654A
Authority
CN
China
Prior art keywords
router
domain
network
neighbor
link state
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
CN202011583383.1A
Other languages
Chinese (zh)
Other versions
CN112671654B (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 CN202011583383.1A priority Critical patent/CN112671654B/en
Publication of CN112671654A publication Critical patent/CN112671654A/en
Application granted granted Critical
Publication of CN112671654B publication Critical patent/CN112671654B/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, a medium and an OSPF network for updating routing information. The method is executed by a router in an area in any routing domain in an OSPF network, and comprises the following steps: when receiving the network summary link state advertisement, identifying an identifier of an out-of-domain router included in the network summary link state advertisement; matching the router identification outside the domain with the router identification of each neighbor router in the domain to which the router identification belongs; if the router identification of the target neighbor router is matched with the router identification outside the domain, the neighbor relation between the target neighbor router and the target neighbor router is cleared, and various routing information stored locally is updated immediately. The method can rapidly update the neighbor relation in the domain to which the router belongs when the router moves in the region, and achieves rapid network update and recovery, thereby reducing the communication waiting time of a user and improving the user experience.

Description

Routing information updating method, device, equipment, medium and OSPF network
Technical Field
The embodiment of the invention relates to the technical field of communication networks, in particular to a method, a device, equipment, a medium and an OSPF network for updating routing information.
Background
Open Shortest Path First (OSPF) is an interior gateway protocol used to decide routing within a single Autonomous System (AS). The OSPF network is an implementation of a link-state routing protocol, belonging to an interior gateway protocol, and is a group of networks that exchange routing information with each other through a uniform routing policy or routing protocol. In an OSPF network, OSPF will transmit a Link State Advertisement (LSA) to all routers within an area.
In the prior art, if a router in a certain area, such as a first area, moves fast to another area, such as a second area, it needs to wait for the OSPF neighbor in the first area to be disconnected due to timeout or LSA aging to update the routing information, so as to delete the router that has moved in the first area. The technical scheme in the prior art causes that when the router moves, the network recovery is slow, the user can normally communicate only by waiting for a long time, and the user experience is poor.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment, a medium and an OSPF (open shortest Path first) network for updating routing information, which can quickly update the neighbor relation in the domain to which the router belongs according to the movement condition of the router, recover the network and reduce the communication waiting time of a user.
In a first aspect, an embodiment of the present invention provides a method for updating routing information in an OSPF network, where the method is executed by an intra-area router in any routing domain in the OSPF network, and includes:
when a network summary link state advertisement is received, identifying an identifier of an out-of-domain router included in the network summary link state advertisement;
matching the router identification outside the domain with the router identification of each neighbor router in the domain to which the router identification belongs;
and if the router identification of the target neighbor router is determined to be matched with the router identification outside the domain, clearing the neighbor relation with the target neighbor router, and instantly updating various items of routing information stored locally.
Optionally, when receiving the network summary link status advertisement, identifying an identifier of an out-of-domain router included in the network summary link status advertisement includes:
when receiving a link state notification, analyzing the link state notification to acquire a notification type number included in the link state notification;
if the notification type number is 3, determining that the link state notification is a network summary link state notification;
and identifying the destination internet protocol IP address included in the network summary link state advertisement as the identifier of the out-of-domain router.
Optionally, matching the identifier of the router outside the domain with the identifiers of the neighboring routers in the domain to which the router belongs includes:
and inquiring a local neighbor table, and matching the identifier of the out-of-domain router with the IP address of each neighbor router in the local neighbor table.
Optionally, matching the identifier of the router outside the domain with the identifiers of the neighboring routers in the domain to which the router belongs includes:
and inquiring a local OSPF routing table, and acquiring a destination IP address included in each direct-connection routing information as a router identifier of each neighbor router in the domain to which the direct-connection routing information belongs.
Optionally, clearing the neighbor relation with the target neighbor router, and updating each item of routing information stored locally in real time, including:
deleting the target neighbor router in the local neighbor table;
updating a local link state database according to the new local neighbor table and the network summary link state advertisement;
updating the local OSPF routing table using the updated local link state database.
Optionally, the method further includes:
when a domain switching instruction for switching to a target domain in an OSPF network is detected, the domain switching operation is immediately executed, and a network summary link state advertisement is sent to each neighbor router in the domain to which the neighbor router belongs.
In a second aspect, an embodiment of the present invention further provides a routing information updating apparatus in an OSPF network, which is executed by an intra-area router in any routing domain in the OSPF network, and the apparatus includes:
the system comprises an identification module of the router outside the domain, a link state notification processing module and a link state notification processing module, wherein the identification module of the router outside the domain is used for identifying the identifier of the router outside the domain in the network summary link state notification when the network summary link state notification is received;
the identification matching module is used for matching the identification of the router outside the domain with the identification of the router of each neighbor router in the domain to which the router belongs;
and the routing information updating module is used for clearing the neighbor relation with the target neighbor router and updating various routing information stored locally in real time if the router identification of the target neighbor router is determined to be matched with the router identification outside the domain.
Optionally, the identifier module of the out-of-domain router includes:
the device comprises a notice type number acquisition unit, a link state notice acquisition unit and a link state notice acquisition unit, wherein the notice type number acquisition unit is used for analyzing the link state notice and acquiring a notice type number included in the link state notice when receiving the link state notice;
a network summary link status notification determining unit, configured to determine that the link status notification is a network summary link status notification if the notification type number is 3;
and the identification unit of the router outside the domain is used for identifying the destination internet protocol IP address included in the network summary link state advertisement as the identification of the router outside the domain.
Optionally, the identification matching module includes:
and the neighbor table query and matching unit is used for querying a local neighbor table and matching the identifier of the out-of-domain router with the IP address of each neighbor router in the local neighbor table.
Optionally, the identification matching module includes:
and the routing table query and matching unit is used for querying the local OSPF routing table, acquiring the destination IP address included in each direct-connection routing information, and using the destination IP address as the router identifier of each neighbor router in the domain to which the routing table belongs.
Optionally, the routing information updating module includes:
a target neighbor router deleting unit, configured to delete the target neighbor router in the local neighbor table;
a local link state database updating unit, configured to update the local link state database according to the new local neighbor table and the network summary link state advertisement;
and the local OSPF routing table updating unit is used for updating the local OSPF routing table by using the updated local link state database.
Optionally, the apparatus further includes:
and the domain switching operation execution module is used for immediately executing the domain switching operation and sending the network summary link state advertisement to each neighbor router in the affiliated domain when detecting the domain switching instruction for switching to the target domain in the OSPF network.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
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 a method according to any embodiment of the invention.
In a fourth aspect, the embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method according to any of the embodiments of the present invention.
In a fifth aspect, an embodiment of the present invention further provides an OSPF network, where the OSPF network system is pre-divided into at least one backbone domain and at least two non-backbone domains, and each non-backbone domain includes: an intra-area router and an area border router;
the router in the area is used for executing the method for updating the routing information provided by any embodiment of the invention.
The technical scheme of the embodiment of the invention identifies the identifier of the out-of-domain router included in the network summary link state notification when the network summary link state notification is received; matching the router identification outside the domain with the router identification of each neighbor router in the domain to which the router identification belongs; if the router identification of the target neighbor router is matched with the router identification outside the domain, the neighbor relation between the router and the target neighbor router is eliminated, various routing information stored locally is updated immediately, the problem of fast network recovery when the router is subjected to the regional change is solved, the neighbor relation in the domain to which the router belongs is updated fast, and the fast network update and recovery are realized, so that the communication waiting time of a speed reduction user is prolonged, and the user experience effect is improved.
Drawings
Fig. 1 is a flowchart of a method for providing route information update in an OSPF network according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a routing information updating apparatus in an OSPF network according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an OSPF network according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to a fourth 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.
Example one
Fig. 1 is a flowchart of a method for updating routing information in an OSPF network according to an embodiment of the present invention, where this embodiment is applicable to a case where a router in the OSPF network recovers the network quickly when an area change occurs, the method may be executed by a routing information updating apparatus in the OSPF network, the apparatus may be implemented in a software and/or hardware manner, and the apparatus may be integrated in a computer device, such as a router, as shown in fig. 1, and the method specifically includes:
step 110, upon receiving the network aggregated link state advertisement, identifies an out-of-domain router identification included in the network aggregated link state advertisement.
Wherein the network-summarized link-state advertisement is a type of LSA advertisement. A Designated Router (DR) must advertise the multiple access link and all routers connected to this link. Typically, OSPF networks have 7 types of LSA advertisement types.
The first is router LSA, which is generated by all routers in the area and can only be broadcast flooded in the area. These basic LSA advertisements list all the links and interfaces of the router and indicate their status and cost of outbound along each link.
The second type is network LSA, which is generated by DR or Backup Designated Router (BDR) in an area, and the message includes link information of the router connected with the DR and the BDR. Network LSAs are also flooded only within the area in which the network LSA was generated.
The third is a network summary LSA, which is generated by Area Border Routers (ABRs) and can inform Routers in the Area to route information outside the Area. Default routes outside an area, but still within an OSPF autonomous system, may also be advertised by network summary LSAs. If an ABR receives multiple network summary LSAs from other ABRs over the backbone area, the originating ABR will select the LSA with the lowest cost of these LSA advertisements and advertise the lowest cost of the LSA to the non-backbone area to which it is connected.
The fourth is an Autonomous System Border Router (ASBR) summary LSA, also generated by ABR, but which is a host route pointing to the ASBR router address. The fifth is an autonomous system external LSA, generated by an ASBR, that tells routers of the same autonomous area the path to the external autonomous area. The sixth is the group member LSA. The seventh is a non-so-stub area (NSSA) external LSA.
In an embodiment of the present invention, the network summarized link state advertisement may be of a third type, namely a network summarized LSA. The network summary link state advertisement is routing information input into the local area from other areas, and indicates that the router outside the domain performs Hello packet transmission with the router in the local area. The router outside the domain is the router inside the region outside the region. The identifier of the out-of-domain router may be identification information of the out-of-domain router, such as a router id (router id), or an Internet Protocol (IP) Address. The network aggregated link state advertisement may include an out-of-domain router identification.
Where Router ID indicates the identity of the different routers in the OSPF process. Typically, the Router ID is the loopback interface (a kind of virtual interface) of the default Router. If the loopback has no address, the largest IP address on the physical interface can be used as the Router ID. If the physical interface does not have an address, the Router ID may be manually assigned to the Router.
In an implementation manner of the embodiment of the present invention, optionally, when receiving the network summarized link state advertisement, identifying an identifier of an out-of-domain router included in the network summarized link state advertisement includes: when receiving the link state announcement, analyzing the link state announcement to acquire an announcement type number included in the link state announcement; if the notification type number is 3, determining that the link state notification is a network summary link state notification; and identifying the destination IP address included in the network summary link state advertisement as the identifier of the router outside the domain.
The link state advertisement received by the router may be any one of the seven LSA advertisement types described above. The router may parse the received link state advertisement to determine the LSA advertisement type. For example, the router may determine which LSA advertisement type is by matching each LSA advertisement type according to the transmitting end, the transmission rule, the transmission content, and the like. Alternatively, the link state advertisement may contain an advertisement type number, and the advertisement type number may correspond to the LSA advertisement type of the first kind. For example, the third LSA advertisement type is numbered 3. The LSA advertisement type of the link-state advertisement may be determined from the advertisement type number.
In the network summary link state advertisement, a destination IP address is usually recorded, which is used to indicate that a router receiving the network summary link state advertisement needs to learn a neighbor relationship between the routing information of the latest LSA and a router corresponding to the destination IP address. The network summary link state advertisement belongs to the third type of LSA advertisement, and is a kind of routing information sent out outside the domain. In the embodiment of the present invention, the destination IP address may be used as an identifier of the out-of-domain router. For example, the out-of-domain route identification is 192.168.1.0/255.255.255.0.
And step 120, matching the router identification outside the domain with the router identifications of all the neighbor routers in the domain.
The domain to which the router executing the method belongs is the domain in which the router executing the method is located. The neighbor router is a router which establishes a neighbor relation with a router executing the method. One of the first conditions that neighbors in an OSPF network need to satisfy is to establish a neighbor relation through a Hello message in the same network segment. The router that establishes the neighbor relationship will maintain the router identification of the neighbor router locally. The Router identification may be information indicating a neighbor Router, and may be a Router ID or an IP address, for example.
When an intra-domain router has an area change, the intra-domain will also maintain a neighbor relation with the router having the area change, since OSPF network neighbors have not timed out or LSAs have not aged. In order to update the neighbor relations in time, the router executing the method may compare the identifier of the router outside the domain with the identifier of the neighbor router recorded in the domain to which the neighbor relations are maintained, and determine whether the identifiers match.
In an implementation manner of the embodiment of the present invention, optionally, matching the identifier of the router outside the domain with the identifiers of the neighboring routers in the domain to which the router belongs includes: and inquiring the local neighbor table, and matching the identifier of the out-of-domain router with the IP address of each neighbor router in the local neighbor table.
The router maintains a neighbor table (or called an adjacency table) locally as a basis for sending a link state with the neighbor router. If the IP address of a neighbor router exists in the local neighbor table, the router executing the method may consider that a neighbor relationship still exists with the neighbor router. Thus, one implementation of updating the neighbor relationships may be to match the out-of-domain router identification with the IP addresses of the neighbor routers in the local neighbor table. Specifically, the destination IP address included in the network summary link status advertisement may be matched with the IP addresses of the neighbor routers in the local neighbor table.
In an implementation manner of the embodiment of the present invention, optionally, matching the identifier of the router outside the domain with the identifiers of the neighboring routers in the domain to which the router belongs includes: and inquiring a local OSPF routing table, and acquiring a destination IP address included in each direct-connection routing information as a router identifier of each neighbor router in the domain to which the direct-connection routing information belongs.
The router will locally maintain an OSPF routing table as a shortest path to all network segments formed by using a shortest path first algorithm for the link state database. There are direct routes in the OSPF routing table, which have the highest priority among all routing protocols. The direct route is a route directly connected with the network segment, namely a route connected with each router interface network segment, and is a route network segment which can be directly obtained when the router is started. The destination IP address contained in the direct routing information may represent other router identities that the router may directly access. When the area of other routers changes, the routers cannot directly access the router, and routing information needs to be updated. Therefore, one implementation way of updating the routing information may be to use the destination IP address included in the direct-connection routing information as the router identifier of each neighboring router in the domain to which the direct-connection routing information belongs, and then match the router identifier outside the domain with the router identifiers of each neighboring router in the domain to which the direct-connection routing information belongs.
And step 130, if the router identification of the target neighbor router is determined to be matched with the router identification outside the domain, clearing the neighbor relation with the target neighbor router, and immediately updating various routing information stored locally.
As mentioned previously, when an intra-domain router has an area change, the intra-domain will also maintain a neighbor relation with the router having the area change, since OSPF network neighbors have not timed out or LSAs have not aged. However, when receiving the network summary link status advertisement, if the identifier of the out-of-domain router matches the identifier of the neighbor router, it indicates that the domain in which the router (the router corresponding to the identifier of the out-of-domain router) exists in the domain has changed, and the router cannot continue to maintain the neighbor relationship with other routers in the domain. Therefore, the neighbor relations between the out-of-domain router and the target neighbor router need to be cleared, so as to update the neighbor relations in time. Wherein, the router identification matching may mean that the router identification outside the domain is the same as the router identification of the neighbor router. The specific way to clear the neighbor relation may be to update each item of routing information stored locally instantly without waiting for the timeout mechanism to start or LSA to age.
In an implementation manner of the embodiment of the present invention, optionally, clearing the neighbor relation with the target neighbor router, and updating each item of routing information stored locally in real time includes: deleting the target neighbor router in the local neighbor table; updating a local link state database according to the new local neighbor table and the network summary link state advertisement; updating the local OSPF routing table using the updated local link state database.
In the OSPT network, the local neighbor table is usually relied on to send the packet to the neighbor router to implement communication, so the router identifier of the target neighbor router in the local neighbor table can be deleted to ensure that the packet is not sent through the target neighbor router (i.e. the out-of-domain router).
In an OSPT network, routers maintain link-state tables (link-state databases) locally for storing the link-states of all routers within the network. And the routing table maintained locally by the router is maintained based on the link state database. Therefore, the link state database and the routing table need to be updated.
The new local neighbor table may be a neighbor table formed by deleting the router identification of the matching target neighbor router and other information associated with the target neighbor router from the local neighbor table. The updating of the local link state database may be performed in a manner of updating the database according to the prior art, which is not specifically limited in the embodiment of the present invention.
For example, the update to the local link state database may be to delete information originally in the database relating to the target neighbor router to change the link state. Such as deleting the IP address, subnet mask, network type, and link cost associated with the target neighbor router.
The updating of the local OSPF routing table may be performed according to an algorithm for updating the routing table in the prior art, and the embodiment of the present invention is not particularly limited.
On the basis of the foregoing embodiment, optionally, the method further includes: when a domain switching instruction for switching to a target domain in an OSPF network is detected, the domain switching operation is immediately executed, and a network summary link state advertisement is sent to each neighbor router in the domain to which the neighbor router belongs.
In the prior art, after a domain switching instruction is issued, it is necessary to wait for a timeout mechanism to be started or after LSA ages and a neighbor relation is updated, and then the domain switching operation can be executed. The technical scheme of the embodiment of the invention can immediately execute the switching operation when the domain switching instruction is detected, and send the network summary link state advertisement to each neighbor router in the domain to update the routing information without waiting for overtime or aging. After the network summary link state advertisement is sent, the neighbor router in the domain to which the router performing domain switching belongs can quickly update the neighbor relation with the domain switching router according to the routing information updating method provided by the embodiment of the invention, so that the network can be quickly recovered.
According to the technical scheme of the embodiment, when the network summary link state notification is received, the identifier of the out-of-domain router included in the network summary link state notification is identified; matching the router identification outside the domain with the router identification of each neighbor router in the domain to which the router identification belongs; if the router identification of the target neighbor router is matched with the router identification outside the domain, the neighbor relation between the router and the target neighbor router is eliminated, various routing information stored locally is updated immediately, the problem of fast network recovery when the router is subjected to the regional change is solved, the neighbor relation in the domain to which the router belongs is updated fast, and the fast network update and recovery are realized, so that the communication waiting time of a speed reduction user is prolonged, and the user experience effect is improved.
Example two
Fig. 2 is a schematic structural diagram of a routing information updating apparatus in an OSPF network according to a second embodiment of the present invention. With reference to fig. 2, the apparatus comprises: an out-of-domain router identification module 210, an identification matching module 220, and a routing information update module 230. Wherein:
the identifier identifying module 210 of the out-of-domain router is configured to identify an identifier of the out-of-domain router included in the network summarized link state advertisement when the network summarized link state advertisement is received;
the identifier matching module 220 is configured to match the identifier of the router outside the domain with the identifiers of the routers of the neighboring routers in the domain to which the router belongs;
and a routing information updating module 230, configured to, if it is determined that the router identifier of the target neighbor router matches the router identifier outside the domain, clear the neighbor relationship with the target neighbor router, and immediately update each item of routing information stored locally.
Optionally, the identifier module of the out-of-domain router includes:
the device comprises an announcement type number acquisition unit, a link state announcement acquisition unit and an announcement type number generation unit, wherein the announcement type number acquisition unit is used for analyzing the link state announcement and acquiring an announcement type number included in the link state announcement when receiving the link state announcement;
a network summary link state advertisement determining unit, configured to determine that the link state advertisement is a network summary link state advertisement if the advertisement type number is 3;
and the identification unit of the router outside the domain is used for identifying the destination internet protocol IP address included in the network summary link state advertisement as the identification of the router outside the domain.
Optionally, the identification matching module includes:
and the neighbor table query and matching unit is used for querying the local neighbor table and matching the identifier of the out-of-domain router with the IP address of each neighbor router in the local neighbor table.
Optionally, the identification matching module includes:
and the routing table query and matching unit is used for querying the local OSPF routing table, acquiring the destination IP address included in each direct-connection routing information, and using the destination IP address as the router identifier of each neighbor router in the domain to which the routing table belongs.
Optionally, the routing information updating module includes:
the target neighbor router deleting unit is used for deleting the target neighbor router in the local neighbor table;
a local link state database updating unit for updating the local link state database according to the new local neighbor table and the network summary link state advertisement;
and the local OSPF routing table updating unit is used for updating the local OSPF routing table by using the updated local link state database.
Optionally, the apparatus further includes:
and the domain switching operation execution module is used for immediately executing the domain switching operation and sending the network summary link state advertisement to each neighbor router in the affiliated domain when detecting the domain switching instruction for switching to the target domain in the OSPF network.
The routing information updating device in the OSPF network provided by the embodiment of the invention can execute the routing information updating method in the OSPF network provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an OSPF network according to a third embodiment of the present invention, as shown in fig. 3, an OSPF network system is pre-divided into at least one backbone domain 310 and at least two non-backbone domains 320, each non-backbone domain 320 includes: an intra-area router and an area border router; the router in the area is used for executing the routing information updating method provided by any embodiment of the invention.
As shown in fig. 3, the backbone domain 310 in the OSPF network has A, B, C three devices. The first non-backbone domain has d, e, f devices as intra-area routers. And g, h and k devices are arranged in the second non-backbone domain and are used as routers in the area. Wherein, B can be used as an area boundary router of the first non-backbone domain; c may act as an area border router for the second non-backbone domain.
Take the example of g devices in the second non-backbone domain switching to the first non-backbone domain. Initially, g establishes a neighbor relation with C, k, h. And g, the route issued by the device is learned by C, k and h and issued to the whole network. When the g device moves to the first non-backbone domain, and establishes neighbors with d, e and f of the first non-backbone domain access network, the g device also issues routes to the network and floods the whole network. C. k, h original learning g equipment belongs to a first LSA notification type; however, when g device switches to the first non-backbone domain, the route of g device is distributed to C, k, h in the third LSA advertisement type. At this time, the neighbor relations of C, k, h, and g are not aged, and C, k, and h can quickly delete the received same route g through the route information updating method provided by the embodiment of the present invention, so as to withdraw the original route, and learn the route information of the latest LSA, thereby achieving the effect of quickly recovering the route.
According to the technical scheme of the embodiment of the invention, in the OSPF network which comprises at least one backbone domain and at least two non-backbone domains, wherein each non-backbone domain comprises an intra-area router and an area boundary router, the intra-area router is enabled to execute the routing information updating method provided by any embodiment of the invention, the problem of fast network recovery when domain switching exists in the OSPF network is solved, the neighbor relation in the domain to which the intra-area router belongs is fast updated, and the fast network updating and recovery are realized, so that the communication waiting time of a user is reduced, and the user experience effect is improved.
Example four
Fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention, and as shown in fig. 4, the computer device includes:
one or more processors 410, one processor 410 being illustrated in FIG. 4;
a memory 420;
the apparatus may further include: an input device 430 and an output device 440.
The processor 410, the memory 420, the input device 430 and the output device 440 of the apparatus may be connected by a bus or other means, for example, in fig. 4.
The memory 420 serves as a non-transitory computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to a routing information updating method in an OSPF network in an embodiment of the present invention (for example, the out-of-domain router identification module 210, the identification matching module 220, and the routing information updating module 230 shown in fig. 2). The processor 410 executes various functional applications and data processing of the computer device by executing the software programs, instructions and modules stored in the memory 420, that is, the routing information updating method in the OSPF network, which implements the above-described method embodiments, namely:
when a network summary link state advertisement is received, identifying an identifier of an out-of-domain router included in the network summary link state advertisement;
matching the router identification outside the domain with the router identification of each neighbor router in the domain to which the router identification belongs;
and if the router identification of the target neighbor router is determined to be matched with the router identification outside the domain, clearing the neighbor relation with the target neighbor router, and instantly updating various items of routing information stored locally.
The memory 420 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 420 may optionally include memory located remotely from processor 410, which may be connected to the terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus. The output device 440 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for updating routing information in an OSPF network, according to an embodiment of the present invention:
when a network summary link state advertisement is received, identifying an identifier of an out-of-domain router included in the network summary link state advertisement;
matching the router identification outside the domain with the router identification of each neighbor router in the domain to which the router identification belongs;
and if the router identification of the target neighbor router is determined to be matched with the router identification outside the domain, clearing the neighbor relation with the target neighbor router, and instantly updating various items of routing information stored locally.
Any combination of one or more computer-readable media may be employed. 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 any of a variety of 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 and 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 in an Open Shortest Path First (OSPF) network is executed by an intra-area router in any routing domain in the OSPF network, and is characterized by comprising the following steps:
when a network summary link state advertisement is received, identifying an identifier of an out-of-domain router included in the network summary link state advertisement;
matching the router identification outside the domain with the router identification of each neighbor router in the domain to which the router identification belongs;
and if the router identification of the target neighbor router is determined to be matched with the router identification outside the domain, clearing the neighbor relation with the target neighbor router, and instantly updating various items of routing information stored locally.
2. The method of claim 1, wherein identifying an out-of-domain router identification included in a network aggregated link state advertisement upon receiving the network aggregated link state advertisement comprises:
when receiving a link state notification, analyzing the link state notification to acquire a notification type number included in the link state notification;
if the notification type number is 3, determining that the link state notification is a network summary link state notification;
and identifying the destination internet protocol IP address included in the network summary link state advertisement as the identifier of the out-of-domain router.
3. The method of claim 2, wherein matching the out-of-domain router identity with the router identities of the neighboring routers within the home domain comprises:
and inquiring a local neighbor table, and matching the identifier of the out-of-domain router with the IP address of each neighbor router in the local neighbor table.
4. The method of claim 2, wherein matching the out-of-domain router identity with the router identities of the neighboring routers within the home domain comprises:
and inquiring a local OSPF routing table, and acquiring a destination IP address included in each direct-connection routing information as a router identifier of each neighbor router in the domain to which the direct-connection routing information belongs.
5. The method of claim 3, wherein clearing the neighbor relation with the target neighbor router and instantly updating the locally stored routing information items comprises:
deleting the target neighbor router in the local neighbor table;
updating a local link state database according to the new local neighbor table and the network summary link state advertisement;
updating the local OSPF routing table using the updated local link state database.
6. The method according to any one of claims 1-5, further comprising:
when a domain switching instruction for switching to a target domain in an OSPF network is detected, the domain switching operation is immediately executed, and a network summary link state advertisement is sent to each neighbor router in the domain to which the neighbor router belongs.
7. A routing information updating device in an Open Shortest Path First (OSPF) network, executed by an intra-area router in any routing domain in the OSPF network, comprising:
the system comprises an identification module of the router outside the domain, a link state notification processing module and a link state notification processing module, wherein the identification module of the router outside the domain is used for identifying the identifier of the router outside the domain in the network summary link state notification when the network summary link state notification is received;
the identification matching module is used for matching the identification of the router outside the domain with the identification of the router of each neighbor router in the domain to which the router belongs;
and the routing information updating module is used for clearing the neighbor relation with the target neighbor router and updating various routing information stored locally in real time if the router identification of the target neighbor router is determined to be matched with the router identification outside the domain.
8. A computer device, comprising:
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 method of any one of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 6.
10. An open shortest path first OSPF network, wherein the OSPF network system is pre-divided into at least one backbone domain and at least two non-backbone domains, and each non-backbone domain comprises: an intra-area router and an area border router;
the intra-area router, configured to perform the routing information updating method according to any one of claims 1 to 6.
CN202011583383.1A 2020-12-28 2020-12-28 Routing information updating method, device, equipment and medium and OSPF network Active CN112671654B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011583383.1A CN112671654B (en) 2020-12-28 2020-12-28 Routing information updating method, device, equipment and medium and OSPF network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011583383.1A CN112671654B (en) 2020-12-28 2020-12-28 Routing information updating method, device, equipment and medium and OSPF network

Publications (2)

Publication Number Publication Date
CN112671654A true CN112671654A (en) 2021-04-16
CN112671654B CN112671654B (en) 2022-09-27

Family

ID=75411279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011583383.1A Active CN112671654B (en) 2020-12-28 2020-12-28 Routing information updating method, device, equipment and medium and OSPF network

Country Status (1)

Country Link
CN (1) CN112671654B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363239A (en) * 2021-12-30 2022-04-15 北京东土军悦科技有限公司 Method, device, equipment and storage medium for updating routing information
CN114390629A (en) * 2022-01-21 2022-04-22 广州爱浦路网络技术有限公司 Control method, system, device and medium for backhaul route of 5G network terminal

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140254427A1 (en) * 2013-03-11 2014-09-11 Futurewei Technologies, Inc. Discovering a Topology-Transparent Zone
CN107517163A (en) * 2017-09-22 2017-12-26 杭州迪普科技股份有限公司 A kind of method and device of switching OSPF Router Distinguishers
CN107770069A (en) * 2017-10-31 2018-03-06 杭州迪普科技股份有限公司 A kind of LSA notifying method and device
CN110191059A (en) * 2019-07-29 2019-08-30 华为技术有限公司 A kind of routing iinformation monitoring method and device
CN110752991A (en) * 2019-10-25 2020-02-04 山东华宇航天空间技术有限公司 Method for selecting shortest path of dynamic route
CN110830370A (en) * 2019-12-03 2020-02-21 西安邮电大学 IBGP (Internet protocol gateway protocol) transmission route updating method based on OSPF (open shortest Path first) protocol
CN111464439A (en) * 2020-03-31 2020-07-28 新华三信息安全技术有限公司 Segment identifier issuing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140254427A1 (en) * 2013-03-11 2014-09-11 Futurewei Technologies, Inc. Discovering a Topology-Transparent Zone
CN107517163A (en) * 2017-09-22 2017-12-26 杭州迪普科技股份有限公司 A kind of method and device of switching OSPF Router Distinguishers
CN107770069A (en) * 2017-10-31 2018-03-06 杭州迪普科技股份有限公司 A kind of LSA notifying method and device
CN110191059A (en) * 2019-07-29 2019-08-30 华为技术有限公司 A kind of routing iinformation monitoring method and device
CN110752991A (en) * 2019-10-25 2020-02-04 山东华宇航天空间技术有限公司 Method for selecting shortest path of dynamic route
CN110830370A (en) * 2019-12-03 2020-02-21 西安邮电大学 IBGP (Internet protocol gateway protocol) transmission route updating method based on OSPF (open shortest Path first) protocol
CN111464439A (en) * 2020-03-31 2020-07-28 新华三信息安全技术有限公司 Segment identifier issuing method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363239A (en) * 2021-12-30 2022-04-15 北京东土军悦科技有限公司 Method, device, equipment and storage medium for updating routing information
CN114363239B (en) * 2021-12-30 2024-02-06 北京东土军悦科技有限公司 Routing information updating method, device, equipment and storage medium
CN114390629A (en) * 2022-01-21 2022-04-22 广州爱浦路网络技术有限公司 Control method, system, device and medium for backhaul route of 5G network terminal
CN114390629B (en) * 2022-01-21 2022-10-21 广州爱浦路网络技术有限公司 Control method and system for backhaul route of 5G network terminal

Also Published As

Publication number Publication date
CN112671654B (en) 2022-09-27

Similar Documents

Publication Publication Date Title
US7903650B2 (en) Method and apparatus for updating probabilistic network routing information
US10075371B2 (en) Communication system, control apparatus, packet handling operation setting method, and program
US7532631B2 (en) Method and apparatus for accelerating border gateway protocol convergence
US7647426B2 (en) Method and apparatus for achieving Border Gateway Protocol convergence using alternate route information
US8428057B2 (en) Optimizing return traffic paths using network address translation
US6871235B1 (en) Fast path forwarding of link state advertisements using reverse path forwarding
EP2254284B1 (en) Method and device for route installation and distribution
CN112671654B (en) Routing information updating method, device, equipment and medium and OSPF network
US9143431B2 (en) Hiding a service node in a network from a network routing topology
CN112511444A (en) Multicast traffic transmission method, device, communication node and storage medium
US10979340B2 (en) Link state addition and deletion based on reception of a single message in link state vector routing
CN110430116B (en) Data forwarding method and device, edge device and readable storage medium
CN113098770B (en) Message sending method, route table item generating method, device and storage medium
US11895014B2 (en) Aggregated route communication method and apparatus
CN104580025A (en) Method for establishing in-band connection in open flow network and switch
CN105814944A (en) Topology discovery based on explicit signaling
US7969995B2 (en) Method and apparatus for constructing a forwarding database for a data communications network
CN113542099B (en) Data transmission method, device, electronic equipment, medium and product
CN114422415B (en) Egress node processing flow in segmented routing
US11343153B2 (en) BGP logical topology generation method, and device
CN113542114B (en) Route configuration method and route configuration device
US20230081052A1 (en) Method and apparatus for sending multicast packet
US20230006917A1 (en) Route Determining Method and Apparatus and Network Device
CN107888501B (en) Routing update message sending method, routing update (RR), network equipment and network system
Cisco ISO CLNS Commands

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