Invention content
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide one kind being based on LLDP protocol detection chains
The method and system of road aggregation configuration, for solving the problems, such as that the prior art can not detect the configuration error of link aggregation.
In order to achieve the above objects and other related objects, the present invention is provided one kind and is matched based on LLDP protocol detection link aggregations
The method set, the method based on LLDP protocol detection link aggregation configurations include:The neighbor device received is monitored to send
LLDP messages;The LLDP messages carry the link aggregation information of neighbor device port;Detect local device and the neighbour
Whether the configuration for occupying link aggregation information of the equipment on connected port is consistent, indicates link aggregation configuration just if consistent
Really, link aggregation configuration mistake is indicated if inconsistent.
Optionally, the link aggregation information of the detection local device with the neighbor device on the port being connected is matched
Set whether a kind of consistent realization process includes:Judge local device and neighbor device on the port being connected about link aggregation
Configuration whether be enabled link aggregation or be to be not enabled on link aggregation;If then indicating that local device exists with neighbor device
Configuration consistency on connected port about link aggregation information;Otherwise it indicates inconsistent.
Optionally, the method based on LLDP protocol detection link aggregation configurations further includes:Monitor the neighbours received
What equipment was sent enables certain port links aggregation configuration or goes to enable certain port links aggregation configuration;Detect local device and described
Whether the enabled configuration of link aggregation of the neighbor device on connected port goes enabled configuration consistent, and link is indicated if consistent
Aggregation configuration is correct, and link aggregation configuration mistake is indicated if inconsistent.
Optionally, detection local device enables configuration with link aggregation of the neighbor device on the port being connected or goes
Whether a kind of consistent realization process includes for enabled configuration:Judge that certain port links polymerization that enables that the neighbor device is sent is matched
It sets or goes to enable whether certain port links aggregation configuration is the configuration for making the port of neighbor device being connected with local device;
If otherwise terminating this judgement;If so, continuing to judge whether local device is equal on the port being connected with the neighbor device
Enabled configuration is gone for the enabled configuration of link aggregation or link aggregation, if then indicating local device with neighbor device at the end being connected
Configuration is enabled about link aggregation on mouthful or remove enabled configuration consistency, otherwise indicate inconsistent.
Optionally, the method based on LLDP protocol detection link aggregation configurations further includes:In link aggregation configuration mistake
It mistakes and carries out alarming processing.
It is described to be examined based on LLDP agreements the present invention also provides a kind of system based on LLDP protocol detection link aggregation configurations
Survey link aggregation configuration system include:First monitoring module monitors the LLDP messages that the neighbor device received is sent;It is described
LLDP messages carry the link aggregation information of neighbor device port;First detection module is connected with first monitoring module,
Whether the configuration for detecting link aggregation information of the local device with the neighbor device on the port being connected is consistent, if consistent
It indicates that link aggregation configuration is correct, link aggregation configuration mistake is indicated if inconsistent.
Optionally, the first detection module includes:First judging unit judges that local device is being connected with neighbor device
Port on whether be enabled link aggregation or be to be not enabled on link aggregation about the configuration of link aggregation;First is certainly single
Member is connected with first judging unit, determines that local device is believed on the port being connected about link aggregation with neighbor device
The configuration consistency of breath;First nack unit is connected with first judging unit, determines that local device is being connected with neighbor device
Port on about link aggregation information configuration it is inconsistent.
Optionally, the system based on LLDP protocol detection link aggregation configurations further includes:Second monitoring module, monitoring
What the neighbor device received was sent enables certain port links aggregation configuration or goes to enable certain port links aggregation configuration;Second inspection
Module is surveyed, is connected with second monitoring module, link of the detection local device with the neighbor device on the port being connected
Whether the enabled configuration of polymerization goes enabled configuration consistent, indicates that link aggregation configuration is correct if consistent, if inconsistent indicate
Link aggregation configuration mistake.
Optionally, second detection module includes:Second judgment unit, judge the neighbor device transmission enables certain
Port links aggregation configuration goes to enable whether certain port links aggregation configuration is being connected with local device to neighbor device
The configuration that port is made;Second nack unit, is connected with the second judgment unit, terminates this in the negative case and sentences
It is disconnected;Third judging unit, is connected with the second judgment unit, continues to judge local device and the neighbour in the yes case
Whether occupy equipment on connected port is that the enabled configuration of link aggregation or link aggregation go enabled configuration;Third is certainly single
Member is connected with the third judging unit, determines that local device makes on the port being connected about link aggregation with neighbor device
It can configure or go enabled configuration consistency;Third nack unit is connected with the third judging unit, determines local device and neighbours
Equipment about the enabled configuration of link aggregation or goes enabled configuration inconsistent on connected port.
Optionally, the system based on LLDP protocol detection link aggregation configurations further includes:Alarm module, with described
One detection module or second detection module are connected, and alarming processing is carried out in the case of link aggregation configuration mistake.
As described above, the method and system of the present invention based on LLDP protocol detection link aggregation configurations, have with
Lower advantageous effect:
The present invention provides a kind of method and system based on LLDP protocol detection link aggregation configurations, realize to being based on
The automatic detection of the error configurations of the link aggregation of LLDP agreements, and then realize net caused by the link aggregation configuration to mistake
Quick, the accurate positionin of network failure.
Description of the drawings
Fig. 1 a are a kind of device port connection diagram of existing link aggregation.
Fig. 1 b are another device port connection diagram of existing link aggregation.
Fig. 2 a are a kind of realization of the method based on LLDP protocol detection link aggregation configurations described in the embodiment of the present invention
Flow diagram.
Fig. 2 b are that second of the method based on LLDP protocol detection link aggregation configurations described in the embodiment of the present invention is real
Existing flow diagram.
Fig. 3 is a kind of implementation process schematic diagram of the step S102 described in the embodiment of the present invention.
Fig. 4 is a kind of implementation process schematic diagram of the step S104 described in the embodiment of the present invention.
Fig. 5 is the third realization of the method based on LLDP protocol detection link aggregation configurations described in the embodiment of the present invention
Flow diagram.
Fig. 6 is a kind of realization knot of the system based on LLDP protocol detection link aggregation configurations described in the embodiment of the present invention
Structure schematic diagram.
Fig. 7 is a kind of realization structural schematic diagram of the first detection module described in the embodiment of the present invention.
Fig. 8 is second of realization of the system based on LLDP protocol detection link aggregation configurations described in the embodiment of the present invention
Structural schematic diagram.
Fig. 9 is a kind of realization structural schematic diagram of the second detection module described in the embodiment of the present invention.
Figure 10 is the third reality of the system based on LLDP protocol detection link aggregation configurations described in the embodiment of the present invention
Existing structural schematic diagram.
Component label instructions
600 systems based on LLDP protocol detection link aggregation configurations
610 first monitoring modules
620 first detection modules
621 first judging units
622 first affirmative units
623 first nack units
630 second monitoring modules
640 second detection modules
641 second judgment units
642 second nack units
643 third judging units
644 thirds affirm unit
645 third nack units
650 alarm modules
S101~S105 steps
S301~S303 steps
S401~S405 steps
Embodiment
The present embodiment provides a kind of methods based on LLDP protocol detection link aggregation configurations, as shown in Figure 2 a, the base
Include in the method for LLDP protocol detection link aggregation configurations:
S101 monitors the LLDP messages that the neighbor device received is sent;The LLDP messages carry neighbor device end
The link aggregation information of mouth.LLDP can obtain the link aggregation information of device port, including the whether enabled link aggregation in port,
And the aggregation port ID where port, i.e., the described link aggregation information include whether port is enable port and port place
Aggregation port ID.LLDP messages are made of multiple TLV, wherein Link Aggregation TLV (link aggregation TLV) potted ends
The link aggregation information of mouth.Aggregation status (polymerization state) field identification of Link Aggregation TLV should
The whether enabled link aggregation in port, the aggregation port where aggregated port ID (aggregation port ID) the field identifications port
ID。
S102, whether the configuration of link aggregation information of the detection local device with the neighbor device on the port being connected
Unanimously, indicate that link aggregation configuration is correct if consistent, if inconsistent indicate link aggregation configuration mistake.This step basis
The link aggregation information of LLDP messages judges that the port of neighbor device whether there is enabled link aggregation.
In the present embodiment, if (neighbours being connected with local device direct communication based on LLDP agreements are set opposite equip.
It is standby) configured link aggregation, then the link aggregation information of LLDP neighbours is carried in the LLDP messages that opposite equip. is sent.If
Link aggregation is not configured in opposite equip., then the link aggregation information of the LLDP neighbours carried in the LLDP messages that opposite equip. is sent
For sky.Link aggregation information is organized into TLV formats, then is encapsulated into LLDP messages, is sent to opposite end.If chain is not configured in opposite end
Road polymerize, then LLDP messages do not carry link aggregation TLV (Link Aggregation TLV).The link for comparing local device is poly-
Information is closed, when both ends mismatch, local device can carry out alarming processing.The present invention is realized to because of link aggregation configuration mistake
Quick, the accurate positionin of network failure caused by accidentally.
Further, as shown in figure 3, the step S102 detects local device with the neighbor device in the port being connected
On link aggregation information configuration whether a kind of consistent realization process includes:
S301 judges whether local device with neighbor device on the port being connected is to make about the configuration of link aggregation
Energy link aggregation is to be not enabled on link aggregation.
S302, if then indicating configuration of the local device with neighbor device on the port being connected about link aggregation information
Unanimously.I.e. if local device with neighbor device on the port being connected, about the configuration consistency of link aggregation, i.e., be all enabled
Link aggregation is all to be not enabled on link aggregation, then connected port is correct about the configuration of link aggregation.
S303, otherwise indicate local device and neighbor device on the port being connected about the configuration of link aggregation information not
Unanimously.I.e. if local device with neighbor device on the port being connected, it is inconsistent about link aggregation configuration, i.e., one end be make
Energy link aggregation, the other end are to be not enabled on link aggregation, then configuration error of the connected port about link aggregation, can carry out
Alarming processing.
Further, as shown in Figure 2 b, the method based on LLDP protocol detection link aggregation configurations further includes:
S103 monitors certain enabled port links aggregation configuration or go to enable certain port chain that the neighbor device received is sent
Road aggregation configuration.Described certain port links aggregation configuration that enables refers to that aggregation port is added in no port that aggregation port is added, is made
The port becomes enabled link aggregation mouth.It is described to go to enable certain port links aggregation configuration to refer to that have been added to aggregation port
Port releases polymerization, so that the port is become and is not enabled on link aggregation mouth.
The enabled configuration of the link aggregation of S104, detection local device and the neighbor device on the port being connected goes to make
Whether energy configuration is consistent, indicates that link aggregation configuration is correct if consistent, if inconsistent indicate link aggregation configuration mistake.
Further, as shown in figure 4, the step 104 detects local device with the neighbor device in the port being connected
On the enabled configuration of link aggregation or go enabled configuration whether a kind of consistent realization process include:
S401, judge that the neighbor device sends enables certain port links aggregation configuration or goes to enable certain port links poly-
Close whether configuration is the configuration made to the port of neighbor device being connected with local device.
S402, if otherwise terminating this judgement.
S403, if so, continuing to judge whether local device with the neighbor device on the port being connected is link
The enabled configuration of polymerization or link aggregation go enabled configuration.
S404, if then indicate local device and neighbor device on the port being connected about the enabled configuration of link aggregation or
Remove enabled configuration consistency.
Otherwise S405 indicates that local device enables configuration about link aggregation on the port being connected with neighbor device or goes
Enabled configuration is inconsistent.
Further, as shown in figure 5, the method based on LLDP protocol detection link aggregation configurations further includes:
S105 carries out alarming processing in link aggregation configuration mistake.
The protection domain of method of the present invention based on LLDP protocol detection link aggregation configurations is not limited to this implementation
The step of example is enumerated executes sequence, the replacements sides such as every easy steps increase and decrease done using the principle of the present invention, sequence adjustment
Case is included in protection scope of the present invention.
The present embodiment also provides a kind of system based on LLDP protocol detection link aggregation configurations, which may be implemented this
The method based on LLDP protocol detection link aggregation configurations described in embodiment, but being examined based on LLDP agreements described in the present embodiment
Survey link aggregation configuration method realization device include but not limited to the present embodiment enumerate based on LLDP protocol detection links
The structure of the system of aggregation configuration.
The present embodiment provides a kind of systems based on LLDP protocol detection link aggregation configurations, as shown in fig. 6, described be based on
The system 600 of LLDP protocol detection link aggregation configurations includes:First monitoring module 610, first detection module 620.
First monitoring module 610 monitors the LLDP messages that the neighbor device received is sent.The LLDP messages are taken
Link aggregation information with neighbor device port.LLDP can obtain the link aggregation information of device port, including port is
Aggregation port ID where no enabled link aggregation and port, i.e., the described link aggregation information include whether port is Enable Pin
Aggregation port ID where mouth and the port.LLDP messages are made of multiple TLV, wherein Link Aggregation TLV encapsulation
The link aggregation information of port.Whether the aggregation status field identifications of the Link Aggregation TLV port
Enabled link aggregation, aggregated port id fields identify the aggregation port ID where the port.
The first detection module 620 is connected with first monitoring module 610, detects local device and the neighbours set
Whether the configuration of the standby link aggregation information on connected port is consistent, indicates that link aggregation configuration is correct if consistent, if
It is inconsistent, indicate link aggregation configuration mistake.The first detection module 620 is sentenced according to the link aggregation information of LLDP messages
The port of disconnected neighbor device whether there is enabled link aggregation.
In the present embodiment, if (neighbours being connected with local device direct communication based on LLDP agreements are set opposite equip.
It is standby) configured link aggregation, then the link aggregation information of LLDP neighbours is carried in the LLDP messages that opposite equip. is sent.If
Link aggregation is not configured in opposite equip., then the link aggregation information of the LLDP neighbours carried in the LLDP messages that opposite equip. is sent
For sky.The link aggregation information for comparing local device, when both ends mismatch, local device can carry out alarming processing.This hair
Bright quick, the accurate positionin realized to the network failure caused by link aggregation configuration mistake.
Further, as shown in fig. 7, the first detection module 620 includes:First judging unit 621, first is certainly single
Member 622, the first nack unit 623.
First judging unit 621 judges local device and neighbor device on the port being connected about link aggregation
Whether configuration is enabled link aggregation or is to be not enabled on link aggregation.
The first affirmative unit 622 is connected with first judging unit 621, determines that local device exists with neighbor device
Configuration consistency on connected port about link aggregation information.I.e. if local device with neighbor device in the port being connected
On, about the configuration consistency of link aggregation, i.e., all it is enabled link aggregation or is all to be not enabled on link aggregation, then connected port
Configuration about link aggregation is correct.
First nack unit 623 is connected with first judging unit 621, determines that local device exists with neighbor device
Configuration on connected port about link aggregation information is inconsistent.I.e. if local device with neighbor device in the port being connected
On, inconsistent about link aggregation configuration, i.e., one end is enabled link aggregation, and the other end is to be not enabled on link aggregation, then is connected
Configuration error of the port about link aggregation, alarming processing can be carried out.
Further, as shown in figure 8, the system 600 based on LLDP protocol detection link aggregation configurations further includes:Second
Monitoring module 630, the second detection module 640.
Certain port links aggregation configuration that second monitoring module 630 monitored that the neighbor device received sends enable or
It goes to enable certain port links aggregation configuration.Described certain port links aggregation configuration that enables refers to, by no end that aggregation port is added
Aggregation port is added in mouth, and the port is made to become enabled link aggregation mouth.It is described go to enable certain port links aggregation configuration refer to, will
Port through aggregation port is added releases polymerization, so that the port is become and is not enabled on link aggregation mouth.
Second detection module 640 is connected with second monitoring module 630, detects local device and the neighbours set
Whether the enabled configuration of the standby link aggregation on connected port goes enabled configuration consistent, indicates that link aggregation is matched if consistent
It sets correctly, link aggregation configuration mistake is indicated if inconsistent.
Further, as shown in figure 9, second detection module 640 includes:Second judgment unit 641, the second negative are single
Member 642, third judging unit 643, third affirm unit 644, third nack unit 645.
The second judgment unit 641 judges certain enabled port links aggregation configuration or go to make that the neighbor device is sent
Whether certain port links aggregation configuration of energy is the configuration made to the port of neighbor device being connected with local device.
Second nack unit 642 is connected with the second judgment unit 641, terminates this in the negative case and sentences
It is disconnected.
The third judging unit 643 is connected with the second judgment unit 641, continues to judge this in the yes case
Whether end equipment and the neighbor device are that the enabled configuration of link aggregation or link aggregation go enabled match on the port being connected
It sets.
The third affirmative unit 644 is connected with the third judging unit 643, determines that local device exists with neighbor device
Configuration is enabled about link aggregation or remove enabled configuration consistency on connected port.
The third nack unit 645 is connected with the third judging unit 643, determines that local device exists with neighbor device
Configuration is enabled about link aggregation or go enabled configuration inconsistent on connected port.
Further, as shown in Figure 10, the system 600 based on LLDP protocol detection link aggregation configurations further includes alarm
Module 650;The alarm module 650 is connected with the first detection module 620 or second detection module 640, in link
Alarming processing is carried out in the case of aggregation configuration mistake.
The present invention provides a kind of method and system based on LLDP protocol detection link aggregation configurations, realize to being based on
The automatic detection of the error configurations of the link aggregation of LLDP agreements, and then realize net caused by the link aggregation configuration to mistake
Quick, the accurate positionin of network failure.The present invention can detect the configuration of link aggregation, and Active report by LLDP agreements automatically
Error configurations problem.
In conclusion the present invention effectively overcomes various shortcoming in the prior art and has high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology can all carry out modifications and changes to above-described embodiment without violating the spirit and scope of the present invention.Cause
This, institute is complete without departing from the spirit and technical ideas disclosed in the present invention by those of ordinary skill in the art such as
At all equivalent modifications or change, should by the present invention claim be covered.