Management method and equipment for forwarding table item
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for managing a forwarding table entry.
Background
Currently, in a networking structure of an RRPP (Rapid Ring Protection Protocol), the networking structure includes: (1) the RRPP domains have the same domain ID (identification) and control VLAN (virtual local Area Network), and the devices which are mutually communicated form one RRPP domain, and one RRPP domain has elements such as an RRPP main ring, a sub-ring, a control VLAN, a main node, a transmission node, a main port and an auxiliary port, a public port and an edge port, and the like. (2) The RRPP ring is characterized in that the Ethernet network topology of a ring connection is called as an RRPP ring, and the RRPP ring is divided into a main ring and a sub-ring. (3) The control VLAN is used for transmitting RRPP protocol messages, and the data VLAN is used for transmitting data messages. (4) Each device on the RRPP ring is called a node and is divided into a main node, a transmission node, an edge node and an auxiliary edge node. (5) The RRPP ring comprises a main port and an auxiliary port, wherein the main port and the transmission node are respectively provided with two ports to be connected into the RRPP ring, one port is the main port, and the other port is the auxiliary port. (6) The edge port is a port which is only accessed to the sub-ring on the edge node and the auxiliary edge node.
In the RRPP polling mechanism, a main node periodically sends a Hello message from a main port of the main node, and the Hello message is transmitted on a ring through each transmission node in sequence; if the loop is broken, the secondary port of the master node cannot receive the Hello message before the timer is overtime, the master node will remove the blocking state of the data VLAN at the secondary port, and send a Common-Flush-FDB (Forwarding Database) message to notify all the transmission nodes, so that the transmission nodes update their respective MAC (Media Access Control) entries and ARP (Address Resolution Protocol)/ND (Neighbor Discovery) entries.
In a Link Down alarm mechanism of RRPP, when a transmission node, an edge node or an auxiliary edge node finds that any one of the transmission node, the edge node or the auxiliary edge node belongs to a port Down of an RRPP domain, a Link-Down message is immediately sent to a main node; after receiving the Link-Down message, the host node removes the blocking state of the data VLAN at the secondary port, and sends a Common-Flush-FDB message to inform all transmission nodes, edge nodes and auxiliary edge nodes, so that the MAC table entries and ARP/ND table entries of the host node are updated.
Currently, in a networking structure of Smart Link (which is proposed for dual uplink networking and can implement redundant backup of a main Link and a standby Link, and quickly switch traffic to the standby Link after a failure occurs in the main Link), the method includes: (1) smart Link groups, each group only includes two ports, one is a master port, and the other is a slave port; one port is in a forwarding state, the other port is blocked, and the other port is in a standby state; when the port in the forwarding state fails, the Smart Link group automatically blocks the port and switches the port in the standby state to the forwarding state. (2) The master/slave ports, the master and slave ports are two port roles in the Smart Link group. (3) The link where the master port is located is called a master link, and the link where the slave port is located is called a slave link. (4) And the protection VLAN is a user data VLAN for controlling the forwarding state of the SmartLink group. (5) A sending control VLAN which is a VLAN used for sending Flush messages; when the link switching occurs, the device broadcasts and sends a Flush message in the sending control VLAN. (6) Receiving a control VLAN which is used for receiving and processing a Flush message; when the link switching occurs, the equipment receives and processes the Flush message belonging to the receiving control VLAN, and refreshes the MAC table entry and the ARP/ND table entry. (7) In the Flush message, when link switching occurs in the SmartLink group, the original MAC table entry and ARP/ND table entry are not suitable for a new topological network, and all equipment in the network needs to update the MAC table entry and the ARP/ND table entry; at this time, the Smart Link group needs to inform other devices of refreshing the MAC table entry and the ARP/ND table entry by sending Flush messages.
As shown in FIG. 1, which is a networking schematic diagram of Smart Link, the respective ports Ethernet1/1 and Ethernet1/2 of Device C and Device D respectively form a Smart Link group, Ethernet1/1 is in forwarding state, and Ethernet1/2 is in standby state; the respective ports of Device C and Device D, Ethernet1/1, are master ports and Ethernet1/2 are slave ports; the link where the port Ethernet1/1 of Device C is located is the master link, and the link where the port Ethernet1/2 is located is the slave link. Based on the networking, normally, the Ethernet1/1 is in a forwarding state, and the Ethernet1/2 is in a standby state; when the main link fails, Ethernet1/1 will block and switch to standby, and Ethernet1/2 will switch to forward.
When the Smart Link is subjected to Link switching, the MAC table entry and the ARP/ND table entry on each device in the network are possibly not in the latest state, and in order to ensure the correct sending of the message, an updating mechanism of the MAC table entry and the ARP/ND table entry needs to be provided; the current update mechanism has the following two types: (1) and automatically refreshing the MAC table entry and the ARP/ND table entry through flow, wherein the mode needs to be triggered by uplink flow. (2) The method needs that the uplink equipment can identify the Flush message of the Smart Link and update the MAC table entry and the ARP/ND table entry.
In summary, in the current RRPP networking structure, the method for refreshing the MAC entry and the ARP/ND entry is as follows: the method requires that all devices in the RRPP networking can identify the flush-FDB message, otherwise, the MAC table entry and the ARP/ND table entry cannot be refreshed immediately after the topology changes, so that the networking application of the RRPP device and other manufacturer devices is limited.
In the current Smart Link networking structure, the refreshing method of the MAC table entry and the ARP/ND table entry is as follows: the method requires that all devices in the Smart link networking can identify the flush message, otherwise, the MAC table entry and the ARP/ND table entry cannot be refreshed immediately after the topology changes, and therefore networking application of the Smart link devices and other manufacturer devices is limited.
Disclosure of Invention
The invention provides a method and equipment for managing a forwarding table entry, so that network equipment which does not support a specified topology protocol can delete the forwarding table entry in time, and the application range of the specified topology protocol is expanded.
In order to achieve the above object, the present invention provides a method for managing a forwarding table, which is applied to a network system including network devices supporting a specified topology protocol and network devices not supporting the specified topology protocol, where one of the network devices supporting the specified topology protocol is a control device of the network system, and the control device is configured to control each network device in the network system to update its own forwarding table, and the method includes the following steps:
the control equipment discovers that the network topology changes;
and the control equipment sends a multiple virtual local area network registration protocol (MVRP) message for clearing forwarding entries to the network equipment which does not support the specified topology protocol, and indicates the network equipment which does not support the specified topology protocol to clear the forwarding entries of the network equipment.
The designated topology protocol comprises a rapid ring network protection protocol RRPP protocol or a flexible link SmartLink protocol.
When the specified topology protocol is an RRPP protocol, the sending, by the control device, an MVRP packet for clearing a forwarding table entry to the network device that does not support the specified topology protocol includes:
the control equipment sends a forwarding database to refresh a Flush-FDB message to other network equipment in the network equipment supporting the specified topology protocol, and instructs the other network equipment to clear the forwarding table entry of the other network equipment by using the Flush-FDB message; and sending an MVRP message to the network equipment which does not support the specified topology protocol, and indicating the network equipment which does not support the specified topology protocol to clear the forwarding table entry of the network equipment by using the MVRP message.
When the specified topology protocol is a Smart Link protocol, the control device sends an MVRP packet for clearing forwarding table entries to the network device that does not support the specified topology protocol, which specifically includes:
the control equipment sends a refresh Flush message to other network equipment in the network equipment supporting the specified topology protocol, and instructs the other network equipment to clear the forwarding table entry of the control equipment by using the Flush message; sending an MVRP message to the network equipment which does not support the specified topology protocol, and indicating the network equipment which does not support the specified topology protocol to clear forwarding table items of the network equipment by using the MVRP message; or,
and the control equipment sends MVRP messages to other network equipment in the network equipment supporting the specified topology protocol and network equipment not supporting the specified topology protocol, and indicates the other network equipment and the network equipment not supporting the specified topology protocol to clear forwarding table entries of the other network equipment and the network equipment not supporting the specified topology protocol by using the MVRP messages.
The MVRP message for clearing forwarding table entries includes: new message based on MVRP protocol.
In another aspect, the present invention further provides a management device for forwarding table entries, which is applied to a network system including a network device supporting a specified topology protocol and a network device not supporting the specified topology protocol, where one of the network devices supporting the specified topology protocol is a control device of the network system, the control device is configured to control each network device in the network system to update its own forwarding table entry, and the management device is used as the control device, and the control device includes:
the discovery module is used for discovering that the network topology changes;
a sending module, configured to send, when a change in network topology is found, a multiple virtual local area network registration protocol MVRP packet for clearing forwarding entries to the network device that does not support the specified topology protocol, and indicate the network device that does not support the specified topology protocol to clear its forwarding entries.
The designated topology protocol comprises a rapid ring network protection protocol RRPP protocol or a flexible link SmartLink protocol.
When the specified topology protocol is an RRPP protocol;
the sending module is specifically configured to send a forwarding database to refresh a Flush-FDB message to other network devices in the network devices supporting the specified topology protocol, and instruct the other network devices to clear forwarding entries of the other network devices by using the Flush-FDB message; and sending an MVRP message to the network equipment which does not support the specified topology protocol, and indicating the network equipment which does not support the specified topology protocol to clear the forwarding table entry of the network equipment by using the MVRP message.
When the specified topology protocol is a Smart Link protocol;
the sending module is specifically configured to send a refresh Flush message to other network devices in the network device supporting the specified topology protocol, and instruct the other network devices to clear forwarding entries of the other network devices by using the Flush message; sending an MVRP message to the network equipment which does not support the specified topology protocol, and indicating the network equipment which does not support the specified topology protocol to clear forwarding table items of the network equipment by using the MVRP message; or sending an MVRP message to other network devices in the network devices supporting the specified topology protocol and network devices not supporting the specified topology protocol, and indicating the other network devices and the network devices not supporting the specified topology protocol to clear forwarding entries of the other network devices and the network devices not supporting the specified topology protocol by using the MVRP message.
The MVRP message for clearing forwarding table entries includes: new message based on MVRP protocol.
Compared with the prior art, the invention has at least the following advantages: after the change of the network topology is found, by sending an MVRP (Multiple VLAN Register Protocol) message for clearing the forwarding table entry, under the scene of the specified topology protocols such as an RRPP (remote virtual local area network) Protocol and a Smart Link Protocol, the network equipment which does not support the specified topology protocols can delete the forwarding table entry in time and recover the service flow in the network in time, thereby expanding the application range of the specified topology protocols.
Drawings
FIG. 1 is a prior art networking diagram of a Smart Link;
fig. 2 is a flowchart of a method for managing a forwarding table entry according to the present invention;
FIG. 3 is a schematic diagram of an application scenario for the RRPP protocol in the present invention;
fig. 4 is a structural diagram of a management device for forwarding table entries according to the present invention.
Detailed Description
The invention provides a management method of a forwarding table item, which aims at the problem that the forwarding table item (such as an MAC table item and an ARP/ND table item) can not be deleted in time by network equipment which does not support a specified topology protocol (such as RRPP protocol or Smart Link protocol) in the prior art.
The MVRP is an application of MRP (Multiple Register Protocol) to VLAN attributes, and is used to publish and learn VLAN configuration information among devices, so that the devices can automatically synchronize VLAN configuration information, and reduce configuration work of network management personnel; after the network topology changes, the MVRP re-releases and learns the VLAN configuration information according to the new topology so as to synchronously update with the network topology in real time.
Based on the MVRP protocol, the method for managing the forwarding table entry provided by the present invention is applied to a network system including a network device supporting the specified topology protocol and a network device not supporting the specified topology protocol, and each network device in the network system needs to support the MVRP protocol.
In the invention, the designated topology protocol includes but is not limited to RRPP protocol or Smart Link protocol, when the designated topology protocol is RRPP protocol, the control device is a master node in the network system (namely, the master node in the RRPP networking structure); when the specified topology protocol is a Smart Link protocol, the control device is a Smart Link device in the network system (i.e., a network device configured with a Smart Link group).
As shown in fig. 2, the method for managing the forwarding table entry includes the following steps:
step 201, the control device discovers that the network topology changes.
When the designated topology protocol is the RRPP protocol, the method for the control device to discover the change of the network topology comprises the following steps:
(1) in the RRPP polling mechanism, a master node (i.e., a control device) periodically sends a Hello packet from its master port, and the Hello packet is sequentially transmitted on a ring through each transmission node, and if the ring is broken, a secondary port of the master node cannot receive the Hello packet before a timer expires, and a change in network topology is found.
(2) In a Link Down alarm mechanism of RRPP, when a transmission node, an edge node or an auxiliary edge node finds that any one of the transmission node, the edge node or the auxiliary edge node belongs to a port Down of an RRPP domain, a Link-Down message is immediately sent to a main node (namely control equipment); and after receiving the Link-Down message, the master node discovers that the network topology changes.
When the specified topology protocol is a Smart Link protocol, the method for the control device to discover the change of the network topology includes: when the Link switching of the Smart Link group occurs, the Smart Link device (namely, the control device) where the Smart Link group is located discovers that the network topology changes.
Step 202, the control device sends an MVRP message for clearing forwarding entries to the network device that does not support the specified topology protocol, and indicates the network device that does not support the specified topology protocol to clear its forwarding entries. The forwarding table entry is an MAC table entry and an ARP/ND table entry; the MVRP message for clearing forwarding entries includes: new message based on MVRP protocol.
When the designated topology protocol is the RRPP protocol, the control equipment sends an MVRP message for clearing forwarding table items to the network equipment which does not support the designated topology protocol, and the method comprises the following steps:
the control equipment sends Flush-FDB messages to other network equipment in the network equipment supporting the specified topology protocol, and instructs the other network equipment to clear forwarding table entries of the other network equipment by using the Flush-FDB messages; and sending an MVRP message to the network equipment which does not support the specified topology protocol, and indicating the network equipment which does not support the specified topology protocol to clear the forwarding table entry of the network equipment by using the MVRP message.
When the designated topology protocol is a Smart Link protocol, the control device sends an MVRP message for clearing the forwarding table entry to the network device which does not support the designated topology protocol, and the method comprises the following steps:
the method comprises the steps that firstly, control equipment sends Flush messages to other network equipment in the network equipment supporting the specified topology protocol, and the other network equipment is instructed to clear forwarding table entries of the other network equipment by using the Flush messages; and sending an MVRP message to the network equipment which does not support the specified topology protocol, and indicating the network equipment which does not support the specified topology protocol to clear the forwarding table entry of the network equipment by using the MVRP message.
And secondly, the control equipment sends the MVRP message to other network equipment in the network equipment supporting the specified topology protocol and network equipment not supporting the specified topology protocol, and indicates the other network equipment and the network equipment not supporting the specified topology protocol to clear the forwarding table entry of the control equipment by using the MVRP message.
Step 203, the network device which does not support the specified topology protocol clears its forwarding table entry.
In the invention, when the designated topology protocol is the RRPP protocol, for the network equipment which does not support the RRPP protocol, after receiving the Flush-FDB message, the Flush-FDB message cannot be identified, so that the forwarding table entry of the network equipment can not be deleted based on the Flush-FDB message; however, after receiving the new message based on the MVRP protocol, the new message based on the MVRP protocol may be identified, and based on the characteristics of the new message itself, the forwarding table entry of the new message may be cleared.
When the specified topology protocol is a Smart Link protocol, for network equipment which does not support the Smart Link protocol, after receiving a Flush message, the Flush message cannot be identified, so that the forwarding table entry of the network equipment cannot be deleted based on the Flush message; however, after receiving the new message based on the MVRP protocol, the new message based on the MVRP protocol may be identified, and based on the characteristics of the new message itself, the forwarding table entry of the new message may be cleared.
The procedure of the RRPP protocol is described in detail below with reference to the application scenario shown in fig. 3.
Assuming that Device a, Device B, Device C, Device D, and Device E are all network devices (e.g., routers) supporting RRPP protocol, Ring1 of RRPP is composed of Device a, Device B, Device C, and Device D, and Ring2 of RRPP is composed of Device a, Device B, Device C, Device D, and Device E. In addition, there is a Device F that does not support the RRPP protocol between Device a and Device D.
Assuming that a link between Device B and Device a fails and Device B is a master node (i.e., a control Device), in the prior art, after Device B finds a failure (i.e., finds that a network topology changes), it sends a Flush-FDB message to each node in a Ring, taking Ring1 as an example, the Flush-FDB message is sent to Device a, Device C, Device D, and Device F, and since Device a, Device C, and Device D can recognize the Flush-FDB message, it deletes its own forwarding table based on the Flush-FDB message; however, since the Device F cannot recognize the Flush-FDB packet, the forwarding table entry of the Device F cannot be deleted, so that the forwarding table entry of the Device F cannot be cleared, and thus the drop-on Device of the Device F cannot normally communicate with other nodes on the ring and the drop-on devices of the nodes, which affects the link switching performance of the RRPP.
In the invention, after discovering a fault (that is, discovering that network topology changes), Device B sends a Flush-FDB message to each node in the ring and simultaneously sends an MVRP message (that is, a new message based on an MVRP protocol, wherein the new message contains all VLAN information related to RRPP topology change, and the message types of the VLANs are new); since the Device a, the Device C and the Device D can identify the Flush-FDB message, the forwarding table entry of the Device a, the Device C and the Device D is deleted based on the Flush-FDB message; although the Device F cannot recognize the Flush-FDB packet, the Device F can recognize the new message based on the MVRP protocol and explicitly stipulate in IEEE that "after receiving the new message of the MVRP, all forwarding entries in the forwarding table of the designated VLAN (i.e., all VLAN information related to the topology change carried in the new message) on the packet receiving port need to be cleared", so the Device F deletes its own forwarding entry based on the new message.
In conclusion, the method can solve the problem of networking limitation of the RRPP technology; after the topology changes, other devices in the network (a network device supporting the RRPP protocol or a network device not supporting the RRPP protocol) can be notified in time to delete the forwarding table entry, and the service traffic in the network can be recovered in time.
The procedure of the Smart Link protocol is described in detail below with reference to the application scenario shown in fig. 1.
Assuming that Device a, Device B, Device C and Device D are all network devices (such as routers) supporting Smart Link protocol, Device E is a network Device not supporting Smart Link protocol; and Smart Link groups are configured on the Device C and the Device D, and the Device C and the Device D are Smart Link devices (i.e., control devices). When the Smart Link master-slave Link on Device C is switched, the traffic in the network also needs to be able to switch to the new master Link.
In the prior art, when Device C finds that Smart Link master-slave links are switched (i.e. finds that network topology changes), it sends Flush messages to each node in the network, and the Flush messages are sent to Device a, Device B, Device D, and Device E, because Device a, Device B, and Device D can identify Flush messages, it deletes its own forwarding table based on the Flush messages; however, since the Device E cannot identify the Flush message, the forwarding table entry of the Device E cannot be deleted, so that the forwarding table entry of the Device E cannot be cleared, that is, the Device E still turns the traffic to the direction of the old primary Link when sending the traffic, that is, the traffic of the Device E cannot be switched to the new primary Link, which affects the Link switching performance of the Smart Link.
In the invention, when Device C finds that Smart Link master-slave links are switched (i.e. finds that network topology changes), MVRP messages (i.e. new messages based on MVRP protocol, which contain all VLAN information related to the Smart Link topology changes and the message types of these VLANs are new) are directly sent to each node in the network, and the new messages based on MVRP protocol are sent to Device a, Device B, Device D, and Device E, because Device a, Device B, Device D, and Device E can recognize the new messages based on MVRP protocol and specify in IEEE that "after receiving the new messages of MVRP, all forwarding entries in forwarding tables of VLAN (i.e. all VLAN information related to topology changes carried in the new messages) assigned on packet receiving ports need to be cleared", Device a, Device B, Device D, and Device E will delete their own forwarding entries based on the new messages, thereby switching the flow in the network to the new active link.
In conclusion, the method can solve the problem of networking limitation of the Smart Link technology; after the topology changes, other devices in the network (network devices supporting the Smart Link protocol or network devices not supporting the Smart Link protocol) can be notified in time to delete the forwarding table entry, and the service flow in the network can be recovered in time.
Based on the same inventive concept as the method described above, the present invention further provides a management device for forwarding table entries, which is applied to a network system including a network device supporting a specified topology protocol and a network device not supporting the specified topology protocol, where one of the network devices supporting the specified topology protocol is a control device of the network system, the control device is configured to control each network device in the network system to update its own forwarding table entry, and the management device is used as the control device, as shown in fig. 4, the control device includes:
a discovery module 11, configured to discover that a network topology changes;
a sending module 12, configured to send, when it is found that a network topology changes, a multiple virtual local area network registration protocol MVRP packet for clearing forwarding entries to the network device that does not support the specified topology protocol, and indicate the network device that does not support the specified topology protocol to clear its forwarding entries.
In the invention, the specified topology protocol comprises a rapid ring network protection protocol RRPP protocol or a flexible Link Smart Link protocol.
When the specified topology protocol is an RRPP protocol; the sending module 12 is specifically configured to send a forwarding database to refresh a Flush-FDB message to other network devices in the network devices supporting the specified topology protocol, and instruct the other network devices to clear forwarding entries of the other network devices by using the Flush-FDB message; and sending an MVRP message to the network equipment which does not support the specified topology protocol, and indicating the network equipment which does not support the specified topology protocol to clear the forwarding table entry of the network equipment by using the MVRP message.
When the specified topology protocol is a Smart Link protocol; the sending module 12 is specifically configured to send a refresh Flush message to other network devices in the network devices supporting the specified topology protocol, and instruct the other network devices to clear forwarding entries of the other network devices by using the Flush message; sending an MVRP message to the network equipment which does not support the specified topology protocol, and indicating the network equipment which does not support the specified topology protocol to clear forwarding table items of the network equipment by using the MVRP message; or,
and sending MVRP messages to other network equipment in the network equipment supporting the specified topology protocol and network equipment not supporting the specified topology protocol, and indicating the other network equipment and the network equipment not supporting the specified topology protocol to clear forwarding table entries of the network equipment by using the MVRP messages.
In the present invention, the MVRP packet for clearing forwarding table entry includes: new message based on MVRP protocol.
The modules of the device can be integrated into a whole or can be separately deployed. The modules can be combined into one module, and can also be further split into a plurality of sub-modules.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by hardware, or by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
Those skilled in the art will appreciate that the drawings are merely schematic representations of one preferred embodiment and that the blocks or flow diagrams in the drawings are not necessarily required to practice the present invention.
Those skilled in the art will appreciate that the modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, and may be correspondingly changed in one or more devices different from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
The above-mentioned serial numbers of the present invention are for description only and do not represent the merits of the embodiments.
The above disclosure is only for a few specific embodiments of the present invention, but the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.