CN113794644B - Method and device for deleting routing table entries - Google Patents

Method and device for deleting routing table entries Download PDF

Info

Publication number
CN113794644B
CN113794644B CN202111189302.4A CN202111189302A CN113794644B CN 113794644 B CN113794644 B CN 113794644B CN 202111189302 A CN202111189302 A CN 202111189302A CN 113794644 B CN113794644 B CN 113794644B
Authority
CN
China
Prior art keywords
routing table
server
acquisition mode
table entry
table item
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.)
Active
Application number
CN202111189302.4A
Other languages
Chinese (zh)
Other versions
CN113794644A (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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202111189302.4A priority Critical patent/CN113794644B/en
Publication of CN113794644A publication Critical patent/CN113794644A/en
Application granted granted Critical
Publication of CN113794644B publication Critical patent/CN113794644B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/021Ensuring consistency of routing table updates, e.g. by using epoch numbers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables

Abstract

The embodiment of the invention provides a method and a device for deleting routing table entries, which relate to the technical field of networks and are applied to network equipment, wherein the network equipment is connected with a server, and the method comprises the following steps: acquiring a routing table item from the RIB, and sending the acquired routing table item and an identification of an acquisition mode adopted when the routing table item is acquired to a server, so that the server stores the routing table item and the identification of the acquisition mode; when the acquisition mode of acquiring the routing table entries changes, sending a PD message carrying the identification of the original acquisition mode to a server based on BMP aiming at each original acquisition mode before the change, so that the server deletes the routing table entries stored by the server and corresponding to the original acquisition mode. By applying the embodiment of the invention, the routing table items stored in the server and reported by the network equipment before the acquisition mode of acquiring the routing table items changes can be deleted.

Description

Method and device for deleting routing table entries
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method and an apparatus for deleting a routing table entry.
Background
Network devices in the network may exchange routing entries recorded by the network devices and various information related to the transmission message with each other based on BGP (Border Gateway Protocol ), so as to forward the message based on the exchanged information, where the network devices exchanging information with each other may be called BGP neighbors of each other. A server connected to any one of the BGP neighbors may obtain a routing table of the BGP neighbor of the network device based on BMP (BGP Monitoring Protocol ), so that the obtained routing table may be further processed.
In the prior art, the network device may acquire the routing table of its BGP neighbor, and after acquiring the routing table, report the routing table to the connected server. However, the acquisition mode of the network device for acquiring the routing table entry may change, and after the acquisition mode changes, the server may delete the routing table entry received before the acquisition mode changes. In order to delete the above routing entries, a method for deleting routing entries needs to be provided.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for deleting routing table entries, which are stored in a server and reported by network equipment before the acquisition mode of acquiring the routing table entries changes.
The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for deleting a routing table entry, which is applied to a network device, where the network device is connected to a server, and the method includes:
acquiring a routing table item from the RIB, and sending the acquired routing table item and an identification of an acquisition mode adopted when the routing table item is acquired to the server, so that the server stores the routing table item and the identification of the acquisition mode;
When the acquisition mode of acquiring the routing table item changes, sending a PD message carrying the identification of the original acquisition mode to the server based on BMP aiming at each original acquisition mode before changing, so that the server deletes the self-stored routing table item corresponding to the original acquisition mode.
In one embodiment of the present invention, after the obtaining the routing table entry from the RIB and sending the obtained routing table entry and the identifier of the obtaining mode adopted when obtaining the routing table entry to the server, the server stores the routing table entry and the identifier of the obtaining mode, the method further includes:
determining whether the server supports deleting the self-stored routing table entry based on the identification of the acquisition mode;
if so, when the acquisition mode of the acquisition routing table item changes, sending a PD message carrying the identification of the original acquisition mode to the server based on BMP aiming at the original acquisition mode before each change.
In one embodiment of the present invention, the determining whether the server supports deleting the self-stored routing table entry based on the identification of the acquisition mode includes:
based on BMP, a first Initiation message is sent to the server, wherein the first Initiation message carries first capability information, and the first capability information represents: the network equipment supports deleting the routing table entry based on the identification of the acquisition mode;
If a second Initiation message sent by the server and used for responding to the first Initiation message is received, determining that the server supports deleting a self-stored routing table item based on an identifier of an acquisition mode, wherein the second Initiation message carries second capability information, and the second capability information represents: the server supports deleting self-stored routing entries based on the identification of the acquisition mode.
In one embodiment of the present invention, in the first Initiation message, the first capability information is stored in a value field in a first type length value TLV, and a value of a type field in the first TLV is 0.
In one embodiment of the present invention, if it is determined that the server does not support deleting the self-stored routing table entry based on the identifier of the acquisition mode, after acquiring the routing table entry from the RIB, the method further includes:
recording the obtained routing table item;
when the acquisition mode of acquiring the routing table item changes, the method further comprises the following steps:
sending a PD message carrying a routing table item identifier to the server based on BMP, so that the server deletes the routing table item corresponding to the routing table item identifier stored by the server, wherein the routing table item identifier is as follows: and the network equipment records the identification of each routing table item corresponding to the original acquisition mode.
In a second aspect, an embodiment of the present invention provides a method for deleting a routing table entry, which is applied to a server, where the server is connected to a network device, and the method includes:
receiving and storing a routing table item sent by the network equipment and an identification of an acquisition mode adopted when the network equipment acquires the routing table item, wherein the routing table item is: the network equipment obtains a routing table entry from the RIB;
receiving a PD message carrying an identifier of an original acquisition mode, wherein the PD message is sent by the network equipment: the network device obtains the route list item and obtains the mode and sends after changing, the original obtains the mode is: the network equipment acquires an acquisition mode of a routing table item before change;
and deleting the self-stored routing table entry corresponding to the original acquisition mode based on the identification.
In one embodiment of the invention, the method further comprises:
receiving a first Initiation message sent by the network device based on a BMP, wherein the first Initiation message carries first capability information, and the first capability information represents: the network equipment supports deleting the routing table entry based on the identification of the acquisition mode;
If the server supports deleting the self-stored routing table entry based on the identifier of the acquisition mode, a second Initiation message is sent to the network device to inform the network device that the self-stored routing table entry is self-supported by the identifier of the acquisition mode, wherein the second Initiation message carries second capability information, and the second capability information represents: the server supports deleting self-stored routing entries based on the identification of the acquisition mode.
In one embodiment of the invention, the method further comprises:
receiving a PD message which is sent by the network equipment and carries a routing table item identifier, wherein the routing table item identifier is as follows: the network equipment records the identification of each routing table item corresponding to the original acquisition mode;
and deleting the routing table item corresponding to the routing table item identification stored by the routing table item identification.
In a third aspect, an embodiment of the present invention provides a routing table entry deletion apparatus, which is applied to a network device, where the network device is connected to a server, and the apparatus includes:
the table item acquisition module is used for acquiring a routing table item from the RIB, and sending the acquired routing table item and the identification of the acquisition mode adopted when the routing table item is acquired to the server so that the server stores the routing table item and the identification of the acquisition mode;
The first message sending module is used for sending a PD message carrying the identification of the original acquisition mode to the server based on the BMP aiming at each original acquisition mode before the change when the acquisition mode of acquiring the routing list item changes, so that the server deletes the routing list item stored by the server and corresponding to the original acquisition mode.
In one embodiment of the invention, the apparatus further comprises:
and the capacity determining module is used for determining whether the server supports deleting the self-stored routing table entry based on the identification of the acquisition mode, and if so, triggering and executing the first message sending module.
In one embodiment of the present invention, the capability determining module is specifically configured to:
based on BMP, a first Initiation message is sent to the server, wherein the first Initiation message carries first capability information, and the first capability information represents: the network equipment supports deleting the routing table entry based on the identification of the acquisition mode;
if a second Initiation message sent by the server and used for responding to the first Initiation message is received, determining that the server supports deleting a self-stored routing table item based on an identifier of an acquisition mode, wherein the second Initiation message carries second capability information, and the second capability information represents: the server supports deleting self-stored routing entries based on the identification of the acquisition mode.
In one embodiment of the present invention, in the first Initiation message, the first capability information is stored in a value field in a first TLV, and a value of a type field in the first TLV is 0.
In one embodiment of the present invention, if it is determined that the server does not support deletion of the self-stored routing table entry based on the identification of the acquisition mode, the apparatus further includes:
the table entry recording module is used for recording the acquired routing table entry;
the second message sending module is configured to send, when an acquisition mode for acquiring a routing table entry changes, a PD message carrying a routing table entry identifier to the server based on BMP, so that the server deletes a routing table entry corresponding to the routing table entry identifier stored by the server, where the routing table entry identifier is: and the network equipment records the identification of each routing table item corresponding to the original acquisition mode.
In a fourth aspect, an embodiment of the present invention provides a routing table entry deletion apparatus, which is applied to a server, where the server is connected to a network device, and the apparatus includes:
the table entry receiving module is configured to receive and store a routing table entry sent by the network device and an identifier of an acquisition mode adopted when the network device acquires the routing table entry, where the routing table entry is: the network equipment obtains a routing table entry from the RIB;
The first message receiving module is configured to receive a PD message carrying an identifier of an original acquisition mode, where the PD message is sent by the network device: the network device obtains the route list item and obtains the mode and sends after changing, the original obtains the mode is: the network equipment acquires an acquisition mode of a routing table item before change;
and the first table item deleting module is used for deleting the self-stored routing table item corresponding to the original acquisition mode based on the identification.
In one embodiment of the invention, the apparatus further comprises:
the second message receiving module is configured to receive a first Initiation message sent by the network device based on BMP, where the first Initiation message carries first capability information, and the first capability information indicates: the network equipment supports deleting the routing table entry based on the identification of the acquisition mode;
a third message sending module, configured to send a second Initiation message to the network device if the server supports deleting the self-stored routing table entry based on the identifier of the acquisition mode, so as to inform the network device that the network device supports deleting the self-stored routing table entry based on the identifier of the acquisition mode, where the second Initiation message carries second capability information, and the second capability information represents: the server supports deleting self-stored routing entries based on the identification of the acquisition mode.
In one embodiment of the invention, the apparatus further comprises:
a third message receiving module, configured to receive a PD message sent by the network device and carrying a routing table entry identifier, where the routing table entry identifier is: the network equipment records the identification of each routing table item corresponding to the original acquisition mode;
and the second table item deleting module is used for deleting the routing table item corresponding to the routing table item identifier stored by the second table item deleting module.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor configured to implement the method steps of any one of the first or second aspects when executing a program stored on a memory.
In a sixth aspect, embodiments of the present invention provide a computer readable storage medium having a computer program stored therein, which when executed by a processor implements the method steps of any of the first or second aspects.
In a seventh aspect, embodiments of the present invention also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps of any of the first or second aspects described above.
The embodiment of the invention has the beneficial effects that:
the embodiment of the invention provides a method for deleting a routing table entry applied to network equipment, wherein the network equipment is connected with a server, acquires the routing table entry from a RIB, and sends the acquired routing table entry and an identification of an acquisition mode adopted when the routing table entry is acquired to the server, so that the server stores the routing table entry and the identification of the acquisition mode. When the acquisition mode of acquiring the routing table item changes, a PD message carrying the identification of the original acquisition mode before the change is sent to the server based on the BMP, so that the server deletes the routing table item stored by the server and corresponding to the original acquisition mode.
In the above, after the network device changes the acquisition mode of acquiring the routing table entry, for each original acquisition mode before the change, the network device may send the PD packet of the identifier of the original acquisition mode to the server, so that the server may delete the routing table entry corresponding to the original acquisition mode stored by the server. Moreover, the network equipment can delete each routing table item corresponding to the original acquisition mode stored by the server only by sending the identifier of the original acquisition mode to the server, and the network equipment does not need to inform the server to delete each routing table item corresponding to the original acquisition mode.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings for a person having ordinary skill in the art.
Fig. 1 is a flow chart of a first method for deleting routing entries according to an embodiment of the present invention;
fig. 2 is a flow chart of a second method for deleting routing entries according to an embodiment of the present invention;
fig. 3 is a flow chart of a third method for deleting routing entries according to an embodiment of the present invention;
fig. 4 is a flow chart of a fourth method for deleting routing entries according to an embodiment of the present invention;
fig. 5 is a flowchart of a fifth method for deleting a routing table entry according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a first routing table entry deleting device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a second routing table entry deleting device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
Fig. 9 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, those of ordinary skill in the art will be able to devise all other embodiments that are obtained based on this application and are within the scope of the present invention.
In order to delete a routing table entry stored in a server, the embodiment of the invention provides a method and a device for deleting the routing table entry.
The embodiment of the invention provides a method for deleting routing table entries, which is applied to network equipment, wherein the network equipment is connected with a server, and the method comprises the following steps:
acquiring a routing table item from the RIB, and sending the acquired routing table item and an identifier of an acquisition mode adopted when acquiring the routing table item to the server, so that the server stores the routing table item and the identifier of the acquisition mode;
when the acquisition mode of acquiring the routing table item changes, sending a PD message carrying the identification of the original acquisition mode to the server based on BMP aiming at each original acquisition mode before changing, so that the server deletes the self-stored routing table item corresponding to the original acquisition mode.
In the above, after the network device changes the acquisition mode of acquiring the routing table entry, for each original acquisition mode before the change, the network device may send the PD packet of the identifier of the original acquisition mode to the server, so that the server may delete the routing table entry corresponding to the original acquisition mode stored by the server. Moreover, the network equipment can delete each routing table item corresponding to the original acquisition mode stored by the server only by sending the identifier of the original acquisition mode to the server, and the network equipment does not need to inform the server to delete each routing table item corresponding to the original acquisition mode.
Referring to fig. 1, a flow chart of a first routing table entry deletion method provided by an embodiment of the present invention is applied to a network device, where the network device is connected to a server. The method comprises the following steps S101-S102.
Specifically, the server may monitor the routing table entry acquired by the network device based on BMP.
The network device may be a switch, a router, or the like. The server may be referred to as a monitoring terminal, or a server terminal, and the network device may be referred to as a monitored terminal, or a client terminal. The same server may monitor multiple network devices, and the same network device may also be monitored by multiple servers. The server side can monitor the network equipment based on the monitoring software ODL BMP.
S101: and acquiring the routing table item from the RIB, and sending the acquired routing table item and the identification of the acquisition mode adopted when acquiring the routing table item to the server, so that the server stores the identification of the routing table item and the identification of the acquisition mode.
Specifically, the routing table entry acquired by the network device may be a routing table entry acquired by the network device based on BGP and sent by its BGP neighbor, and the acquired routing table entry is a routing table entry included In Adj-RIB-In reported by the BGP neighbor based on RFC 7854. The Adj-RIB-In described above is contained In a RIB (Routing Information Base ).
In addition, the routing table entry from the RIB may also be a routing table entry sent by the network device to the BGP neighbor based on BGP, and the obtained routing table entry is a routing table entry contained in the Adj-RIB-Out sent by the network device to the BGP neighbor based on RFC 8671. The above-mentioned Adj-RIB-Out is contained in the RIB.
Furthermore, the network device may acquire the routing entries In the Adj-RIB-In and the routing entries In the Adj-RIB-Out.
In one embodiment of the invention, the address of the connected server and the port number of the server for monitoring the client may be configured in the network device, thereby establishing a TCP (Transmission Control Protocol ) connection between the network device and the server. The network device may send the routing table entry to the server based on TCP.
The network device may encapsulate BMP message header before the routing table entry, encapsulate BGP UPDATE (Border Gateway Protocol Update ) information after the routing table entry, generate a BGP message, and after the server receives the BGP message, parse the BGP message based on BGP and BMP, so as to obtain the routing table entry included in the BGP message. The manner in which the network device encapsulates and generates the BGP message and the server parses the BGP message is similar to the prior art, and is not described herein.
In addition, the route table item sent by the network device to the server carries an identifier of an acquisition mode adopted when the network device acquires the route table item, and the network device can acquire the route table item based on one or more different acquisition modes.
Specifically, the mode of the network device obtaining the routing table entry may be: pre-policy RM mode and/or post-policy RM mode.
The user can control the network equipment to acquire the mode of the routing table item based on the application scene, the network equipment can acquire the original routing table item before policy processing based on the pre-policy RM mode, and the network equipment can acquire the routing table item after policy processing based on the post-policy RM mode. The network device may select the acquired routing table entry based on the set policy, or may adjust attribute information included in the acquired routing table entry based on the policy, or the like.
S102: when the acquisition mode of acquiring the routing table item changes, sending a PD message carrying the identification of the original acquisition mode to the server based on BMP aiming at each original acquisition mode before changing, so that the server deletes the self-stored routing table item corresponding to the original acquisition mode.
Specifically, if the network device acquires the routing table entry based on multiple different acquisition modes, where multiple different acquisition modes that are changed may exist, for each original acquisition mode before the change, the network device may send a PD (Peer Down) message carrying an identifier of the original acquisition mode to the server, so that the server deletes the routing table entry corresponding to the original acquisition mode stored by the server after receiving the PD message.
In one embodiment of the present invention, a BMP-based PD packet is used to instruct a server to delete a routing table item stored in the server, and after the server receives the PD packet, the server may determine an identifier of an original acquisition mode carried in the PD packet, and determine that the routing table item corresponding to the original acquisition mode needs to be deleted. Because the route table items stored by the server contain the identifiers of the acquisition modes adopted when the network equipment acquires the route table items, the route table items containing the identifiers of the original acquisition modes can be searched from the stored route table items and used as the route table items corresponding to the original acquisition modes, and the searched route table items are deleted.
In the above, after the network device changes the acquisition mode of acquiring the routing table entry, for each original acquisition mode before the change, the network device may send the PD packet of the identifier of the original acquisition mode to the server, so that the server may delete the routing table entry corresponding to the original acquisition mode stored by the server. Moreover, the network equipment can delete each routing table item corresponding to the original acquisition mode stored by the server only by sending the identifier of the original acquisition mode to the server, and the network equipment does not need to inform the server to delete each routing table item corresponding to the original acquisition mode.
In addition, since the network device only needs to send the identifier of the original acquisition mode to the server, the server can delete the self-stored routing table entry corresponding to the original acquisition mode based on the identifier of the original acquisition mode, so that after the acquired routing table entry is sent to the server, the network device does not need to record the self-acquired routing table entry corresponding to the original acquisition mode, the subsequent server is not influenced to delete the routing table entry, and the storage space of the network device can be saved.
Referring to fig. 2, a flowchart of a second method for deleting a routing table entry according to an embodiment of the present invention, compared with the embodiment shown in fig. 1, further includes the following step S103 after the step S101.
S103: and determining whether the server supports deleting the self-stored routing table entry based on the identification of the acquisition mode.
Specifically, the network device may record a server identifier of a server supporting deletion of the self-stored routing table entry based on the identifier of the acquisition mode, and if the network device records the server identifier of the server, the network device may determine that the server supports deletion of the self-stored routing table entry based on the identifier of the acquisition mode.
Wherein, the server identification recorded in the network device can be written by a user.
In another embodiment of the present invention, the above step S103 may also be implemented based on the following steps a-B.
Step A: and sending a first Initiation message to the server based on the BMP.
The first Initiation message carries first capability information, where the first capability information indicates: the network device supports deleting routing entries based on the identification of the acquisition mode.
Specifically, after the TCP connection is established between the network device and the server according to the BMP specification, the network device may send an Initiation message to the server for sending relevant information of the network device to the server.
Wherein, the first capability information can be identified in the form of characters, character strings, numbers and the like. For example, the network device may be enabled to delete routing entries based on the identification of the acquisition mode as indicated by the numeral "1".
The embodiment of the invention can add the first capability information in the Initiation message, generate the first Initiation message, and send the first Initiation message to the server to inform the server that the network equipment supports deleting the routing table item based on the identification of the acquisition mode.
And (B) step (B): if a second Initiation message which is sent by the server and is used for responding to the first Initiation message is received, determining that the server supports deleting the self-stored routing table entry based on the identification of the acquisition mode.
The second Initiation message carries second capability information, where the second capability information indicates: the server supports deleting the self-stored routing table entry based on the identification of the acquisition mode.
Specifically, if the server receives the first Initiation message and determines that the server supports deleting the self-stored routing table entry based on the identifier of the acquisition mode, the server may be notified of the second Initiation message carrying the second capability information, so as to notify the network device that the server also supports deleting the self-stored routing table entry based on the identifier of the acquisition mode, and the further network device may execute step S103, send a PD message carrying the identifier of the original acquisition mode to the server, so as to delete the routing table entry corresponding to the original acquisition mode in the server.
If the server does not support deleting the self-stored routing table entry based on the identifier of the acquisition mode, the server may not reply any message to the network device, or reply a third Initiation message carrying third capability information, where the third capability information indicates that the server does not support deleting the self-stored routing table entry based on the identifier of the acquisition mode. That is, if the network device does not receive the second Initiation message, it may be determined that the server does not support deleting the routing table entry based on the identifier of the acquisition mode.
In addition, the information in the first Initiation message may be stored in a TLV (Type Length Vaule, type length value) format, the first capability information may be stored in a value field in the first TLV, and the value of the type field in the first TLV is 0, which indicates that the information stored in the value field in the first TLV is represented in the form of a string.
In one embodiment of the present invention, if the server supports deleting the self-stored routing table entry based on the identifier of the acquisition mode, step S102 may be executed after the acquisition mode of acquiring the routing table entry changes. Otherwise, the network device may be controlled to delete the routing table entry corresponding to the original acquisition mode stored by the network device based on other modes, such as a routing table entry deleting method in the prior art.
From the above, before sending a PD packet carrying an identifier of an original acquisition mode to a server to control the server to delete a routing table entry stored in the server and corresponding to the original acquisition mode, the embodiment of the present invention may further determine in advance whether the server supports deleting the routing table entry stored in the server based on the identifier of the acquisition mode, and if the server has the capability, send the PD packet carrying the identifier of the original acquisition mode to the server. After the PD message carrying the identification of the original acquisition mode is sent to the server, the server can complete deleting of the routing table entry based on the identification of the original acquisition mode.
Referring to fig. 3, a flow chart of a third method for deleting a routing table entry according to an embodiment of the present invention, compared with the embodiment shown in fig. 2, if it is determined in step S102 that the server does not support deleting a self-stored routing table entry based on the identifier of the acquisition mode, further includes the following steps S104 to S105.
S104: and recording the acquired routing table entry.
S105: when the acquisition mode of acquiring the routing table item changes, a PD message carrying the routing table item identification is sent to the server based on the BMP, so that the server deletes the routing table item corresponding to the routing table item identification stored by the server.
Wherein, the routing table item is identified as follows: and the network equipment records the identification of each routing table item corresponding to the original acquisition mode.
Specifically, the routing table entry identifier may be the number of the routing table entry, the source address and the destination address included in the routing table entry, and so on. After the server receives the PD message carrying the routing table item identification, the routing table item corresponding to the routing table item identification can be searched based on the routing table item identification in the PD message, and the searched routing table item can be deleted.
Because the network device records the acquired routing table entry to inform the server of deleting the routing table entry after the acquisition mode is changed, the routing table entry corresponding to the recorded original acquisition mode can be deleted after the PD message carrying the routing table entry identification is sent to the server.
From the above, if the server does not support deleting the routing table entry stored by itself based on the identifier of the acquisition mode, the network device cannot delete the routing table entry corresponding to the original acquisition mode even if the network device sends a PD message carrying the identifier of the original acquisition mode to the server. Therefore, the network device can respectively send the route table item identifiers of the route table items acquired based on the original acquisition mode to the server through the PD message, so that the server can respectively delete the route table items corresponding to the route table item identifiers based on the route table item identifiers.
Corresponding to the foregoing method for deleting the routing table entry applied to the network device, the embodiment of the invention also provides a method for deleting the routing table entry applied to the server.
Referring to fig. 4, a flowchart of a fourth routing table entry deletion method according to an embodiment of the present invention is applied to a network device, where the server is connected to the network device, and includes the following steps S401 to S403.
S401: and receiving and storing the route list item sent by the network equipment, and identifying an acquisition mode adopted when the network equipment acquires the route list item.
Wherein, the routing table items are: the network device obtains the routing table entry from the RIB.
In particular, the network device may send routing entries to the server based on TCP. The routing table entry contains an identifier of an acquisition mode based on which the network device acquires the routing table entry.
S402: and receiving the PD message carrying the identification of the original acquisition mode, which is sent by the network equipment.
Wherein, the PD message is: the network device obtains the route list item and obtains the mode and sends after changing, the above-mentioned original obtains the mode is: the network device acquires the acquisition mode of the routing table entry before the change.
Specifically, after the acquisition mode of the network device for acquiring the routing table entry changes, the network device sends a PD message to the server to instruct the server to delete the routing table entry.
S403: and deleting the self-stored routing table entry corresponding to the original acquisition mode based on the identification.
Specifically, the server may search the routing table entry corresponding to the original acquisition mode stored in the server based on the identification of the original acquisition mode, and delete the searched routing table entry.
In the above, after the network device changes the acquisition mode of acquiring the routing table entry, the network device may send the PD packet carrying the identifier of the original acquisition mode to the server, where the server may delete the routing table entry corresponding to the original acquisition mode stored by the server after receiving the PD packet. And, the network device only needs to send the identifier of the original acquisition mode to the server, the server can delete each routing table item stored by the server and corresponding to the original acquisition mode, and the server does not need to receive the messages sent by the network device and notifying the server to delete the routing table item corresponding to the original acquisition mode, and each routing table item corresponding to the original acquisition mode is deleted. The method for deleting the routing table entry by applying the scheme provided by the embodiment of the invention is simpler and has higher efficiency.
Referring to fig. 5, a flowchart of a fifth method for deleting a routing table entry according to an embodiment of the present invention is shown, and compared with the embodiment shown in fig. 4, the method further includes the following steps S404 to S405 after step S401.
S404: and receiving a first Initiation message sent by the network equipment based on the BMP.
The first Initiation message carries first capability information, where the first capability information indicates: the network device supports deleting routing entries based on the identification of the acquisition mode.
S405: if the server supports deleting the self-stored routing table item based on the identifier of the acquisition mode, a second Initiation message is sent to the network equipment so as to inform the network equipment that the self-stored routing table item is deleted based on the identifier of the acquisition mode.
The second Initiation message carries second capability information, where the second capability information indicates: the server supports deleting the self-stored routing table entry based on the identification of the acquisition mode.
Specifically, after the server sends the second Initiation message to the network device, the network device may determine that the server may support deleting the self-stored routing table entry based on the identification of the acquisition mode. The network device may send a PD packet carrying the identifier of the original acquisition mode to the network device, so as to delete the routing table entry corresponding to the original acquisition mode stored in the server, and after the server receives the PD packet, the server may delete the routing table entry in step S403.
In addition, if the server does not support the deletion of the routing table entry based on the identifier of the acquisition mode, no message may be sent to the network device, or a third Initiation message carrying third capability information may be sent to the network device, where the third capability information indicates that the server does not support the deletion of the routing table entry based on the identifier of the acquisition mode, and the network device may determine that the server does not support the deletion of the routing table entry based on the identifier of the acquisition mode, and may delete the routing table entry in the server in other manners.
In the above, before the network device sends the PD message to the server, the network device may notify the server that the network device supports deleting the routing table entry recorded in the network device based on the identifier of the acquisition mode through the first Initiation message, if the server also supports deleting the routing table entry recorded in the network device based on the identifier of the acquisition mode, the network device may send the second Initiation message to the network device, so that the network device determines that the server also supports deleting the routing table entry based on the identifier of the acquisition mode, and further sends the PD message carrying the identifier of the original acquisition mode to the server on the basis of the first Initiation message, so that it may be ensured that the routing table entry corresponding to the original acquisition mode recorded in the server can be deleted.
In another embodiment of the present invention, if the server does not support deleting the routing table entry based on the identification of the acquisition mode, the self-stored routing table entry may be deleted through the following steps C-D.
Step C: and receiving the PD message which is sent by the network equipment and carries the route table item identification.
Wherein, the routing table item is identified as follows: and the network equipment records the identification of each routing table item corresponding to the original acquisition mode.
Step D: and deleting the routing table item corresponding to the routing table item identifier stored by the routing table item identifier.
Specifically, the routing table entries corresponding to the identifiers of the routing table entries can be searched in the stored routing table entries, and the searched routing table entries are deleted.
From the above, if the server does not support deleting the routing table entry stored by itself based on the identifier of the acquisition mode, the network device cannot delete the routing table entry corresponding to the original acquisition mode even if the network device sends a PD message carrying the identifier of the original acquisition mode to the server. Therefore, the network device can respectively send the route table item identifiers of the route table items acquired based on the original acquisition mode to the server through the PD message, and after the server receives the PD message, the server can respectively delete the route table items corresponding to the route table item identifiers based on the route table item identifiers.
Referring to fig. 6, a schematic structural diagram of a first routing table entry deletion apparatus according to an embodiment of the present invention is applied to a network device, where the network device is connected to a server, and the apparatus includes:
an entry obtaining module 601, configured to obtain a routing entry from a RIB, and send the obtained routing entry and an identifier of an obtaining mode adopted when obtaining the routing entry to the server, so that the server stores the routing entry and the identifier of the obtaining mode;
the first message sending module 602 is configured to send, when an acquisition mode of acquiring a routing table entry changes, a PD message carrying an identifier of the original acquisition mode to the server based on BMP for each original acquisition mode before the change, so that the server deletes the routing table entry stored by the server and corresponding to the original acquisition mode.
In the above, after the network device changes the acquisition mode of acquiring the routing table entry, for each original acquisition mode before the change, the network device may send the PD packet of the identifier of the original acquisition mode to the server, so that the server may delete the routing table entry corresponding to the original acquisition mode stored by the server. Moreover, the network equipment can delete each routing table item corresponding to the original acquisition mode stored by the server only by sending the identifier of the original acquisition mode to the server, and the network equipment does not need to inform the server to delete each routing table item corresponding to the original acquisition mode.
In addition, since the network device only needs to send the identifier of the original acquisition mode to the server, the server can delete the self-stored routing table entry corresponding to the original acquisition mode based on the identifier of the original acquisition mode, so that after the acquired routing table entry is sent to the server, the network device does not need to record the self-acquired routing table entry corresponding to the original acquisition mode, the subsequent server is not influenced to delete the routing table entry, and the storage space of the network device can be saved.
In one embodiment of the invention, the apparatus further comprises:
and the capability determining module is used for determining whether the server supports deleting the self-stored routing table entry based on the identification of the acquisition mode, and if so, triggering the execution of the first message sending module 602.
From the above, before sending a PD packet carrying an identifier of an original acquisition mode to a server to control the server to delete a routing table entry stored in the server and corresponding to the original acquisition mode, the embodiment of the present invention may further determine in advance whether the server supports deleting the routing table entry stored in the server based on the identifier of the acquisition mode, and if the server has the capability, send the PD packet carrying the identifier of the original acquisition mode to the server. After the PD message carrying the identification of the original acquisition mode is sent to the server, the server can complete deleting of the routing table entry based on the identification of the original acquisition mode.
In one embodiment of the present invention, the capability determining module is specifically configured to:
based on BMP, a first Initiation message is sent to the server, wherein the first Initiation message carries first capability information, and the first capability information represents: the network equipment supports deleting the routing table entry based on the identification of the acquisition mode;
if a second Initiation message sent by the server and used for responding to the first Initiation message is received, determining that the server supports deleting a self-stored routing table item based on an identifier of an acquisition mode, wherein the second Initiation message carries second capability information, and the second capability information represents: the server supports deleting self-stored routing entries based on the identification of the acquisition mode.
In one embodiment of the present invention, in the first Initiation message, the first capability information is stored in a value field in a first TLV, and a value of a type field in the first TLV is 0.
In one embodiment of the present invention, if it is determined that the server does not support deletion of the self-stored routing table entry based on the identification of the acquisition mode, the apparatus further includes:
The table entry recording module is used for recording the acquired routing table entry;
the second message sending module is configured to send, when an acquisition mode for acquiring a routing table entry changes, a PD message carrying a routing table entry identifier to the server based on BMP, so that the server deletes a routing table entry corresponding to the routing table entry identifier stored by the server, where the routing table entry identifier is: and the network equipment records the identification of each routing table item corresponding to the original acquisition mode.
From the above, if the server does not support deleting the routing table entry stored by itself based on the identifier of the acquisition mode, the network device cannot delete the routing table corresponding to the original acquisition mode even if the network device sends a PD message carrying the identifier of the original acquisition mode to the server. Therefore, the network device can respectively send the route table item identifiers of the route table items acquired based on the original acquisition mode to the server through the PD message, so that the server can respectively delete the route table items corresponding to the route table item identifiers based on the route table item identifiers.
Referring to fig. 7, a schematic structural diagram of a second routing table entry deletion apparatus according to an embodiment of the present invention is applied to a server, where the server is connected to a network device, and the apparatus includes:
An entry receiving module 701, configured to receive and store a routing entry sent by the network device and an identifier of an acquisition mode adopted when the network device acquires the routing entry, where the routing entry is: the network equipment obtains a routing table entry from the RIB;
a first packet receiving module 702, configured to receive a PD packet sent by the network device and carrying an identifier of an original acquisition mode, where the PD packet is: the network device obtains the route list item and obtains the mode and sends after changing, the original obtains the mode is: the network equipment acquires an acquisition mode of a routing table item before change;
a first table entry deleting module 703, configured to delete, based on the identification, a routing table entry corresponding to the original acquisition mode stored in the first table entry deleting module.
In the above, after the network device changes the acquisition mode of acquiring the routing table entry, the network device may send the PD packet carrying the identifier of the original acquisition mode to the server, where the server may delete the routing table entry corresponding to the original acquisition mode stored by the server after receiving the PD packet. And, the network device only needs to send the identifier of the original acquisition mode to the server, the server can delete each routing table item stored by the server and corresponding to the original acquisition mode, and the server does not need to receive the messages sent by the network device and notifying the server to delete the routing table item corresponding to the original acquisition mode, and each routing table item corresponding to the original acquisition mode is deleted. The method for deleting the routing table entry by applying the scheme provided by the embodiment of the invention is simpler and has higher efficiency.
In one embodiment of the present invention, the apparatus further includes:
the second message receiving module is configured to receive a first Initiation message sent by the network device based on BMP, where the first Initiation message carries first capability information, and the first capability information indicates: the network equipment supports deleting the routing table entry based on the identification of the acquisition mode;
a third message sending module, configured to send a second Initiation message to the network device if the server supports deleting the self-stored routing table entry based on the identifier of the acquisition mode, so as to inform the network device that the network device supports deleting the self-stored routing table entry based on the identifier of the acquisition mode, where the second Initiation message carries second capability information, and the second capability information represents: the server supports deleting self-stored routing entries based on the identification of the acquisition mode.
In the above, before the network device sends the PD message to the server, the network device may notify the server that the network device supports deleting the routing table entry recorded in the network device based on the identifier of the acquisition mode through the first Initiation message, if the server also supports deleting the routing table entry recorded in the network device based on the identifier of the acquisition mode, the network device may send the second Initiation message to the network device, so that the network device determines that the server also supports deleting the routing table entry based on the identifier of the acquisition mode, and further sends the PD message carrying the identifier of the original acquisition mode to the server on the basis of the first Initiation message, so that it may be ensured that the routing table entry corresponding to the original acquisition mode recorded in the server can be deleted.
In one embodiment of the present invention, the apparatus further includes:
a third message receiving module, configured to receive a PD message sent by the network device and carrying a routing table entry identifier, where the routing table entry identifier is: the network equipment records the identification of each routing table item corresponding to the original acquisition mode;
and the second table item deleting module is used for deleting the routing table item corresponding to the routing table item identifier stored by the second table item deleting module.
From the above, if the server does not support deleting the routing table entry stored by itself based on the identifier of the acquisition mode, the network device cannot delete the routing table entry corresponding to the original acquisition mode even if the network device sends a PD message carrying the identifier of the original acquisition mode to the server. Therefore, the network device can respectively send the route table item identifiers of the route table items acquired based on the original acquisition mode to the server through the PD message, and after the server receives the PD message, the server can respectively delete the route table items corresponding to the route table item identifiers based on the route table item identifiers.
The embodiment of the present invention further provides an electronic device, as shown in fig. 8, including a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete communication with each other through the communication bus 804,
A memory 803 for storing a computer program;
the processor 801 is configured to implement the above-described routing table entry deletion method applied to the network device when executing the program stored in the memory 803.
When the electronic device provided by the embodiment of the invention is applied to deleting the routing table item, after the acquisition mode of acquiring the routing table item is changed, the network device can send the PD message of the identifier of the original acquisition mode to the server aiming at the original acquisition mode before each change, so that the server can delete the routing table item which is stored by the server and corresponds to the original acquisition mode. Moreover, the network equipment can delete each routing table item corresponding to the original acquisition mode stored by the server only by sending the identifier of the original acquisition mode to the server, and the network equipment does not need to inform the server to delete each routing table item corresponding to the original acquisition mode.
In addition, since the network device only needs to send the identifier of the original acquisition mode to the server, the server can delete the self-stored routing table entry corresponding to the original acquisition mode based on the identifier of the original acquisition mode, so that after the acquired routing table entry is sent to the server, the network device does not need to record the self-acquired routing table entry corresponding to the original acquisition mode, the subsequent server is not influenced to delete the routing table entry, and the storage space of the network device can be saved.
The embodiment of the present invention also provides an electronic device, as shown in fig. 9, including a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 perform communication with each other through the communication bus 904,
a memory 903 for storing a computer program;
the processor 901 is configured to implement the above-described method for deleting a routing entry applied to a server when executing a program stored in the memory 903.
When the electronic device provided by the embodiment of the invention is used for deleting the routing table entry, after the acquisition mode of acquiring the routing table entry changes, the network device can send the PD message carrying the identification of the original acquisition mode to the server, and the server can delete the routing table entry stored by the server and corresponding to the original acquisition mode after receiving the PD message. And, the network device only needs to send the identifier of the original acquisition mode to the server, the server can delete each routing table item stored by the server and corresponding to the original acquisition mode, and the server does not need to receive the messages sent by the network device and notifying the server to delete the routing table item corresponding to the original acquisition mode, and each routing table item corresponding to the original acquisition mode is deleted. The method for deleting the routing table entry by applying the scheme provided by the embodiment of the invention is simpler and has higher efficiency.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, there is further provided a computer readable storage medium having a computer program stored therein, the computer program when executed by a processor implementing the steps of any of the above-mentioned routing table entry deletion methods applied to a network device.
When the computer program stored in the computer readable storage medium provided by the embodiment is used for deleting the routing table entry, after the acquisition mode for acquiring the routing table entry changes, the network device can send the identified PD message of the original acquisition mode to the server for each original acquisition mode before the change, so that the server can delete the routing table entry corresponding to the original acquisition mode stored by the server. Moreover, the network equipment can delete each routing table item corresponding to the original acquisition mode stored by the server only by sending the identifier of the original acquisition mode to the server, and the network equipment does not need to inform the server to delete each routing table item corresponding to the original acquisition mode.
In addition, since the network device only needs to send the identifier of the original acquisition mode to the server, the server can delete the self-stored routing table entry corresponding to the original acquisition mode based on the identifier of the original acquisition mode, so that after the acquired routing table entry is sent to the server, the network device does not need to record the self-acquired routing table entry corresponding to the original acquisition mode, the subsequent server is not influenced to delete the routing table entry, and the storage space of the network device can be saved.
In yet another embodiment of the present invention, there is also provided a computer readable storage medium having a computer program stored therein, the computer program when executed by a processor implementing the steps of any of the above-mentioned routing entry deletion methods applied to a server.
When the computer program stored in the computer readable storage medium provided by the embodiment is used for deleting the routing table entry, after the acquisition mode of acquiring the routing table entry changes, the network device can send the PD message carrying the identifier of the original acquisition mode to the server, and the server can delete the self-stored routing table entry corresponding to the original acquisition mode after receiving the PD message. And, the network device only needs to send the identifier of the original acquisition mode to the server, the server can delete each routing table item stored by the server and corresponding to the original acquisition mode, and the server does not need to receive the messages sent by the network device and notifying the server to delete the routing table item corresponding to the original acquisition mode, and each routing table item corresponding to the original acquisition mode is deleted. The method for deleting the routing table entry by applying the scheme provided by the embodiment of the invention is simpler and has higher efficiency.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the routing table entry deletion methods of the above embodiments applied to a network device.
When the computer program product provided in this embodiment is executed to delete a routing table entry, after the obtaining mode of obtaining the routing table entry changes, for each original obtaining mode before the change, the network device may send the PD packet of the identifier of the original obtaining mode to the server, so that the server may delete the routing table entry corresponding to the original obtaining mode stored by the server. Moreover, the network equipment can delete each routing table item corresponding to the original acquisition mode stored by the server only by sending the identifier of the original acquisition mode to the server, and the network equipment does not need to inform the server to delete each routing table item corresponding to the original acquisition mode.
In addition, since the network device only needs to send the identifier of the original acquisition mode to the server, the server can delete the self-stored routing table entry corresponding to the original acquisition mode based on the identifier of the original acquisition mode, so that after the acquired routing table entry is sent to the server, the network device does not need to record the self-acquired routing table entry corresponding to the original acquisition mode, the subsequent server is not influenced to delete the routing table entry, and the storage space of the network device can be saved.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the routing table entry deletion methods of the above embodiments applied to a server.
When the computer program product provided by the embodiment is executed to delete the routing table entry, after the obtaining mode of obtaining the routing table entry changes, the network device may send the PD message carrying the identifier of the original obtaining mode to the server, and the server may delete the routing table entry corresponding to the original obtaining mode stored by the server after receiving the PD message. And, the network device only needs to send the identifier of the original acquisition mode to the server, the server can delete each routing table item stored by the server and corresponding to the original acquisition mode, and the server does not need to receive the messages sent by the network device and notifying the server to delete the routing table item corresponding to the original acquisition mode, and each routing table item corresponding to the original acquisition mode is deleted. The method for deleting the routing table entry by applying the scheme provided by the embodiment of the invention is simpler and has higher efficiency.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, electronic devices, computer readable storage media and computer program product embodiments, the description is relatively simple as it is substantially similar to method embodiments, as relevant points are found in the partial description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A method for deleting a routing table entry, the method being applied to a network device, the network device being connected to a server, the method comprising:
acquiring a routing table item from a Routing Information Base (RIB), and sending the acquired routing table item and an identification of an acquisition mode adopted when acquiring the routing table item to the server so that the server stores the routing table item and the identification of the acquisition mode;
when the acquisition mode of acquiring the routing table item changes, sending a peer-closed PD message carrying an identification of the original acquisition mode to the server based on a border gateway monitoring protocol BMP aiming at each original acquisition mode before the change, so that the server deletes the routing table item stored by the server and corresponding to the original acquisition mode.
2. The method of claim 1, wherein after the obtaining the routing table entry from the RIB and sending the obtained routing table entry and the identification of the obtaining mode used when obtaining the routing table entry to the server, so that the server stores the routing table entry and the identification of the obtaining mode, further comprises:
Determining whether the server supports deleting the self-stored routing table entry based on the identification of the acquisition mode;
if so, when the acquisition mode of the acquisition routing table item changes, sending a PD message carrying the identification of the original acquisition mode to the server based on BMP aiming at the original acquisition mode before each change.
3. The method of claim 2, wherein determining whether the server supports deletion of self-stored routing entries based on the identification of the acquisition mode comprises:
based on BMP, a first initial Initiation message is sent to the server, wherein the first Initiation message carries first capability information, and the first capability information represents: the network equipment supports deleting the routing table entry based on the identification of the acquisition mode;
if a second Initiation message sent by the server and used for responding to the first Initiation message is received, determining that the server supports deleting a self-stored routing table item based on an identifier of an acquisition mode, wherein the second Initiation message carries second capability information, and the second capability information represents: the server supports deleting self-stored routing entries based on the identification of the acquisition mode.
4. The method of claim 3, wherein in the first Initiation message, the first capability information is stored in a value field in a first type length value TLV, and a value of a type field in the first TLV is 0.
5. The method of any one of claims 2-4, further comprising, after said obtaining a routing entry from the RIB, if it is determined that the server does not support deletion of the self-stored routing entry based on the identification of the obtaining mode:
recording the obtained routing table item;
when the acquisition mode of acquiring the routing table item changes, the method further comprises the following steps:
sending a PD message carrying a routing table item identifier to the server based on BMP, so that the server deletes the routing table item corresponding to the routing table item identifier stored by the server, wherein the routing table item identifier is as follows: and the network equipment records the identification of each routing table item corresponding to the original acquisition mode.
6. A method for deleting a routing table entry, the method being applied to a server, the server being connected to a network device, the method comprising:
receiving and storing a routing table item sent by the network equipment and an identification of an acquisition mode adopted when the network equipment acquires the routing table item, wherein the routing table item is: the network equipment obtains a routing table entry from the RIB;
Receiving a PD message carrying an identifier of an original acquisition mode, wherein the PD message is sent by the network equipment: the network device obtains the route list item and obtains the mode and sends after changing, the original obtains the mode is: the network equipment acquires an acquisition mode of a routing table item before change;
and deleting the self-stored routing table entry corresponding to the original acquisition mode based on the identification.
7. The method of claim 6, wherein the method further comprises:
receiving a first Initiation message sent by the network device based on a BMP, wherein the first Initiation message carries first capability information, and the first capability information represents: the network equipment supports deleting the routing table entry based on the identification of the acquisition mode;
if the server supports deleting the self-stored routing table entry based on the identifier of the acquisition mode, a second Initiation message is sent to the network device to inform the network device that the self-stored routing table entry is self-supported by the identifier of the acquisition mode, wherein the second Initiation message carries second capability information, and the second capability information represents: the server supports deleting self-stored routing entries based on the identification of the acquisition mode.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
receiving a PD message which is sent by the network equipment and carries a routing table item identifier, wherein the routing table item identifier is as follows: the network equipment records the identification of each routing table item corresponding to the original acquisition mode;
and deleting the routing table item corresponding to the routing table item identification stored by the routing table item identification.
9. A routing table entry deletion apparatus, for use with a network device, the network device being connected to a server, the apparatus comprising:
the table item acquisition module is used for acquiring a routing table item from the RIB, and sending the acquired routing table item and the identification of the acquisition mode adopted when the routing table item is acquired to the server so that the server stores the routing table item and the identification of the acquisition mode;
the first message sending module is used for sending a PD message carrying the identification of the original acquisition mode to the server based on the BMP aiming at each original acquisition mode before the change when the acquisition mode of acquiring the routing list item changes, so that the server deletes the routing list item stored by the server and corresponding to the original acquisition mode.
10. A routing table entry deletion apparatus, applied to a server, the server being connected to a network device, the apparatus comprising:
the table entry receiving module is configured to receive and store a routing table entry sent by the network device and an identifier of an acquisition mode adopted when the network device acquires the routing table entry, where the routing table entry is: the network equipment obtains a routing table entry from the RIB;
the first message receiving module is configured to receive a PD message carrying an identifier of an original acquisition mode, where the PD message is sent by the network device: the network device obtains the route list item and obtains the mode and sends after changing, the original obtains the mode is: the network equipment acquires an acquisition mode of a routing table item before change;
and the first table item deleting module is used for deleting the self-stored routing table item corresponding to the original acquisition mode based on the identification.
CN202111189302.4A 2021-10-12 2021-10-12 Method and device for deleting routing table entries Active CN113794644B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111189302.4A CN113794644B (en) 2021-10-12 2021-10-12 Method and device for deleting routing table entries

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111189302.4A CN113794644B (en) 2021-10-12 2021-10-12 Method and device for deleting routing table entries

Publications (2)

Publication Number Publication Date
CN113794644A CN113794644A (en) 2021-12-14
CN113794644B true CN113794644B (en) 2023-05-26

Family

ID=78877904

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111189302.4A Active CN113794644B (en) 2021-10-12 2021-10-12 Method and device for deleting routing table entries

Country Status (1)

Country Link
CN (1) CN113794644B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7007100B1 (en) * 2000-12-20 2006-02-28 Nortel Networks Limited Method for synchronization of multicast routing table changes with a plurality of multicast routing protocols
CN106161256A (en) * 2016-07-26 2016-11-23 杭州华三通信技术有限公司 A kind of processing method and processing device of Border Gateway Protocol (BGP) route
WO2018121284A1 (en) * 2016-12-28 2018-07-05 华为技术有限公司 Method for processing routing, and network device
CN109246008A (en) * 2014-07-23 2019-01-18 华为技术有限公司 The network equipment, system and the method for sending bgp information
CN110932876A (en) * 2018-09-19 2020-03-27 华为技术有限公司 Communication system, method and device
WO2020093958A1 (en) * 2018-11-08 2020-05-14 华为技术有限公司 Route processing method, apparatus, and device

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102300275B (en) * 2010-06-22 2014-07-30 华为终端有限公司 Switching method in communication process and local route control function entity
CN102412984B (en) * 2011-10-24 2014-10-29 杭州华三通信技术有限公司 Management method and equipment for forwarded table entry
CN102437960B (en) * 2011-12-21 2014-08-27 福建星网锐捷网络有限公司 Detection processing method and system of cluster mode, and network equipment
CN107770073B (en) * 2016-08-19 2020-06-02 华为技术有限公司 Method, device and system for information synchronization
CN106059924B (en) * 2016-08-19 2020-04-03 华为技术有限公司 Method, device and system for managing information
CN106506376B (en) * 2016-10-27 2021-02-23 新华三技术有限公司 Method and device for sending monitored neighbor initial routing information
CN106899501A (en) * 2017-03-30 2017-06-27 重庆金美通信有限责任公司 A kind of method that concentrated route control is carried out in distributed communication network
CN107547386B (en) * 2017-06-23 2020-03-06 新华三技术有限公司 Message forwarding method and device
CN109873766B (en) * 2019-03-29 2020-01-03 北京华三通信技术有限公司 Message transmission method and device
CN110445719B (en) * 2019-07-16 2021-08-17 中国第一汽车股份有限公司 Routing table management method, device, equipment and storage medium
CN112787930B (en) * 2019-11-06 2024-04-09 华为技术有限公司 Method, device and storage medium for monitoring running state of peer
CN110912827B (en) * 2019-11-22 2021-08-13 北京金山云网络技术有限公司 Route updating method and user cluster
CN113098770B (en) * 2020-01-08 2024-04-16 华为技术有限公司 Message sending method, route table item generating method, device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7007100B1 (en) * 2000-12-20 2006-02-28 Nortel Networks Limited Method for synchronization of multicast routing table changes with a plurality of multicast routing protocols
CN109246008A (en) * 2014-07-23 2019-01-18 华为技术有限公司 The network equipment, system and the method for sending bgp information
CN106161256A (en) * 2016-07-26 2016-11-23 杭州华三通信技术有限公司 A kind of processing method and processing device of Border Gateway Protocol (BGP) route
WO2018121284A1 (en) * 2016-12-28 2018-07-05 华为技术有限公司 Method for processing routing, and network device
CN110932876A (en) * 2018-09-19 2020-03-27 华为技术有限公司 Communication system, method and device
WO2020093958A1 (en) * 2018-11-08 2020-05-14 华为技术有限公司 Route processing method, apparatus, and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
杨夏 ; 毕艳冰 ; 孙延涛 ; .交换式以太网物理拓扑发现的进展与研究.计算机应用研究.2007,(12),全文. *
柳溶,王建新,杨路明.基于IPv6选播路由协议的负载平衡研究.计算机工程与应用.2003,(36),全文. *
陆笑天 ; 李曦 ; 周学海 ; 纪金松 ; .基于前驱查找的快速IP路由查找和更新方案.计算机工程.2007,(13),全文. *
黄伟.《基于SDN分级分域架构的QoS约束路由算法》.《网络与信息安全学报》.2019,(第第5期期),全文. *

Also Published As

Publication number Publication date
CN113794644A (en) 2021-12-14

Similar Documents

Publication Publication Date Title
TWI631475B (en) System and method for capability monitoring
CN106412142B (en) Resource equipment address obtaining method and device
CN110580256B (en) Method, device and system for identifying application identification
US20050047350A1 (en) Apparatus and methods for discovery of network elements in a network
CN108494755B (en) Method and device for transmitting Application Programming Interface (API) request
CN112929241B (en) Network testing method and device
CN112839076B (en) Data storage method, data reading method, gateway, electronic equipment and storage medium
CN113452561A (en) Topology generation method, device and equipment and readable storage medium
US10298672B2 (en) Global contact-point registry for peer network devices
CN112087532B (en) Information acquisition method, device, equipment and storage medium
CN113794644B (en) Method and device for deleting routing table entries
CN110855627B (en) Application deployment method, device, equipment and medium
KR20140125223A (en) Method for collecting information with management interface in contents network based on information centric networking, content network management system, and node apparatus
CN109714398B (en) Data storage method and device
CN116719868A (en) Network asset identification method, device and equipment
US20170353818A1 (en) Method for deleting notification resource, and common service entity
US11638134B2 (en) Methods, systems, and computer readable media for resource cleanup in communications networks
CN110809033B (en) Message forwarding method and device and switching server
CN111917868A (en) Addressing method and device for block chain node, routing equipment and storage medium
CN108848033B (en) Method, device and storage medium for avoiding route conflict
CN113934916A (en) CDN service implementation method, terminal device, node server and storage medium
CN113676540B (en) Connection establishment method and device
CN112468600B (en) Application message notification method, system and storage medium based on network matrix
CN113438166B (en) Anycast address determination method, anycast address determination device, network equipment and storage medium
CN110740198B (en) Neighbor table item management method and device, electronic equipment and machine-readable storage medium

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