CN109450738A - Chain circuit detecting method, device and server - Google Patents
Chain circuit detecting method, device and server Download PDFInfo
- Publication number
- CN109450738A CN109450738A CN201811566653.0A CN201811566653A CN109450738A CN 109450738 A CN109450738 A CN 109450738A CN 201811566653 A CN201811566653 A CN 201811566653A CN 109450738 A CN109450738 A CN 109450738A
- Authority
- CN
- China
- Prior art keywords
- interface
- state
- devices
- test
- switched
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0023—Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the signalling
- H04L1/0025—Transmission of mode-switching indication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/02—Standardisation; Integration
- H04L41/0213—Standardised network management protocols, e.g. simple network management protocol [SNMP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Quality & Reliability (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a kind of chain circuit detecting method, device and server, is related to data communication technology field.This method by the first Devices to test send indicate its first interface communication connection status by first state be switched to the second state first instruction;During the communication connection status of first interface is switched to the second state by first state, it whether there is the second interface for being switched to the second state by first state in judgement and the second Devices to test of the first Devices to test physical connection, obtain judging result;Based on judging result, the first interface and the second Devices to test that obtain the first Devices to test whether there is the testing result of communication link.Based on the program, the Ethernet interface of standard agreement is needed not rely upon, so being able to detect the link of non-Ethernet interface, also just enough detects the link of Wide Area Network interface, facilitates the scope of application for expanding link detecting.
Description
Technical field
This application involves data communication technology fields, in particular to a kind of chain circuit detecting method, device and service
Device.
Background technique
The function that current router function is supported is more, and product module is complicated, and institute's supporting interface type is also more, router
Testing cost also gradually increases.According to traditional manual testing, the simple mode by manual testing will increase manpower and when
Between cost, therefore, in the prior art, usually with automatic test replace manual test.
In the prior art, it is generally required that the topological link to router detects, to find the topological chain of router
Road.In existing route device topology link discovery method, the transparent transmission mechanism of interchanger is usually utilized, by router ether interface
It is connected with interchanger, by way of dividing VLAN on switches, direct-connected interface will be needed to draw to inside the same VLAN,
Indirect realizes that interface is direct-connected, then by learning the corresponding information of direct-connected interface to generate list item.To topological chain
When road is detected, the ether interface for the standard agreement that needs to rely on, by being detected to the list item of study, and which without
Discovery of the method to router wide area network direct connected link.Because which is by realizing router indirectly by the transparent transmission of interchanger
Interface it is direct-connected, be suitable only for the ether interface using standard agreement, and be not suitable for connecing using all kinds of wide area networks of nonstandard protocol
Mouthful.
Summary of the invention
The application provides a kind of chain circuit detecting method, device and server.
To achieve the goals above, technical solution provided by the embodiment of the present application is as follows:
In a first aspect, the embodiment of the present application provides a kind of chain circuit detecting method, which comprises
It is sent to the first Devices to test and indicates that the communication connection status of its first interface is switched to the second shape by first state
First instruction of state;
During the communication connection status of the first interface is switched to second state by the first state, judgement
Described the is switched to the presence or absence of by the first state with the second Devices to test of the first Devices to test physical connection
The second interface of two-state obtains judging result;
Based on the judging result, whether the first interface and second Devices to test of acquisition first Devices to test
There are the testing results of communication link.In this way, communication link can be checked by sending instructions under server, so as to
To need not rely upon standard Ether protocoll, the communication link being able to detect under Ethernet and wide area network is conducive to expand link inspection
The use scope of survey.
With reference to first aspect, in some implementations optionally, be based on the judging result, obtain described first to
The first interface of measurement equipment and second Devices to test whether there is the testing result of communication link, comprising:
Show to obtain described second there are when the second interface from second Devices to test and connect in the judging result
The identification information of mouth;
It is sent to first Devices to test and indicates that the communication connection status of the first interface is cut by second state
It is changed to the second instruction of the first state, and is obtained from second Devices to test and is switched to described the by second state
The identification information of the third interface of one state;In the identification information phase of the identification information and the third interface of the second interface
Meanwhile obtaining the testing result between the first interface and the second interface there are communication link;Or
In the identification information of the second interface and the not identical identification information of the third interface, described first is obtained
The testing result of communication link is not present between interface and the second interface.In this way, in the second Devices to test two
The interface that secondary communications status changes is verified, so as to improve the reliability and accuracy of testing result.
With reference to first aspect, in some implementations optionally, the method also includes:
The first state is communication connection connected state, and second state is communication connection off-state, described
It is sent to the first Devices to test and indicates that the communication connection status of its first interface is switched to the first of the second state by first state
Before instruction, the method also includes:
Obtain the total interface in first Devices to test and second Devices to test in the first state
Interface message, and generate the interface message table including the total interface, wherein the interface message includes the mark letter of interface
Breath and communication connection status.In this way, can be convenient the communication link progress to each Devices to test based on interface message table
Detection helps avoid missing inspection occur or repeats the case where detecting appearance.
With reference to first aspect, in some implementations optionally, sending instruction to the first Devices to test, it first is connect
The communication connection status of mouth is switched to the first instruction of the second state by first state, comprising:
The interface in first state of first Devices to test is successively chosen as based on the interface message table
One interface, the first Devices to test of Xiang Suoshu send the first instruction, include the mark letter of the first interface in first instruction
Breath.In this way, convenient detect the communication link of each Devices to test, helps avoid missing inspection occur or repeat to detect
The case where occur.
With reference to first aspect, in some implementations optionally, the first interface is characterized in the testing result
Between the second interface in the presence of communication link, the method also includes: described is deleted from the interface message table
One interface message and the second interface information.In this way, the case where duplicating detection appearance is helped avoid, thus
Be conducive to promote detection efficiency.
With reference to first aspect, in some implementations optionally, first Devices to test and described the are being obtained
Before the interface message of total interface in two Devices to test in the first state, the method also includes:
According to the corresponding link layer association of the type configuration of first Devices to test and the interface of second Devices to test
View;Wherein, the first Devices to test physics and the interface of the second Devices to test same type configure identical link layer
Agreement.
Second aspect, the embodiment of the present application also provide a kind of link detecting device, and described device includes:
Instruction sending unit, for sending the communication connection status for indicating its first interface by first to the first Devices to test
State is switched to the first instruction of the second state;
Judging unit is switched to described second by the first state for the communication connection status in the first interface
During state, it whether there is in judgement and the second Devices to test of the first Devices to test physical connection by the first state
It is switched to the second interface of second state, obtains judging result;
As a result determination unit obtains first interface and the institute of first Devices to test for being based on the judging result
Stating the second Devices to test whether there is the testing result of communication link.
In conjunction with second aspect, in some implementations optionally, show that there are described second in the judging result
When interface, the result determination unit is also used to obtain the identification information of the second interface from second Devices to test;
Described instruction transmission unit is also used to send the communication link for indicating the first interface to first Devices to test
The second instruction that state is switched to the first state by second state is connect, and is obtained from second Devices to test by institute
State the identification information that the second state is switched to the third interface of the first state;Identification information and institute in the second interface
State third interface identification information it is identical when, obtain the inspection between the first interface and the second interface there are communication link
Survey result;Or
In the identification information of the second interface and the not identical identification information of the third interface, described first is obtained
The testing result of communication link is not present between interface and the second interface.
In conjunction with second aspect, in some implementations optionally, described device further includes information table generation unit, institute
First state is stated as communication connection connected state, second state is communication connection off-state;
The information table generation unit is for obtaining in first Devices to test and second Devices to test in institute
The interface message of the total interface of first state is stated, and generates the interface message table including the total interface, wherein is described to connect
Message breath includes the identification information and communication connection status of interface.
The third aspect, the embodiment of the present application also provide a kind of server, including intercouple memory module, processing mould
Block, communication module, the memory module is interior to store computer program, when the computer program is executed by the processing module
When, so that the server executes above-mentioned method.
Fourth aspect, the embodiment of the present application also provide a kind of computer readable storage medium, are stored thereon with computer journey
Sequence when the computer program is run by processor, executes above-mentioned method.
To enable the above objects, features, and advantages of the application to be clearer and more comprehensible, the embodiment of the present application is cited below particularly, and match
Appended attached drawing is closed, is described in detail below.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached
Figure is briefly described.It should be appreciated that the following drawings illustrates only some embodiments of the application, therefore it is not construed as pair
The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the interaction schematic diagram of server provided by the embodiments of the present application and the first Devices to test, the second Devices to test.
Fig. 2 is the flow diagram of chain circuit detecting method provided by the embodiments of the present application.
Fig. 3 is the schematic diagram for the interface message table that server provided by the embodiments of the present application obtains.
Fig. 4 is the block diagram of link detecting device provided by the embodiments of the present application.
Fig. 5 is the block diagram of server provided by the embodiments of the present application.
Icon: 10- server;11- processing module;12- communication module;13- memory module;The first Devices to test of 20-;
The second Devices to test of 30-;100- link detecting device;110- instruction sending unit;120- judging unit;130- result determines single
Member.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description.Obviously, described embodiment is only a part of the embodiment of the application, instead of all the embodiments.It is logical
The component of the embodiment of the present application being often described and illustrated herein in the accompanying drawings can be arranged and be designed with a variety of different configurations.
Therefore, the detailed description of the embodiments herein provided in the accompanying drawings is not intended to limit below claimed
Scope of the present application, but be merely representative of the selected embodiment of the application.Based on embodiments herein, those skilled in the art
Member's every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.In addition, term " the
One ", " second " etc. is only used for distinguishing description, is not understood to indicate or imply relative importance.
With reference to the accompanying drawing, it elaborates to some embodiments of the application.In the absence of conflict, following
Feature in embodiment and embodiment can be combined with each other.
In the prior art, it is generally required that the topological link to router detects, to find the topological chain of router
Road.In existing route device topology link discovery method, the transparent transmission mechanism of interchanger is usually utilized, by router ether interface
It is connected with interchanger, by dividing virtual LAN (Virtual Local Area Network, abbreviation on switches
VLAN mode) will need direct-connected interface to draw to inside same VLAN, indirect to realize interface direct-connected, then lead to
The corresponding information of the direct-connected interface of overfitting is to generate list item.When being detected to topological link, the standard that needs to rely on association
The ether interface of view, by detecting to the list item of study, and which can not be to the hair of router wide area network direct connected link
It is existing.Because which is to realize the direct-connected of router interface indirectly by the transparent transmission by interchanger, it is suitable only for assisting using standard
The ether interface of view, and be not suitable for all kinds of Wide Area Network interface using nonstandard protocol.
In view of the above problems, the application applicant proposes following embodiment to solve above-mentioned ask by the exploration that studies for a long period of time
Topic.With reference to the accompanying drawing, it elaborates to the embodiment of the present application.In the absence of conflict, following embodiment and implementation
Feature in example can be combined with each other.
Please refer to Fig. 1, server 10 provided by the embodiments of the present application can be used for at least two in network environment to
The communication link of measurement equipment is detected, wherein and the quantity of measurement equipment to be checked can be configured according to the actual situation, such as to
The quantity of detection device can be two or more.
Server 10 can establish communication connection by network and the first Devices to test 20 to carry out data interaction, server
10 can also establish communication connection by network and the second Devices to test 30 to carry out data interaction.First Devices to test 20 and
Pass through physical connection between two Devices to test 30, it usually needs the communication chain between two equipment is detected on the basis of physical connection
Whether road is connected to.
In the present embodiment, Devices to test (for example, first Devices to test 20, the second Devices to test 30) can be routing
Device, interchanger etc..Network may be, but not limited to, cable network or wireless network.
Referring to figure 2., chain circuit detecting method provided by the embodiments of the present application can be applied to above-mentioned server 10, by taking
Business device 10 executes or realizes each step of chain circuit detecting method, and this method can be suitable for detection Ethernet interface, wide area network connect
The communication link of mouth, expands the scope of application of link detecting.Wherein, server 10 is based on preset network protocol and realizes data
It issues and collects, to realize link detecting.Preset protocol is the association of the collection that can be realized facility information, configuration issued
View comprising but be not limited to snmp protocol, NETCONF agreement etc..
Each step of chain circuit detecting method shown in Fig. 2 will be described in detail below:
Step S210 sends to the first Devices to test 20 and indicates that the communication connection status of its first interface is cut by first state
It is changed to the first instruction of the second state.
In the present embodiment, server 10 can according to need sends instructions under two equipment detected, by instruct come
Change the communication connection status of equipment interface.For example, the equipment that can store two equipment detected in server 10
Interface message table, being then based on default network protocol by the interface message table, an equipment sends instruction thereto.Wherein, it is sent out
The equipment for sending instruction is the first Devices to test 20, and another equipment is just the second Devices to test 30.
Understandably, the communication connection status of the interface of Devices to test generally includes communication connection connected state or communication link
Connect off-state.First state is state of the Devices to test before the instruction of reception first, and the second state receives for Devices to test
State after first instruction, the second state are the state different from first state.First state and the second state can be according to realities
Border situation is determined.For example, if first state is connected state (communication connection connected state can be referred to as UP), the second shape
State is just off-state (communication connection off-state can be referred to as DOWN).If first state is off-state, then second
State becomes connected state.
That is, the first Devices to test 20 and the second Devices to test 30 be when carrying out link detecting, if with second to be measured
The first interface of 30 physical connection of equipment is UP, then the first Devices to test 20 is receiving the first instruction that server 10 issues
Afterwards, the communication connection status of first interface will will be switched to DOWM by UP.Similarly, if with 30 physics of the second Devices to test
The communication connection status of the first interface of connection is DOWM, then the first Devices to test 20 is in receive that server 10 issues the
After one instruction, the communication connection status of first interface will be switched to UP by DOWM, then observed in the second Devices to test 30
The interface equally changed occurs with the presence or absence of communication connection status.
Optionally, first state is communication connection connected state, and the second state is communication connection off-state, in step
Before S210, method can also include: to obtain the institute that first state is in the first Devices to test 20 and the second Devices to test 30
There is the interface message of interface, and generate the interface message table including total interface, wherein interface message includes the mark letter of interface
Breath and communication connection status.
Understandably, before step S210, server 10 can by preset network protocol (such as snmp protocol), to
All Devices to test of the server 10 communication connection send the request message collected for information, to collect and the server 10
The information of all Devices to test of communication connection, which includes device name, equipment identities mark, interface name, interface body
Part mark, communications status of interface etc., are then based on device name, interface name and the communications status of interface of Devices to test etc.
Information generates equipment interface information table as shown in Figure 3.Based on the interface message table, it can be used for detecting the first Devices to test 20
First interface communications status during change, occur in the second Devices to test 30 with the presence or absence of the communications status of interface
It is same to change.
Optionally, step S210 may include: based on interface message table successively choose the first Devices to test 20 in the
The interface of one state sends the first instruction as first interface, to the first Devices to test 20, includes first interface in the first instruction
Identification information.
In the present embodiment, server 10 can send the first instruction to Devices to test based on interface message table.For
The label for indicating to be transmitted across the first instruction can be set in interface through being transmitted across the first instruction, convenient for information interface
The interface without sending the first instruction in table continues to detect, to avoid there is missing inspection or repeating the case where detecting, thus
It is able to ascend the efficiency and reliability of link detecting.
Optionally, before step S210, method can also include the steps that configuring interface.Such as: according to
The corresponding link layer protocol of type configuration of the interface of one Devices to test 20 and the second Devices to test 30;Wherein, it first to be measured sets
The interface of standby 30 same type of 20 physics and the second Devices to test configures identical link layer protocol.
Link is carried out according to the type of interface to the total interface of 20 physics of the first Devices to test and the second Devices to test 30
Layer protocol configuration, for example, interface is ether interface, ether interface is inherently UP by its state after cable or optical fiber connection
, it does not need to carry out special configuration again.If interface is pos interface, when can encapsulate ppp protocol, configuration to pos interface
Clock, CRC check, in order to which interface can realize the change of communication connection status by instruction.If interface is CE1 interface, can
To divide channel creation interface, ppp protocol is encapsulated on the interface of creation, in order to which interface can realize communication link by instruction
Connect the change of state.
Step S220, during the communication connection status of first interface is switched to the second state by first state, judgement with
The of the second state is switched to the presence or absence of by first state in second Devices to test 30 of 20 physical connection of the first Devices to test
Two interfaces obtain judging result.
In the present embodiment, generally, if two Devices to test realize link connection by corresponding two interface, that
, if wherein the communications status of an interface is switched to DOWN by UP, then simultaneously, the communications status of another interface can also be sent out
Raw identical change, that is, its communications status also can be switched to DOWN by UP.That is, by changing the first Devices to test
Whether the communications status of 20 first interface detects and deposits in the second equipment then during the state changes of first interface
In the interface of identical change, the testing result of the communication link of two interfaces just can determine that out by its judging result.
Step S230 is based on judging result, and the first interface for obtaining the first Devices to test 20 is with the second Devices to test 30
It is no that there are the testing results of communication link.
Understandably, during the communication connection status of first interface is switched to the second state by first state, if with
There is the second interface that the second state is switched to by first state in second Devices to test 30 of one Devices to test, 20 physical connection,
So there are communication links with second interface for first interface, and the communication of communication link is normal.If with 20 object of the first Devices to test
The second interface for being not present in the second Devices to test 30 of connection and being switched to the second state by first state is managed, then first interface
With the communication abnormality of the communication link of second interface or communication link is not present.
After determining testing result, (interface message) can be identified according to interface identity and determines that the two of link connection connects
Then mouth detailed identification information can be arranged it for indicating normal communication, communication abnormality or the mark for having already passed through detection,
This two interface is detected to avoid repetition.
Optionally, method can determine testing result by the change of a communications status, can also connect to same
Mouth carries out the change of communications status twice to determine testing result, to improve the accuracy of testing result.For example, step S230 can
To include:
Show to obtain the identification information of second interface from the second Devices to test 30 there are when second interface in judging result;
The communication connection status for sending instruction first interface to the first Devices to test 20 is switched to the first shape by the second state
Second instruction of state, and believe from the mark that the second Devices to test 30 obtains the third interface for being switched to first state by the second state
Breath;When the identification information of second interface is identical as the identification information of third interface, obtain between first interface and second interface
There are the testing results of communication link;
Alternatively, in the identification information of second interface and the not identical identification information of third interface, obtain first interface with
The testing result of communication link is not present between second interface.
In the present embodiment, server 10 can be by instructing to the logical of the same first interface of the first Devices to test 20
Letter connection status is switched twice.Then it detects in the second Devices to test 30 and identical change occurs with the presence or absence of communications status
Interface.It is twice the second interface in the second Devices to test 30 (that is, generating state change twice is if existing twice
The same interface in second Devices to test 30), then also mean that between first interface and second interface there are communication link,
And the communication of communication link is normal.If during two next states change, having there is no there is a situation where identical change generations, or send out twice
The interface of raw identical change is not the same interface, it means that communication chain is not present between first interface and second interface
The communication abnormality of communication link between road or two interfaces.Based on this, switched by two next states to determine testing result,
The reliability and accuracy of testing result can be further increased.
It should be noted that when carrying out second and detecting, server 10 can be the into the second Devices to test 30
Two interfaces send instruction, then judge that the interface of identical change occurs with the presence or absence of state for the first Devices to test 20, and if it exists, and
The interface that the first Devices to test 20 changes in second of detection is exactly first interface (for example, the interface that two next states change
Identification information it is identical), then then thinking first interface, there are communication links with second interface, and the communication of communication link is just
Often.
Optionally, after step S230, communication link between first interface and second interface is characterized in testing result and is deposited
When, method can also include: that first interface information and second interface information are deleted from interface message table.
Understandably, if there are multiple Devices to test to need to carry out link detecting in interface message table, correspondence is had determined
Interface existing for communication link out can then delete its interface message from interface message table, in order to which server 10 continues pair
Other interfaces not detected continue to test, and are based on this, can help to be promoted to avoid repeating to detect identical two interface
The efficiency of detection.
Optionally, if in interface message table, the interface message including multiple Devices to test completes the first Devices to test 20
After detection with the second Devices to test 30, it can continue to carry out traversal detection to other Topology connections in interface message table, directly
Corresponding communication link and corresponding interface are determined to all Devices to test.For example, server 10 can continue to
Communication link between one Devices to test 20 and other Devices to test is detected, and certainly, the object continued to test is also possible to
Second Devices to test 30 is with other Devices to test or two different from its of the first Devices to test 20 and the second Devices to test 30
His Devices to test.Its process detected is referred to the detailed description of step S210 to S230, and which is not described herein again.
Referring to figure 3., citing is illustrated each step of above-mentioned chain circuit detecting method below:
The first step, link equipment to be found-interface message table generate: all devices (Devices to test, including first to
Measurement equipment 20 and the second Devices to test 30) on enable snmp protocol, generate that link is to be found sets according to the information of traversal equipment
Standby-interface message table, as shown in Figure 3.For example, in Fig. 3, the entitled DUT1 of Devices to test, interface entitled If1 are corresponding to connect
Mouth type is ether.The entitled DUT2 of Devices to test, the entitled If2 of interface, corresponding interface type are POS.
Second step, interface configuration distributing, concrete operations may is that for ether interface, connect it by cable or optical fiber
Its state is inherently UP afterwards, does not need to carry out special configuration again;For POS, E1 interface, PPP association can be encapsulated to it
View, configurable clock generator, CRC check realize that the state of interface is UP;For CPOS, CE1 interface, channel creation interface can be divided,
Ppp protocol is encapsulated on the interface of creation;For SA interface, interface clock rate is configured in DCE side, is sealed in DCE and DTE side
Fill ppp protocol.
Third step, the acquisition of interface communication connection status variation, which is divided into two processes, first is that being serviced by SNMP
Device 10 carries out shutdown operation (link opening operation) to equipment interface, issues interface to equipment using snmp protocol
Shutdown operation, such as by the IF1 interface shutdown of DUT1;Second is that obtaining the TRAP information of equipment and being parsed, obtain
Take the interface and facility information of stateful variation.
4th step generates direct-connected topological relation according to the TRAP information obtained in third step, as follows:
(DUT1)IF1--------IF2(DUT2)
5th step exists again according to topological relation by the IF1 interface no shutdown (link opening operation) of DUT1
The TRAP information that equipment is obtained on SNMP server 10, according to the UP information at both ends, parsing generates topological relation, raw with the 4th step
At topological relation be compared, think that the topological relation is correct if as the two, topological relation deposited to designated position, if
It is inconsistent then to repeat the 4th step, the 5th step.
6th step, however, it is determined that go out communication link connection between the IF2 interface in the IF1 interface and DUT2 of DUI1, then it can be with
The IF2 interface message in the IF1 interface message and DUT2 of the DUI1 of topological relation is had confirmed in sweep equipment information table, is kept away
Exempt from subsequent repetition and finds topology.
7th step checks the link between other routers in interface message table, repeats third step to the 6th
Step, until all interface topologys find success.
Based on above-mentioned design, scheme provided in this embodiment be may not need dependent on the ether interface under standard agreement, be removed
The link of ether interface can be checked, the link of all kinds of interfaces of wide area network can also be detected, it is applicable
Interface is more.In addition, the program can rapid deployment into the net environment for needing to carry out link detecting, the expense of link detecting compared with
Small, the data volume for collecting processing is few, so that the speed of link detecting is fast.
Referring to figure 4., the embodiment of the present application also provides a kind of link detecting device 100.The link detecting device 100 can be with
Applied in above-mentioned server 10, storage mould can be stored in the form of software or firmware (firmware) including at least one
In block 13 or the software function module that is solidificated in 10 operating system of server (operating system, OS).Link inspection
Surveying device 100 can be used for executing each step of chain circuit detecting method, can improve and is only capable of in the prior art to ether interface
The technical issues of link is detected.Wherein, which may include instruction sending unit 110, judging unit
120 and result determination unit 130.
Instruction sending unit 110, for sending the communication connection status for indicating its first interface to the first Devices to test 20
The first instruction of the second state is switched to by first state.
Optionally, instruction sending unit 110 is also used to successively choose the place of the first Devices to test 20 based on interface message table
In first state interface as first interface, send the first instruction to the first Devices to test 20, include first in the first instruction
The identification information of interface.
Judging unit 120, during being switched to the second state by first state for the communication connection status in first interface,
It whether there is in judgement and the second Devices to test 30 of 20 physical connection of the first Devices to test and the second shape be switched to by first state
The second interface of state obtains judging result.
As a result determination unit 130, for be based on judging result, obtain the first Devices to test 20 first interface and second to
Measurement equipment 30 whether there is the testing result of communication link.
Optionally, show in judging result there are when second interface, as a result determination unit 130 is also used to be measured set from second
Standby 30 obtain the identification information of second interface;Instruction sending unit 110 is also used to send instruction first to the first Devices to test 20
The communication connection status of interface by the second state be switched to first state second instruction, and from the second Devices to test 30 obtain by
Second state is switched to the identification information of the third interface of first state;In the identification information of second interface and the mark of third interface
When knowledge information is identical, there are the testing results of communication link between acquisition first interface and second interface;Alternatively, in second interface
Identification information and third interface identification information it is not identical when, obtain and communication chain be not present between first interface and second interface
The testing result on road.
Optionally, link detecting device 100 further includes information table generation unit, and first state is communication connection connected state
State, the second state are communication connection off-state.Information table generation unit is to be measured for obtaining the first Devices to test 20 and second
The interface message of total interface in equipment 30 in first state, and generate the interface message table including total interface, wherein
Interface message includes the identification information and communication connection status of interface.
Optionally, link detecting device 100 further includes information deletion unit.First interface and second is characterized in testing result
Between interface in the presence of communication link, information deletion unit connects for the deletion first interface information from interface message table and second
Message breath.
Optionally, link detecting device 100 further includes configuration unit.It to be measured is set obtaining the first Devices to test 20 and second
Before the interface message of total interface in standby 30 in first state, configuration unit is used for according to the first Devices to test 20 and the
The corresponding link layer protocol of type configuration of the interface of two Devices to test 30;Wherein, 20 physics of the first Devices to test and second to
The interface of 30 same type of measurement equipment configures identical link layer protocol.
It should be noted that it is apparent to those skilled in the art that, for convenience and simplicity of description, on
The specific work process and function of the link detecting device 100 of description are stated, it can be with reference to each step pair in preceding method
Process and effect are answered, is no longer excessively repeated herein.
Referring to figure 5., the embodiment of the present application also provides a kind of server 10, can be used in executing or realizing above-mentioned link
Detection method.Server 10 may include processing module 11, communication module 12, memory module 13 and link detecting device 100,
It is directly or indirectly electric between processing module 11, communication module 12, memory module 13 and each element of link detecting device 100
Property connection, to realize the transmission or interaction of data.For example, these elements between each other can by one or more communication bus or
Signal wire, which is realized, to be electrically connected.
Processing module 11 may be a kind of IC chip, the processing capacity with signal.Above-mentioned processing module 11 can
To be general processor.For example, the processor can be central processing unit (Central Processing Unit, CPU), figure
Shape processor (Graphics Processing Unit, GPU), network processing unit (Network Processor, NP) etc.;Also
Can be digital signal processor (DSP), specific integrated circuit (ASIC), field programmable gate array (FPGA) or other can
Programmed logic device, discrete gate or transistor logic, discrete hardware components.It may be implemented or execute the application implementation
Disclosed each method, step and logic diagram in example.
Communication module 12 is used to establish server 10 and the first Devices to test 20 and the second Devices to test 30 by network
Communication connection, and pass through network sending and receiving data.
Memory module 13 may be, but not limited to, random access memory, read-only memory, programmable read only memory,
Erasable Programmable Read Only Memory EPROM, electrically erasable programmable read-only memory etc..In the present embodiment, memory module 13 can be with
For data such as memory interface information, communication connection status.Certainly, memory module 13 can be also used for storage program, handle mould
Block 11 executes the program after receiving and executing instruction.
Further, link detecting device 100 includes that at least one can be deposited in the form of software or firmware (firmware)
The software function mould for being stored in memory module 13 or being solidificated in 10 operating system of server (operating system, OS)
Block.Processing module 11 is used to execute the executable module stored in memory module 13, such as included by link detecting device 100
Software function module and computer program etc..
It is understood that structure shown in fig. 5 is only a kind of structural schematic diagram of server 10, server 10 can be with
Including than more or fewer components shown in Fig. 5.Each component shown in Fig. 5 can be realized using hardware, software, or its combination.
It should be noted that it is apparent to those skilled in the art that, for convenience and simplicity of description, on
State the specific work process of the server 10 of description, can with reference to each step corresponding process in preceding method, herein not after
It repeats more.
The embodiment of the present application also provides a kind of computer readable storage medium.Computer journey is stored in readable storage medium storing program for executing
Sequence, when computer program is run on computers, so that computer executes such as above-mentioned link detecting side as described in the examples
Method.
Through the above description of the embodiments, those skilled in the art can be understood that the application can lead to
Hardware realization is crossed, the mode of necessary general hardware platform can also be added to realize by software, based on this understanding, this Shen
Technical solution please can be embodied in the form of software products, which can store in a non-volatile memories
In medium (can be CD-ROM, USB flash disk, mobile hard disk etc.), including some instructions are used so that a computer equipment (can be
Personal computer, server or network equipment etc.) execute method described in each implement scene of the application.
In conclusion the application provides a kind of chain circuit detecting method, device and server.This method passes through to be measured to first
Equipment sends the first instruction for indicating that the communication connection status of its first interface is switched to the second state by first state;First
During the communication connection status of interface is switched to the second state by first state, judgement and the of the first Devices to test physical connection
With the presence or absence of the second interface for being switched to the second state by first state in two Devices to test, judging result is obtained;Based on judgement
As a result, the first interface and the second Devices to test of the first Devices to test of acquisition whether there is the testing result of communication link.It is based on
The program, needs not rely upon the Ethernet interface of standard agreement, so it is able to detect the link of non-Ethernet interface, also just enough inspections
The link for surveying Wide Area Network interface facilitates the scope of application for expanding link detecting.
In embodiment provided herein, it should be understood that disclosed devices, systems, and methods can also lead to
Other modes are crossed to realize.Devices, systems, and methods embodiment described above is only schematical, for example, in attached drawing
Flow chart and block diagram show that the system of multiple embodiments according to the application, the possibility of method and computer program product are real
Existing architecture, function and operation.In this regard, each box in flowchart or block diagram can represent module, a journey
A part of sequence section or code, a part of the module, section or code include one or more for realizing defined
The executable instruction of logic function.It should also be noted that in some implementations as replacement, function marked in the box
It can also occur in a different order than that indicated in the drawings.For example, two continuous boxes can actually be substantially in parallel
It executes, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that block diagram and/
Or the combination of each box in flow chart and the box in block diagram and or flow chart, can with execute as defined in function or
The dedicated hardware based system of movement is realized, or can be realized using a combination of dedicated hardware and computer instructions.
In addition, each functional module in each embodiment of the application can integrate one independent part of formation together, it can also be with
It is modules individualism, an independent part can also be integrated to form with two or more modules.
It can replace, can be realized wholly or partly by software, hardware, firmware or any combination thereof.When
When using software realization, can entirely or partly it realize in the form of a computer program product.The computer program product
Including one or more computer instructions.It is all or part of when loading on computers and executing the computer program instructions
Ground is generated according to process or function described in the embodiment of the present application.The computer can be general purpose computer, special purpose computer,
Computer network or other programmable devices.The computer instruction may be stored in a computer readable storage medium, or
Person is transmitted from a computer readable storage medium to another computer readable storage medium, for example, the computer instruction
Wired (such as coaxial cable, optical fiber, digital subscriber can be passed through from a web-site, computer, server or data center
Line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or data
It is transmitted at center.The computer readable storage medium can be any usable medium that computer can access and either wrap
The data storage devices such as server, the data center integrated containing one or more usable mediums.The usable medium can be magnetic
Property medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk
Solid State Disk (SSD)) etc..
The foregoing is merely preferred embodiment of the present application, are not intended to limit this application, for the skill of this field
For art personnel, various changes and changes are possible in this application.Within the spirit and principles of this application, made any to repair
Change, equivalent replacement, improvement etc., should be included within the scope of protection of this application.
Claims (10)
1. a kind of chain circuit detecting method, which is characterized in that the described method includes:
It is sent to the first Devices to test and indicates that the communication connection status of its first interface is switched to the second state by first state
First instruction;
During the communication connection status of the first interface is switched to second state by the first state, judgement and institute
Stating, which whether there is in the second Devices to test of the first Devices to test physical connection, is switched to second shape by the first state
The second interface of state obtains judging result;
Based on the judging result, the first interface for obtaining first Devices to test whether there is with second Devices to test
The testing result of communication link.
2. acquisition described first is to be measured to be set the method according to claim 1, wherein being based on the judging result
Standby first interface and second Devices to test whether there is the testing result of communication link, comprising:
Show to obtain the second interface from second Devices to test there are when the second interface in the judging result
Identification information;
It is sent to first Devices to test and indicates that the communication connection status of the first interface is switched to by second state
Second instruction of the first state, and obtained from second Devices to test and first shape is switched to by second state
The identification information of the third interface of state;It is identical as the identification information of the third interface in the identification information of the second interface
When, obtain the testing result between the first interface and the second interface there are communication link;Or
In the identification information of the second interface and the not identical identification information of the third interface, the first interface is obtained
The testing result of communication link is not present between the second interface.
3. method according to claim 1 or 2, which is characterized in that the first state is communication connection connected state, institute
The second state is stated for communication connection off-state, in the communication connection for sending its first interface of instruction to the first Devices to test
State is switched to before the first instruction of the second state by first state, the method also includes:
Obtain the interface of the total interface in first Devices to test and second Devices to test in the first state
Information, and generate include the total interface interface message table, wherein the interface message include interface identification information and
Communication connection status.
4. according to the method described in claim 3, indicating the logical of its first interface it is characterized in that, sending to the first Devices to test
Letter connection status is switched to the first instruction of the second state by first state, comprising:
The interface in first state for successively choosing first Devices to test based on the interface message table connects as first
Mouthful, the first Devices to test of Xiang Suoshu sends the first instruction, includes the identification information of the first interface in first instruction.
5. according to the method described in claim 3, it is characterized in that, obtaining first Devices to test and described second to be measured
Before the interface message of total interface in equipment in the first state, the method also includes:
According to the corresponding link layer protocol of type configuration of first Devices to test and the interface of second Devices to test;Its
In, the interface of the first Devices to test physics and the second Devices to test same type configures identical link layer protocol.
6. a kind of link detecting device, which is characterized in that described device includes:
Instruction sending unit, for sending the communication connection status for indicating its first interface by first state to the first Devices to test
It is switched to the first instruction of the second state;
Judging unit is switched to second state by the first state for the communication connection status in the first interface
Period, judgement are switched by the first state with whether there is in the second Devices to test of the first Devices to test physical connection
For the second interface of second state, judging result is obtained;
As a result determination unit obtains the first interface and described the of first Devices to test for being based on the judging result
Two Devices to test whether there is the testing result of communication link.
7. device according to claim 6, which is characterized in that show that there are the second interfaces in the judging result
When, the result determination unit is also used to obtain the identification information of the second interface from second Devices to test;
Described instruction transmission unit is also used to send the communication connection shape for indicating the first interface to first Devices to test
State is switched to the second instruction of the first state by second state, and is obtained from second Devices to test by described the
Two-state is switched to the identification information of the third interface of the first state;In the identification information of the second interface and described the
When the identification information of three interfaces is identical, the detection knot between the first interface and the second interface there are communication link is obtained
Fruit;Or
In the identification information of the second interface and the not identical identification information of the third interface, the first interface is obtained
The testing result of communication link is not present between the second interface.
8. device according to claim 6 or 7, which is characterized in that described device further includes information table generation unit, described
First state is communication connection connected state, and second state is communication connection off-state;
The information table generation unit is for obtaining in first Devices to test and second Devices to test in described the
The interface message of the total interface of one state, and generate the interface message table including the total interface, wherein the interface letter
Breath includes the identification information and communication connection status of interface.
9. a kind of server, which is characterized in that including the memory module, processing module, communication module to intercouple, the storage
Computer program is stored in module, when the computer program is executed by the processing module, so that the server executes
Method of any of claims 1-5.
10. a kind of computer readable storage medium, which is characterized in that be stored thereon with computer program, the computer program
When being run by processor, method according to any one of claims 1 to 5 is executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811566653.0A CN109450738A (en) | 2018-12-19 | 2018-12-19 | Chain circuit detecting method, device and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811566653.0A CN109450738A (en) | 2018-12-19 | 2018-12-19 | Chain circuit detecting method, device and server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109450738A true CN109450738A (en) | 2019-03-08 |
Family
ID=65558994
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811566653.0A Pending CN109450738A (en) | 2018-12-19 | 2018-12-19 | Chain circuit detecting method, device and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109450738A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110868407A (en) * | 2019-11-06 | 2020-03-06 | 成都卫士通信息产业股份有限公司 | Ethernet link detection method, device, electronic equipment and computer medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1819548A (en) * | 2004-11-01 | 2006-08-16 | 阿尔卡特公司 | Port re-enabling by monitoring link status |
CN101330412A (en) * | 2008-07-29 | 2008-12-24 | 中兴通讯股份有限公司 | Automatization test approach and system based on topological discovery |
CN102364892A (en) * | 2011-10-12 | 2012-02-29 | 华为技术有限公司 | Link aggregation control protocol (LACP) link switching and data transmission method and apparatus thereof |
CN103634131A (en) * | 2012-08-24 | 2014-03-12 | 杭州华三通信技术有限公司 | A method and device for detecting interconnection links of virtualization network devices |
CN106713145A (en) * | 2015-07-28 | 2017-05-24 | 中兴通讯股份有限公司 | Method and device for refreshing link state message |
-
2018
- 2018-12-19 CN CN201811566653.0A patent/CN109450738A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1819548A (en) * | 2004-11-01 | 2006-08-16 | 阿尔卡特公司 | Port re-enabling by monitoring link status |
CN101330412A (en) * | 2008-07-29 | 2008-12-24 | 中兴通讯股份有限公司 | Automatization test approach and system based on topological discovery |
CN102364892A (en) * | 2011-10-12 | 2012-02-29 | 华为技术有限公司 | Link aggregation control protocol (LACP) link switching and data transmission method and apparatus thereof |
CN103634131A (en) * | 2012-08-24 | 2014-03-12 | 杭州华三通信技术有限公司 | A method and device for detecting interconnection links of virtualization network devices |
CN106713145A (en) * | 2015-07-28 | 2017-05-24 | 中兴通讯股份有限公司 | Method and device for refreshing link state message |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110868407A (en) * | 2019-11-06 | 2020-03-06 | 成都卫士通信息产业股份有限公司 | Ethernet link detection method, device, electronic equipment and computer medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106155260B (en) | System and management method of server and computer readable storage medium | |
US7864707B2 (en) | Determination of network topology using flow-based traffic information | |
CN104796298B (en) | A kind of method and device of SDN network accident analysis | |
US11539611B2 (en) | Fine-grained network monitoring | |
US20150249587A1 (en) | Method and apparatus for topology and path verification in networks | |
CN107317695A (en) | Mthods, systems and devices for debugging network node Intranet failure | |
JP2006526303A (en) | System and method for boundary scan testing of wired or wireless networks | |
US11799888B2 (en) | Automatic identification of roles and connection anomalies | |
EP3410133A1 (en) | System and method for voltage regulator self-burn-in test | |
CN108141385A (en) | For the system and method based on cloud of the test configurations of management cable test equipment | |
CN113347059B (en) | In-band network telemetering optimal detection path planning method based on fixed probe position | |
CN109802855A (en) | A kind of Fault Locating Method and device | |
CN111614505B (en) | Message processing method and gateway equipment | |
CN109474495A (en) | A kind of tunnel detection method and device | |
CN113273135B (en) | Network topology discovery in a substation | |
CN109326114A (en) | Method and device for dividing station area to which power node belongs | |
CN110858810A (en) | Network link state monitoring method, device, system and medium | |
CN105207850B (en) | A kind of network connectivty test method and system | |
CN103746874A (en) | Method and equipment for IP (Internet protocol) FPM (flow performance monitor) | |
CN117783841A (en) | FPGA wiring coverage rate testing method, device, equipment and medium | |
CN109450738A (en) | Chain circuit detecting method, device and server | |
CN109327242A (en) | Method and device for identifying the station area to which an electric energy meter belongs | |
Bermudez et al. | On the infiniband subnet discovery process | |
US11368380B1 (en) | Estimating end-to-end network packet loss | |
CN110730093B (en) | Metropolitan area network topology mapping method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190308 |