Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of method and system based on LLDP protocol detection link aggregation configuration, cannot detect the problem of the configuration error of link aggregation for solving prior art.
For achieving the above object and other relevant objects, the invention provides a kind of method based on LLDP protocol detection link aggregation configuration, the described method based on LLDP protocol detection link aggregation configuration comprises: monitor the LLDP message that the neighbor device that receives sends; Described LLDP message carries the link aggregation information of neighbor device port; Detect local device whether consistent with the configuration of the link aggregation information of described neighbor device on the port be connected, if consistent, represent that link aggregation configuration is correct, if inconsistent, represent link aggregation configuration mistake.
Alternatively, a kind of implementation procedure that whether configuration of described detection local device and the described neighbor device link aggregation information on the port be connected is consistent comprises: judge whether local device and neighbor device are enable link about the configuration of link aggregation and are polymerized or are non-enable link and be polymerized on the port be connected; If then represent local device and neighbor device configuration consistency about link aggregation information on the port be connected; Otherwise represent inconsistent.
Alternatively, the described method based on LLDP protocol detection link aggregation configuration also comprises: monitor certain the port links aggregation configuration enable of the neighbor device transmission received or go certain port links aggregation configuration enable; Whether detection local device is with the enable configuration of the link aggregation of described neighbor device on the port be connected or go enable configuration consistent, if consistent, represents that link aggregation configuration is correct, if inconsistent, and expression link aggregation configuration mistake.
Alternatively, local device and the enable configuration of the link aggregation of described neighbor device on the port be connected is detected or a kind of implementation procedure of going enable configuration whether consistent comprises: judge certain port links aggregation configuration enable that described neighbor device sends or go certain port links aggregation configuration enable whether to be the configuration made the port be connected with local device of neighbor device; Then terminate this if not to judge; If, then continue to judge whether local device and described neighbor device are the enable configuration of link aggregation on the port be connected or link aggregation goes enable configuration, if then represent local device and neighbor device about the enable configuration of link aggregation or remove enable configuration consistency on the port be connected, otherwise represent inconsistent.
Alternatively, the described method based on LLDP protocol detection link aggregation configuration also comprises: carry out alarming processing when link aggregation configuration mistake.
The present invention also provides a kind of system based on LLDP protocol detection link aggregation configuration, and the described system based on LLDP protocol detection link aggregation configuration comprises: the first monitoring module, monitors the LLDP message of the neighbor device transmission received; Described LLDP message carries the link aggregation information of neighbor device port; First detection module, be connected with described first monitoring module, detect local device whether consistent with the configuration of the link aggregation information of described neighbor device on the port be connected, if consistent, represent that link aggregation configuration is correct, if inconsistent, represent link aggregation configuration mistake.
Alternatively, described first detection module comprises: the first judging unit, judges whether local device and neighbor device are enable link about the configuration of link aggregation and are polymerized or are non-enable link and be polymerized on the port be connected; First affirmative unit, is connected with described first judging unit, determines local device and the neighbor device configuration consistency about link aggregation information on the port be connected; First nack unit, is connected with described first judging unit, determines that local device is inconsistent with the configuration of neighbor device about link aggregation information on the port be connected.
Alternatively, the described system based on LLDP protocol detection link aggregation configuration also comprises: the second monitoring module, monitors certain the port links aggregation configuration enable of the neighbor device transmission received or goes certain port links aggregation configuration enable; Second detection module, be connected with described second monitoring module, whether detection local device is with the enable configuration of the link aggregation of described neighbor device on the port be connected or go enable configuration consistent, if consistent, represents that link aggregation configuration is correct, if inconsistent, and expression link aggregation configuration mistake.
Alternatively, whether described second detection module comprises: the second judging unit, judge certain port links aggregation configuration enable that described neighbor device sends or go certain port links aggregation configuration enable to be the configuration made the port be connected with local device of neighbor device; Second nack unit, is connected with described second judging unit, terminates this in the negative case and judges; 3rd judging unit, is connected with described second judging unit, continues in the yes case to judge whether local device and described neighbor device are the enable configuration of link aggregation on the port be connected or link aggregation goes enable configuration; 3rd certainly unit, is connected with described 3rd judging unit, determines local device and neighbor device on the port be connected about the enable configuration of link aggregation or remove enable configuration consistency; 3rd nack unit, is connected with described 3rd judging unit, determines local device and neighbor device on the port be connected about the enable configuration of link aggregation or go enable configuration inconsistent.
Alternatively, the described system based on LLDP protocol detection link aggregation configuration also comprises: alarm module, is connected with described first detection module or described second detection module, carries out alarming processing when link aggregation configuration mistake.
As mentioned above, the method and system based on LLDP protocol detection link aggregation configuration of the present invention, have following beneficial effect:
The invention provides a kind of method and system based on LLDP protocol detection link aggregation configuration, achieve the automatic detection of the error configurations to the link aggregation based on LLDP agreement, so achieve to the network failure that the link aggregation configuration of mistake causes quick, accurately locate.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this specification can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this specification also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.
Refer to accompanying drawing.It should be noted that, the diagram provided in the present embodiment only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in graphic but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
Below in conjunction with embodiment and accompanying drawing, the present invention is described in detail.
Embodiment
The present embodiment provides a kind of method based on LLDP protocol detection link aggregation configuration, and as shown in Figure 2 a, the described method based on LLDP protocol detection link aggregation configuration comprises:
S101, monitors the LLDP message of the neighbor device transmission received; Described LLDP message carries the link aggregation information of neighbor device port.LLDP can obtain the link aggregation information of device port, comprises port whether enable link polymerization, and the aggregation port ID at port place, and namely described link aggregation information comprises the aggregation port ID whether port is enable port and this port place.LLDP message is made up of multiple TLV, wherein the link aggregation information of Link Aggregation TLV (link aggregation TLV) encapsulation port.This port of aggregation status (polymerization state) field identification of Link Aggregation TLV whether be polymerized by enable link, the aggregation port ID at this port place of aggregated port ID (aggregation port ID) field identification.
S102, detects local device whether consistent with the configuration of the link aggregation information of described neighbor device on the port be connected, if consistent, represents that link aggregation configuration is correct, if inconsistent, represents link aggregation configuration mistake.According to the link aggregation information of LLDP message, this step judges whether the port of neighbor device exists enable link polymerization.
In the present embodiment, if opposite equip. (namely based on the neighbor device that LLDP agreement is connected with local device direct communication) configuration link be polymerized, then carry the link aggregation information of LLDP neighbours in the LLDP message that opposite equip. sends.If the non-configuration link polymerization of opposite equip., then the link aggregation information of the LLDP neighbours carried in the LLDP message that opposite equip. sends is for empty.Link aggregation information is organized into TLV form, then is encapsulated into LLDP message, sends to opposite end.If the non-configuration link polymerization in opposite end, then LLDP message does not carry link aggregation TLV (Link Aggregation TLV).The relatively link aggregation information of local device, when two ends are not mated, local device can carry out alarming processing.Present invention achieves to the network failure caused because of link aggregation configuration mistake quick, accurately locate.
Further, as shown in Figure 3, a kind of implementation procedure that described step S102 detects local device whether consistent with the configuration of the link aggregation information of described neighbor device on the port be connected comprises:
S301, judges whether local device and neighbor device are enable link about the configuration of link aggregation and are polymerized or are non-enable link and be polymerized on the port be connected.
S302, if then represent local device and neighbor device configuration consistency about link aggregation information on the port be connected.If namely local device and neighbor device are on the port be connected, about the configuration consistency of link aggregation, be namely all enable link polymerization or be all non-enable link polymerization, be then connected port correct about the configuration of link aggregation.
S303, otherwise represent that local device is inconsistent with the configuration of neighbor device about link aggregation information on the port be connected.If namely local device and neighbor device are on the port be connected, inconsistent about link aggregation configuration, namely one end is enable link polymerization, and the other end is the polymerization of non-enable link, then the port be connected, about the configuration error of link aggregation, can carry out alarming processing.
Further, as shown in Figure 2 b, the described method based on LLDP protocol detection link aggregation configuration also comprises:
S103, monitors certain the port links aggregation configuration enable of the neighbor device transmission received or goes certain port links aggregation configuration enable.Described certain port links aggregation configuration enable refers to, the port not adding aggregation port is added aggregation port, makes this port become enable link aggregation port.Describedly go certain port links aggregation configuration enable to refer to, the port that will add aggregation port removes polymerization, makes this port become non-enable link aggregation port.
S104, whether detection local device is with the enable configuration of the link aggregation of described neighbor device on the port be connected or go enable configuration consistent, if consistent, represents that link aggregation configuration is correct, if inconsistent, expression link aggregation configuration mistake.
Further, as shown in Figure 4, described step 104 detects local device and the enable configuration of the link aggregation of described neighbor device on the port be connected or a kind of implementation procedure of going enable configuration whether consistent comprises:
Whether S401, judge certain port links aggregation configuration enable that described neighbor device sends or go certain port links aggregation configuration enable to be the configuration made the port be connected with local device of neighbor device.
S402, then terminates this if not and judges.
S403, if so, then continues to judge whether local device and described neighbor device are the enable configuration of link aggregation on the port be connected or link aggregation goes enable configuration.
S404, if then represent local device and neighbor device on the port be connected about the enable configuration of link aggregation or remove enable configuration consistency.
S405, otherwise represent local device and neighbor device on the port be connected about the enable configuration of link aggregation or go enable configuration inconsistent.
Further, as shown in Figure 5, the described method based on LLDP protocol detection link aggregation configuration also comprises:
S105, carries out alarming processing when link aggregation configuration mistake.
The protection range of the method based on LLDP protocol detection link aggregation configuration of the present invention is not limited to the step execution sequence that the present embodiment is enumerated, and every alternative such as easy steps increase and decrease, order adjustment utilizing principle of the present invention to do all 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 configuration, this system can realize the method based on LLDP protocol detection link aggregation configuration described in the present embodiment, but the implement device of the method based on LLDP protocol detection link aggregation configuration described in the present embodiment includes but not limited to the structure of the system based on LLDP protocol detection link aggregation configuration that the present embodiment is enumerated.
The present embodiment provides a kind of system based on LLDP protocol detection link aggregation configuration, and as shown in Figure 6, the described system 600 based on LLDP protocol detection link aggregation configuration comprises: the first monitoring module 610, first detection module 620.
Described first monitoring module 610 monitors the LLDP message of the neighbor device transmission received.Described LLDP message carries the link aggregation information of neighbor device port.LLDP can obtain the link aggregation information of device port, comprises port whether enable link polymerization, and the aggregation port ID at port place, and namely described link aggregation information comprises the aggregation port ID whether port is enable port and this port place.LLDP message is made up of multiple TLV, wherein the link aggregation information of Link Aggregation TLV encapsulation port.This port of aggregation status field identification of Link Aggregation TLV whether be polymerized by enable link, and aggregated port id field identifies the aggregation port ID at this port place.
Described first detection module 620 is connected with described first monitoring module 610, detect local device whether consistent with the configuration of the link aggregation information of described neighbor device on the port be connected, if consistent, represent that link aggregation configuration is correct, if inconsistent, represent link aggregation configuration mistake.According to the link aggregation information of LLDP message, described first detection module 620 judges whether the port of neighbor device exists enable link polymerization.
In the present embodiment, if opposite equip. (namely based on the neighbor device that LLDP agreement is connected with local device direct communication) configuration link be polymerized, then carry the link aggregation information of LLDP neighbours in the LLDP message that opposite equip. sends.If the non-configuration link polymerization of opposite equip., then the link aggregation information of the LLDP neighbours carried in the LLDP message that opposite equip. sends is for empty.The relatively link aggregation information of local device, when two ends are not mated, local device can carry out alarming processing.Present invention achieves to the network failure caused because of link aggregation configuration mistake quick, accurately locate.
Further, as shown in Figure 7, described first detection module 620 comprises: the first judging unit 621, first is unit 622, first nack unit 623 certainly.
Described first judging unit 621 judges whether local device and neighbor device are enable link about the configuration of link aggregation and are polymerized or are non-enable link and be polymerized on the port be connected.
Described first affirmative unit 622 is connected with described first judging unit 621, determines local device and the neighbor device configuration consistency about link aggregation information on the port be connected.If namely local device and neighbor device are on the port be connected, about the configuration consistency of link aggregation, be namely all enable link polymerization or be all non-enable link polymerization, be then connected port correct about the configuration of link aggregation.
Described first nack unit 623 is connected with described first judging unit 621, determines that local device is inconsistent with the configuration of neighbor device about link aggregation information on the port be connected.If namely local device and neighbor device are on the port be connected, inconsistent about link aggregation configuration, namely one end is enable link polymerization, and the other end is the polymerization of non-enable link, then the port be connected, about the configuration error of link aggregation, can carry out alarming processing.
Further, as shown in Figure 8, the described system 600 based on LLDP protocol detection link aggregation configuration also comprises: the second monitoring module 630, second detection module 640.
Described second monitoring module 630 is monitored certain the port links aggregation configuration enable of the neighbor device transmission received or is gone certain port links aggregation configuration enable.Described certain port links aggregation configuration enable refers to, the port not adding aggregation port is added aggregation port, makes this port become enable link aggregation port.Describedly go certain port links aggregation configuration enable to refer to, the port that will add aggregation port removes polymerization, makes this port become non-enable link aggregation port.
Described second detection module 640 is connected with described second monitoring module 630, whether detection local device is with the enable configuration of the link aggregation of described neighbor device on the port be connected or go enable configuration consistent, if consistent, represent that link aggregation configuration is correct, if inconsistent, represent link aggregation configuration mistake.
Further, as shown in Figure 9, described second detection module 640 comprises: the second judging unit 641, second nack unit the 642, three judging unit the 643, three is unit the 644, three nack unit 645 certainly.
Whether described second judging unit 641 judges certain port links aggregation configuration enable that described neighbor device sends or goes certain port links aggregation configuration enable to be the configuration made the port be connected with local device of neighbor device.
Described second nack unit 642 is connected with described second judging unit 641, terminates this in the negative case and judges.
Described 3rd judging unit 643 is connected with described second judging unit 641, continues in the yes case to judge whether local device and described neighbor device are the enable configuration of link aggregation on the port be connected or link aggregation goes enable configuration.
Described 3rd certainly unit 644 be connected with described 3rd judging unit 643, determine local device and neighbor device on the port be connected about the enable configuration of link aggregation or remove enable configuration consistency.
Described 3rd nack unit 645 is connected with described 3rd judging unit 643, determines local device and neighbor device on the port be connected about the enable configuration of link aggregation or go enable configuration inconsistent.
Further, as shown in Figure 10, the described system 600 based on LLDP protocol detection link aggregation configuration also comprises alarm module 650; Described alarm module 650 is connected with described first detection module 620 or described second detection module 640, carries out alarming processing when link aggregation configuration mistake.
The invention provides a kind of method and system based on LLDP protocol detection link aggregation configuration, achieve the automatic detection of the error configurations to the link aggregation based on LLDP agreement, so achieve to the network failure that the link aggregation configuration of mistake causes quick, accurately locate.The present invention can detect the configuration of link aggregation automatically by LLDP agreement, and Active report error configurations problem.
In sum, the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.