CN108011755B - Network element management method and device - Google Patents

Network element management method and device Download PDF

Info

Publication number
CN108011755B
CN108011755B CN201711230008.7A CN201711230008A CN108011755B CN 108011755 B CN108011755 B CN 108011755B CN 201711230008 A CN201711230008 A CN 201711230008A CN 108011755 B CN108011755 B CN 108011755B
Authority
CN
China
Prior art keywords
network element
vlan
target
target table
mac
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
CN201711230008.7A
Other languages
Chinese (zh)
Other versions
CN108011755A (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.)
Raisecom Technology Co Ltd
Original Assignee
Raisecom Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Raisecom Technology Co Ltd filed Critical Raisecom Technology Co Ltd
Priority to CN201711230008.7A priority Critical patent/CN108011755B/en
Publication of CN108011755A publication Critical patent/CN108011755A/en
Application granted granted Critical
Publication of CN108011755B publication Critical patent/CN108011755B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Abstract

The invention discloses a method and a device for managing network elements, wherein by setting the method for managing the network elements, a target network element can determine a target table item for providing a second VLAN communicated with a source network element by adopting a preset dynamic learning rule according to a request message sent by the source network element, and the source network element can also determine a target table item for providing a first VLAN communicated with the target network element by adopting the dynamic learning rule according to a response message sent by the target network element, so that when the source network element is communicated with the target network element, the pointed communication can be realized according to the VLAN in the determined target table item, the problem of network blockage is avoided, and the communication efficiency between the network elements is improved; in addition, the method does not need manual intervention, so that the management cost can be greatly reduced.

Description

Network element management method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for network element management.
Background
In a packet Network, a Network manager manages different Network elements through different Virtual Local Area Networks (VLANs), and a single Network element generally needs to configure a plurality of VLANs in order to communicate with other Network elements and remote terminals; for example, VLAN-1 is used for communication between the network element A and the network element B, VLAN-2 is used for communication between the network element A and the remote end, and VLAN-3 is used for communication between the network element B and the remote end; therefore, in the network element a, VLAN-1 and VLAN-2 need to be configured, so the VLAN linked list of the network element a includes: VLAN-1 and VLAN-2; similarly, the VLAN chain table of network element B includes: VLAN-1 and VLAN-3.
However, before the network element a communicates with the network element B, it may not know which VLANs are included in the VLAN chain table of the other party, or may not know a network interface physical address (Media Access Control, MAC) of the other party or an Internet Protocol (IP) between networks, and thus it may not be determined whether the network element a and the network element B can communicate with each other; therefore, in general, a technician is required to go to a machine room, and communication between the network element a and the network element B can be realized through manual configuration. Because the method needs human intervention, the cost of network element management is greatly increased, and the communication efficiency between the network elements is reduced, which is not beneficial to the management of the network elements.
Based on this, how to efficiently implement communication between network elements without human intervention is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for network element management, so as to solve a problem in the prior art how to efficiently implement communication between network elements without human intervention.
The embodiment of the invention provides a network element management method, which is applied to a source network element and comprises the following steps:
sending a request message carrying the first VLAN, a Media Access Control (MAC) of the first VLAN, and an Internet Protocol (IP) of the network through all prestored first VLANs, so that a target network element receiving the request message sends a response message through a second VLAN;
receiving a response message which is sent by the target network element and carries the second VLAN, the MAC of the target network element and the IP of the target network element; wherein the second VLAN is: the destination network element determines a VLAN used for communicating with the source network element according to the first VLAN in the request message;
determining a target table item of a first VLAN used for providing communication with the target network element by adopting a preset dynamic learning rule according to the second VLAN carried in the received response message, the MAC of the target network element and the IP of the target network element, and storing the determined target table item into a preset target table item library; the target table entry includes: a first VLAN in communication with the destination network element, and a MAC of the destination network element and an IP of the destination network element.
In a possible implementation manner, in the foregoing method provided in an embodiment of the present invention, the determining, according to the second VLAN carried in the received response message, the MAC of the destination network element, and the IP of the destination network element, a target entry of a first VLAN used for providing communication with the destination network element by using a preset dynamic learning rule specifically includes:
determining whether a target table item containing the MAC of the target network element is found in the target table item library or not according to the MAC of the target network element carried in the received response message;
when determining that the target table entry containing the MAC of the target network element is not found in the target table entry library, adding the target table entry containing the MAC of the target network element;
and updating the searched target table entry according to the second VLAN carried in the received response message and the IP of the target network element when the target table entry containing the MAC of the target network element is found in the target table entry library.
In a possible implementation manner, in the method provided in an embodiment of the present invention, the updating the found target entry according to the second VLAN carried in the received response message and the IP of the destination network element specifically includes:
determining whether the IP in the searched target table item is the same as the IP of the target network element carried in the response message;
when the IP in the searched target table entry is determined to be different from the IP of the target network element carried in the response message, updating the IP in the searched target table entry into the IP of the target network element carried in the response message;
determining whether the first VLAN in the target table entry and the second VLAN carried in the response message are the same or not when the IP in the target table entry which is determined to be found is the same as the IP of the target network element carried in the response message;
when it is determined that the first VLAN found in the target table entry is different from the second VLAN carried in the response message, the first VLAN found in the target table entry is updated to the second VLAN carried in the response message.
In a possible implementation manner, in the foregoing method provided in an embodiment of the present invention, the method further includes:
when a first VLAN which is stored in advance and used for communicating with the target network element is changed, deleting a target table item which is stored in advance in the target table item library and contains the first VLAN before the change;
the sending of the request message carrying the first VLAN, the network interface physical address MAC of the request message and the internet protocol IP of the network of the request message by using all the prestored first VLANs specifically includes:
and sending a request message carrying the first VLAN, the MAC of the target network element and the IP of the target network element to the target network element according to the MAC of the target network element through the changed first VLAN and all unchanged first VLANs.
In a possible implementation manner, in the foregoing method provided by the embodiment of the present invention, after determining a target entry for providing a first VLAN in communication with the destination network element, and storing the determined target entry in a preset target entry library, the method further includes:
searching a target table item containing the MAC or IP of the target network element in an updated target table item library according to the MAC or IP of the target network element;
extracting a first VLAN in the searched target table item;
and adding the extracted first VLAN into a message to be sent, and sending the message to the target network element.
On the other hand, an embodiment of the present invention further provides a method for managing a network element, which is applied to a destination network element, and the method includes:
receiving a first Virtual Local Area Network (VLAN) carrying a source network element, a network interface physical address (MAC) of the source network element and a request message of an Internet Protocol (IP) between networks of the source network element, which are sent by the source network element;
when determining that a first VLAN of a source network element carried in a received request message is a second VLAN pre-stored by the source network element, determining a first target table item of the second VLAN used for providing communication with the source network element according to the first VLAN carried in the received request message, an MAC of the source network element and an IP of the source network element by adopting a pre-set dynamic learning rule, and storing the first target table item into a pre-set target table item library;
and sending a response message carrying the determined second VLAN communicated with the source network element and the MAC and IP of the source network element to the source network element, so that the source network element determines a second target table item of the first VLAN communicated with the source network element by adopting the dynamic learning rule according to the response message.
In a possible implementation manner, in the foregoing method provided in this embodiment of the present invention, the determining, according to the first VLAN carried in the received request message, the MAC of the source network element, and the IP of the source network element, a first target entry of a second VLAN used for providing communication with the source network element by using a preset dynamic learning rule specifically includes:
determining whether a first target table item containing the MAC of the source network element is found in the target table item library or not according to the MAC of the source network element carried in the received request message;
when determining that the first target table item containing the MAC of the source network element is not found in the target table item library, adding the first target table item containing the MAC of the source network element;
and updating the searched first target table entry according to the first VLAN carried in the received request message and the IP of the source network element when the first target table entry containing the MAC of the source network element is determined to be searched in the target table entry library.
In a possible implementation manner, in the method provided in an embodiment of the present invention, the updating the found first target entry according to the first VLAN carried in the received request message and the IP of the source network element specifically includes:
determining whether the IP in the searched first target table entry is the same as the IP of the source network element carried in the request message;
when the found IP in the first target table entry is determined to be different from the IP of the source network element carried in the request message, updating the found IP in the first target table entry to the IP of the source network element carried in the request message;
determining whether a second VLAN in the searched first target table entry is the same as the first VLAN carried in the request message or not when the IP in the searched first target table entry is determined to be the same as the IP of the source network element carried in the request message;
when it is determined that the second VLAN in the first target table entry found is different from the first VLAN carried in the request message, the second VLAN in the first target table entry found is updated to the first VLAN carried in the request message.
In a possible implementation manner, in the method provided in an embodiment of the present invention, the determining that the first VLAN of the source network element carried in the received request message is a second VLAN stored in advance includes:
determining whether the value of the first VLAN of the source network element carried in the received request message is the same as the value of a second VLAN stored in advance;
and when the value of the first VLAN of the source network element carried in the received request message is determined to be the same as the value of one of the second VLANs stored in advance, determining that the first VLAN of the source network element carried in the received request message is the second VLAN stored in advance.
In another aspect, an embodiment of the present invention further provides a source network element, including: a transmitting unit, a receiving unit and a processing unit; wherein the content of the first and second substances,
the sending unit is used for sending a request message carrying the first VLAN, the MAC of the sending unit and the IP of the sending unit through all prestored first VLANs so as to enable a target network element receiving the request message to send a response message through a second VLAN;
the receiving unit is configured to receive a response packet which is sent by the destination network element and carries the second VLAN, the MAC of the destination network element, and the IP of the destination network element; wherein the second VLAN is: the destination network element determines a VLAN used for communicating with the source network element according to the first VLAN in the request message;
the processing unit is configured to determine, according to the second VLAN carried in the received response message, the MAC of the destination network element, and the IP of the destination network element, a target entry of a first VLAN used for providing communication with the destination network element by using a preset dynamic learning rule, and store the determined target entry in a preset target entry library; the target table entry includes: a first VLAN in communication with the destination network element, and a MAC of the destination network element and an IP of the destination network element.
In a possible implementation manner, in the source network element provided in the embodiment of the present invention, the processing unit is specifically configured to determine, according to the MAC of the destination network element carried in the received response message, whether a target entry containing the MAC of the destination network element is found in the target entry library; when determining that the target table entry containing the MAC of the target network element is not found in the target table entry library, adding the target table entry containing the MAC of the target network element; and updating the searched target table entry according to the second VLAN carried in the received response message and the IP of the target network element when the target table entry containing the MAC of the target network element is found in the target table entry library.
In a possible implementation manner, in the source network element provided in the embodiment of the present invention, the processing unit is specifically configured to determine whether an IP in the searched target entry is the same as an IP of the destination network element carried in the response packet; when the IP in the searched target table entry is determined to be different from the IP of the target network element carried in the response message, updating the IP in the searched target table entry into the IP of the target network element carried in the response message; determining whether the first VLAN in the target table entry and the second VLAN carried in the response message are the same or not when the IP in the target table entry which is determined to be found is the same as the IP of the target network element carried in the response message; when the first VLAN in the target table entry found is determined to be different from the second VLAN carried in the response message, the first VLAN in the target table entry found is updated to the second VLAN carried in the response message.
In a possible implementation manner, in the source network element provided in the embodiment of the present invention, the method further includes: a deletion unit;
the deleting unit is configured to delete a target entry that is pre-stored in the target entry library and includes a first VLAN before change when the first VLAN used for communicating with the target network element, which is pre-stored, is changed;
the sending unit is specifically configured to send, according to the MAC of the destination network element, a request packet carrying the first VLAN, the MAC of the destination network element and the IP of the destination network element, through the changed first VLAN and all unchanged first VLANs.
In a possible implementation manner, in the source network element provided in the embodiment of the present invention, the method further includes: a target table item determining unit and an extracting unit; wherein the content of the first and second substances,
the target table item determining unit is configured to search a target table item including the MAC or IP of the target network element in an updated target table item library according to the MAC or IP of the target network element;
the extracting unit is used for extracting the first VLAN in the searched target table item;
the sending unit is further configured to add the extracted first VLAN to a message to be sent, and send the message to the destination network element.
In another aspect, an embodiment of the present invention further provides a destination network element, including: a receiving unit, a processing unit and a transmitting unit; wherein the content of the first and second substances,
the receiving unit is configured to receive a request packet, which is sent by a source network element and carries a first virtual local area network VLAN of the source network element, a network interface physical address MAC of the source network element, and an internet protocol IP between networks of the source network element;
the processing unit is configured to, when it is determined that a first VLAN of the source network element, which is carried in the received request message, is a second VLAN pre-stored by the processing unit, determine, according to the first VLAN carried in the received request message, the MAC of the source network element, and the IP of the source network element, a first target entry of the second VLAN, which is used for providing communication with the source network element, by using a preset dynamic learning rule, and store the first target entry into a preset target entry library;
the sending unit is configured to send a response packet carrying the determined second VLAN in communication with the source network element and the MAC and IP of the source network element to the source network element, so that the source network element determines, according to the response packet and by using the dynamic learning rule, a second target entry of the first VLAN in communication with the source network element.
In a possible implementation manner, in the destination network element provided in the embodiment of the present invention, the processing unit is specifically configured to determine, according to the MAC of the source network element carried in the received request message, whether a first target entry including the MAC of the source network element is found in the target entry library; when determining that the first target table item containing the MAC of the source network element is not found in the target table item library, adding the first target table item containing the MAC of the source network element; and updating the searched first target table item according to the received first VLAN carried in the request message and the IP of the source network element when the first target table item containing the MAC of the source network element is found in the target table item library.
In a possible implementation manner, in the destination network element provided in the embodiment of the present invention, the processing unit is specifically configured to determine whether the IP in the searched first target entry is the same as the IP of the source network element carried in the request packet; when the found IP in the first target table entry is determined to be different from the IP of the source network element carried in the request message, updating the found IP in the first target table entry to the IP of the source network element carried in the request message; determining whether a second VLAN in the searched first target table entry is the same as the first VLAN carried in the request message or not when the IP in the searched first target table entry is determined to be the same as the IP of the source network element carried in the request message; when it is determined that the second VLAN in the first target table entry found is different from the first VLAN carried in the request message, the second VLAN in the first target table entry found is updated to the first VLAN carried in the request message.
In a possible implementation manner, in the destination network element provided in the embodiment of the present invention, the processing unit is specifically configured to determine whether a value of a first VLAN of the source network element carried in the received request message is the same as a value of a second VLAN stored in advance; and when the value of the first VLAN of the source network element carried in the received request message is determined to be the same as the value of one of the second VLANs stored in advance, determining that the first VLAN of the source network element carried in the received request message is the second VLAN stored in advance.
The invention has the following beneficial effects:
according to the method and the device for managing the network elements, provided by the embodiment of the invention, through setting the method for managing the network elements, the target network element can determine the target table entry of the second VLAN used for providing communication with the source network element according to the request message sent by the source network element by adopting a preset dynamic learning rule, and the source network element can also determine the target table entry of the first VLAN used for providing communication with the target network element according to the response message sent by the target network element by adopting the dynamic learning rule, so that when the source network element communicates with the target network element, the pointed communication can be realized according to the VLAN in the determined target table entry, the problem of network blockage is avoided, and the communication efficiency between the network elements is improved; in addition, the method does not need manual intervention, so that the management cost can be greatly reduced.
Drawings
Fig. 1 is a flowchart of a method for network element management according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method according to a first embodiment of the present invention;
fig. 3 is a second flowchart of a method for managing network elements according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a source network element provided in an embodiment of the present invention;
fig. 5 is a second schematic structural diagram of a source network element according to an embodiment of the present invention;
fig. 6 is a third flowchart of a method for network element management according to an embodiment of the present invention;
FIG. 7 is a flowchart of a method according to a second embodiment of the present invention;
fig. 8 is an interaction flowchart of a second embodiment according to the present invention;
FIG. 9 is a flowchart of a method according to a third embodiment of the present invention;
fig. 10 is an interaction flowchart of a third embodiment provided by the present invention;
fig. 11 is a schematic structural diagram of a destination network element provided in an embodiment of the present invention.
Detailed Description
The following describes in detail a specific implementation of a method and an apparatus for network element management according to an embodiment of the present invention with reference to the accompanying drawings. It should be noted that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The inventor finds in research that a plurality of VLANs are stored in a VLAN chain table inside each network element, and when a source network element sends a message without knowing the MAC and IP of a destination network element, the source network element sends messages of equal number according to the number of internally stored VLANs, and the destination network element also sends response messages according to the number of received messages and the number of internally stored VLANs, so that the number of response messages received by the source network element increases dramatically, a Central Processing Unit (CPU) and memory resources of the source network element are heavily occupied, which causes the network element to be disconnected, and a communication network between network elements is congested, thereby possibly causing a problem of packet loss.
For example, a represents a source network element, B represents a destination network element, the number of VLANs stored in the source network element is N, the number of VLANs stored in the destination network element is M, and M is greater than N; when the network element A does not know the MAC and IP of the network element B, the messages are copied by N and are all sent out (wherein, VLANs carried among the N messages are different, and other carried contents are the same); when the network element B responds to the N messages, each message is changed into M messages (similarly, the M messages are different from each other only by the VLAN), so that the number of the response messages sent by the network element B is N × M, and the network element B is out of control because the number of the response messages sent is large, the memory of the network element B is seriously occupied; when the network element A receives the response message, the VLAN message in the non-VLAN linked list is discarded, so that the number of the response messages actually received by the network element A is N2Therefore, the packet receiving cache of the network element A is obviously insufficient, and the network element A is out of control. In addition, after the copy of the network element A and the network element B, the number of the messages in the network is changed into NxM, so that the network transmission is congested.
Therefore, an embodiment of the present invention provides a method for managing a network element, so as to solve the problems of network element disconnection and communication network congestion.
Specifically, the method for managing the network element provided in the embodiment of the present invention, on a source network element side, as shown in fig. 1, may include:
s101, sending a request message carrying the first VLAN, the MAC of the first VLAN and the IP of the first VLAN through all prestored first VLANs so that a target network element receiving the request message sends a response message through a second VLAN;
s102, receiving a response message which is sent by a target network element and carries a second VLAN, an MAC of the target network element and an IP of the target network element;
wherein, the second VLAN is: and the destination network element determines the VLAN used for communicating with the source network element according to the first VLAN in the request message.
S103, determining a target table item of the first VLAN for providing communication with the target network element by adopting a preset dynamic learning rule according to the second VLAN carried in the received response message, the MAC of the target network element and the IP of the target network element, and storing the determined target table item into a preset target table item library; the target table entry includes: a first VLAN in communication with the destination network element, and a MAC of the destination network element and an IP of the destination network element.
In the method provided by the embodiment of the present invention, by setting the method for managing the network element, the target entry of the first VLAN used for providing communication with the target network element can be determined by using the dynamic learning rule according to the response message sent by the target network element, so that when the source network element communicates with the target network element, the targeted communication can be realized according to the first VLAN in the determined target entry, thereby avoiding the problem of network congestion and improving the efficiency of network element communication; in addition, the method does not need manual intervention, so that the management cost can be greatly reduced.
It should be noted that, regardless of the source network element or the destination network element, after receiving the message, the VLAN carried in the received message is determined, that is, whether the VLAN carried in the message is the same as the VLAN stored in advance is determined, and if the VLAN carried in the message is not the same as the VLAN, it is determined that the two network elements cannot communicate with each other through the VLAN, so the message is discarded; and if the target table entries are the same, determining the target table entries by adopting a dynamic learning rule. Moreover, because different VLANs have different corresponding values, whether the two VLANs are the same can be determined by comparing whether the value of the VLAN carried in the message is the same as the value of the VLAN stored in advance.
The first VLAN stored at one side of the source network element is at least partially identical to the second VLAN stored at one side of the destination network element; at this time, after the source network element sends the request message through all the first VLANs, the destination network element can judge according to the first VLANs carried in the request message, and when the first VLAN carried in the request message is the same as a certain second VLAN in the VLAN chain table for storing the second VLAN, the destination network element sends a response message through the second VLAN (which is the same as the first VLAN carried in the request message); for the source network element, because the response message is sent by the target network element after receiving the request message, the source network element must have the second VLAN carried in the response message, so the source network element does not need to judge whether the second VLAN carried in the response message exists in the VLAN chain table for storing the first VLAN, and can directly adopt the dynamic learning rule to determine the target table entry.
In addition, the IP of different network elements may be the same or different, but the MAC of different network elements is definitely different, so that the MAC can be used to distinguish different network elements; therefore, for the source network element, when the MAC of the destination network element is known, the request message can be directly sent to the destination network element according to the MAC of the destination network element, so that the destination network element sends a response message after dynamically learning the target table entry; the source network element determines a target table item of a first VLAN for providing communication with a target network element by utilizing a dynamic learning rule according to the received response message; therefore, when the MAC of the destination network element is known, the request packet sent belongs to a unicast packet.
In specific implementation, if the source network element and the destination network element know the VLANs used for communication with each other, but one end of the source network element modifies the first VLAN in the VLAN chain table, the source network element and the destination network element cannot normally communicate with each other; therefore, in the foregoing method provided in an embodiment of the present invention, the method may further include: when a first VLAN which is stored in advance and used for communicating with a target network element is changed, a target table entry which is stored in advance in a target table entry library and contains the first VLAN before the change is deleted; by deleting the target table entry comprising the first VLAN before modification, the target table entry can be re-determined according to the modified first VLAN, so that the interference and the influence of the target table entry comprising the first VLAN before modification on the subsequent process are avoided. However, although the source network element modifies the first VLAN, it still knows the MAC of the destination network element, so in this embodiment of the present invention, through the modified first VLAN and all the unmodified first VLANs, according to the MAC of the destination network element, a request message carrying the first VLAN, its own MAC, and its own IP is sent to the destination network element, so that the destination network element and itself re-determine the target entry of the first VLAN for providing communication through the dynamic learning rule, respectively.
It should be noted that, if the message is sent only through the modified first VLAN, the message may be discarded if the modified first VLAN is not stored in the VLAN chain table on the destination network element side, so that the destination network element cannot learn the modified first VLAN, and further communication errors between network elements are caused; if the first VLAN is modified on the source network element side, the request message is sent through the modified first VLAN and the first VLAN which is not changed completely when the request message is sent, so that the modified first VLAN can be learned on the destination network element side, and normal communication between the network elements can be guaranteed.
However, for the source network element, sometimes the MAC of the destination network element is not known, but the IP of the destination network element is known (because different network elements may have the same IP), or although the MAC and IP of the destination network element are known, the MAC and IP are not specified when the message is sent, so that such a request message belongs to a broadcast message, so that when the request message is sent, a plurality of request messages are sent out only through the first VLAN stored in the internal VLAN linked list, a response message sent by the destination network element is waited to be received, and a target table entry for providing the first VLAN for communication with the destination network element is determined through information carried in the response message.
In specific implementation, in order to enable communication with a destination network element and determine a target entry, in step S103 of the method provided in the embodiment of the present invention, according to a second VLAN carried in a received response message, an MAC of the destination network element and an IP of the destination network element, a preset dynamic learning rule is adopted to determine the target entry of a first VLAN used for providing communication with the destination network element, which may specifically include:
determining whether a target table item containing the MAC of the target network element is found in a target table item base or not according to the MAC of the target network element carried in the received response message;
when determining that the target table entry containing the MAC of the destination network element is not found in the target table entry library, adding the target table entry containing the MAC of the destination network element;
and when the target table entry containing the MAC of the destination network element is found in the target table entry library, updating the found target table entry according to the second VLAN carried in the received response message and the IP of the destination network element.
Specifically, in the foregoing method provided in the embodiment of the present invention, the target entry may include: a first VLAN in communication with a destination network element, and a MAC of the destination network element and an IP of the destination network element, as shown in table 1; the VLAN is a first VLAN prestored by a source network element, the destination MAC is the MAC of a destination network element, and the destination IP is the IP of the destination network element; it should be noted that both the MAC and the IP in the target table entry are the MAC and the IP of the opposite network element, that is, the MAC of the target network element and the IP of the target network element are at the source network element side; the MAC and IP of the source network element are arranged on one side of the target network element; and the VLAN is a VLAN that can implement communication between the source network element and the destination network element.
TABLE 1
Destination MAC VLAN Destination IP
Regardless of the source network element or the destination network element, since the corresponding MAC is unique, the corresponding target entry can be found according to the MAC of the destination network element, and certainly, the corresponding target entry can also be found through the IP of the destination network element, and then the first VLAN capable of communicating with the destination network element can be determined through the target entry, so as to facilitate the communication with the destination network element, and effectively improve the communication efficiency.
Specifically, in the target table entry library, if the target table entry including the MAC of the destination network element cannot be found according to the MAC of the destination network element, it is described that the corresponding target table entry has not been determined by the dynamic learning rule before, that is, the related message sent by the destination network element has not been received, or the first VLAN in the internal VLAN chain table is modified and deleted; therefore, a target table entry including the MAC of the target network element needs to be added, and as shown in table 1, in the added target table entry, the target IP is the IP of the target network element, and the VLAN is the second VLAN carried in the received response message, so as to implement subsequent communication with the target network element. It should be noted that, as can be seen from the foregoing, the source network element must have the second VLAN carried in the response packet, so that the second VLAN included in the added target entry is the same as a certain first VLAN stored in the VLAN linked list of the source network element in advance, and therefore, the added target entry is the target entry for providing the first VLAN used for communicating with the destination network element.
Specifically, in the target table entry library, if a target table entry containing the MAC of the target network element is found, the found target table entry needs to be updated according to the second VLAN and the IP of the target network element; therefore, in the method provided in the embodiment of the present invention, updating the found target entry according to the second VLAN carried in the received response message and the IP of the destination network element may specifically include:
determining whether the IP in the searched target table item is the same as the IP of the target network element carried in the response message;
when the IP in the searched target table entry is determined to be different from the IP of the target network element carried in the response message, updating the IP in the searched target table entry into the IP of the target network element carried in the response message;
determining whether the first VLAN in the searched target table entry is the same as the second VLAN in the response message or not when the IP in the searched target table entry is determined to be the same as the IP of the target network element carried in the response message;
and when the first VLAN in the searched target table entry is determined to be different from the second VLAN carried in the response message, updating the first VLAN in the searched target table entry into the second VLAN carried in the response message.
It should be noted that, in the embodiment of the present invention, between a source network element and a destination network element, there may be multiple VLANs that can be used for communication, each VLAN has a different value, for example, 1, 5, 10, 25, 30, and the like, and the value of the VLAN is between 1 and 4094; for the source network element, if the sent request message is a broadcast message, and the messages are sent through the first VLAN, the messages are generally sent sequentially according to the sequence of the value of the first VLAN from small to large, and the time interval between two adjacent request messages is generally in the microsecond level, so the request messages can be considered to be sent simultaneously. However, for the destination network element, if the next request message is already received when the previous response message has not been sent, the destination network element does not send the previous response message, but sends the response message of the next request message.
For example, if the source network element stores three first VLANs, i.e., V1, V2, and V3, and V1 has a value of 1, V2 has a value of 5, and V3 has a value of 10, the destination network element also stores three second VLANs, i.e., V4, V5, and V6, and V4 has a value of 2, V5 has a value of 5, and V6 has a value of 10; when the source network element sequentially sends request messages through V1, V2 and V3, the target network element discards the request messages sent through V1 and processes the request messages sent through V2 and V3; if the destination network element has received the request message sent by the V3 when the action of sending the response message by the V2 has not started, the response message about the V2 is not sent at this time, but the response message about the V3 is sent after the request message about the V3 is processed, so as to reduce the number of messages in the communication network and effectively avoid network congestion. Of course, the request message of V3 is received after the destination network element has sent the response message through V2, and the response message related to V2 is not affected at this time.
In addition, for the source network element, when a response message is received through a second VLAN, a corresponding target table entry is determined through a dynamic learning rule; however, in the present invention, it is first determined whether the IP in the searched target entry is the same as the IP of the target network element carried in the response packet, that is, on the basis of the same MAC, it is continuously determined whether the IP is the same, so that it can be fully determined whether the MAC and the IP included in the searched target entry belong to the target network element that sends the response packet; then, when determining that the MAC and the IP contained in the searched target entry belong to the target network element that sends the response message, determining whether the first VLAN in the searched target entry is the same as the second VLAN carried in the response message, since there may be a plurality of VLANs that can communicate between the source network element and the target network element, the first VLAN in the searched target entry may be different from the second VLAN carried in the response message, at this time, updating the first VLAN in the searched target entry to the second VLAN carried in the response message, that is, updating the searched target entry, and covering the searched target entry, and using the last updated target entry for communication between the source network element and the target network element, which not only can improve the accuracy of communication, but also can reduce the memory usage inside the network element.
It should be further noted that, since the source network element sends the request message in the order from small to large according to the value of the first VLAN, and also receives the response message in the order from small to large, when the target table entry is determined by the dynamic learning rule, the value of the first VLAN in the finally generated target table entry is the greatest common divisor of the values of the VLANs in the VLANs between the source network element and the target network element; for example, the values of three first VLANs stored in the source network element are 1, 5, and 10, respectively, and the values of three second VLANs stored in the destination network element are 2, 5, and 10, respectively, then at one end of the source network element, the value of the first VLAN in the target entry determined through the dynamic learning rule is 10, and 10 is the greatest common divisor of the values of the VLANs in the source network element and the destination network element.
The following describes, with reference to a specific embodiment, a process of determining a target entry by using a dynamic learning rule in the foregoing method according to an embodiment of the present invention.
The first embodiment is as follows: taking the example that the source network element receives the response message sent by the destination network element, the method flowchart shown in fig. 2 is combined.
S201, determining whether a target table item containing the MAC of the target network element is found in a target table item library or not according to the MAC of the target network element carried in the received response message; if not, executing step S202; if yes, go to step S203;
s202, adding a target table item containing the MAC of the target network element; step S207 is executed;
s203, determining whether the IP in the searched target table entry is the same as the IP of the target network element carried in the response message; if not, executing step S204; if yes, go to step S205;
s204, updating the IP in the searched target table entry into the IP of the target network element carried in the response message; step S207 is executed;
s205, determining whether the first VLAN in the searched target table entry is the same as the second VLAN carried in the response message; if not, go to step S206; if yes, ending the process;
s206, updating the first VLAN in the searched target table entry into a second VLAN carried in the response message;
and S207, storing the added or updated target table entry into a target table entry library.
In specific implementation, after determining the VLAN capable of performing communication between the source network element and the destination network element, the communication between the network elements can be realized according to the determined target table entry; therefore, after step S103 in the above method provided by the embodiment of the present invention determines a target entry of a first VLAN used for providing communication with a destination network element, and stores the determined target entry in a preset target entry library, as shown in fig. 3, the method may further include:
s301, searching a target table item containing the MAC or IP of the destination network element in the updated target table item library according to the MAC or IP of the destination network element;
s302, extracting a first VLAN in the searched target table entry;
s303, adding the extracted first VLAN into the message to be sent, and sending the message to a target network element.
After the first VLAN target table item for providing communication with the target network element is determined through the dynamic learning rule, the corresponding target table item can be found according to the MAC or IP of the target network element, and then the communication with the target network element is realized according to the first VLAN in the target table item; therefore, a large number of messages can be effectively prevented from being sent when the VLAN for communication is not known between the network elements, and further, the occupation of CPU and memory resources in the network elements is avoided, so that the offline of the network elements is avoided; in addition, network congestion can be effectively avoided, and the communication speed and efficiency are improved.
It should be further noted that the request message and the message mentioned in the embodiment of the present invention belong to the ethernet message, and the format thereof can be shown in table 2; the target MAC is the MAC of a target network element, the source MAC is the MAC of a source network element, the source MAC is bound when an Ethernet interface drive is loaded, the target IP is the IP of the target network element, the source IP is the IP of the source network element, namely the Ethernet interface IP of the source network element, the Ethernet type is determined by the sent content and module, and the message payload is also determined by the sent content and module; in the specific implementation, except for the VLAN, other contents are added by the ethernet protocol stack, and the VLAN is added by the next layer of the ethernet protocol stack.
TABLE 2
Figure BDA0001488025890000181
Based on the same inventive concept, embodiments of the present invention further provide a source network element, and since a working principle of the source network element is similar to that of the foregoing network element management method on the source network element side, reference may be made to the above embodiments of the network element management method for the specific implementation of the source network element, and repeated details are not described again.
Specifically, as shown in fig. 4, the source network element provided in the embodiment of the present invention may include: a transmitting unit 401, a receiving unit 402, and a processing unit 403; wherein the content of the first and second substances,
a sending unit 401, configured to send, through all pre-stored first VLANs, a request packet carrying the first VLAN, a network interface physical address MAC of the first VLAN, and an interconnection protocol IP between networks of the first VLAN, so that a destination network element that receives the request packet sends a response packet through a second VLAN;
a receiving unit 402, configured to receive a response packet sent by a destination network element and carrying a second VLAN, an MAC of the destination network element, and an IP of the destination network element; wherein the second VLAN is: the destination network element determines a VLAN used for communicating with the source network element according to the first VLAN in the request message;
a processing unit 403, configured to determine, according to the second VLAN carried in the received response message, the MAC of the destination network element, and the IP of the destination network element, a target entry of the first VLAN used for providing communication with the destination network element by using a preset dynamic learning rule, and store the determined target entry in a preset target entry library; the target table entry includes: a first VLAN in communication with the destination network element, and a MAC of the destination network element and an IP of the destination network element.
In specific implementation, in the source network element provided in the embodiment of the present invention, the processing unit 403 is specifically configured to determine whether a target entry including the MAC of the target network element is found in the target entry library according to the MAC of the target network element carried in the received response message; when determining that the target table entry containing the MAC of the destination network element is not found in the target table entry library, adding the target table entry containing the MAC of the destination network element; and when the target table entry containing the MAC of the destination network element is found in the target table entry library, updating the found target table entry according to the second VLAN carried in the received response message and the IP of the destination network element.
Specifically, in the source network element provided in the embodiment of the present invention, the processing unit 403 is specifically configured to determine whether the IP in the searched target entry is the same as the IP of the target network element carried in the response packet; when the IP in the searched target table entry is determined to be different from the IP of the target network element carried in the response message, updating the IP in the searched target table entry into the IP of the target network element carried in the response message; determining whether the first VLAN in the searched target table entry is the same as the second VLAN in the response message or not when the IP in the searched target table entry is determined to be the same as the IP of the target network element carried in the response message; and when the first VLAN in the searched target table entry is determined to be different from the first VLAN carried in the response message, updating the first VLAN in the searched target table entry into the second VLAN carried in the response message.
In specific implementation, as shown in fig. 5, in the source network element provided in the embodiment of the present invention, the method may further include: a deletion unit 404;
a deleting unit 404, configured to delete a target entry that is prestored in the target entry library and includes a first VLAN before change when the first VLAN used for communicating with the target network element, which is prestored, is changed;
the sending unit 401 is specifically configured to send, according to the MAC of the destination network element, a request packet carrying the first VLAN, the MAC of the destination network element and the IP of the destination network element, through the first VLAN in which all the changed first VLANs are unchanged.
In specific implementation, as shown in fig. 5, in the source network element provided in the embodiment of the present invention, the method may further include: a target table entry determination unit 405 and an extraction unit 406; wherein the content of the first and second substances,
a target table item determining unit 405, configured to search, according to the MAC or IP of the target network element, a target table item including the MAC or IP of the target network element in the updated target table item library;
an extracting unit 406, configured to extract the first VLAN in the found target entry;
the sending unit 401 is further configured to add the extracted first VLAN to a message that needs to be sent, and send the message to a destination network element.
Based on the same inventive concept, an embodiment of the present invention further provides a method for managing a network element, where, on a destination network element side, as shown in fig. 6, the method may include:
s601, receiving a request message which is sent by a source network element and carries a first VLAN of the source network element, an MAC of the source network element and an IP of the source network element;
s602, determining whether a first VLAN of a source network element carried in a received request message is a second VLAN prestored by the user; if not, executing step S603; if yes, go to step S604;
s603, discarding the received request message; ending the flow;
s604, determining a first target table item of a second VLAN used for providing communication with the source network element according to a first VLAN carried in the received request message, the MAC of the source network element and the IP of the source network element by adopting a preset dynamic learning rule, and storing the first target table item into a preset target table item library;
s605, sending a response message carrying the determined second VLAN communicated with the source network element and the MAC and IP of the source network element to the source network element, so that the source network element determines a second target table entry of the first VLAN communicated with the source network element by adopting a dynamic learning rule according to the response message.
According to the method provided by the embodiment of the invention, for the target network element, when the request message sent by the source network element is received and the first VLAN of the source network element carried in the received request message is determined to be the same as the second VLAN prestored by the target network element, the first target table item is dynamically learned and determined according to the information carried in the request message, so that when the source network element communicates with the target network element, the targeted communication can be realized according to the determined second VLAN in the first target table item, the problem of network blockage is avoided, and the efficiency of network element communication is improved; in addition, the method does not need manual intervention, so that the management cost can be greatly reduced.
In specific implementation, step S604 in the method provided in the embodiment of the present invention determines, according to the first VLAN carried in the received request message, the MAC of the source network element, and the IP of the source network element, a first target entry of a second VLAN used for providing communication with the source network element by using a preset dynamic learning rule, which may specifically include:
determining whether a first target table item containing the MAC of the active network element is found in a target table item base or not according to the MAC of the source network element carried in the received request message;
when determining that the first target table item of the MAC containing the active network element is not found in the target table item library, adding the first target table item of the MAC containing the active network element;
and when the first target table item containing the MAC of the active network element is found in the target table item library, updating the found first target table item according to the first VLAN carried in the received request message and the IP of the source network element.
Specifically, if the corresponding first target entry is not found according to the MAC of the source network element carried in the request message, it is shown that the first target entry is not determined by the dynamic learning rule before, so that the corresponding first target entry needs to be added to facilitate the subsequent communication with the source network element; if the corresponding first target table entry is found according to the MAC of the source network element carried in the request message, it is described that the first target table entry is determined by the dynamic learning rule before, so that it is also necessary to determine whether the information included in the first target table entry meets the communication requirement at the present stage, so as to avoid an error.
Specifically, in the method provided in the embodiment of the present invention, updating the found first target entry according to the first VLAN carried in the received request message and the IP of the source network element may specifically include:
determining whether the IP in the searched first target table item is the same as the IP of the source network element carried in the request message;
when the IP in the searched first target table item is determined to be different from the IP of the source network element carried in the request message, updating the IP in the searched first target table item into the IP of the source network element carried in the request message;
when determining that the IP in the searched first target table entry is the same as the IP of the source network element carried in the request message, determining whether a second VLAN in the searched first target table entry is the same as a first VLAN carried in the request message;
and when the second VLAN in the searched first target table entry is determined to be different from the first VLAN carried in the request message, updating the second VLAN in the searched first target table entry into the first VLAN carried in the request message.
It should be noted that, at the destination network element side, a method for determining the first target table entry by using a dynamic learning rule according to the received request message is similar to that in the method shown in fig. 2, and the working principle is the same, which may specifically refer to the method shown in fig. 2, and repeated parts are not described again.
In addition, on the destination network element side, since the same dynamic learning rule as that on the source network element side is adopted, the finally determined value of the second VLAN in the first target entry is also the greatest common divisor of the values of the VLANs in the source network element and the destination network element, which can be specifically referred to above, and repeated details are omitted.
In specific implementation, when step S603 in the above method provided in the embodiment of the present invention determines whether the first VLAN of the source network element carried in the received request message is the second VLAN stored in advance, the first VLAN value of the source network element carried in the received request message may be determined to be the same as one of the second VLAN values stored in advance by comparing whether the first VLAN value carried in the request message is the same as a second VLAN value stored in advance, determining that the first VLAN of the source network element carried in the received request message is the same as a second VLAN prestored by the source network element, if the value of the first VLAN of the source network element carried in the received request message is determined to be different from the value of any second VLAN prestored by the source network element, determining that a first VLAN of a source network element carried in the received request message is different from a second VLAN prestored by the source network element; the method can simply and quickly determine whether the two are the same, thereby quickly determining which request messages need to be discarded and which request messages need to be responded, and being beneficial to improving the communication efficiency between network elements.
Of course, when it is determined that the first VLAN of the source network element carried in the received request message is not the second VLAN stored in advance, the request message is discarded, so as to simplify the processing procedure and reduce power consumption.
In specific implementation, after a first target table entry for providing a second VLAN for communicating with a source network element is determined, since the first target table entry for providing the second VLAN for communicating with the source network element is stored in the target table entry library of the target network element, after the source network element also stores a corresponding target table entry, a message can be accurately sent out by extracting the VLAN in the target table entry; at the same time, the message can be accurately received at one end of the target network element, so that the data transmission is realized, and the communication process is completed; therefore, after step S603 in the above method provided by the embodiment of the present invention, the method may further include: and receiving a message sent by the source network element.
The above method provided by the embodiment of the present invention will be described in detail with reference to the specific embodiments.
Example two: taking an example that one end of a source network element modifies a first VLAN in a VLAN chain table, the source network element determines a second target entry, and a destination network element determines a first target entry, where a represents the source network element, B represents the destination network element, and at one end of the source network element, V1 represents the first VLAN before modification, and V2 represents the first VLAN after modification, the method provided by the embodiment of the present invention is described with reference to the flowchart of the method shown in fig. 7 and the flowchart of interaction shown in fig. 8.
S701, the network element A modifies V1 into V2;
s702, the network element A deletes a second target table entry which is stored in the target table entry library and contains V1;
s703, the network element A sends a request message carrying the MAC of the V2 and the network element A and the IP of the network element A to the network element B according to the deleted MAC in the second target table entry;
s704, the network element B receives a request message carrying the MAC of the network element V2 and the network element A and the IP of the network element A;
s705, the network element B determines whether the V2 carried in the received request message is the same as the VLAN stored in the VLAN linked list; if not, executing step S706; if yes, go to step S707;
s706, the network element B discards the request message;
s707, the network element B determines a first target table item through a dynamic learning rule according to the V2 carried in the received request message, the MAC of the network element A and the IP of the network element A, and stores the first target table item into a target table item library;
s708, the network element B sends a response message carrying the MAC of the network element V2 and the network element B and the IP of the network element B to the network element A;
s709, the network element A receives a response message carrying the MAC of the network element V2 and the network element B and the IP of the network element B;
and S710, the network element A determines a second target table entry according to the V2 carried in the received response message, the MAC of the network element B and the IP of the network element B through a dynamic learning rule and stores the second target table entry into a target table entry library.
Example three: taking the source network element sending a message to the destination network element through V2 as an example, where a denotes the source network element and B denotes the destination network element, the method provided by the embodiment of the present invention is described with reference to the flowchart of the method shown in fig. 9 and the flowchart of the interaction shown in fig. 10.
S901, the network element A searches a second target table item containing the MAC or IP of the network element B in a target table item base according to the MAC or IP of the network element B;
s902, the network element A extracts V2 in the searched second target table entry;
s903, the network element A adds the extracted V2 to a message to be sent;
s904, the network element A sends the message to the network element B;
and S905, the network element B receives the message.
Based on the same inventive concept, an embodiment of the present invention further provides a destination network element, and since a working principle of the destination network element is similar to that of the foregoing method for managing a network element on the destination network element side, for a specific implementation manner of the destination network element, reference may be made to the above method embodiment, and repeated details are omitted.
Specifically, as shown in fig. 11, the above-mentioned target network element provided in the embodiment of the present invention may include: a receiving unit 1101, a processing unit 1102, and a transmitting unit 1103; wherein the content of the first and second substances,
a receiving unit 1101, configured to receive a request packet, which is sent by a source network element and carries a first VLAN of the source network element, a network interface physical address MAC of the source network element, and an internet protocol IP between networks of the source network element;
a processing unit 1102, configured to, when it is determined that a first VLAN of a source network element carried in a received request message is a second VLAN pre-stored by itself, determine, according to the first VLAN carried in the received request message, an MAC of the source network element, and an IP of the source network element, a first target entry of the second VLAN used for providing communication with the source network element by using a preset dynamic learning rule, and store the first target entry into a preset target entry library;
a sending unit 1103, configured to send a response packet carrying the determined second VLAN in communication with the source network element and the MAC and IP of the source network element to the source network element, so that the source network element determines, according to the response packet, a second target entry for providing the first VLAN in communication with the source network element by using a dynamic learning rule.
In specific implementation, in the above-mentioned destination network element provided in the embodiment of the present invention, the processing unit 1102 is specifically configured to determine, according to the MAC of the source network element carried in the received request message, whether a first target entry including the MAC of the source network element is found in the target entry library; when determining that the first target table item of the MAC containing the active network element is not found in the target table item library, adding the first target table item of the MAC containing the active network element; and when the first target table item containing the MAC of the active network element is found in the target table item library, updating the found first target table item according to the first VLAN carried in the received request message and the IP of the source network element.
Specifically, in the destination network element provided in the embodiment of the present invention, the processing unit 1102 is specifically configured to determine whether the IP in the searched first target entry is the same as the IP of the source network element carried in the request packet; when the IP in the searched first target table item is determined to be different from the IP of the source network element carried in the request message, updating the IP in the searched first target table item into the IP of the source network element carried in the request message; when determining that the IP in the searched first target table entry is the same as the IP of the source network element carried in the request message, determining whether a second VLAN in the searched first target table entry is the same as a first VLAN carried in the request message; and when the second VLAN in the searched first target table entry is determined to be different from the first VLAN carried in the request message, updating the second VLAN in the searched first target table entry into the first VLAN carried in the request message.
Specifically, in the destination network element provided in the embodiment of the present invention, the processing unit 1102 is specifically configured to determine whether a value of a first VLAN of the source network element carried in the received request message is the same as a value of a second VLAN stored in advance by itself; and when the value of the first VLAN of the source network element carried in the received request message is determined to be the same as the value of one of the second VLANs stored in advance, determining that the first VLAN of the source network element carried in the received request message is the second VLAN stored in advance.
It should be noted that, the sending unit, the receiving unit and the processing unit included in the source network element are similar to the sending unit, the receiving unit and the processing unit included in the destination network element in operation principle, that is, the sending unit is used for sending corresponding messages, the receiving unit is used for receiving corresponding messages, and the processing unit is used for determining corresponding target table items according to preset dynamic learning rules; for the sake of clarity, only, the structures of the source network element and the destination network element are described, in the source network element and the destination network element, the sending unit, the processing unit and the receiving unit are respectively numbered differently, that is, in the source network element, the sending unit is numbered 401, the processing unit is numbered 403 and the receiving unit is numbered 402, in the destination network element, the sending unit is numbered 1103, the processing unit is numbered 1102 and the receiving unit is numbered 1101.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
The embodiment of the invention provides a method and a device for managing network elements, wherein through the setting of the method for managing the network elements, a target network element can determine a target table entry of a second VLAN for providing communication with a source network element by adopting a preset dynamic learning rule according to a request message sent by the source network element, and the source network element can also determine a target table entry of a first VLAN for providing communication with the target network element by adopting the dynamic learning rule according to a response message sent by the target network element, so that when the source network element communicates with the target network element, the pointed communication can be realized according to the VLAN in the determined target table entry, the problem of network blockage is avoided, and the communication efficiency between the network elements is improved; in addition, the method does not need manual intervention, so that the management cost can be greatly reduced.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (14)

1. A method for managing a network element, applied to a source network element, the method comprising:
sending a request message carrying the first VLAN, a self network interface physical address MAC and an interconnection protocol IP between self networks through all prestored first Virtual Local Area Networks (VLANs) so that a target network element receiving the request message sends a response message through a second VLAN;
receiving a response message which is sent by the target network element and carries the second VLAN, the MAC of the target network element and the IP of the target network element; wherein the second VLAN is: the destination network element determines a VLAN used for communicating with the source network element according to the first VLAN in the request message;
determining a target table item of a first VLAN used for providing communication with the target network element by adopting a preset dynamic learning rule according to the second VLAN carried in the received response message, the MAC of the target network element and the IP of the target network element, and storing the determined target table item into a preset target table item library; the target table entry includes: a first VLAN which is communicated with the target network element, and the MAC of the target network element and the IP of the target network element;
wherein, the determining, according to the second VLAN carried in the received response message, the MAC of the destination network element, and the IP of the destination network element, a preset dynamic learning rule for a target entry of a first VLAN used for providing communication with the destination network element specifically includes:
determining whether a target table item containing the MAC of the target network element is found in the target table item library or not according to the MAC of the target network element carried in the received response message;
when determining that the target table entry containing the MAC of the target network element is not found in the target table entry library, adding the target table entry containing the MAC of the target network element;
and updating the searched target table entry according to the second VLAN carried in the received response message and the IP of the target network element when the target table entry containing the MAC of the target network element is found in the target table entry library.
2. The method according to claim 1, wherein the updating the found target entry according to the second VLAN carried in the received response message and the IP of the destination network element specifically includes:
determining whether the IP in the searched target table item is the same as the IP of the target network element carried in the response message;
when the IP in the searched target table entry is determined to be different from the IP of the target network element carried in the response message, updating the IP in the searched target table entry into the IP of the target network element carried in the response message;
determining whether the first VLAN in the target table entry and the second VLAN carried in the response message are the same or not when the IP in the target table entry which is determined to be found is the same as the IP of the target network element carried in the response message;
when the first VLAN in the target table entry found is determined to be different from the second VLAN carried in the response message, the first VLAN in the target table entry found is updated to the second VLAN carried in the response message.
3. The method of claim 1, further comprising:
when a first VLAN which is stored in advance and used for communicating with the target network element is changed, deleting a target table item which is stored in advance in the target table item library and contains the first VLAN before the change;
the sending of the request message carrying the first VLAN, the network interface physical address MAC of the first VLAN, and the internet protocol IP between the networks of the first VLAN and the first VLAN by using all the first VLAN stored in advance specifically includes:
and sending a request message carrying the first VLAN, the MAC of the target network element and the IP of the target network element to the target network element according to the MAC of the target network element through the changed first VLAN and all unchanged first VLANs.
4. The method of any one of claims 1-3, wherein after determining the target entry for the first VLAN for providing communication with the destination network element and storing the determined target entry in a preset target entry repository, further comprising:
searching a target table item containing the MAC or IP of the target network element in an updated target table item library according to the MAC or IP of the target network element;
extracting a first VLAN in the searched target table item;
and adding the extracted first VLAN into a message to be sent, and sending the message to the target network element.
5. A method for network element management, applied to a destination network element, is characterized in that the method comprises:
receiving a first Virtual Local Area Network (VLAN) carrying a source network element, a network interface physical address (MAC) of the source network element and a request message of an Internet Protocol (IP) between networks of the source network element, which are sent by the source network element;
when determining that a first VLAN of a source network element carried in a received request message is a second VLAN pre-stored by the source network element, determining a first target table item of the second VLAN used for providing communication with the source network element according to the first VLAN carried in the received request message, an MAC of the source network element and an IP of the source network element by adopting a pre-set dynamic learning rule, and storing the first target table item into a pre-set target table item library;
sending a response message carrying the determined second VLAN communicated with the source network element and the MAC and IP of the source network element to the source network element, so that the source network element determines a second target table item for providing the first VLAN communicated with the source network element according to the response message by adopting the dynamic learning rule;
wherein, the determining, according to the first VLAN carried in the received request message, the MAC of the source network element, and the IP of the source network element, a first target entry of a second VLAN used for providing communication with the source network element by using a preset dynamic learning rule specifically includes:
determining whether a first target table item containing the MAC of the source network element is found in the target table item library or not according to the MAC of the source network element carried in the received request message;
when determining that the first target table item containing the MAC of the source network element is not found in the target table item library, adding the first target table item containing the MAC of the source network element;
and updating the searched first target table entry according to the first VLAN carried in the received request message and the IP of the source network element when the first target table entry containing the MAC of the source network element is determined to be searched in the target table entry library.
6. The method according to claim 5, wherein the updating the found first target entry according to the received first VLAN carried in the request message and the IP of the source network element specifically includes:
determining whether the IP in the searched first target table entry is the same as the IP of the source network element carried in the request message;
when the found IP in the first target table entry is determined to be different from the IP of the source network element carried in the request message, updating the found IP in the first target table entry to the IP of the source network element carried in the request message;
determining whether a second VLAN in the searched first target table entry is the same as the first VLAN carried in the request message or not when the IP in the searched first target table entry is determined to be the same as the IP of the source network element carried in the request message;
when it is determined that the second VLAN in the first target table entry found is different from the first VLAN carried in the request message, the second VLAN in the first target table entry found is updated to the first VLAN carried in the request message.
7. The method according to claim 5, wherein the determining that the first VLAN of the source network element carried in the received request message is a second VLAN stored in advance includes:
determining whether the value of the first VLAN of the source network element carried in the received request message is the same as the value of a second VLAN stored in advance;
and when the value of the first VLAN of the source network element carried in the received request message is determined to be the same as the value of one of the second VLANs stored in advance, determining that the first VLAN of the source network element carried in the received request message is the second VLAN stored in advance.
8. A source network element, comprising: a transmitting unit, a receiving unit and a processing unit; wherein the content of the first and second substances,
the sending unit is used for sending a request message carrying the first VLAN, the self network interface physical address MAC and the self network interconnection protocol IP through all the prestored first virtual local area network VLANs so as to enable a target network element receiving the request message to send a response message through a second VLAN;
the receiving unit is configured to receive a response packet which is sent by the destination network element and carries the second VLAN, the MAC of the destination network element, and the IP of the destination network element; wherein the second VLAN is: the destination network element determines a VLAN used for communicating with the source network element according to the first VLAN in the request message;
the processing unit is configured to determine, according to the second VLAN carried in the received response message, the MAC of the destination network element, and the IP of the destination network element, a target entry of a first VLAN used for providing communication with the destination network element by using a preset dynamic learning rule, and store the determined target entry in a preset target entry library; the target table entry includes: a first VLAN which is communicated with the target network element, and the MAC of the target network element and the IP of the target network element;
the processing unit is specifically configured to determine, according to the MAC of the destination network element carried in the received response message, whether a destination entry including the MAC of the destination network element is found in the destination entry library; when determining that the target table entry containing the MAC of the target network element is not found in the target table entry library, adding the target table entry containing the MAC of the target network element; and updating the searched target table entry according to the second VLAN carried in the received response message and the IP of the target network element when the target table entry containing the MAC of the target network element is found in the target table entry library.
9. The source network element of claim 8, wherein the processing unit is specifically configured to determine whether the IP in the target entry found is the same as the IP of the destination network element carried in the response packet; when the IP in the searched target table entry is determined to be different from the IP of the target network element carried in the response message, updating the IP in the searched target table entry into the IP of the target network element carried in the response message; determining whether the first VLAN in the target table entry and the second VLAN carried in the response message are the same or not when the IP in the target table entry which is determined to be found is the same as the IP of the target network element carried in the response message; when the first VLAN in the target table entry found is determined to be different from the second VLAN carried in the response message, the first VLAN in the target table entry found is updated to the second VLAN carried in the response message.
10. The source network element of claim 8, further comprising: a deletion unit;
the deleting unit is configured to delete a target entry that is pre-stored in the target entry library and includes a first VLAN before change when the first VLAN used for communicating with the target network element, which is pre-stored, is changed;
the sending unit is specifically configured to send, according to the MAC of the destination network element, a request packet carrying the first VLAN, the MAC of the destination network element and the IP of the destination network element, through the changed first VLAN and all unchanged first VLANs.
11. The source network element of any one of claims 8-10, further comprising: a target table item determining unit and an extracting unit; wherein the content of the first and second substances,
the target table item determining unit is configured to search a target table item including the MAC or IP of the target network element in an updated target table item library according to the MAC or IP of the target network element;
the extracting unit is used for extracting the first VLAN in the searched target table item;
the sending unit is further configured to add the extracted first VLAN to a message to be sent, and send the message to the destination network element.
12. A destination network element, comprising: a receiving unit, a processing unit and a transmitting unit; wherein the content of the first and second substances,
the receiving unit is configured to receive a request packet, which is sent by a source network element and carries a first virtual local area network VLAN of the source network element, a network interface physical address MAC of the source network element, and an internet protocol IP between networks of the source network element;
the processing unit is configured to, when it is determined that a first VLAN of the source network element, which is carried in the received request message, is a second VLAN pre-stored by the processing unit, determine, according to the first VLAN carried in the received request message, the MAC of the source network element, and the IP of the source network element, a first target entry of the second VLAN, which is used for providing communication with the source network element, by using a preset dynamic learning rule, and store the first target entry into a preset target entry library;
the sending unit is configured to send a response packet carrying the determined second VLAN in communication with the source network element and the MAC and IP of the source network element to the source network element, so that the source network element determines, according to the response packet and by using the dynamic learning rule, a second target entry of the first VLAN in communication with the source network element;
the processing unit is specifically configured to determine, according to the MAC of the source network element carried in the received request message, whether a first target entry including the MAC of the source network element is found in the target entry library; when determining that the first target table item containing the MAC of the source network element is not found in the target table item library, adding the first target table item containing the MAC of the source network element; and updating the searched first target table item according to the received first VLAN carried in the request message and the IP of the source network element when the first target table item containing the MAC of the source network element is found in the target table item library.
13. The destination network element according to claim 12, wherein the processing unit is specifically configured to determine whether the IP in the first target entry found is the same as the IP of the source network element carried in the request packet; when the found IP in the first target table entry is determined to be different from the IP of the source network element carried in the request message, updating the found IP in the first target table entry to the IP of the source network element carried in the request message; determining whether a second VLAN in the searched first target table entry is the same as the first VLAN carried in the request message or not when the IP in the searched first target table entry is determined to be the same as the IP of the source network element carried in the request message; when it is determined that the second VLAN in the first target table entry found is different from the first VLAN carried in the request message, the second VLAN in the first target table entry found is updated to the first VLAN carried in the request message.
14. The destination network element of claim 12, wherein the processing unit is specifically configured to determine whether a value of a first VLAN of the source network element carried in the received request message is the same as a value of a second VLAN stored in advance in the processing unit; and when the value of the first VLAN of the source network element carried in the received request message is determined to be the same as the value of one of the second VLANs stored in advance, determining that the first VLAN of the source network element carried in the received request message is the second VLAN stored in advance.
CN201711230008.7A 2017-11-29 2017-11-29 Network element management method and device Active CN108011755B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711230008.7A CN108011755B (en) 2017-11-29 2017-11-29 Network element management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711230008.7A CN108011755B (en) 2017-11-29 2017-11-29 Network element management method and device

Publications (2)

Publication Number Publication Date
CN108011755A CN108011755A (en) 2018-05-08
CN108011755B true CN108011755B (en) 2021-02-26

Family

ID=62054858

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711230008.7A Active CN108011755B (en) 2017-11-29 2017-11-29 Network element management method and device

Country Status (1)

Country Link
CN (1) CN108011755B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101163083A (en) * 2007-10-19 2008-04-16 杭州华三通信技术有限公司 Multi-point to multi-point VPN interconnecting method, system and device in PBT network
CN101662383A (en) * 2009-09-17 2010-03-03 杭州华三通信技术有限公司 Method and equipment for configuring maintenance end points
CN101888338A (en) * 2010-07-01 2010-11-17 中兴通讯股份有限公司 Information forwarding method and gateway
CN102790692A (en) * 2011-05-19 2012-11-21 中兴通讯股份有限公司 Method for calculating network element interface and web master
CN106911724A (en) * 2017-04-27 2017-06-30 杭州迪普科技股份有限公司 A kind of message processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101163083A (en) * 2007-10-19 2008-04-16 杭州华三通信技术有限公司 Multi-point to multi-point VPN interconnecting method, system and device in PBT network
CN101662383A (en) * 2009-09-17 2010-03-03 杭州华三通信技术有限公司 Method and equipment for configuring maintenance end points
CN101888338A (en) * 2010-07-01 2010-11-17 中兴通讯股份有限公司 Information forwarding method and gateway
CN102790692A (en) * 2011-05-19 2012-11-21 中兴通讯股份有限公司 Method for calculating network element interface and web master
CN106911724A (en) * 2017-04-27 2017-06-30 杭州迪普科技股份有限公司 A kind of message processing method and device

Also Published As

Publication number Publication date
CN108011755A (en) 2018-05-08

Similar Documents

Publication Publication Date Title
US9110884B2 (en) Message publishing and subscribing method and apparatus
JP6004299B2 (en) Method and apparatus for matching flow tables and switch
EP3282649B1 (en) Data packet forwarding
CN109981493B (en) Method and device for configuring virtual machine network
JP2016149757A (en) Technologies for modular forwarding table scalability
CN113946416A (en) Method and device for determining virtual machine migration
CN107113241B (en) Route determining method, network configuration method and related device
CN105122745A (en) Efficient longest prefix matching techniques for network devices
EP3451592B1 (en) Packet transmission between vxlan domains
CN105262667A (en) Method and device for controlling multicast transmission in Overlay network
US20220045875A1 (en) Multicast message processing method and apparatus, storage medium and processor
CN104221331A (en) Layer 2 packet switching without look-up table for ethernet switches
US9954775B2 (en) Software-defined network (SDN) system using host abstraction, and method for implementing the same
CN107547346B (en) Message transmission method and device
WO2016175768A1 (en) Map tables for hardware tables
CN105704045A (en) Method for virtual machine location information synchronization between data center gateways, gateway and system
CN115426312B (en) Method and device for managing, optimizing and forwarding identifiers in large-scale multi-modal network
US9553764B2 (en) Migration of guest bridge
US9705978B1 (en) Dependency graph management
CN104780201A (en) Data packet processing method and device for use in IPVS (Internet Protocol Virtual Server) cluster
WO2023143595A1 (en) Method and system for communication between processors, storage medium, and processor
CN105245428A (en) Method and device for configuring message processing rule
CN108011755B (en) Network element management method and device
CN111294316B (en) Network isolation method and device based on user mode protocol stack virtual router
WO2016173196A1 (en) Method and apparatus for learning address mapping relationship

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100094 First to Fifth Floors of Building 11, East Yard, No. 10 Wangdong Road, Northwest Haidian District, Beijing

Applicant after: Raisecom Technology Inc.

Address before: 100085 No. 2 Building, No. 28 Shangdi Sixth Street, Haidian District, Beijing

Applicant before: Raisecom Technology Inc.

GR01 Patent grant
GR01 Patent grant