CN103179014A - LLDP (link layer discovery protocol) massage processing method and device - Google Patents

LLDP (link layer discovery protocol) massage processing method and device Download PDF

Info

Publication number
CN103179014A
CN103179014A CN2013101239176A CN201310123917A CN103179014A CN 103179014 A CN103179014 A CN 103179014A CN 2013101239176 A CN2013101239176 A CN 2013101239176A CN 201310123917 A CN201310123917 A CN 201310123917A CN 103179014 A CN103179014 A CN 103179014A
Authority
CN
China
Prior art keywords
tlv
information data
sty
lldp message
field
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.)
Granted
Application number
CN2013101239176A
Other languages
Chinese (zh)
Other versions
CN103179014B (en
Inventor
徐鹏飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201310123917.6A priority Critical patent/CN103179014B/en
Publication of CN103179014A publication Critical patent/CN103179014A/en
Application granted granted Critical
Publication of CN103179014B publication Critical patent/CN103179014B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks

Landscapes

  • Communication Control (AREA)

Abstract

The invention discloses an LLDP (link layer discovery protocol) massage processing method and an LLDP massage processing device. The method comprises the following steps that: STY (subtype) TLV (type, length, value) is defined in advance, STY TLV indicates that the TLV type is same as the TLV type of the former TLV, and the STY TLV consists of a TLV head and a TLV information field; when information data is sent, each information data in to-be-sent N information datum is carried by a first TLV, wherein the first TLV consists of an extension TLV head and a TLV information field, and more than two continuous first TLVs are allowed to be carried in one LLDP massage; a first TLV and (N-1) STY TLVs are constructed to carry N information datum, wherein the TLV information field in the first constructed TLV is used for carrying one information data in the N information data, a TLV information field in each constructed STY TLV is used for carrying one information data in the rest (N-1) information datum, and the information datum carried by TLV information fields in different STY TLVs are different; and the constructed first TLV and (N-1) STY TLVs are continuously packaged into one LLDP massage one after another, and then the LLDP massage is sent out.

Description

The processing method of LLDP message and device
Technical field
The application relates to network communications technology field, particularly a kind of processing method of LLDP message and device.
Background technology
At present, the kind of network communication equipment is day by day various and configuration separately is intricate, can mutually find also mutual system configuration information separately for the equipment that makes different vendor in network, and the information interchange platform of a standard need to be arranged.LLDP(Link Layer Discovery Protocol, Link Layer Discovery Protocol) be exactly to produce under such background, it provides a kind of link layer of standard to find mode, can be with the main ability of local device, management address, device identification becomes different TLV(Type Length Value with Information Organizations such as interface identifier, type, length, value), and be encapsulated in LLDPDU(Link Layer Discovery Protocol Data Unit, the Link Layer Discovery Protocol data cell), be to be distributed in the LLDP message and own direct-connected neighbor device, neighbor device receives after these information it with standard mib (Management Information Base, management information bank) form is preserved, communication conditions for network management system inquiry and oneself judgement link.
LLDP is the information interaction bridge between communication equipment, and can carrying various basic facility informations, to reach alternately extend information mutual, and very large extensibility is arranged on Protocol Design, has much based on the expanded application of LLDP.LLDP adds OUISubType(by TLV and organizes unique identification subtype, is used for the type of TLV field corresponding to expression) form organizes message, and can facilitate different manufacturers to carry out various expansions to the LLDP message and use.
The below is introduced as follows to the various TLV types of LLDP:
(1) in LLDP basic TLV type as shown in table 1-1:
Table 1-1
Figure BDA00003029657900011
Figure BDA00003029657900021
(2) the TLV type that defines in IEEE802.1 is as shown in table 1-2:
Table 1-2
Figure BDA00003029657900022
(3) the TLV type that defines in IEEE802.3 is as shown in table 1-3:
Table 1-3
Figure BDA00003029657900023
Figure BDA00003029657900031
(4) LLDP-MED(Media Endpoint Discovery, the media endpoint discovery) TLV is VoIP(Voiceover IP, upload sending voice in IP network) many senior application are provided, comprise basic configuration, network strategy configuration, address information and directory management etc., the different production firms that satisfied speech ciphering equipment cost effectively, the requirement of the aspects such as easily deployment, manageability, and solved in Ethernet the problem of disposing speech ciphering equipment, for the producer, sellers and the user of speech ciphering equipment provides convenience.LLDP-MED TLV type is as shown in table 1-4:
Table 1-4
Figure BDA00003029657900032
Figure BDA00003029657900041
In addition, also defined many expansion TLV in the newest standards of LLDP, such as: Management VLAN TLV, VIDUsageDigest TLV, QCN TLV, EVB TLV, CDCP TLV, APP TLV, PFC TLV and ETSTLV etc.The privately owned LLDP TLV of each manufacturer also constantly increases newly in application practice.
Summary of the invention
The application provides a kind of processing method and device of LLDP message, with solve exist in prior art when carrying continuous a plurality of same type TLV in a LLDP message, expansion TLV head in the expansion TLV of these a plurality of same types is identical, has caused the problem of the waste of data space.
The application's technical scheme is as follows:
On the one hand, provide a kind of processing method of LLDP message, having comprised:
Pre-defined STY TLV, described STY TLV represent identical with the TLV type of previous TLV, and described STYTLV is comprised of TLV head and TLV information field;
In the time will sending information data, each information data of judging in N the information data that will send all needs a TLV to carry, wherein, the one TLV is comprised of expansion TLV head and TLV information field, and allow to carry a continuous TLV more than two in a LLDP message, N is the natural number greater than 1;
Construct a TLV and N-1 STY TLV carries a described N information data, wherein, TLV information field in the one TLV of structure is used for carrying an information data of a described N information data, TLV information field in each STY TLV of structure is used for carrying an information data of remaining N-1 information data, and the information data that the TLV information field in different STY TLV carries is different;
The one TLV and described N-1 the STY TLV that successively will construct are encapsulated in a LLDP message continuously, send described LLDP message.
On the other hand, also provide a kind of processing unit of LLDP message, having comprised:
Definition module is used for pre-defined STY TLV, and it is identical with the TLV type of previous TLV that described STY TLV represents, described STY TLV is comprised of TLV head and TLV information field;
Judge module, be used in the time will sending information data, each information data of judging in N the information data that will send all needs a TLV to carry, wherein, the one TLV is comprised of expansion TLV head and TLV information field, and allow to carry a continuous TLV more than two in a LLDP message, N is the natural number greater than 1;
Constructing module, be used for the one TLV of structure and N-1 STY TLV and carry a described N information data, wherein, TLV information field in the one TLV of structure is used for carrying an information data of a described N information data, TLV information field in each STY TLV of structure is used for carrying an information data of remaining N-1 information data, and the information data that the TLV information field in different STY TLV carries is different;
Sending module, a TLV and described N-1 STY TLV of being used for successively described constructing module being constructed are encapsulated into a LLDP message continuously, send described LLDP message.
In the application's technical scheme, pre-defined a kind of TLV:STY TLV of newtype, STY TLV is previous TLV with adjacent TLV(in this TLV front) the TLV type identical, and STY TLV is comprised of TLV head and TLV information field, namely, expansion TLV head in expansion TLV is simplified for the basic TLV head that only is comprised of Type and Length field, thereby, data space saved.need the expansion TLV of N certain type when the N that will a send information data, when being called a TLV and carrying, just can carry this N information data with a TLV and N-1 STY TLV, namely, substituted a N-1 TLV that originally need to use with N-1 STY TLV, because STY TLV is identical with the TLV type of previous TLV, and save data space than a TLV, thereby, after sending in this TLV and N-1 STY TLV successively are carried at a LLDP message continuously, be equivalent to send a N TLV, but, saved again simultaneously data space.
Description of drawings
Fig. 1 is the form schematic diagram of the Port And Protocol VLAN ID TLV of prior art;
Fig. 2 is the flow chart of processing method of LLDP message of the application's embodiment one;
Fig. 3 is the form schematic diagram of STY TLV of the application's embodiment one;
Fig. 4 is the application's the continuous Port And Protocol VLAN ID TLV of embodiment one and the form schematic diagram of N-1 STY TLV;
Fig. 5 is the form schematic diagram of CONT TLV of the application's embodiment two;
Fig. 6 is the application's the continuous CDCP TLV of embodiment two and the form schematic diagram of a CONT TLV;
Fig. 7 is the structural representation of processing unit of LLDP message of the application's embodiment three.
Embodiment
There are following two problems in existing TLV:
(1) can find by analyzing existing expansion TLV, TLV is in the basic TLV head that is comprised of Type and Length field in expansion, increased OUI(Organizationally Unique Identifier newly, identifier is unified in the whole world) and Subtype(subtype) these two fields, jointly consist of an expansion TLV head by these four fields of Type, Length, OUI and Subtype, identify an expansion TLV.Like this, for repeatably expanding TLV, that is, the continuous a plurality of the type TLV of portability in a LLDP message, the expansion TLV head in the expansion TLV of these a plurality of same types is identical, thereby has caused the waste of data space.For example, Port And Protocol VLANID TLV is a kind of TLV that repeatably expands, when need to carry continuous a plurality of Port And Protocol VLAN ID TLV in the LLDP message time, the expansion TLV head of these a plurality of Port And Protocol VLAN ID TLV is identical.As shown in Figure 1, expansion TLV head comprises: Type, Length, 802.1OUI and Subtype field, take altogether 6 bytes, and accounted for 2/3 of Port And Protocol VLAN ID TLV total length.
(2) maximum due to Length field in TLV is 511, therefore, can only carry the data of 511 bytes at most in TLV information field in TLV except Type and Length field, like this, for the data of certain type, if be unrepeatable TLV for the TLV that carries this kind data, that is, can carry at most the type TLV in a LLDP message,, in order data to be carried in a TLV fully, just must the length of the data of carrying be limited.Thereby, the further application of LLDP has been brought impact.
for solve exist in prior art when carrying continuous a plurality of same type TLV in a LLDP message, expansion TLV head in the expansion TLV of these a plurality of same types is identical, caused the problem of the waste of data space, and, if the TLV for carrying certain data that exists in prior art is unrepeatable TLV, in order data to be carried in a TLV fully, the problem that just must limit the length of the data of carrying, a kind of processing method and a kind of device that can use the method for LLDP message are provided in following examples of the application.
Embodiment one
The processing method of the LLDP message of the application's embodiment one can be carried out by any one network equipment that can move LLDP, and the application does not do restriction to this.As shown in Figure 2, the method comprises the following steps:
Step S202, pre-defined STY(Same Type, of the same type) TLV, it is identical with the TLV type of previous TLV that STY TLV represents, that is, in the LLDP message at STY TLV and place, the TLV type of adjacent TLV in this TLV front is identical; As shown in Figure 4, STY TLV is comprised of TLV head and TLV information field, and wherein, the TLV head is comprised of the type field and Length field, and the below is explained as follows the implication of each field:
The type field: be used for the type of this TLV of expression, when the value of the type field is set to the first value, represent that this TLV is STY TLV; In actual implementation process, the first value for example can be 125, and the length of the type field is 7 bits;
The Length field: for the length of carrying the TLV information field, the length of this field can be 9 bits;
The TLV information field: be used for carrying the information data that will send, the length maximum of this field can be 511 bytes.
Step S204, in the time will sending information data, each information data of judging in N the information data that will send all needs a TLV to carry, namely, need a N TLV to carry, wherein, a TLV is comprised of expansion TLV head and TLV information field, namely, the one TLV is expansion TLV, and allows to carry a continuous TLV more than two in a LLDP message, namely, the one TLV is TLV repeatably, and N is the natural number greater than 1;
Wherein, expansion TLV head is comprised of the type field, Length field, OUI field and Subtype field.
Step S206, construct a TLV and N-1 STY TLV carries a described N information data, wherein, TLV information field in the one TLV of structure is used for carrying an information data of a described N information data, TLV information field in each STY TLV of structure is used for carrying an information data of remaining N-1 information data, and the information data that the TLV information field in different STY TLV carries is different; That is, a STYTLV carries an information data, and the information data that different STY TLV carries is different; Like this, carry in N the information data that needs to send by a TLV, N-1 STY TLV carries remaining N-1 information data, carries this N information data complete.
For example, suppose that N the information data (for the PPVID of port) that will send needs N Port And Protocol VLAN ID TLV to carry, at this moment, Port And Protocol VLAN ID TLV is a TLV, Port And Protocol VLAN ID TLV is TLV repeatably, and include expansion TLV head: Type, Length, 802.1OUI and Subtype field take 6 bytes altogether.
In order to save data space, can carry N the information data that will send with a TLV and N-1 STY TLV.That is a N-1 TLV who, replaces needs use originally with N-1 STY TLV.
Carry in N the information data that will send one with a Port And Protocol VLAN ID TLV, re-use N-1 STY TLV and carry remaining N-1 information data.Like this, if originally use N Port And Protocol VLAN ID TLV, so, N expansion TLV head need take the 6N byte altogether, but, use now a Port And Protocol VLAN ID TLV and N-1 STY TLV, 1 TLV expansion TLV head and N-1 TLV head only need take 6+ (N-1) * 2=2N+4 byte, have saved data space.
Step S208, a TLV that successively will construct and N-1 STY TLV are encapsulated in a LLDP message continuously, send the LLDP message.That is, in this LLDP message, the back of a TLV is followed by described N-1 STY TLV.
For example, successively a Port And Protocol VLAN ID TLV and N-1 STY TLV are encapsulated in a LLDP message continuously, at this moment, the form of this Port And Protocol VLAN ID TLV and N-1 STY TLV as shown in Figure 4.
In the technical scheme of the embodiment of the present application, pre-defined a kind of TLV:STY TLV of newtype, STY TLV is previous TLV with adjacent TLV(in this TLV front) the TLV type identical, and STY TLV is comprised of TLV head and TLV information field, namely, expansion TLV head in expansion TLV is simplified for the basic TLV head that only is comprised of Type and Length field, thereby, data space saved.need the expansion TLV of N certain type when the N that will a send information data, when being called a TLV and carrying, just can carry this N information data with a TLV and N-1 STY TLV, namely, substituted a N-1 TLV that originally need to use with N-1 STY TLV, because STY TLV is identical with the TLV type of previous TLV, and save data space than a TLV, thereby, after sending in this TLV and N-1 STY TLV successively are carried at a LLDP message continuously, be equivalent to send a N TLV, but, saved again simultaneously data space.
By upper, if an expansion TLV back followed by a STY TLV,, this STY TLV is identical with this TLV type of expanding TLV; If an expansion TLV back is followed by a plurality of STY TLV, these a plurality of STY TLV can be called a STY TLV sequence, and, by recurrence relation, the TLV type that can determine each the STY TLV in this STY TLV sequence is all identical with this expansion TLV.
In addition, can also comprise the following steps in above-mentioned method:
Step S302 receives the LLDP message, wherein, carries continuous a TLV and M-1 STY TLV in the LLDP message of reception, and M is the natural number greater than 1;
Step S304, adjacent in the front of M-1 STY TLV according to a TLV who carries in the LLDP message that receives, the type of determining M-1 STY TLV is identical with the type of a TLV.
For example, carry continuous a Port And Protocol VLAN ID TLV and N-1 STY TLV in the LLDP message of reception, as shown in Figure 4.By Type=125 as can be known, this TLV is STY TLV, and because the type of STY TLV is identical with the type of previous TLV, therefore, the type that can in turn determine each STY TLV is Port And Protocol VLAN ID TLV.
In actual implementation process, can also make some regulations to the use of STY TLV according to actual needs, for example:
(1) STY TLV can not be adjacent at three essential TLV:Chassis ID TLV, after PortID TLV and TTL TLV, can not be adjacent after End TLV, that is and, above-mentioned four TLV all do not support STY TLV;
Allow to carry a plurality of STY TLV in (2) LLDP messages, and can be continuous; When a plurality of STY TLV of continuous appearance, these continuous a plurality of STY TLV are called STY TLV sequence, and the type of all the STY TLV in this sequence all TLV type with the previous TLV of this sequence is identical.
Embodiment two
Can also comprise the following steps in method in above-described embodiment one:
Step S402, pre-defined CONT(Continue continues) TLV, CONT TLV represents that information data that this TLV carries is the follow-up data of the previous TLV information data of carrying and then;
For example, the previous TLV of CONT TLV is CDCP TLV, and so, the information data that CONT TLV carries is exactly the follow-up data that are right after after the information data that CDCP TLV carries.
In actual implementation process, as shown in Figure 5, CONT TLV is comprised of TLV head and TLV information field, and wherein, the TLV head is comprised of the type field and Length field, and the below makes an explanation as follows to the implication of each field respectively:
The type field: be used for the type of this TLV of expression, when the value of the type field is set to the second value, represent that this TLV is CONT TLV; In actual implementation process, the second value can be 126, and the length of this field is 7 bits;
The Length field: for the length of carrying the TLV information field, the length of this field can be 9 bits;
The TLV information field: be used for the carry information data, the length maximum of this field can be 511 bytes.
Step S404 in the time will sending information data, judges the information data that will send and need to carry by the 2nd TLV more than two, wherein, allows to carry at most the 2nd TLV in a LLDP message, that is, the 2nd TLV is unrepeatable TLV;
Step S406 constructs the front portion that the 2nd TLV carries the information data that will send, and constructs at least one CONT TLV and carry respectively remainder;
Step S408 according to the sequencing of the information data of carrying, is encapsulated into the 2nd TLV and at least one the CONT TLV that constructs in a LLDP message continuously, sends the LLDP message.
For example, suppose that a CDCP TLV(namely, the 2nd TLV) can carry the information data (for SCID/SVID) of 504 bytes, to send now the information data that length is the 1K byte, originally need 2 CDCP TLV to carry, still, CDCP TLV is unrepeatable TLV, like this, just can only carry a part of information data.In order to provide larger elastic data space for the larger information data of length, use the method for the present embodiment two, can carry with a CDCP TLV the most front 504 bytes of the information data of this 1K byte, then, re-use a CONT TLV and carry respectively remaining part, the form of this CDCP TLV and a CONT TLV as shown in Figure 6.Like this, just can be longer in the length of the information data that will send, and when the TLV of this kind of portability information data is unrepeatable TLV again, for this information data provides larger elastic data space, with complete the sending in a LLDP message of this information data.
in the technical scheme of the embodiment of the present application, pre-defined a kind of novel TLV:CONT TLV, CONT TLV represents that information data that this TLV carries is the follow-up data of the previous TLV information data of carrying and then, like this, when the length of the information data that will send longer, need the TLV of a plurality of certain type, being called the 2nd TLV could carry fully, but when the 2nd TLV is unrepeatable TLV again, just can carry with the 2nd TLV front portion of this information data, re-use at least one CONT TLV and carry respectively remainder, and, sequencing according to the information data of carrying, the 2nd TLV that constructs is encapsulated in a LLDP message continuously with at least one CONT TLV sends, like this, the follow-up data of the previous TLV information data of carrying and then because CONT TLV represents information data that this TLV carries, therefore, just be equivalent to this information data has been divided into a plurality of parts, and be carried in the LLDP message according to the sequencing of information data.
In addition, can also comprise the following steps in above-mentioned method:
Step S502 receives the LLDP message, wherein, carries continuous the 2nd TLV and at least one CONT TLV in the LLDP message of reception;
Step S504 obtains the information data in the 2nd TLV that carries in the LLDP message of reception and at least one CONT TLV, and according to the sequencing of the 2nd TLV and at least one CONT TLV, the information data that combination is obtained obtains a complete information data.
For example, carry continuous a CDCP TLV and a CONT TLV in the LLDP message that receives, as shown in Figure 6, obtain the information data of carrying in a CDCP TLV and CONT TLV, the information data that to obtain is placed on the information data of obtaining from CDCP TLV after, obtained a complete information data from CONT TLV.
In actual implementation process, can make some regulations to the use of CONT TLV, for example:
(1) CONT TLV can not closely follow after three essential TLV:Chassis ID TLV, PortID TLV and TTLTLV, can not be adjacent after End TLV, and above-mentioned four TLV all do not support CONT TLV;
Allow to carry a plurality of CONT TLV in (2) LLDP messages, and can be continuous; When a plurality of CONT TLV of continuous appearance, these continuous a plurality of CONT TLV are called CONT TLV sequence, the information data of carrying in all the CONT TLV in this sequence is placed in order continuously, and the information data of carrying in each CONT TLV is the follow-up data followed by the information data of carrying in previous TLV;
(3) CONT TLV is as the data extending of unrepeatable TLV, if the expansion of the data of CONT TLV and unrepeatable TLV exist conflict or unrepeatable TLV in information data do not support expansion, CONTTLV can abandon as wrong TLV.
Obviously, the above embodiments one and embodiment two can implement separately, also can combine enforcement, and the application does not do restriction to this.
Embodiment three
For the method in above-described embodiment one and embodiment two, the embodiment of the present application provides a kind of processing unit that can use the LLDP message of the method.
As shown in Figure 7, this processing unit comprises with lower module: definition module 10, judge module 20, constructing module 30 and sending module 40, wherein:
Definition module 10 is used for pre-defined STY TLV, and it is identical with the TLV type of previous TLV that STY TLV represents, STY TLV is comprised of TLV head and TLV information field;
Judge module 20, be used in the time will sending information data, each information data of judging in N the information data that will send all needs a TLV to carry, wherein, the one TLV is comprised of expansion TLV head and TLV information field, and allow to carry a continuous TLV more than two in a LLDP message, N is the natural number greater than 1;
Constructing module 30, be used for the one TLV of structure and N-1 STY TLV and carry a described N information data, wherein, TLV information field in the one TLV of structure is used for carrying an information data of a described N information data, TLV information field in each STY TLV of structure is used for carrying an information data of remaining N-1 information data, and the information data that the TLV information field in different STY TLV carries is different;
Sending module 40, a TLV and N-1 STY TLV of being used for successively constructing module 30 being constructed are encapsulated into a LLDP message continuously, send this LLDP message.
In addition, can also comprise in this processing unit with lower module: receiver module and processing module, wherein:
Receiver module is used for receiving the LLDP message, wherein, carries continuous a TLV and M-1 STY TLV in the LLDP message of reception, and M is the natural number greater than 1;
Processing module, a TLV who carries for the LLDP message that receives according to receiver module is adjacent in the front of M-1 STY TLV, and the type of determining M-1 STY TLV is identical with the type of a TLV.
In addition, according to another embodiment of the application, the definition module 10 in this processing unit, judge module 20, constructing module 30 and sending module 40 also have following functions:
Definition module 10 also is used for pre-defined CONT TLV, and CONT TLV represents that information data that this TLV carries is the follow-up data of the previous TLV information data of carrying and then;
Judge module 20 also is used in the time will sending information data, judges the information data that will send and need to carry by the 2nd TLV more than two, wherein, allows to carry at most the 2nd TLV in a LLDP message;
Constructing module 30 also is used for the front portion that the 2nd TLV of structure carries the information data that will send, and constructs at least one CONT TLV and carry respectively remainder;
Sending module 40 also is used for the sequencing according to the information data of carrying, and the 2nd TLV and at least one CONT TLV that constructing module 30 is constructed are encapsulated in a LLDP message continuously, send the LLDP message.
Wherein, can also comprise in this processing unit with lower module: receiver module and processing module, wherein:
Receiver module is used for receiving the LLDP message, wherein, carries continuous the 2nd TLV and at least one CONT TLV in the LLDP message of reception;
Processing module, be used for obtaining the 2nd TLV that LLDP message that receiver module receives carries and the information data at least one CONT TLV, according to the sequencing of the 2nd TLV and at least one CONT TLV, the information data that combination is obtained obtains a complete information data.
To sum up, the above embodiment of the application can reach following technique effect:
(1) pre-defined a kind of TLV:STY TLV of newtype, STY TLV is previous TLV with adjacent TLV(in this TLV front) the TLV type identical, and STY TLV is comprised of TLV head and TLV information field, namely, expansion TLV head in expansion TLV is simplified for the basic TLV head that only is comprised of Type and Length field, thereby, saved data space.need the expansion TLV of N certain type when the N that will a send information data, when being called a TLV and carrying, just can carry this N information data with a TLV and N-1 STY TLV, namely, substituted a N-1 TLV that originally need to use with N-1 STY TLV, because STY TLV is identical with the TLV type of previous TLV, and save data space than a TLV, thereby, after sending in this TLV and N-1 STY TLV successively are carried at a LLDP message continuously, be equivalent to send a N TLV, but, saved again simultaneously data space.
(2) pre-defined a kind of novel TLV:CONT TLV, CONT TLV represents that information data that this TLV carries is the follow-up data of the previous TLV information data of carrying and then, like this, when the length of the information data that will send longer, need the TLV of a plurality of certain type, being called the 2nd TLV could carry fully, but when the 2nd TLV is unrepeatable TLV again, just can carry with the 2nd TLV front portion of this information data, re-use at least one CONT TLV and carry respectively remainder, and, sequencing according to the information data of carrying, the 2nd TLV that constructs is encapsulated in a LLDP message continuously with at least one CONT TLV sends, like this, the follow-up data of the previous TLV information data of carrying and then because CONT TLV represents information data that this TLV carries, therefore, just be equivalent to this information data has been divided into a plurality of parts, and be carried in the LLDP message according to the sequencing of information data.
(3) provide for follow-up more self-defined TLV the TLV composition mechanism of optimizing.
The above is only the application's preferred embodiment, and is in order to limit the application, not all within the application's spirit and principle, any modification of making, is equal to replacement, improvement etc., within all should being included in the scope of the application's protection.

Claims (10)

1. the processing method of a Link Layer Discovery Protocol LLDP message, is characterized in that, comprising:
Pre-defined STY type lengths values TLV of the same type, it is identical with the TLV type of previous TLV that described STY TLV represents, described STY TLV is comprised of TLV head and TLV information field;
In the time will sending information data, each information data of judging in N the information data that will send all needs a TLV to carry, wherein, the one TLV is comprised of expansion TLV head and TLV information field, and allow to carry a continuous TLV more than two in a LLDP message, N is the natural number greater than 1;
Construct a TLV and N-1 STY TLV carries a described N information data, wherein, TLV information field in the one TLV of structure is used for carrying an information data of a described N information data, TLV information field in each STY TLV of structure is used for carrying an information data of remaining N-1 information data, and the information data that the TLV information field in different STY TLV carries is different;
The one TLV and described N-1 the STY TLV that successively will construct are encapsulated in a LLDP message continuously, send described LLDP message.
2. method according to claim 1, is characterized in that,
Described expansion TLV head is comprised of type the type field, length L ength field, the unified identifier OUI field in the whole world and subtype Subtype field;
TLV head in described STY TLV is comprised of the type field and Length field, wherein, the type field is used for the type of this TLV of expression, when the value of the type field is set to the first value, represent that this TLV is STY TLV, the Length field is used for carrying the length value of TLV information field.
3. method according to claim 1 and 2, is characterized in that, also comprises:
Receive the LLDP message, wherein, carry continuous a TLV and M-1 STY TLV in the LLDP message of reception, M is the natural number greater than 1;
Adjacent in the front of described M-1 STY TLV according to a TLV who carries in the LLDP message that receives, the type of determining described M-1 STY TLV is identical with the type of a TLV.
4. method according to claim 1, is characterized in that, also comprises:
Pre-defined continuation CONT TLV, described CONT TLV represent that information data that this TLV carries is the follow-up data of the previous TLV information data of carrying and then;
In the time will sending information data, judge the information data that will send and need to carry by the 2nd TLV more than two, wherein, allow to carry at most the 2nd TLV in a LLDP message;
Construct the 2nd TLV and carry the front portion of the information data that will send, and construct at least one CONT TLV and carry respectively remainder;
According to the sequencing of the information data of carrying, the 2nd TLV and described at least one the CONT TLV that constructs is encapsulated in a LLDP message continuously, send described LLDP message.
5. method according to claim 4, is characterized in that, described CONT TLV is comprised of TLV head and TLV information field, and the TLV head is comprised of the type field and Length field, wherein:
The type field is used for the type of this TLV of expression, when the value of the type field is set to the second value, represents that this TLV is CONT TLV;
The Length field is for the length of carrying the TLV information field;
The TLV information field is used for the carry information data.
6. according to claim 4 or 5 described methods, is characterized in that, also comprises:
Receive the LLDP message, wherein, carry continuous the 2nd TLV and at least one CONT TLV in the LLDP message of reception;
Obtain the information data in the 2nd TLV that carries in the LLDP message of reception and at least one CONT TLV, according to the sequencing of the 2nd TLV and at least one CONT TLV, the information data that combination is obtained obtains a complete information data.
7. the processing unit of a Link Layer Discovery Protocol LLDP message, is characterized in that, comprising:
Definition module is used for pre-defined STY type lengths values TLV of the same type, and it is identical with the TLV type of previous TLV that described STY TLV represents, described STY TLV is comprised of TLV head and TLV information field;
Judge module, be used in the time will sending information data, each information data of judging in N the information data that will send all needs a TLV to carry, wherein, the one TLV is comprised of expansion TLV head and TLV information field, and allow to carry a continuous TLV more than two in a LLDP message, N is the natural number greater than 1;
Constructing module, be used for the one TLV of structure and N-1 STY TLV and carry a described N information data, wherein, TLV information field in the one TLV of structure is used for carrying an information data of a described N information data, TLV information field in each STY TLV of structure is used for carrying an information data of remaining N-1 information data, and the information data that the TLV information field in different STY TLV carries is different;
Sending module, a TLV and described N-1 STY TLV of being used for successively described constructing module being constructed are encapsulated into a LLDP message continuously, send described LLDP message.
8. device according to claim 7, is characterized in that, also comprises:
Receiver module is used for receiving the LLDP message, wherein, carries continuous a TLV and M-1 STY TLV in the LLDP message of reception, and M is the natural number greater than 1;
Processing module, a TLV who carries for the LLDP message that receives according to described receiver module is adjacent in the front of described M-1 STY TLV, and the type of determining described M-1 STY TLV is identical with the type of a TLV.
9. device according to claim 7, is characterized in that,
Described definition module also is used for pre-defined continuation CONT TLV, and described CONT TLV represents that information data that this TLV carries is the follow-up data of the previous TLV information data of carrying and then;
Described judge module also is used in the time will sending information data, judges the information data that will send and need to carry by the 2nd TLV more than two, wherein, allows to carry at most the 2nd TLV in a LLDP message;
Described constructing module also is used for the front portion that the 2nd TLV of structure carries the information data that will send, and constructs at least one CONT TLV and carry respectively remainder;
Described sending module also is used for the sequencing according to the information data of carrying, and the 2nd TLV and described at least one CONT TLV that described constructing module is constructed are encapsulated in a LLDP message continuously, send described LLDP message.
10. device according to claim 9, is characterized in that, also comprises:
Receiver module is used for receiving the LLDP message, wherein, carries continuous the 2nd TLV and at least one CONT TLV in the LLDP message of reception;
Processing module, be used for obtaining the 2nd TLV that LLDP message that described receiver module receives carries and the information data at least one CONT TLV, according to the sequencing of the 2nd TLV and at least one CONT TLV, the information data that combination is obtained obtains a complete information data.
CN201310123917.6A 2013-04-10 2013-04-10 The processing method of LLDP message and device Active CN103179014B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310123917.6A CN103179014B (en) 2013-04-10 2013-04-10 The processing method of LLDP message and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310123917.6A CN103179014B (en) 2013-04-10 2013-04-10 The processing method of LLDP message and device

Publications (2)

Publication Number Publication Date
CN103179014A true CN103179014A (en) 2013-06-26
CN103179014B CN103179014B (en) 2016-03-09

Family

ID=48638645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310123917.6A Active CN103179014B (en) 2013-04-10 2013-04-10 The processing method of LLDP message and device

Country Status (1)

Country Link
CN (1) CN103179014B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103368967A (en) * 2013-07-17 2013-10-23 杭州华三通信技术有限公司 Security access method and equipment for IP phone
CN103441983A (en) * 2013-07-11 2013-12-11 盛科网络(苏州)有限公司 Information protection method and device based on link layer discovery protocol
CN103825813A (en) * 2014-03-12 2014-05-28 杭州华三通信技术有限公司 LLDP (Link Layer Discovery Protocol) message processing method and device
CN106790232A (en) * 2017-01-18 2017-05-31 上海市共进通信技术有限公司 The method and system of VOIP speech businesses are realized by LLDP messages

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060280174A1 (en) * 2003-09-10 2006-12-14 Nokia Corporation Method and system for establishing a data link layer protocol on a physical layer port connection
CN101621414A (en) * 2009-08-21 2010-01-06 杭州华三通信技术有限公司 Method and apparatus for discovering network resource and topology
CN102739448A (en) * 2012-06-28 2012-10-17 华为技术有限公司 Method, device and system for transmitting messages

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060280174A1 (en) * 2003-09-10 2006-12-14 Nokia Corporation Method and system for establishing a data link layer protocol on a physical layer port connection
CN101621414A (en) * 2009-08-21 2010-01-06 杭州华三通信技术有限公司 Method and apparatus for discovering network resource and topology
CN102739448A (en) * 2012-06-28 2012-10-17 华为技术有限公司 Method, device and system for transmitting messages

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441983A (en) * 2013-07-11 2013-12-11 盛科网络(苏州)有限公司 Information protection method and device based on link layer discovery protocol
CN103368967A (en) * 2013-07-17 2013-10-23 杭州华三通信技术有限公司 Security access method and equipment for IP phone
CN103825813A (en) * 2014-03-12 2014-05-28 杭州华三通信技术有限公司 LLDP (Link Layer Discovery Protocol) message processing method and device
CN103825813B (en) * 2014-03-12 2017-02-15 杭州华三通信技术有限公司 LLDP (Link Layer Discovery Protocol) message processing method and device
CN106790232A (en) * 2017-01-18 2017-05-31 上海市共进通信技术有限公司 The method and system of VOIP speech businesses are realized by LLDP messages

Also Published As

Publication number Publication date
CN103179014B (en) 2016-03-09

Similar Documents

Publication Publication Date Title
CN103825954B (en) A kind of OpenFlow control methods and corresponding plug-in unit, platform and network
CN107347205B (en) A kind of network slice selection method, apparatus and system
CN102685856B (en) Wireless communication method and Wi-Fi Direct (Wireless Fidelity Direct) communication system
CN103441932B (en) A kind of Host routes list item generates method and apparatus
CN106487558B (en) A kind of method and apparatus for realizing the scalable appearance of access device
CN110401568A (en) A kind of method for discovering network topology and equipment
GB0421206D0 (en) Method and system for enabling connections into networks with local address realms
CN112953774B (en) Network topology generation method, system, equipment and computer storage medium
CN103179014B (en) The processing method of LLDP message and device
CN104426927B (en) A kind of intercommunication terminal parameter setting method and system
CN104937896A (en) Method for processing address resolution protocol message, forwarder and controller
CN104618980A (en) Routing implementation method for wireless multi-hop chain network
US9094316B2 (en) Dynamic name generation
CN104283802A (en) Neighbor discovery method and device
CN106506717A (en) A kind of automatic discovering method and equipment
CN106161103A (en) Switch-layer topology construction method and device
KR101033665B1 (en) A head node election method for clustering in wireless sensor network and thereof wireless sensor network
CN104579978A (en) Link-layer topology discovery method for dynamic network
CN102457903B (en) Wireless sensor network is linked into connection control method and the device of telecommunications network by multiple gateway
CN107465621A (en) A kind of router finds method, SDN controllers, router and network system
ATE365435T1 (en) RADIO EQUIPMENT MANAGEMENT OF PACKET DATA ON A PORT NUMBER BASIS
CN103825813A (en) LLDP (Link Layer Discovery Protocol) message processing method and device
CN103249114B (en) Group's Intranet strange land cut-in method and system
CN107071856A (en) A kind of node cut-in method of channel wireless radio multi Mesh network
CN102882887A (en) Smooth software updating method and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: Huasan Communication Technology Co., Ltd.