CN103179014B - The processing method of LLDP message and device - Google Patents
The processing method of LLDP message and device Download PDFInfo
- Publication number
- CN103179014B CN103179014B CN201310123917.6A CN201310123917A CN103179014B CN 103179014 B CN103179014 B CN 103179014B CN 201310123917 A CN201310123917 A CN 201310123917A CN 103179014 B CN103179014 B CN 103179014B
- Authority
- CN
- China
- Prior art keywords
- tlv
- information data
- stytlv
- 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.)
- Active
Links
Classifications
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
Landscapes
- Communication Control (AREA)
Abstract
Does this application discloses a kind of processing method and device of LLDP message, wherein, the method comprise: pre-defined STY? TLV, STY? does TLV represent identical with the TLV type of previous TLV, STY? TLV is made up of TLV head and TLV information field; When information data will be sent, judge that each information data in N number of information data that will send all needs a TLV to carry, wherein, a TLV by expanding TLV head and TLV information field forms, and allows in a LLDP message, carry continuous print two or more the one TLV; Do you construct a TLV and N-1 STY? TLV carries N number of information data, wherein, TLV information field in one TLV of structure is for carrying an information data in N number of information data, each STY of structure? is TLV information field in TLV for carrying an information data in remaining N-1 information data, different STY? the information data that TLV information field in TLV carries is different; Successively by a TLV and N-1 STY of structure? TLV is encapsulated in a LLDP message continuously, sends LLDP message.
Description
Technical field
The application relates to network communication technology field, particularly a kind of processing method of LLDP message and device.
Background technology
At present, the configuration that the kind of network communication equipment is day by day various and respective is intricate, in order to enable the equipment of different vendor mutually find in a network and system configuration information respective alternately, needs the information intercourse platform of a standard.LLDP (LinkLayerDiscoveryProtocol, Link Layer Discovery Protocol) be exactly produce in this context, the link layer it providing a kind of standard finds mode, can by the unique ability of local device, management address, device identification becomes different TLV (TypeLengthValue with Information Organizations such as interface identifier, type, length, value), and be encapsulated in LLDPDU (LinkLayerDiscoveryProtocolDataUnit, Link Layer Discovery Protocol data cell), namely the neighbor device direct-connected with oneself is distributed in LLDP message, neighbor device to receive it after these information with standard mib (ManagementInformationBase, management information bank) form save, for network management system inquiry and the communication conditions oneself judging link.
LLDP is the information interaction bridge between communication equipment, and can carry the mutual and extend information of various basic facility information mutual, Protocol Design has very large extensibility, the expanded application based on LLDP has a lot.LLDP adds OUISubType (tissue unique identification subtype, for representing the type of the TLV field of correspondence) form by TLV and organizes message, different manufacturers can be facilitated to carry out various expansion to LLDP message and use.
Be introduced as follows to the various TLV types of LLDP below:
(1) basic in LLDP TLV type is as shown in table 1-1:
Table 1-1
(2) the TLV type defined in IEEE802.1 is as shown in table 1-2:
Table 1-2
(3) the TLV type defined in IEEE802.3 is as shown in table 1-3:
Table 1-3
(4) LLDP-MED (MediaEndpointDiscovery, media endpoints finds) TLV is VoIP (VoiceoverIP, transmit voice on ip networks) provide many senior application, comprise basic configuration, network strategy configuration, address information and directory management etc., the requirement of the different production firms meeting speech ciphering equipment at cost effectively, easily in deployment, manageability etc., and solve the problem of disposing speech ciphering equipment in ethernet networks, for the producer of speech ciphering equipment, sellers and user provide convenience.LLDP-MEDTLV type is as shown in table 1-4:
Table 1-4
In addition, many expansion TLV are also defined in the newest standards of LLDP, such as: Management VLAN TLV, VIDUsageDigestTLV, QCNTLV, EVBTLV, CDCPTLV, APPTLV, PFCTLV and ETSTLV etc.The privately owned LLDPTLV of each manufacturer also constantly increases newly in application practice.
Summary of the invention
This application provides a kind of processing method and device of LLDP message, with solve exist in prior art when carrying the multiple same type TLV of continuous print in a LLDP message, expansion TLV head in the expansion TLV of this multiple identical type is identical, causes the problem of the waste of data space.
The technical scheme of the application is as follows:
On the one hand, provide a kind of processing method of LLDP message, comprising:
Pre-defined STYTLV, described STYTLV represent identical with the TLV type of previous TLV, and described STYTLV is made up of TLV head and TLV information field;
When information data will be sent, judge that each information data in N number of information data that will send all needs a TLV to carry, wherein, one TLV is by expanding TLV head and TLV information field forms, and allow carry in a LLDP message continuous print two or more the one TLV, N be greater than 1 natural number;
Construct a TLV and N-1 STYTLV and carry described N number of information data, wherein, TLV information field in one TLV of structure is for carrying an information data in described N number of information data, TLV information field in each STYTLV of structure is for carrying an information data in remaining N-1 information data, and the information data that the TLV information field in different STYTLV carries is different;
Successively a TLV of a structure and described N-1 STYTLV is encapsulated in a LLDP message continuously, sends described LLDP message.
On the other hand, additionally provide a kind of processing unit of LLDP message, comprising:
Definition module, for pre-defined STYTLV, described STYTLV represents identical with the TLV type of previous TLV, and described STYTLV is made up of TLV head and TLV information field;
Judge module, for when information data will be sent, judge that each information data in N number of information data that will send all needs a TLV to carry, wherein, one TLV is by expanding TLV head and TLV information field forms, and allow carry in a LLDP message continuous print two or more the one TLV, N be greater than 1 natural number;
Constructing module, for constructing a TLV and N-1 STYTLV to carry described N number of information data, wherein, TLV information field in one TLV of structure is for carrying an information data in described N number of information data, TLV information field in each STYTLV of structure is for carrying an information data in remaining N-1 information data, and the information data that the TLV information field in different STYTLV carries is different;
Sending module, the TLV constructed by described constructing module for a priority and described N-1 STYTLV is encapsulated in a LLDP message continuously, sends described LLDP message.
In the technical scheme of the application, pre-define a kind of TLV:STYTLV of newtype, STYTLV is identical with the TLV type of the TLV be close in before this TLV (i.e. previous TLV), and STYTLV is made up of TLV head and TLV information field, namely, expansion TLV head in expansion TLV is simplified in order to the basic TLV head be only made up of Type and Length field, thus, save data space.When N number of information data that will send needs the expansion TLV of certain type N number of, when being called a TLV to carry, a TLV and N-1 STYTLV just can be used to carry this N number of information data, namely, N-1 the TLV originally needing to use is instead of with N-1 STYTLV, because STYTLV is identical with the TLV type of previous TLV, and save data space than a TLV, thus, after this TLV and N-1 STYTLV be successively carried at continuously send in a LLDP message, be equivalent to have sent a N number of TLV, but, in turn save data space simultaneously.
Accompanying drawing explanation
Fig. 1 is the form schematic diagram of the PortAndProtocolVLANIDTLV of prior art;
Fig. 2 is the flow chart of the processing method of the LLDP message of the embodiment one of the application;
Fig. 3 is the form schematic diagram of the STYTLV of the embodiment one of the application;
Fig. 4 is the form schematic diagram of a continuous print PortAndProtocolVLANIDTLV and N-1 STYTLV of the embodiment one of the application;
Fig. 5 is the form schematic diagram of the CONTTLV of the embodiment two of the application;
Fig. 6 is the form schematic diagram of a continuous print CDCPTLV and CONTTLV of the embodiment two of the application;
Fig. 7 is the structural representation of the processing unit of the LLDP message of the embodiment three of the application.
Embodiment
There is following two problems in existing TLV:
(1) can find by analyzing existing expansion TLV, TLV is in the basic TLV head be made up of Type and Length field in expansion, increase OUI (OrganizationallyUniqueIdentifier newly, whole world unified identifier) and these two fields of Subtype (subtype), jointly form 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, can carry the multiple the type TLV of continuous print in a LLDP message, the expansion TLV head in the expansion TLV of this multiple identical type is identical, thus causes the waste of data space.Such as, PortAndProtocolVLANIDTLV is that one repeatably expands TLV, when needs carry the multiple PortAndProtocolVLANIDTLV of continuous print in LLDP message, the expansion TLV head of this multiple PortAndProtocolVLANIDTLV is identical.As shown in Figure 1, expand TLV head to comprise: Type, Length, 802.1OUI and Subtype field, takies 6 bytes altogether, account for 2/3 of PortAndProtocolVLANIDTLV total length.
(2) because the maximum of Length field in TLV is 511, therefore, the data of 511 bytes can only be carried at most in TLV information field in a TLV except Type and Length field, like this, for the data of certain type, if the TLV for carrying this kind of data is unrepeatable TLV, namely, the type TLV can be carried at most in a LLDP message, then, in order to data be carried in a TLV completely, just must limit the length of the data of carrying.Thus, impact is brought on the further application of LLDP.
In order to solve exist in prior art when carrying the multiple same type TLV of continuous print in a LLDP message, expansion TLV head in the expansion TLV of this multiple identical type is identical, cause the problem of the waste of data space, and, if what exist in prior art is unrepeatable TLV for carrying the TLV of certain data, then in order to data be carried in a TLV completely, the problem that just must limit the length of the data of carrying, provide in following examples of the application a kind of LLDP message processing method and a kind of can device to apply the method.
Embodiment one
The network equipment that the processing method of the LLDP message of the embodiment one of the application can run LLDP by any one performs, and the application does not limit this.As shown in Figure 2, the method comprises the following steps:
Step S202, pre-defined STY (SameType, of the same type) TLV, STYTLV represent identical with the TLV type of previous TLV, that is, STYTLV is identical with the TLV type being close in the TLV before this TLV in the LLDP message at place; As shown in Figure 3, STYTLV is made up of TLV head and TLV information field, and wherein, TLV head is made up of the type field and Length field, is explained as follows below to the implication of each field:
The type field: for representing the type of this TLV, when the value of the type field is set to the first value, represents that this TLV is STYTLV; In actual implementation process, the first value can be such as 125, and the length of the type field is 7 bits;
Length field: for carrying the length of TLV information field, the length of this field can be 9 bits;
TLV information field: for carrying the information data that will send, the length of this field is maximum can be 511 bytes.
Step S204, when sending information data, judges that each information data in N number of information data that will send all needs a TLV to carry, namely, need a N number of TLV to carry, wherein, a TLV is by expanding TLV head and TLV information field forms, namely, one TLV is expansion TLV, and allows in a LLDP message, carry continuous print two or more the one TLV, namely, one TLV be repeatably TLV, N be greater than 1 natural number;
Wherein, expand TLV head to be made up of the type field, Length field, OUI field and Subtype field.
Step S206, construct a TLV and N-1 STYTLV and carry described N number of information data, wherein, TLV information field in one TLV of structure is for carrying an information data in described N number of information data, TLV information field in each STYTLV of structure is for carrying an information data in remaining N-1 information data, and the information data that the TLV information field in different STYTLV carries is different; That is, a STYTLV carries an information data, and the information data that different STYTLV carries is different; Like this, carried in the N number of information data needing to send by a TLV, N-1 STYTLV carries remaining N-1 information data, carries complete by this N number of information data.
Such as, suppose that N number of information data (PPVID for port) that will send needs N number of PortAndProtocolVLANIDTLV to carry, now, PortAndProtocolVLANIDTLV is a TLV, PortAndProtocolVLANIDTLV is repeatably TLV, and including expansion TLV head: Type, Length, 802.1OUI and Subtype field, takies 6 bytes altogether.
In order to save data space, a TLV and N-1 STYTLV can be used to carry N number of information data that will send.That is, with N-1 the TLV that N-1 STYTLV replaces needs originally to use.
Use one that a PortAndProtocolVLANIDTLV carries in N number of information data that will send, re-use N-1 STYTLV to carry remaining N-1 information data.Like this, if originally use N number of PortAndProtocolVLANIDTLV, so, N number of expansion TLV head need take 6N byte altogether, but, present use PortAndProtocolVLANIDTLV and N-1 STYTLV, then 1 TLV expansion TLV head and N-1 TLV head only need take 6+ (N-1) * 2=2N+4 byte, save data space.
Step S208, is successively encapsulated in a LLDP message by a TLV and N-1 STYTLV of structure continuously, sends LLDP message.That is, in this LLDP message, followed by a described N-1 STYTLV after a TLV.
Such as, be successively encapsulated in a LLDP message continuously by a PortAndProtocolVLANIDTLV and N-1 STYTLV, now, the form of this PortAndProtocolVLANIDTLV and N-1 STYTLV as shown in Figure 4.
In the technical scheme of the embodiment of the present application, pre-define a kind of TLV:STYTLV of newtype, STYTLV is identical with the TLV type of the TLV be close in before this TLV (i.e. previous TLV), and STYTLV is made up of TLV head and TLV information field, namely, expansion TLV head in expansion TLV is simplified in order to the basic TLV head be only made up of Type and Length field, thus, save data space.When N number of information data that will send needs the expansion TLV of certain type N number of, when being called a TLV to carry, a TLV and N-1 STYTLV just can be used to carry this N number of information data, namely, N-1 the TLV originally needing to use is instead of with N-1 STYTLV, because STYTLV is identical with the TLV type of previous TLV, and save data space than a TLV, thus, after this TLV and N-1 STYTLV be successively carried at continuously send in a LLDP message, be equivalent to have sent a N number of TLV, but, in turn save data space simultaneously.
By upper, if followed by a STYTLV after an expansion TLV, then, this STYTLV is identical with the TLV type of this expansion TLV; If followed by multiple STYTLV after an expansion TLV, this multiple STYTLV can be called a STYTLV sequence, then, by recurrence relation, can determine that the TLV type of each STYTLV in this STYTLV sequence is all identical with this expansion TLV.
In addition, can also comprise the following steps in above-mentioned method:
Step S302, receives LLDP message, wherein, carry in the LLDP message of reception continuous print one the one TLV and M-1 STYTLV, M be greater than 1 natural number;
Step S304, the TLV according to carrying in the LLDP message received is close in before M-1 STYTLV, determines that the type of M-1 STYTLV is identical with the type of a TLV.
Such as, continuous print PortAndProtocolVLANIDTLV and N-1 STYTLV is carried in the LLDP message of reception, as shown in Figure 4.Be STYTLV from Type=125, this TLV, because the type of STYTLV is identical with the type of previous TLV, therefore, in turn can determine that the type of each STYTLV is PortAndProtocolVLANIDTLV.
In actual implementation process, some regulations can also be made to the use of STYTLV according to actual needs, such as:
(1) after STYTLV can not be close in three essential TLV:ChassisIDTLV, PortIDTLV and TTLTLV, after can not being close in EndTLV, that is, above-mentioned four TLV all do not support STYTLV;
Allow to carry multiple STYTLV in (2) LLDP messages, and can be continuous; When there is multiple STYTLV continuously, the multiple STYTLV of this continuous print is called STYTLV sequence, and the type of all STYTLV in this sequence is all identical with the TLV type of the previous TLV of this sequence.
Embodiment two
Can also comprise the following steps in method in above-described embodiment one:
Step S402, pre-defined CONT (Continue continues) TLV, CONTTLV represent that information data that this TLV carries is and then previous TLV follow-up data of information data of carrying;
Such as, the previous TLV of CONTTLV is CDCPTLV, and so, the information data that CONTTLV carries is exactly the follow-up data after the information data of carrying immediately preceding CDCPTLV.
In actual implementation process, as shown in Figure 5, CONTTLV is made up of TLV head and TLV information field, and wherein, TLV head is made up of the type field and Length field, makes an explanation as follows respectively below to the implication of each field:
The type field: for representing the type of this TLV, when the value of the type field is set to the second value, represents that this TLV is CONTTLV; In actual implementation process, the second value can be 126, and the length of this field is 7 bits;
Length field: for carrying the length of TLV information field, the length of this field can be 9 bits;
TLV information field: for carry information data, the length of this field is maximum can be 511 bytes.
Step S404, when sending information data, judge that the information data that will send needs two or more the 2nd TLV to carry, wherein, allow in a LLDP message, carry at most the 2nd TLV, that is, the 2nd TLV is unrepeatable TLV;
Step S406, constructs the most front portion that the 2nd TLV carries the information data that will send, and constructs at least one CONTTLV and carry remainder respectively;
Step S408, according to the sequencing of the information data of carrying, is encapsulated in a LLDP message continuously by the 2nd TLV of structure and at least one CONTTLV, sends LLDP message.
Such as, suppose a CDCPTLV (namely, 2nd TLV) information data (for SCID/SVID) of 504 bytes can be carried, to send now the information data that length is 1K byte, then originally need 2 CDCPTLV to carry, but CDCPTLV is unrepeatable TLV, like this, just a part of information data can only be carried.In order to the information data larger for length provides larger elastic data space, use the method for the present embodiment two, a CDCPTLV can be used to carry the most front 504 bytes of the information data of this 1K byte, then, re-use a CONTTLV and carry remaining part respectively, the form of this CDCPTLV and CONTTLV as shown in Figure 6.Like this, just can be longer in the length of the information data that will send, and the TLV that can carry this kind of information data is when being again unrepeatable TLV, for this information data provides larger elastic data space, complete for this information data is sent in a LLDP message.
In the technical scheme of the embodiment of the present application, pre-define a kind of novel TLV:CONTTLV, CONTTLV represents that information data that this TLV carries is and then previous TLV follow-up data of information data of carrying, like this, when the length of the information data that will send is longer, need the TLV of certain type multiple, be called that the 2nd TLV could carry completely, but when the 2nd TLV is again unrepeatable TLV, the 2nd TLV just can be used to carry the most front portion of this information data, re-use at least one CONTTLV and carry remainder respectively, and, according to the sequencing of the information data of carrying, 2nd TLV of structure and at least one CONTTLV is encapsulated in a LLDP message continuously and sends, like this, because CONTTLV represents that information data that this TLV carries is and then previous TLV follow-up data of information data of carrying, therefore, this information data is just equivalent to divide into multiple part, and be carried in LLDP message according to the sequencing of information data.
In addition, can also comprise the following steps in above-mentioned method:
Step S502, receives LLDP message, wherein, carries continuous print the 2nd TLV and at least one CONTTLV in the LLDP message of reception;
Step S504, obtains the information data in the 2nd TLV and at least one CONTTLV carried in the LLDP message received, and according to the sequencing of the 2nd TLV and at least one CONTTLV, the information data that combination obtains obtains a complete information data.
Such as, a continuous print CDCPTLV and CONTTLV is carried in the LLDP message received, as shown in Figure 6, obtain the information data of carrying in a CDCPTLV and CONTTLV, after the information data obtained from CONTTLV is placed on the information data obtained from CDCPTLV, obtain a complete information data.
In actual implementation process, some regulations can be made to the use of CONTTLV, such as:
(1) CONTTLV can not immediately following after three essential TLV:ChassisIDTLV, PortIDTLV and TTLTLV, and after can not being close in EndTLV, above-mentioned four TLV all do not support CONTTLV;
Allow to carry multiple CONTTLV in (2) LLDP messages, and can be continuous; When there is multiple CONTTLV continuously, the multiple CONTTLV of this continuous print is called CONTTLV sequence, the information data of carrying in all CONTTLV in this sequence is placed in order continuously, and the information data of carrying in each CONTTLV is the follow-up data followed by the information data of carrying in previous TLV;
(3) CONTTLV is as the data extending of unrepeatable TLV, if the Data expansion of CONTTLV and unrepeatable TLV exist and to conflict or information data in unrepeatable TLV is not supported to expand, then CONTTLV can abandon as wrong TLV.
Obviously, the above embodiments one and embodiment two can be implemented separately, and also can combine enforcement, the application does not limit this.
Embodiment three
For the method in above-described embodiment one and embodiment two, the embodiment of the present application provide a kind of can the processing unit of LLDP message to apply 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, represent identical with the TLV type of previous TLV for pre-defined STYTLV, STYTLV, STYTLV is made up of TLV head and TLV information field;
Judge module 20, for when information data will be sent, judge that each information data in N number of information data that will send all needs a TLV to carry, wherein, one TLV is by expanding TLV head and TLV information field forms, and allow carry in a LLDP message continuous print two or more the one TLV, N be greater than 1 natural number;
Constructing module 30, for constructing a TLV and N-1 STYTLV to carry described N number of information data, wherein, TLV information field in one TLV of structure is for carrying an information data in described N number of information data, TLV information field in each STYTLV of structure is for carrying an information data in remaining N-1 information data, and the information data that the TLV information field in different STYTLV carries is different;
Sending module 40, is encapsulated into continuously in a LLDP message for TLV and the N-1 STYTLV successively constructed by constructing module 30, sends this LLDP message.
In addition, can also comprise with lower module in this processing unit: receiver module and processing module, wherein:
Receiver module, for receiving LLDP message, wherein, carry in the LLDP message of reception continuous print one the one TLV and M-1 STYTLV, M be greater than 1 natural number;
Processing module, is close in before M-1 STYTLV for the TLV carried in the LLDP message that receives according to receiver module, determines that the type of M-1 STYTLV 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:
For pre-defined CONTTLV, CONTTLV, definition module 10, also represents that information data that this TLV carries is and then previous TLV follow-up data of information data of carrying;
Judge module 20, also for when sending information data, judges that the information data that will send needs two or more the 2nd TLV to carry, wherein, allows in a LLDP message, carry at most the 2nd TLV;
Constructing module 30, also carries the most front portion of the information data that will send for constructing the 2nd TLV, and constructs at least one CONTTLV and carry remainder respectively;
Sending module 40, also for the sequencing according to the information data of carrying, the 2nd TLV constructed by constructing module 30 and at least one CONTTLV is encapsulated in a LLDP message continuously, sends LLDP message.
Wherein, can also comprise with lower module in this processing unit: receiver module and processing module, wherein:
Receiver module, for receiving LLDP message, wherein, carries continuous print the 2nd TLV and at least one CONTTLV in the LLDP message of reception;
Processing module, for obtaining the 2nd TLV and the information data at least one CONTTLV that carry in the LLDP message of receiver module reception, according to the sequencing of the 2nd TLV and at least one CONTTLV, the information data that combination obtains obtains a complete information data.
To sum up, the above embodiment of the application can reach following technique effect:
(1) a kind of TLV:STYTLV of newtype has been pre-defined, STYTLV is identical with the TLV type of the TLV be close in before this TLV (i.e. previous TLV), and STYTLV is made up of TLV head and TLV information field, namely, expansion TLV head in expansion TLV is simplified in order to the basic TLV head be only made up of Type and Length field, thus, save data space.When N number of information data that will send needs the expansion TLV of certain type N number of, when being called a TLV to carry, a TLV and N-1 STYTLV just can be used to carry this N number of information data, namely, N-1 the TLV originally needing to use is instead of with N-1 STYTLV, because STYTLV is identical with the TLV type of previous TLV, and save data space than a TLV, thus, after this TLV and N-1 STYTLV be successively carried at continuously send in a LLDP message, be equivalent to have sent a N number of TLV, but, in turn save data space simultaneously.
(2) a kind of novel TLV:CONTTLV has been pre-defined, CONTTLV represents that information data that this TLV carries is and then previous TLV follow-up data of information data of carrying, like this, when the length of the information data that will send is longer, need the TLV of certain type multiple, be called that the 2nd TLV could carry completely, but when the 2nd TLV is again unrepeatable TLV, the 2nd TLV just can be used to carry the most front portion of this information data, re-use at least one CONTTLV and carry remainder respectively, and, according to the sequencing of the information data of carrying, 2nd TLV of structure and at least one CONTTLV is encapsulated in a LLDP message continuously and sends, like this, because CONTTLV represents that information data that this TLV carries is and then previous TLV follow-up data of information data of carrying, therefore, this information data is just equivalent to divide into multiple part, and be carried in LLDP message according to the sequencing of information data.
(3) for follow-up more self-defined TLV provides the TLV composition mechanism of optimization.
The foregoing is only the preferred embodiment of the application, not in order to limit the application, within all spirit in the application and principle, any amendment made, equivalent replacements, improvement etc., all should be included within scope that the application protects.
Claims (10)
1. a processing method for Link Layer Discovery Protocol LLDP message, is characterized in that, comprising:
Pre-defined STY type lengths values TLV, described STYTLV of the same type represent identical with the TLV type of previous TLV, and described STYTLV is made up of TLV head and TLV information field;
When information data will be sent, judge that each information data in N number of information data that will send all needs a TLV to carry, wherein, one TLV is by expanding TLV head and TLV information field forms, and allow carry in a LLDP message continuous print two or more the one TLV, N be greater than 1 natural number;
Construct a TLV and N-1 STYTLV and carry described N number of information data, wherein, TLV information field in one TLV of structure is for carrying an information data in described N number of information data, TLV information field in each STYTLV of structure is for carrying an information data in remaining N-1 information data, and the information data that the TLV information field in different STYTLV carries is different;
Successively a TLV of a structure and described N-1 STYTLV is encapsulated in a LLDP message continuously, sends described LLDP message.
2. method according to claim 1, is characterized in that,
Described expansion TLV head is made up of type the type field, length Length field, global unified identifier OUI field and subtype Subtype field;
TLV head in described STYTLV is made up of the type field and Length field, wherein, the type field for representing the type of this TLV, when the value of the type field is set to the first value, represent that this TLV is that STYTLV, Length field is for carrying the length value of TLV information field.
3. method according to claim 1 and 2, is characterized in that, also comprises:
Receive LLDP message, wherein, carry in the LLDP message of reception continuous print one the one TLV and M-1 STYTLV, M be greater than 1 natural number;
A TLV according to carrying in the LLDP message received is close in before a described M-1 STYTLV, determines that the type of a described M-1 STYTLV is identical with the type of a TLV.
4. method according to claim 1, is characterized in that, also comprises:
Pre-defined to continue information data that CONTTLV, described CONTTLV represent that this TLV carries be and then previous TLV follow-up data of information data of carrying, and described CONTTLV is made up of TLV head and TLV information field;
When information data will be sent, judge that the information data that will send needs two or more the 2nd TLV to carry, wherein, allow in a LLDP message, carry at most the 2nd TLV;
Construct the most front portion that the 2nd TLV carries the information data that will send, and construct at least one CONTTLV and carry remainder respectively;
According to the sequencing of the information data of carrying, the 2nd TLV of structure and at least one CONTTLV described is encapsulated in a LLDP message continuously, sends described LLDP message.
5. method according to claim 4, is characterized in that, described CONTTLV is made up of TLV head and TLV information field, and TLV head is made up of the type field and Length field, wherein:
The type field, for representing the type of this TLV, when the value of the type field is set to the second value, represents that this TLV is CONTTLV;
Length field is for carrying the length of TLV information field;
TLV information field is used for carry information data.
6. the method according to claim 4 or 5, is characterized in that, also comprises:
Receive LLDP message, wherein, in the LLDP message of reception, carry continuous print the 2nd TLV and at least one CONTTLV;
Obtain the information data in the 2nd TLV and at least one CONTTLV carried in the LLDP message received, according to the sequencing of the 2nd TLV and at least one CONTTLV, the information data that combination obtains obtains a complete information data.
7. a processing unit for Link Layer Discovery Protocol LLDP message, is characterized in that, comprising:
Definition module, represent identical with the TLV type of previous TLV for pre-defined STY type lengths values TLV, described STYTLV of the same type, described STYTLV is made up of TLV head and TLV information field;
Judge module, for when information data will be sent, judge that each information data in N number of information data that will send all needs a TLV to carry, wherein, one TLV is by expanding TLV head and TLV information field forms, and allow carry in a LLDP message continuous print two or more the one TLV, N be greater than 1 natural number;
Constructing module, for constructing a TLV and N-1 STYTLV to carry described N number of information data, wherein, TLV information field in one TLV of structure is for carrying an information data in described N number of information data, TLV information field in each STYTLV of structure is for carrying an information data in remaining N-1 information data, and the information data that the TLV information field in different STYTLV carries is different;
Sending module, the TLV constructed by described constructing module for a priority and described N-1 STYTLV is encapsulated in a LLDP message continuously, sends described LLDP message.
8. device according to claim 7, is characterized in that, also comprises:
Receiver module, for receiving LLDP message, wherein, carry in the LLDP message of reception continuous print one the one TLV and M-1 STYTLV, M be greater than 1 natural number;
Processing module, is close in before a described M-1 STYTLV for the TLV carried in the LLDP message that receives according to described receiver module, determines that the type of a described M-1 STYTLV is identical with the type of a TLV.
9. device according to claim 7, is characterized in that,
Described definition module, also represent that information data that this TLV carries is and then previous TLV follow-up data of information data of carrying for pre-defined continuation CONTTLV, described CONTTLV, described CONTTLV is made up of TLV head and TLV information field;
Described judge module, also for when sending information data, judges that the information data that will send needs two or more the 2nd TLV to carry, wherein, allows in a LLDP message, carry at most the 2nd TLV;
Described constructing module, also carries the most front portion of the information data that will send for constructing the 2nd TLV, and constructs at least one CONTTLV and carry remainder respectively;
Described sending module, also for the sequencing according to the information data of carrying, the 2nd TLV constructed by described constructing module and at least one CONTTLV described is encapsulated in a LLDP message continuously, sends described LLDP message.
10. device according to claim 9, is characterized in that, also comprises:
Receiver module, for receiving LLDP message, wherein, carries continuous print the 2nd TLV and at least one CONTTLV in the LLDP message of reception;
Processing module, for obtaining the 2nd TLV and the information data at least one CONTTLV that carry in the LLDP message of described receiver module reception, according to the sequencing of the 2nd TLV and at least one CONTTLV, the information data that combination obtains obtains a complete information data.
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 CN103179014A (en) | 2013-06-26 |
CN103179014B true 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) |
Families Citing this family (4)
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 |
CN103825813B (en) * | 2014-03-12 | 2017-02-15 | 杭州华三通信技术有限公司 | LLDP (Link Layer Discovery Protocol) message processing method and device |
CN106790232B (en) * | 2017-01-18 | 2021-02-26 | 上海市共进通信技术有限公司 | Method and system for realizing VOIP voice service through LLDP message |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU2003263408A1 (en) * | 2003-09-10 | 2005-03-29 | Nokia Corporation | Method and system for establishing a data link layer protocol on a physical layer port connection |
-
2013
- 2013-04-10 CN CN201310123917.6A patent/CN103179014B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Also Published As
Publication number | Publication date |
---|---|
CN103179014A (en) | 2013-06-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103534993B (en) | Connect the system of selection of Tag switching route and the device in low-power network territory | |
CN103269299B (en) | Message forwarding method in SPBM network and device | |
CN106789526B (en) | method and device for connecting multiple system networks | |
CN103179014B (en) | The processing method of LLDP message and device | |
CN112953774B (en) | Network topology generation method, system, equipment and computer storage medium | |
CN103220219B (en) | A kind of message forwarding method and equipment | |
CN104283791A (en) | Three-layer topology determining method and device in SDN network | |
CN101521895A (en) | Forwarding method used for constructing multi-hop routing in wireless self-organizing network | |
CN104937896A (en) | Method for processing address resolution protocol message, forwarder and controller | |
CN105337855A (en) | Method and device used for processing modified message | |
CN106937351B (en) | Session realization method and core network element | |
CN103209132A (en) | Method, device and system for achieving multicast in transparent interconnection of lots of links (TRILL) network | |
CN104283802A (en) | Neighbor discovery method and device | |
CN108924052B (en) | Message forwarding method, convergence gateway, access gateway and system | |
CN103200100A (en) | Method and device for packet transmitting | |
CN106161103A (en) | Switch-layer topology construction method and device | |
CN102546409B (en) | Method and RB (route bridge) for processing message based on TRILL (Transparent Interconnection of Lots of Links) network | |
CN104253878A (en) | VLAN (Virtual Local Area Network) information management system and method of DHCP (Dynamic Host Configuration Protocol) RELAY termination sub-interface | |
CN104579978A (en) | Link-layer topology discovery method for dynamic network | |
WO2022160864A1 (en) | Network access method and apparatus for intelligent device, and intelligent device | |
CN107465621A (en) | A kind of router finds method, SDN controllers, router and network system | |
US20150023215A1 (en) | TRILL Network Establishing Method, Node, and System | |
CN102882887A (en) | Smooth software updating method and equipment | |
CN103825813B (en) | LLDP (Link Layer Discovery Protocol) message processing method and device | |
CN103227733B (en) | A kind of topology discovery method and system |
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 |
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. |
|
CP03 | Change of name, title or address |