CN103354509B - The acquisition methods of a kind of link connection information and equipment - Google Patents
The acquisition methods of a kind of link connection information and equipment Download PDFInfo
- Publication number
- CN103354509B CN103354509B CN201310293780.9A CN201310293780A CN103354509B CN 103354509 B CN103354509 B CN 103354509B CN 201310293780 A CN201310293780 A CN 201310293780A CN 103354509 B CN103354509 B CN 103354509B
- Authority
- CN
- China
- Prior art keywords
- equipment
- link connection
- udp message
- connection information
- message
- 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
- 238000000034 method Methods 0.000 title claims abstract description 78
- 238000012545 processing Methods 0.000 claims description 16
- 238000010276 construction Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 abstract description 43
- 238000005516 engineering process Methods 0.000 description 10
- 101710176296 Switch 2 Proteins 0.000 description 8
- 230000006855 networking Effects 0.000 description 8
- 238000007726 management method Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000008901 benefit Effects 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000004806 packaging method and process Methods 0.000 description 3
- 239000003086 colorant Substances 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000010230 functional analysis Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000000379 polymerizing effect Effects 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention discloses acquisition methods and the equipment of a kind of link connection information, the technical scheme proposed by the application embodiment of the present invention, the network equipment in link connection receives after comprising the UDP message obtaining link connection information specifying source port number, while continuing to forward this UDP message, structure comprises the LIDPDU message of self corresponding link connection information, and send to the source equipment corresponding to the source IP address of described UDP message, so that described source equipment obtains the link connection information corresponding to the described network equipment, thus, achieve a kind of quick and convenient and accurately acquire link-attached equipment, the method of interface attributes information, improve the understanding to network environment and control, reach the target of fast failure location.The method can avoid the limitation that NMS is relied on by above-mentioned link connection information acquisition process.
Description
Technical field
The present invention relates to communication technical field, particularly to the acquisition methods of a kind of link connection information with set
Standby.
Background technology
The either networking test of research and development department of intra-company, the network architecture in the logical market of number and maintenance, also
Be little to Internet bar, the wiring of home network connect, the link interaction table between distinct device reveals common
And loaded down with trivial details feature.
In the prior art, it is primarily present following several processing mode:
Scheme one, being checked the executable command of network-in-dialing situation by ping(mono-) technology judges even
Connect and can be normally carried out data transmission.
Based on such connection judgment, can be by the company between the netting twine mark different port of different colours
Connect, or the connection by port between netting twine two ends are labelled in order to mark equipment with port.
Scheme two, follow the tracks of route by tracert() technology carries out network management.
By using tracert function, check IP message from source arrive destination the three-layer equipment of process,
Thus check that network connects and whether can use.When a network fails, user can be by this functional analysis
Out of order network node.
As it is shown in figure 1, in prior art Tracert technology realize principle schematic.
Scheme three, utilize LLDP(Link Layer Discovery Protocol, Link Layer Discovery Protocol),
SNMP(Simple Network Management Protocol, Simple Network Management Protocol) technology carries out
Network management.
In order to obtain link connect in management address, device identification, interface identifier information, have one at present
The individual more ripe scheme utilizing LLDP, SNMP technology to realize, as in figure 2 it is shown, be in prior art
The networking structure schematic diagram of LLDP, SNMP technology.
LLDP, it is allowed to the website with Ethernet exchanging ability issues the main of oneself system to neighbor site
Ability, the information such as management address, device identification, interface identifier.And the information tissue that it will send
Become different TLV(Type-Length-Value, type, length, value), encapsulation in messages, is passed through
Interface is distributed to the neighbours direct-connected with oneself.As in figure 2 it is shown, switch SA and SB is by interface A1 and B1
It is connected, after equipment SA and the determinant attribute of interface A1 and information are distributed to SB, B1 reception information by LLDP
Save as neighbor information, wait the inquiry of NMS.
NMS can be according to receiving neighbor information, such as the PVID(Port-base to end interface
Vlan ID, virtual net based on port identify), interface rate, duplex state, polymerizing power and state
Deng, configuration and state with this end interface compare, and diagnose whether this link exists communication issue.
The management address information that NMS can also be issued by opposite end, opposite equip. is conducted interviews and
Control.
During realizing the technical scheme that the embodiment of the present invention is proposed, inventor finds prior art
Have the disadvantage that
For scheme one, current implementation is more also based on the reasonable operation in networking stage, i.e.
Carry out planning and the record of different colours connection in the networking line stage and arrange label mark the most clearly
Note.But, need to ensure that carefully updating label makes a record in the maintenance that the later stage is long-term, and rationally hand over
Connect, if improper activity occurs in centre, be exactly that disaster is properly functioning also for network for keeper
Disaster.It is logical and obstructed that Ping means also only judge that network connects, and substantially can not find failure cause.
For scheme two, the Tracert in the program compares Ping method in scheme one, although have certain
Advantage, but equally exist and cannot quickly orient given link warp in the numerous interface of numerous equipment connects
Which equipment, and the problem passed in and out by which interface are crossed.
For scheme three, although the program has reached can to obtain in network the attribute information connecting equipment
Function, but, for the dependence of NMS, considerably increase network organizing and technology realizes
Complexity and limitation.
Summary of the invention
The embodiment of the present invention provides acquisition methods and the equipment of a kind of link connection information, solves existing net
The problem that network way to manage can not facilitate relevant device and the interface message known accurately in network linking.
For reaching above-mentioned purpose, on the one hand the embodiment of the present invention provides the acquisition of a kind of link connection information
Method, described method at least comprises the following steps:
When the network equipment receives the UDP message comprising the acquisition link connection information specifying source port number
Time, the described network equipment determines the equipment identification information of self, and continues the purpose to described UDP message
IP address forwards described UDP message;
Described Network Device Construction comprises the LIDPDU message of self corresponding link connection information, and
Send to the source equipment corresponding to the source IP address of described UDP message, so that described source equipment obtains
Link connection information corresponding to the described network equipment, wherein, comprises described in described link connection information
The equipment identification information of the network equipment.
On the other hand, the embodiment of the present invention additionally provides a kind of network equipment, at least includes:
Identification module, for identifying whether currently received message is to comprise to specify obtaining of source port number
Take the UDP message of link connection information;
Processing module, for when the recognition result of described identification module is for being, determines the described network equipment
The equipment identification information of self, and continue to forward described UDP to the purpose IP address of described UDP message
Message;
Constructing module, for when the recognition result of described identification module is for being, structure comprises described network
The LIDPDU message of the link connection information that equipment self is corresponding, wherein, described link connection information
In comprise the equipment identification information of the described network equipment;
Sending module, described for sending to the source equipment corresponding to the source IP address of described UDP message
The LIDPDU message that constructing module is constructed, so that the described source equipment acquisition described network equipment is right
The link connection information answered.
On the other hand, present invention also offers a kind of source equipment, at least include:
Sending module, specifies the acquisition link of source port number to connect letter for sending to destination equipment to comprise
The UDP message of breath;
Acquisition module, comprises each corresponding link connection information for receive that each network equipment returns
LIDPDU message, obtain link connection information therein.
Compared with prior art, the technical scheme that the embodiment of the present invention is proposed has the advantage that
The technical scheme proposed by the application embodiment of the present invention, the network equipment during link connects receives
After comprising the UDP message obtaining link connection information specifying source port number, continuing this UDP of forwarding
While message, structure comprises the LIDPDU message of self corresponding link connection information, and to described
Source equipment corresponding to the source IP address of UDP message sends, so that described source equipment obtains described network
Link connection information corresponding to equipment, thus, it is achieved that one is quick and convenient and accurately acquires chain
The equipment of road connection, the method for interface attributes information, improve the understanding to network environment and control, reach
The target of fast failure location.The method can avoid above-mentioned link connection information acquisition process to network pipe
The limitation that reason system relies on.
Accompanying drawing explanation
Fig. 1 be in prior art Tracert technology realize principle schematic;
Fig. 2 is the networking structure schematic diagram of LLDP, SNMP technology in prior art;
The flow process signal of the acquisition methods of a kind of link connection information that Fig. 3 is proposed by the embodiment of the present invention
Figure;
A kind of concrete application scenarios that Fig. 4 is proposed by the embodiment of the present invention networking structure schematic diagram;
The schematic diagram of a kind of UDP message that Fig. 5 is proposed by the embodiment of the present invention;
The structural representation of a kind of network equipment that Fig. 6 is proposed by the embodiment of the present invention;
The structural representation of a kind of source equipment that Fig. 7 is proposed by the embodiment of the present invention.
Detailed description of the invention
As stated in the Background Art, in the prior art scheme, connecting link is obtained the most rapidly and accurately
Port, facility information become a problem needing to consider.Particularly, one two, three layers connection
Mutual complex environment is found out link trend be even more important.But prior art does not has suitable technical side
Case.
In order to solve such problem, the embodiment of the present invention proposes the acquisition side of a kind of link connection information
Method, connects the location with network connectivity fai_lure and solution in order to the convenient netting twine that arranges.
As it is shown on figure 3, the flow process for the acquisition methods of a kind of link connection information proposed by the invention is shown
Being intended to, the method specifically includes following steps:
Step S301, when the network equipment receive comprise specify source port number obtain link connection information
UDP(User Data Protocol, UDP) message time, the described network equipment determines self
Equipment identification information, and continue to the purpose IP address of described UDP message forward described UDP message.
Wherein, described in comprise specify source port number obtain link connection information UDP message, specifically take
With:
Need the identification information of the link connection information obtained, for making to receive the net of described UDP message
Network equipment determines that described source equipment needs the type of the link connection information obtained;And/or,
Sequence number information, for making the network equipment receiving described UDP message believe according to described sequence number
Breath determines the equipment identification information of self.
In concrete application scenarios, above-mentioned sequence number information can be a concrete numerical value or mark,
Such as, if above-mentioned UDP message carries the sequence number information that initial value is 0, then, in step
In rapid S301, the described network equipment determines that the mode of the equipment identification information of self can be such that
The described network equipment adds 1 to the sequence number information currently carried in described UDP message, and will
Sequence number after adding 1 is as the equipment identification information of self.
Accordingly, the network equipment continues to forward described UDP report to the purpose IP address of described UDP message
In the operating process of literary composition, corresponding process is specific as follows:
The described network equipment continues to forward described UDP message to the purpose IP address of described UDP message,
Wherein, the sequence number information entrained by described UDP message being forwarded is updated to the sequence number after adding 1.
By above-mentioned process, each network equipment that link connects can determine the device identification of self successively
Information, and, according to the difference of sequence number size, it may be determined that receive the order of this UDP message,
The most each network equipment order of connection on link connects.
Certainly, in actual application scenarios, each network equipment company in link connects can distinguished
In the case of connecing relation, the sequence number that initial value is 0 that concrete employing is above-mentioned, still use other to identify
Content, can't affect protection scope of the present invention.
Step S302, described Network Device Construction comprise self corresponding link connection information
LIDPDU(Link Information Discover Protocol Data Unit, link information finds agreement number
According to unit) message, and send to the source equipment corresponding to the source IP address of described UDP message, so that
Described source equipment obtains the link connection information corresponding to the described network equipment.
Wherein, described link connection information comprises the equipment identification information of the described network equipment.
Here, if it should be noted that carried in the UDP message mentioned by step S301
Need the identification information of the link connection information obtained, then, in step s 302, LIDPDU message
Specific configuration mode can be such that
The described network equipment is according to the link connection information needing to obtain entrained in described UDP message
Identification information, reads self current corresponding link connection information, wherein, in described link connection information
Comprise the equipment identification information of the described network equipment.
The LLDP protocol massages comprising described link connection information is encapsulated in IP head by the described network equipment,
Address for the purpose of the source address of described UDP message, constructs LIDPDU message.
Certainly, need it is further noted that can not in the UDP message mentioned by step S301
Carry the identification information of link connection information needing to obtain, but configuration rule the most on network devices
Or default setting, the network equipment is during structure LIDPDU message, according to the rule being pre-configured with
Then or default setting determines the type of link connection information needing to obtain, then, read corresponding
Link connection information, constructs LIDPDU message.
In actual applications, the type of the above-mentioned link connection information needing to obtain, specifically may include that
The description of bridge MAC, device name, system, inbound port, go out port, and the letter such as link device sequence number
Breath, wherein, link device sequence number is setting of the described network equipment determined by step S301 self
Standby identification information.In actual application scenarios, the equipment of the described network equipment self mentioned herein
The concrete form of identification information can be corresponding sequence number, it is also possible to be concrete letter or number institute group
The character string become, or other can show that network equipment own identification, to be different from during link connects
The identification information of other network equipments, the change of such concrete form, can't affect the present invention's
Protection domain.
Certainly, the type of the above-mentioned link connection information needing to obtain can be adjusted according to actual needs
Whole, such change can't affect protection scope of the present invention.
Moreover, need also exist for explanation, whether UDP message carries the link needing to obtain
The identification information of link information is the mode of a kind of information type notifying the needs acquisition of corresponding network equipment
Change, belong to protection scope of the present invention.
In concrete application scenarios, when the network equipment receives the acquisition link comprising appointment source port number
During the UDP message of link information, if the described network equipment determines from right as described UDP message institute
The destination equipment answered, then it represents that this network equipment should be the terminal of this UDP message transmission, therefore,
Above-mentioned method also includes:
The described network equipment determines the equipment identification information of self, meanwhile, stops turning of described UDP message
Send out.
Described Network Device Construction comprises the LIDPDU message of self corresponding link connection information, and
Send to the source equipment corresponding to the source IP address of described UDP message, so that described source equipment obtains
Link connection information corresponding to the described network equipment, wherein, comprises described in described link connection information
The equipment identification information of the network equipment.
Each network equipment in connecting due to network link all can perform similar after receiving UDP message
The operation of step S302, thus, carry self link connection information to specifying source port feedback
LIDPDU message, therefore, it is the most corresponding that described source equipment receives comprising of each network equipment return
The LIDPDU message of link connection information, and resolve, obtain link connection information therein,
Thus, it is determined that the link connection in the connection of whole network link and facility information.
Compared with prior art, the technical scheme that the embodiment of the present invention is proposed has the advantage that
The technical scheme proposed by the application embodiment of the present invention, the network equipment during link connects receives
After comprising the UDP message obtaining link connection information specifying source port number, continuing this UDP of forwarding
While message, structure comprises the LIDPDU message of self corresponding link connection information, and to described
Source equipment corresponding to the source IP address of UDP message sends, so that described source equipment obtains described network
Link connection information corresponding to equipment, thus, it is achieved that one is quick and convenient and accurately acquires chain
The equipment of road connection, the method for interface attributes information, improve the understanding to network environment and control, reach
The target of fast failure location.The method can avoid above-mentioned link connection information acquisition process to network pipe
The limitation that reason system relies on.
In order to the technological thought of the present invention is expanded on further, in conjunction with concrete application scenarios, to the present invention
Technical scheme illustrate.
In the technical scheme that the embodiment of the present invention is proposed, the network equipment in link connection receives and comprises
After specifying the UDP message obtaining link connection information of source port number, continuing this UDP message of forwarding
While, structure comprises the LIDPDU message of self corresponding link connection information, and to described UDP
Source equipment corresponding to the source IP address of message sends, so that described source equipment obtains described network and sets
Standby corresponding link connection information, such mode can be quick and convenient and accurately acquire link even
The link connection information corresponding to each network equipment connected.
In actual application scenarios, on each network equipment in link connects, specifically can run LIDP
Finger daemon, concrete:
A LIDP finger daemon can be separately operable on each network equipment during link connects, work as reception
The current network equipment is entered to containing the UDP message obtaining link connection information specifying source port number
Time, this network equipment determines that the equipment identification information of self, structure comprise self current ink link information
LIDPDU message (link information discovery message), and to this UDP message source equipment send should
LIDPDU message, the correlation attribute information connected for this source equipment contribution link.Thus simplify
Process, break the dependence to NMS.
As shown in Figure 4, a kind of concrete application scenarios proposed by the embodiment of the present invention networking structure
Schematic diagram.
Firstly, it is necessary to message involved in the technical scheme being proposed the embodiment of the present invention illustrates
As follows:
In the technical scheme that the embodiment of the present invention is proposed, need to be applied to UDP message and LIDPDU
Message, compared with message of the prior art, is described as follows:
In the technical scheme that the embodiment of the present invention is proposed, relative to existing UDP message, it is right to need
DATA field does some and processes, and other part is the most motionless, and this message is still by source equipment
(Source Route) sends.
Concrete, the process that DATA field is done by technical scheme that the embodiment of the present invention is proposed is concrete
For:
Field little for proper sense in existing UDP message is changed into a mark link device sequence number
Option field, as it is shown in figure 5, the signal of a kind of UDP message proposed by the embodiment of the present invention
Figure, wherein:
The value of the type field is 241, and the value of Length field is 2, identifies the length of whole Option, 8
Byte is unit, accordingly, in Figure 5, and a length of 16 bytes of Option field.
And in the technical scheme that the embodiment of the present invention is proposed, for LIDPDU message, need to carry out with
Lower both sides processes:
1, existing LLDP protocol massages is encapsulated in IP head.
Certainly, for IPv6 agreement, such process can be done directly so that it is Next Header=250
, and for IPv4 agreement, then need the Extension of the most self-defined Protocol=250
Header。
2, the purpose network address in this IP head uses the Internet of source equipment (Source Route)
Address.
In concrete application scenarios, source address according to actual conditions in the destination network address, link
Between Route outgoing interface address, fixing address (fixed value pre-set) select.
Based on above-mentioned message structure, the processing procedure of control process aspect is described as follows:
First, LIDP process mainly has three aspects in the technical scheme that the embodiment of the present invention is proposed
Effect, specific as follows:
(1) for the LIDP process on source equipment, receive and parse through and be sent to this source equipment
LIDPDU message, by the link device relevant information that comprises in message according to the elder generation receiving such message
Rear order prints, and reaches the open-and-shut purpose of link condition.
(2) and for link connect in, the LIDP on other network equipments in addition to source equipment enters
Journey, then be to check the source port number included in self received UDP message, when port is one
During preassigned source port number, illustrate that this message is for detecting link device-dependent message.This UDP
Message will be further processed by LIDP process, be set by the link of Option field in this UDP message
Standby sequence number adds 1, then, is not the situation of the destination equipment of this UDP message at current network device
Under, the UDP message after processing continues to forward to corresponding destination equipment.
(3) except the processing procedure described in above-mentioned (2), set except source during link is connected
LIDP process on standby other network equipments in addition, in addition it is also necessary to carry out at the feedback of link connection information
Reason, concrete, it is (specifically can be wrapped by link connection information corresponding in reading current network device
Include bridge MAC, device name, system description, inbound port, go out port, link device sequence number etc.),
And after packaging structure becomes LIDPDU message, the source equipment to above-mentioned UDP message carries out feeding back in fact
Existing.
Below, in conjunction with the networking structure of the network shown in aforesaid Fig. 4, concrete control handling process is entered
Row is described as follows:
(1) source equipment (Source Route) sends the UDP message obtaining link connection information.
In actual applications, it is 255 that the UDP TTL that source equipment sends carries out being separately provided, it is ensured that can
To arrive destination under normal circumstances.
As shown in Figure 4, this UDP message sends, normal condition from source equipment (Source Route)
Destination equipment (Desti Route) can be arrived, and, in the Option field in this UDP message
The initial value of link device sequence number is 0.
In sum, source equipment (Source Route) passes through Port1, to destination equipment (Desti
Route) the UDP message of the link device sequence number that value is 0 is carried in transmission, is used for obtaining in link connection
The link connection information of each network equipment.
(2) UDP message is entered switch 1(Switch1 by Port2), although switch 1 is two layers
Switch, but LIDP process still can detect this UDP according to the appointment source port number of this UDP message
Message for obtaining link connection information, and then, carry out following process:
Link device sequence number in the Option field of this UDP message is added 1, then, according to two layers
Forward, add the value after 1 process by carrying value for 1() the UDP message of link device sequence number by Port3
Continue to send to destination equipment (Desti Route).
Meanwhile, switch 1(Switch1) read self relevant link connection information, and packaging structure
Becoming LIDPDU message, Port2 send, the corresponding purpose network address is UDP message
Source network address, source network address is switch 1(Switch1) corresponding to network layer address.Thus,
Switch 1(Switch1 will be carried) the LIDPDU message of link connection information feed back to source equipment
(Source Route).
It should be noted that during the reading of above-mentioned link connection information, specifically can be according to above-mentioned
Instruction information in UDP message, or the rule that pre-sets of equipment or default determine and read
The type of link connection information, concrete type can include bridge MAC, device name, system describe,
Inbound port, go out port, and link device sequence number etc..Wherein, acquired current link device
Sequence number is and above-mentioned carries out the link device sequence number after 1 process, and i.e. 1.
(3) UDP message is entered switch 2(Switch2 by Port4), switch 2(Switch2)
On LIDP process detect that this UDP message is for obtaining according to the appointment source port number of this UDP message
Take link connection information, and then, corresponding process and switch 1(Switch1) processing procedure one
Cause.
Wherein, due to switch 2(Switch2) received by UDP message in link device sequence
Number by switch 1(Switch1) it is changed to 1, so, switch 2(Switch2) need 1
On the basis of carry out adding 1 process, accordingly by switch 2(Switch2) carry out the chain after adding 1 process
Pipeline equipment Serial No. 2, i.e. switch 2(Switch2) determine self link device Serial No. 2.
Therefore, switch 2(Switch2) continued to destination equipment (Desti Route) by Port5
The link device Serial No. 2 carried in the UDP message forwarded, and switch 2(Switch2) to source
The link device sequence number carried in the LIDPDU message that end equipment (Source Route) feeds back also is 2.
(4) UDP message is entered router 2(Route2 by Port6), router 2(Route2) on
LIDP process detect that this UDP message is for obtaining according to the appointment source port number of this UDP message
Link connection information, and then, carry out following process:
Link device sequence number in the Option field of this UDP message is added 1, in the present embodiment,
Router 2(Route2) received by UDP message in the value of link device sequence number be 2, therefore,
Adding the value after 1 process is 3, router 2(Route2) by carry link device Serial No. 3 UDP
Message is continued to send to destination equipment (Desti Route) by Port7.
Meanwhile, router 2(Route2) read self relevant link connection information, and packaging structure becomes
For LIDPDU message, Port6 send.The corresponding purpose network address is the source of UDP message
The network address, source network address is router 2(Route2) corresponding to network layer address.Thus, will
Carry router 2(Route2) the LIDPDU message of link connection information feed back to source equipment
(Source Route).
Similar with the explanation in (2), during the reading of above-mentioned link connection information, the most permissible
According to the instruction information in above-mentioned UDP message, or the rule or the default that pre-set on equipment come
Determine the type of read link connection information, concrete type can include bridge MAC, device name,
System description, inbound port, go out port, and link device sequence number etc..Wherein, acquired current
Link device sequence number be the link device sequence number after above-mentioned carrying out adds 1 process, i.e. 3.
(5) UDP message is entered switch 3(Switch3 by Port8), switch 3(Switch3)
On LIDP process detect that this UDP message is for obtaining according to the appointment source port number of this UDP message
Take link connection information, and then, corresponding process and switch 1(Switch1) processing procedure one
Cause.
, switch 3(Switch3 similar with the explanation in (3)) carry out the link after adding 1 process and set
Standby Serial No. 4, corresponding processing procedure sees preceding description, does not repeats them here.
(6) UDP message is entered destination equipment (Desti Route), destination equipment (Desti by Port10
Route) the LIDP process on detects this UDP message according to the appointment source port number of this UDP message
For obtaining link connection information, meanwhile, determine it self is the destination of this UDP message, therefore,
Will not be further continued for forwarding, and simply complete following process:
Link device sequence number in the Option field of this UDP message is added 1, in the present embodiment,
The value of the link device sequence number in UDP message received by destination equipment (Desti Route) is
4, therefore, adding the value after 1 process is 5.
Meanwhile, read the relevant link connection information of destination equipment (Desti Route) self, and encapsulate
It is constructed to LIDPDU message, Port10 sends.The corresponding purpose network address is UDP
The source network address of message, holds the Internet corresponding to equipment (Desti Route) for the purpose of source network address
Address.Thus, the LIDPDU of the link connection information of destination equipment (Desti Route) will be carried
Message feeds back to source equipment (Source Route).
Similar with the explanation in (2) and (4), during the reading of above-mentioned link connection information,
Specifically can be according to the instruction information in above-mentioned UDP message, or the rule or default that equipment pre-sets
Rule determines that the type of read link connection information, concrete type can include bridge MAC, set
For title, system description, inbound port, go out port, and link device sequence number etc..Wherein, obtained
The current link device sequence number taken is and above-mentioned carries out the link device sequence number after 1 process, and i.e. 5.
Pass through said process, it can be seen that source equipment (Source Route) is permissible during whole
Receive the source network address different LIDPDU message that each network equipment during link connects is fed back,
Source equipment (Source Route) can resolve LIDPDU message, and can distinguish according to source network address
Know two-layer equipment (i.e. switch, the address of other routing devices during it is connected with link there are differences,
For example, it is possible to be configured to fixed value), middle routing device, destination equipment;According to link device sequence
Number link device is sorted successively, and the chain link information obtained by packet parsing is entered with tabular form successively
Capable output or storage, it is thus possible to facilitate and obtain link connection state accurately.
Compared with prior art, the technical scheme that the embodiment of the present invention is proposed has the advantage that
The technical scheme proposed by the application embodiment of the present invention, the network equipment during link connects receives
After comprising the UDP message obtaining link connection information specifying source port number, continuing this UDP of forwarding
While message, structure comprises the LIDPDU message of self corresponding link connection information, and to described
Source equipment corresponding to the source IP address of UDP message sends, so that described source equipment obtains described network
Link connection information corresponding to equipment, thus, it is achieved that one is quick and convenient and accurately acquires chain
The equipment of road connection, the method for interface attributes information, improve the understanding to network environment and control, reach
The target of fast failure location.The method can avoid above-mentioned link connection information acquisition process to network pipe
The limitation that reason system relies on.
In order to realize technical scheme, the invention allows for a kind of network equipment, its structure is shown
It is intended to shown in 6, including:
Identification module 61, for identifying whether currently received message is to comprise appointment source port number
Obtain the UDP message of link connection information;
Processing module 62, for when the recognition result of described identification module 61 is for being, determines described network
The equipment identification information of equipment self, and continue to the forwarding of the purpose IP address of described UDP message described
UDP message;
Constructing module 63, for when the recognition result of described identification module 61 is for being, structure comprises described
The LIDPDU message of the link connection information that the network equipment self is corresponding, wherein, described link connects
Information comprises the equipment identification information of the described network equipment determined by described processing module 62;
Sending module 64, described for sending to the source equipment corresponding to the source IP address of UDP message
The LIDPDU message that constructing module 63 is constructed, so that described source equipment obtains described network equipment institute
Corresponding link connection information.
Preferably, described processing module, specifically for:
The sequence number information in the UDP message recognized currently carried described identification module 61 is carried out
Add 1, and the sequence number after will adding 1 is as the equipment identification information of self;
If the described network equipment is not the destination equipment corresponding to described UDP message, continue to described
The purpose IP address of UDP message forwards described UDP message, wherein, the described UDP message being forwarded
Entrained sequence number information is updated to the sequence number after adding 1;
If the described network equipment is the destination equipment corresponding to described UDP message, then stop described
The forwarding of UDP message.
Preferably, described constructing module 63, specifically for:
According to the identification information of the link connection information needing to obtain entrained in described UDP message, read
Take the current corresponding link connection information of the described network equipment self, wherein, in described link connection information
Comprise the equipment identification information of the described network equipment determined by described processing module;
The LLDP protocol massages comprising described link connection information is encapsulated in IP head, with described UDP
Address for the purpose of the source address of message, constructs LIDPDU message.
On the other hand, the embodiment of the present invention also proposed a kind of source equipment, its structural representation such as Fig. 7
Shown in, specifically include:
Sending module 71, specifies the acquisition link of source port number to connect for sending to destination equipment to comprise
The UDP message of information;
Acquisition module 72, the most corresponding link that comprises returned for receiving each network equipment connects letter
The LIDPDU message of breath, obtains link connection information therein.
Wherein, described sending module 71 sent described in comprise specify source port number acquisition link connect
The UDP message of information, specifically carries:
Need the identification information of the link connection information obtained, for making to receive the net of described UDP message
Network equipment determines that described source equipment needs the type of the link connection information obtained;And/or,
Sequence number information, for making the network equipment receiving described UDP message believe according to described sequence number
Breath determines the equipment identification information of self.
Compared with prior art, technical scheme proposed by the invention has the advantage that
The technical scheme proposed by the application embodiment of the present invention, the network equipment during link connects receives
After comprising the UDP message obtaining link connection information specifying source port number, continuing this UDP of forwarding
While message, structure comprises the LIDPDU message of self corresponding link connection information, and to described
Source equipment corresponding to the source IP address of UDP message sends, so that described source equipment obtains described network
Link connection information corresponding to equipment, thus, it is achieved that one is quick and convenient and accurately acquires chain
The equipment of road connection, the method for interface attributes information, improve the understanding to network environment and control, reach
The target of fast failure location.The method can avoid above-mentioned link connection information acquisition process to network pipe
The limitation that reason system relies on.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive this
Bright can be realized by hardware, it is also possible to the mode of the general hardware platform adding necessity by software realizes.
Based on such understanding, technical scheme can embody with the form of software product, and this is soft
Part product can be stored in a non-volatile memory medium, and (can be CD-ROM, USB flash disk, movement be hard
Dish etc.) in, including some instructions with so that a computer equipment (can be personal computer, take
Business device, or the network equipment etc.) each implements the method described in scene to perform the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is a schematic diagram being preferable to carry out scene, in accompanying drawing
Module or flow process not necessarily implement necessary to the present invention.
It will be appreciated by those skilled in the art that the module in the device implemented in scene can be according to implementing scene
Describe and carry out being distributed in the device implementing scene, it is also possible to carry out respective change and be disposed other than this enforcement
In one or more devices of scene.The module of above-mentioned enforcement scene can merge into a module, it is possible to
To be further split into multiple submodule.
The invention described above sequence number, just to describing, does not represent the quality implementing scene.
The several scenes that are embodied as being only the present invention disclosed above, but, the present invention is not limited to
This, the changes that any person skilled in the art can think of all should fall into protection scope of the present invention.
Claims (10)
1. the acquisition methods of a link connection information, it is characterised in that described method at least comprises the following steps:
When the network equipment receives and comprises the UDP UDP message obtaining link connection information specifying source port number, the described network equipment determines the equipment identification information of self, and continues to forward described UDP message to the purpose network interconnection Protocol IP address of described UDP message;
The link information that described Network Device Construction comprises self corresponding link connection information finds protocol Data Unit LIDPDU message, and send to the source equipment corresponding to the source IP address of described UDP message, so that described source equipment obtains the link connection information corresponding to the described network equipment, wherein, described link connection information comprises the equipment identification information of the described network equipment.
2. the method for claim 1, it is characterised in that described in comprise specify source port number obtain link connection information UDP message, carry:
Needing the identification information of the link connection information obtained, for making the network equipment receiving described UDP message determine, described source equipment needs the type of the link connection information obtained;And/or,
Sequence number information, for making the network equipment receiving described UDP message determine the equipment identification information of self according to described sequence number information.
3. method as claimed in claim 2, it is characterised in that when carrying sequence number information in described UDP message, the described network equipment determines the equipment identification information of self, and continues to forward to the purpose IP address of described UDP message described UDP message, particularly as follows:
The described network equipment adds 1 to the sequence number information currently carried in described UDP message, and the sequence number after will adding 1 is as the equipment identification information of self;
The described network equipment continue to the purpose IP address of described UDP message forward described UDP message, wherein, the sequence number information entrained by described UDP message being forwarded be described in add 1 after sequence number.
4. method as claimed in claim 2, it is characterised in that when described UDP message includes the identification information of the link connection information that needs obtain, described Network Device Construction comprises the LIDPDU message of self corresponding link connection information, particularly as follows:
The described network equipment, according to the identification information of the link connection information needing to obtain entrained in described UDP message, reads self current corresponding link connection information, wherein, comprises the equipment identification information of the described network equipment in described link connection information;
The LLDP protocol massages comprising described link connection information is encapsulated in IP head by the described network equipment, address for the purpose of the source address of described UDP message, constructs LIDPDU message.
5. the method for claim 1, it is characterised in that when the network equipment receives and comprises the UDP message obtaining link connection information specifying source port number, also include:
If the described network equipment determines that the described network equipment determines the equipment identification information of self, meanwhile, stops the forwarding of described UDP message from as the destination equipment corresponding to described UDP message;
Described Network Device Construction comprises the LIDPDU message of self corresponding link connection information, and send to the source equipment corresponding to the source IP address of described UDP message, so that described source equipment obtains the link connection information corresponding to the described network equipment, wherein, described link connection information comprises the equipment identification information of the described network equipment.
6. a network equipment, it is characterised in that at least include:
Identification module, for identifying whether currently received message is the UDP message obtaining link connection information comprising and specifying source port number;
Processing module, for when the recognition result of described identification module is for being, determines the equipment identification information of the described network equipment self, and continues to forward to the purpose IP address of described UDP message described UDP message;
Constructing module, for when the recognition result of described identification module is for being, structure comprises the LIDPDU message of the corresponding link connection information of the described network equipment self, wherein, comprises the equipment identification information of the described network equipment determined by described processing module in described link connection information;
Sending module, for sending, to the source equipment corresponding to the source IP address of described UDP message, the LIDPDU message that described constructing module is constructed, so that described source equipment obtains the link connection information corresponding to the described network equipment.
7. the network equipment as claimed in claim 6, it is characterised in that described processing module, specifically for:
The sequence number information currently carried in the UDP message being recognized described identification module adds 1, and the sequence number after will adding 1 is as the equipment identification information of self;
If the described network equipment is not the destination equipment corresponding to described UDP message, continue to the purpose IP address of described UDP message forward described UDP message, wherein, the sequence number information entrained by described UDP message being forwarded be described in add 1 after sequence number;
If the described network equipment is the destination equipment corresponding to described UDP message, then stop the forwarding of described UDP message.
8. the network equipment as claimed in claim 6, it is characterised in that described constructing module, specifically for:
Identification information according to the link connection information needing to obtain entrained in described UDP message, read the current corresponding link connection information of the described network equipment self, wherein, described link connection information comprises the equipment identification information of the described network equipment determined by described processing module;
The LLDP protocol massages comprising described link connection information is encapsulated in IP head, address for the purpose of the source address of described UDP message, constructs LIDPDU message.
9. a source equipment, it is characterised in that at least include:
Sending module, for sending the UDP message comprising the acquisition link connection information specifying source port number to destination equipment, described UDP message is for making the network equipment determine the equipment identification information of self, and continues to forward described UDP message to the purpose network interconnection Protocol IP address of described UDP message;
Acquisition module, for receiving the LIDPDU message comprising the most corresponding link connection information that each network equipment returns, obtains link connection information therein;
Wherein, the LIDPDU message of the most corresponding link connection information is comprised described in by described Network Device Construction.
10. source equipment as claimed in claim 9, it is characterised in that described sending module sent described in comprise the UDP message obtaining link connection information specifying source port number, carry:
Needing the identification information of the link connection information obtained, for making the network equipment receiving described UDP message determine, described source equipment needs the type of the link connection information obtained;And/or,
Sequence number information, for making the network equipment receiving described UDP message determine the equipment identification information of self according to described sequence number information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310293780.9A CN103354509B (en) | 2013-07-11 | 2013-07-11 | The acquisition methods of a kind of link connection information and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310293780.9A CN103354509B (en) | 2013-07-11 | 2013-07-11 | The acquisition methods of a kind of link connection information and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103354509A CN103354509A (en) | 2013-10-16 |
CN103354509B true CN103354509B (en) | 2016-08-31 |
Family
ID=49310825
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310293780.9A Active CN103354509B (en) | 2013-07-11 | 2013-07-11 | The acquisition methods of a kind of link connection information and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103354509B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11259233B2 (en) | 2019-02-15 | 2022-02-22 | Qualcomm Incorporated | Signaling port information of user equipment ports in a wireless communication system including a radio access network |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104052816B (en) * | 2014-06-26 | 2017-08-25 | 瑞斯康达科技发展股份有限公司 | The method and apparatus that a kind of network equipment is positioned to user terminal |
CN105450432A (en) * | 2014-07-31 | 2016-03-30 | 华为技术有限公司 | Method for positioning port connection error and associated equipment |
CN106936651B (en) * | 2015-12-29 | 2020-01-31 | 华为技术有限公司 | A method and controller for determining data flow |
CN107733669B (en) * | 2016-08-11 | 2023-03-14 | 中兴通讯股份有限公司 | SNMP server management method and system based on request ID |
CN107231309B (en) * | 2017-07-24 | 2019-12-03 | 迈普通信技术股份有限公司 | Obtain method, controller and the purpose switching node of SDN the whole network view |
CN109743232B (en) * | 2019-02-22 | 2020-11-27 | 新华三技术有限公司 | Interface detection method and device |
CN111817926B (en) * | 2020-09-11 | 2020-12-11 | 中国人民解放军国防科技大学 | A method for reachability monitoring based on net-ping under RubyGems |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1501644A (en) * | 2002-11-19 | 2004-06-02 | ��Ϊ��������˾ | Reachability detection method between IP network devices and its application in access backup of public dial-up network platform |
CN101023631A (en) * | 2003-07-24 | 2007-08-22 | 思科技术公司 | System and method for exchanging awareness information in a network environment |
CN101369933A (en) * | 2008-09-26 | 2009-02-18 | 中兴通讯股份有限公司 | Automatic test method and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002033767A (en) * | 2000-07-18 | 2002-01-31 | Fujitsu Ltd | Network management system |
-
2013
- 2013-07-11 CN CN201310293780.9A patent/CN103354509B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1501644A (en) * | 2002-11-19 | 2004-06-02 | ��Ϊ��������˾ | Reachability detection method between IP network devices and its application in access backup of public dial-up network platform |
CN101023631A (en) * | 2003-07-24 | 2007-08-22 | 思科技术公司 | System and method for exchanging awareness information in a network environment |
CN101369933A (en) * | 2008-09-26 | 2009-02-18 | 中兴通讯股份有限公司 | Automatic test method and system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11259233B2 (en) | 2019-02-15 | 2022-02-22 | Qualcomm Incorporated | Signaling port information of user equipment ports in a wireless communication system including a radio access network |
Also Published As
Publication number | Publication date |
---|---|
CN103354509A (en) | 2013-10-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103354509B (en) | The acquisition methods of a kind of link connection information and equipment | |
US11979322B2 (en) | Method and apparatus for providing service for traffic flow | |
EP2544409B1 (en) | Generic monitoring packet handling mechanism for OpenFlow 1.1 | |
CN101536411B (en) | Ethernet OAM at intrmediate nodes in a PBT network | |
CN110995583B (en) | Path detection method, device and computer storage medium | |
CN104639470B (en) | Traffic identifier packaging method and system | |
US11368357B2 (en) | Service fault locating method and apparatus | |
CN110601983A (en) | Method and system for forwarding routing without sensing source of protocol | |
CN105429841B (en) | NNI PING implementation method and device | |
CN106603413B (en) | Method and device for transmitting flow through designated path | |
CN111865658B (en) | vCPE multi-tenant-based tenant service identification mapping method and system | |
CN107968751B (en) | Information processing method and device | |
WO2017036180A1 (en) | Packet processing method and device | |
CN105515816B (en) | Processing method and device for detecting hierarchical information | |
CN103051477A (en) | Network topology automatic acquisition method and system, and network management system | |
CN101729420B (en) | Data processing method and data processing device | |
CN106506366B (en) | A kind of method and node for realizing multi protocol label exchange path inquiry | |
CN104780090A (en) | VPN multicast transmission method and device PE equipment | |
EP2858302A1 (en) | Connectivity check method of service stream link, related apparatus and system | |
CN110535675B (en) | Method and device for multicast fast switching | |
CN107800581A (en) | A kind of loop detection method of double layer network and double layer network | |
JP4040562B2 (en) | Network equipment test equipment | |
CN103607301A (en) | Link fault protection switching method and device under ECMP mode | |
CN109756409A (en) | Bridge-connection transmitting method | |
CN109450792B (en) | Data message packaging method and device |
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 |