CN110098982A - Link state providing method, device, router and computer readable storage medium - Google Patents

Link state providing method, device, router and computer readable storage medium Download PDF

Info

Publication number
CN110098982A
CN110098982A CN201910356835.3A CN201910356835A CN110098982A CN 110098982 A CN110098982 A CN 110098982A CN 201910356835 A CN201910356835 A CN 201910356835A CN 110098982 A CN110098982 A CN 110098982A
Authority
CN
China
Prior art keywords
data packet
status information
probe data
customization
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910356835.3A
Other languages
Chinese (zh)
Other versions
CN110098982B (en
Inventor
杨涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN201910356835.3A priority Critical patent/CN110098982B/en
Publication of CN110098982A publication Critical patent/CN110098982A/en
Application granted granted Critical
Publication of CN110098982B publication Critical patent/CN110098982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Link state providing method provided by the present application, device router and computer readable storage medium, according to preset configuration information, the probe data packet of a variety of preset kinds is sent by identical port, and according to probe data packet and the data packet received, determine the link including port for the status information of the data packet of a variety of preset kinds, types of customization according to status information customization side, the status information of types of customization is sent to status information customization side, it is available or unavailable for the data packet of types of customization to be used to indicate link, it can be seen that, a plurality of types of link detection results can be obtained, and link detection result is provided according to the demand of status information customization side, to meet the demand of the heterogeneous networks module as status information customization side.

Description

Link state providing method, device, router and computer readable storage medium
Technical field
This application involves electronic information field more particularly to a kind of link state providing method, device, router and calculating Machine readable storage medium storing program for executing.
Background technique
Forwarding data packet is the basic function of router.Router generally includes multiple ports being connected with network, is used for Purpose equipment is delivered a packet to by network.Path of the data packet from port transmission to purpose equipment, referred to as link (including Port).
Refer to for the link detection of any one port, probe data packet is sent to purpose equipment by the port, such as Fruit receives the feedback data packet of probe data packet, then illustrates that the link of port connection is available, otherwise, illustrates that the port connects Link it is unavailable.
Existing link detection method often only carries out the detection of single type, so not being able to satisfy different nets to link Demand of the network module for different type detection result.
Summary of the invention
This application provides a kind of link state providing method, device router and computer readable storage medium, purposes It is to solve the problems, such as how to obtain a plurality of types of link detections as a result, to meet the needs of heterogeneous networks module.
To achieve the goals above, this application provides following technical schemes:
A kind of link state providing method, comprising:
According to preset configuration information, the probe data packet of preset kind, the preset kind are sent by identical port Including preset multiple types;
According to the probe data packet and the data packet received, the status information of the link including the port is determined, The status information includes the status information of the preset kind, wherein the status information of any one type is used to indicate institute It is available or unavailable for the data packet of the type to state link;
According to the types of customization of status information customization side, the status information customization side Xiang Suoshu sends the shape of the types of customization State information, the types of customization are that at least one of the preset kind type, the status information of the types of customization are used for Indicate that the link is available or unavailable for the data packet of the types of customization.
Optionally, the configuration information of any one type in the preset kind includes: the corresponding destination of the type Location, the quantity of the destination address are multiple;
The probe data packet of any one type in the preset kind is configured according to the multiple destination address respectively It generates.
Optionally, the preset kind includes: at least one of Ping, Dns and Arp;
Before the probe data packet for sending preset kind by identical port, further includes:
After the probe data packet for generating the preset kind according to the configuration information, the spy of the preset kind is stored The mark of measured data packet, wherein the mark of the probe data packet of any one Ping type by the probe data packet sequence number The ID that generates at random determines, the mark of the probe data packet of any one Dns type by the probe data packet random generation ID and sending port information determine, the mark of the probe data packet of any one Arp type is by the probe data packet source Location and destination address determine.
Optionally, after the mark of the probe data packet of the storage preset kind, further includes:
For any one mark in the mark, in the case where the setting duration of the mark is more than preset duration, It deletes the stored mark and there is the mark probe data packet;
In the case where probe data packet is not present in any one type, the probe data packet of the type is regenerated;
Store the mark of the probe data packet regenerated.
Optionally, the configuration information of any one type in the preset kind further include:
Send interval and the frequency of failure;
It is described according to preset configuration information, pass through the probe data packet that identical port sends preset kind, comprising:
In the case where the number of any one type continuous probe failure is less than the frequency of failure, according to the type The transmission interval of configuration information instruction sends the probe data packet of the corresponding the type of stored mark.
Optionally, described according to the probe data packet and the data packet received, determine the link including the port Status information, comprising:
The first process is called, is realized according to the probe data packet and the data packet received, determines to include the port Link status information process;
First process is also used to: after the status information for determining the link including the port, merging the same end The status information of the link of mouth, and the status information according to preset interval duration, after periodicity sending merging.
Optionally, the status information for sending the types of customization to the status information customization side includes:
It is the customization class in case of change in the case where the status information of the link of the port sends change The status information of type then sends the status information of the types of customization to the status information customization side.
A kind of link state offer device, comprising:
Sending module, for sending the probe data packet of preset kind by identical port according to preset configuration information, The preset kind includes preset multiple types;
Determining module, for determining the chain including the port according to the probe data packet and the data packet received The status information on road, the status information include the status information of the preset kind, wherein the state of any one type is believed It is available or unavailable for the data packet of the type that breath is used to indicate the link;
State provides module, for the types of customization according to status information customization side, the status information customization side Xiang Suoshu hair The status information of the types of customization is sent, the types of customization is at least one of preset kind type, the customization It is available or unavailable for the data packet of the types of customization that the status information of type is used to indicate the link.
Optionally, the configuration information of any one type in the preset kind includes: the corresponding destination of the type Location, the quantity of the destination address are multiple;
The probe data packet of any one type in the preset kind is configured according to the multiple destination address respectively It generates.
Optionally, the preset kind includes: at least one of Ping, Dns and Arp;
Described device further include:
Memory module, for the sending module by identical port send preset kind probe data packet before, After the probe data packet for generating the preset kind according to the configuration information, the probe data packet of the preset kind is stored Mark, wherein the mark of the probe data packet of any one Ping type is by the sequence number of the probe data packet and random raw At ID determine, the mark of the probe data packet of any one Dns type by the probe data packet the ID generated at random and hair The information of sending end mouth determines that the mark of the probe data packet of any one Arp type is by the probe data packet source address and purpose Address determines.
Optionally, the memory module is also used to:
After the mark of the probe data packet of the storage preset kind, for any one in the mark Mark deletes the stored mark and there is the mark to visit in the case where the setting duration of the mark is more than preset duration Measured data packet;In the case where probe data packet is not present in any one type, the probe data packet of the type is regenerated;It deposits Store up the mark of the probe data packet regenerated.
Optionally, the configuration information of any one type in the preset kind further include:
Send interval and the frequency of failure;
The sending module is used to send the detection data of preset kind by identical port according to preset configuration information Packet, comprising:
The sending module is specifically used for, and is less than the frequency of failure in the number of any one type continuous probe failure In the case where, according to the transmission interval that the configuration information of the type indicates, send the corresponding the type of stored mark Probe data packet.
Optionally, the determining module is used to determine to include institute according to the probe data packet and the data packet received State the status information of the link of port, comprising:
The determining module is specifically used for, and calls the first process, realizes according to the probe data packet and the number received According to packet, the process of the status information of the link including the port is determined;
First process is also used to: after the status information for determining the link including the port, merging the same end The status information of the link of mouth, and the status information according to preset interval duration, after periodicity sending merging.
Optionally, the state provides the state that module is used to send the types of customization to the status information customization side Information includes:
The state provides module and is specifically used for, in the case where the status information of the link of the port sends change, It is the status information of the types of customization in case of change, then sends the types of customization to the status information customization side Status information.
A kind of router, comprising:
Processor and memory;
The processor is used for, and according to preset configuration information, the detection data of preset kind is sent by identical port Packet determines the status information of the link including the port according to the probe data packet and the data packet received, according to shape The types of customization of state information customization side, the status information customization side Xiang Suoshu send the status information of the types of customization;
Wherein, the preset kind includes preset multiple types, and the status information includes the shape of the preset kind State information, it is available or unavailable for the data packet of the type that the status information of any one type is used to indicate the link; The types of customization is at least one of preset kind type, and the status information of the types of customization is used to indicate described Link is available or unavailable for the data packet of the types of customization;
The memory is used to store to be produced in the application program and the processor operational process of the processor operation Raw data.
A kind of computer readable storage medium is stored with instruction in the computer readable storage medium, when it is being calculated When being run on machine, so that computer executes above-mentioned link state providing method.
Technical solution described herein sends a variety of preset kinds by identical port according to preset configuration information Probe data packet, and according to probe data packet and the data packet that receives, determine include port link for a variety of default The status information of the data packet of type sends to status information customization side and customizes according to the types of customization of status information customization side The status information of type it is available or unavailable for the data packet of types of customization to be used to indicate link, it is seen then that can obtain a variety of The link detection of type is as a result, simultaneously the demand according to status information customization side provides link detection as a result, to meet as shape The demand of the heterogeneous networks module of state information customization side.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow chart of link state providing method disclosed in the embodiment of the present application;
Fig. 2 is the flow chart of another link state providing method disclosed in the embodiment of the present application;
Fig. 3 is the flow chart of another link state providing method disclosed in the embodiment of the present application;
Fig. 4 provides the structural schematic diagram of device for a kind of link state disclosed in the embodiment of the present application.
Specific embodiment
Link state providing method and device disclosed in the embodiment of the present application, can apply in the routing being set in network In device.Router receives by port and sends data packet, and the purpose of the link state providing method and device is, obtains A plurality of types of detection results of a port, and the link detection result of types of customization is provided to other modules.
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, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
Fig. 1 is a kind of link state providing method disclosed in the embodiment of the present application, comprising the following steps:
S101: according to preset configuration information, the probe data packet of preset kind is sent by identical port.
Wherein, configuration information is the information for configuring probe data packet.
Preset kind includes preset multiple types.Preset kind is preset type, can be from existing spy In the type of measured data packet, preassigned type.
S102: according to probe data packet and the data packet received, the status information of the link including port is determined.
Wherein, status information includes the status information of preset kind.Because in the present embodiment, using a plurality of types of detections Data packet is detected, and therefore, status information includes a plurality of types of status informations, and the status information of any one type is used for Indicate that link is available or unavailable for the data packet of the type.
S103: according to the types of customization of status information customization side, the state of types of customization is sent to status information customization side Information.
Wherein, types of customization is that at least one of preset kind type, the status information of types of customization are used to indicate chain Road is available or unavailable for the data packet of types of customization.
It can be seen that the link that any one port may be implemented multiple types of data packet from process shown in FIG. 1 Detection, therefore, can provide different types of detection result for different modules, to meet disparate modules for different type The demand of detection result.
Fig. 2 is another link state providing method disclosed in the embodiment of the present application, the basis of process shown in Fig. 1 On, it stresses the probe data packet for how configuring generation and sending preset kind, includes following step in process shown in Fig. 2 It is rapid:
S201: configuration information is obtained.
Configuration information is for configuring probe data packet.
Specifically, obtain configuration information specific implementation be it is following any one:
1, the order line for receiving user's input obtains configuration information by resolve command row.
2, it shows configuration interface, and receives the configuration information of user's input by configuration interface.
Specifically, configuration information includes but is not limited to: destination address sends interval and the frequency of failure.
Wherein, destination address of the destination address as probe data packet, optionally, the quantity of destination address are multiple (examples Such as two), to send probe data packet, the state of the multilink of detection a port connection to different purpose equipments.Mesh Address be specifically as follows the IP address or purpose equipment domain name of purpose equipment.
In the present embodiment, with the probe data packet of three types, it is respectively as follows: Ping probe data packet, Dns probe data packet For Arp probe data packet.Configuration information can be respectively set to the probe data packet of three types in user.Three types are visited The configuration information of measured data packet may be the same or different.
The configuration item of the probe data packet of three types is shown by taking configuration interface as an example, on configuration interface, user can be with one The probe data packet of secondary property configuration three types.
S202: according to configuration information, probe data packet, and the mark of storage detection data packet are generated.
The generating mode of Ping probe data packet, Dns probe data packet and Arp probe data packet, it is same as the prior art, Which is not described herein again.
It should be noted that for any one type, in the case where destination address is multiple, respectively according to different Destination address configures the probe data packet of the type, i.e. the probe data packet of the type configures according to multiple destination addresses give birth to respectively At.
For example, including two purpose IP address: IP1 and IP2 in the configuration information of Ping type, then two are generated Divide the probe data packet of Ping type, the probe data packet of a part of Ping type uses IP1, the spy of another part Ping type Measured data packet uses IP2.As can be seen that this two parts probe data packet will be respectively sent to IP1 equipment and IP2 equipment, because This, can detect both links by a port.
In the present embodiment, for different types of probe data packet, the method for determination of the mark of storage is different:
The mark of the probe data packet of any one Ping type by the probe data packet sequence number and at random generate ID is determined.Specifically, 16 ID can be generated at random, and 16 sequence numbers are configured, ID and sequence number constitute 32 marks Know.Optionally, ID and sequence number can also be subjected to Hash operation, is identified.
The mark of the probe data packet of any one Dns type by the probe data packet the ID generated at random and transmitting terminal The information of mouth determines.Specifically, 16 ID can be generated at random, 16 serial numbers with the port for issuing the probe data packet, Constitute 32 marks.Optionally, ID and port serial number can also be subjected to Hash operation, is identified.
The mark of the probe data packet of any one Arp type is determined by the probe data packet source address and destination address. Specifically, source address and destination address can be 32 IP address, 64 marks are constituted.It optionally, can also be by source Address and destination address carry out Hash operation, are identified.
Optionally, the mark for using Hash operation to obtain can be stored in Hash table.
It further, is above-mentioned each mark (and probe data packet with the mark) statistics setting duration.It is any one A length of mark (and probe data packet with the mark) is from the duration for being generated to current time when the setting of a mark.
Optionally, for the ease of realizing, it can be respectively provided with a timer for each mark in Hash table, any one The timing since generating the mark of the timer of mark.
S203: the mark and probe data packet that setting duration is more than preset duration are deleted.
Any one mark in mark is deleted in the case where the setting duration of the mark is more than preset duration Except the stored mark and there is the mark probe data packet.
The purpose of S203 is, a possibility that probe data packet is cracked is reduced, to improve safety.
S204: in the case where probe data packet is not present in any one type, the detection data of the type is regenerated Packet, and store the mark of the probe data packet regenerated.
It is possible that the probe data packet of some type is all deleted because setting duration is too long, therefore, it is necessary to The probe data packet of the type is regenerated, and stores mark, to guarantee that the link state for preset kind detects.
S205: according to preset configuration information, the probe data packet of preset kind is sent by identical port.
Specifically, being less than the feelings of the frequency of failure of configuration information instruction in the number that any one type continuous probe fails Under condition, according to the transmission interval that the configuration information of the type indicates, the detection number of the corresponding the type of stored mark is sent According to packet.
It should be noted that the timing of aforementioned setting duration, starts timing at the time of identifying and generating, as long as also, With the presence of mark, whether timing always persistently, and sends probe data packet and whether to receive data packet unrelated.But it sends out It is needed when sending probe data packet according to mark, sending has the probe data packet for having not timed out mark.
A plurality of types of probe data packets are sent it should be noted that can synchronize, in the case, synchronize the more of transmission Transmission interval in the configuration information of the data packet of seed type needs identical.
S206: according to probe data packet and the data packet received, the status information of the link including port is determined.
S207: according to the types of customization of status information customization side, the state of types of customization is sent to status information customization side Information.
Link state providing method shown in Fig. 2, has the advantage that
1, for any one port, the link detection of multiple types of data packet may be implemented, can be different therefore Module provides different types of detection result, to meet the needs of disparate modules are for different type detection result.
2, the link detection of multiple types of data packet may be implemented by once configuring in user.
Further, it dividing from a logical point of view, router generally includes control layer and forwarding, in method shown in Fig. 2, S201-S204 is realized that S205-S206 is realized by forwarding by control layer.
In S207, communication interface with status information customization side, setting is used for reception state in control layer, the communication interface The types of customization of information customization side, the transmission of the status information of types of customization, is realized by forwarding.
It is emphasized that forwarding realizes that the concrete mode of S206 can be with are as follows: the first process is called to realize S206.
First process is also with the following functions: after the status information for determining the link including port, merging the same end The status information of the link of mouth, and the status information according to preset interval duration, after periodicity sending merging.
Wherein, merge the link-state information of the same port, and according to preset interval duration, after periodicity sending merges Status information, the number of communications between each process run in router can be reduced, especially in unstable networks, simultaneously In the case where being configured with a large amount of link detections, the resource occupation amount of link detection can be significantly reduced, to reduce link detection Adverse effect to the process for needing to obtain detection result.
Fig. 3 is another link state providing method disclosed in the embodiment of the present application, is compared in above-described embodiment, emphasis is said It is bright how according to the data packet that sends and receives, determine link state, and the status information of the customization provided to customization side Concrete mode, in process shown in Fig. 3 the following steps are included:
S301: according to preset configuration information, the probe data packet of preset kind is sent by identical port.
S302: according to the mark of probe data packet and the mark of the data packet received, the link including port is determined Status information.
Specifically, first determining the type of the data packet, and call type is corresponding after receiving any one data packet Analysis program parses data packet, reuses the control parameters that parsing obtains and carries out Hash operation, obtains control mark.Finally, such as Fruit control mark can find identical mark in the stored mark in the above-described embodiments, it is determined that link pair It is available in the data packet of the type, otherwise, it determines link is unavailable for the data packet of the type.
Wherein, the control parameters of the data packet of Ping type are the sequence number of data packet and the ID that generates at random, Dns type Data packet control parameters be data packet ID and sending port information determine.The control parameters of the data packet of Arp type For the source address and destination address of data packet.Control parameters obtain the mode of control mark, with the above-mentioned mode phase identified Together.More detailed implementation may refer to the prior art, and which is not described herein again.
Because in the present embodiment, being detected using a plurality of types of probe data packets, therefore, status information includes a variety of The status information of type, wherein it is available for the data packet of the type that the status information of any one type is used to indicate link Or it is unavailable.
S303: being the status information of types of customization in case of change, then in the case where status information sends and changes The status information of types of customization is sent to status information customization side.
Wherein, types of customization is at least one of preset kind type, for three types of the present embodiment citing Type, types of customization can be at least one of Ping type, Dns type and Arp type.
Status information customization can be with for the module in router, such as dual-host backup module or routing module.Different According to itself service logic, the types of customization of setting is possible to different for status information customization side, such as dual-host backup module Types of customization is Arp type, and the types of customization of routing module is Ping type and Dns type.
Optionally, in order to guarantee the timeliness of link detection state, in the case where status information sends and changes, if hair Change more be types of customization status information, then the status information of the types of customization is sent to status information customization side.
Link state providing method shown in Fig. 3, allows demand module to customize the type of state detection, is conducive to need Modulus block is better carried out service logic.
Fig. 4 provides device for a kind of link state disclosed in the embodiment of the present application, comprising: sending module 41, determining module 42 and state provide module 43 can also include optionally memory module 44.
Specifically, sending module 41 is used to send the spy of preset kind by identical port according to preset configuration information Measured data packet, preset kind include preset multiple types.
Optionally, preset kind includes: at least one of Ping, Dns and Arp.
Wherein, the configuration information of any one type in preset kind includes: the corresponding destination address of the type, purpose The quantity of address is multiple.The probe data packet of any one type in preset kind is configured according to multiple destination addresses respectively It generates.Optionally, the configuration information of any one type in preset kind further include: send interval and the frequency of failure.
In the case, sending module 41 sends the spy of preset kind by identical port according to preset configuration information The specific implementation of measured data packet are as follows: the case where the number of any one type continuous probe failure is less than the frequency of failure Under, according to the transmission interval that the configuration information of the type indicates, send the detection data of the corresponding the type of stored mark Packet.
Determining module 42 is used to determine the state of the link including port according to probe data packet and the data packet received Information, status information include the status information of preset kind, wherein the status information of any one type is used to indicate link pair It is available or unavailable in the data packet of the type.
Further, determining module 42 determines the link including port according to probe data packet and the data packet received Status information specific implementation are as follows: call the first process, realize according to probe data packet and the data packet that receives, really Surely the process of the status information of the link including port.Further, the first process is also used to: determining the link including port Status information after, merge the status information of the link of the same port, and according to preset interval duration, periodicity sending merges Status information afterwards.
State provides the types of customization that module 43 is used for foundation status information customization side, and it is fixed to send to status information customization side The status information of type processed, types of customization are at least one of preset kind type, and the status information of types of customization is for referring to Show that link is available or unavailable for the data packet of types of customization.
Further, state provides module 43 in the case where the status information of the link of port sends change, if hair Change more be types of customization status information, then to status information customization side send types of customization status information.
Memory module 44 be used for sending module by identical port transmission preset kind probe data packet before, according to After the probe data packet for generating preset kind according to configuration information, the mark of the probe data packet of preset kind is stored, wherein any The mark of the probe data packet of one Ping type by the probe data packet sequence number and at random the ID that generates determine, it is any one The mark of the probe data packet of a Dns type determines by the ID of the probe data packet generated at random and the information of sending port, The mark of the probe data packet of any one Arp type is determined by the probe data packet source address and destination address.And storage Module is also used to: after the mark of the probe data packet of storage preset kind, for any one mark in mark, at this In the case that the setting duration of mark is more than preset duration, deletes the stored mark and there is the mark probe data packet; In the case where probe data packet is not present in any one type, the probe data packet of the type is regenerated;Storage is given birth to again At probe data packet mark.
Link state shown in Fig. 4 provides device, be able to use identical port detecting link for a plurality of types of Whether data packet can be used, and the types of customization that can be specified according to status information customization side, and it is fixed to send to status information customization side The status information of type processed, to meet the needs of status information customization side is for different types of link detection result.
The embodiment of the present application also discloses a kind of router, including processor and memory, and processor and memory can be with It is connected by bus.
Wherein, processor is used for: according to preset configuration information, the detection data of preset kind is sent by identical port Packet determines the status information of the link including port according to probe data packet and the data packet received, fixed according to status information The types of customization of system side sends the status information of types of customization to status information customization side.Memory is transported for storage processor The data generated in capable application program and processor operational process.
Specifically, the specific implementation of the function of processor, may refer to Fig. 1, Fig. 2 or process shown in Fig. 3, here It repeats no more.
It is different types of to can satisfy wherein disparate modules detection as data transfer equipment for the router of the present embodiment Therefore the demand of link state has more preferably performance.
The embodiment of the present application also discloses a kind of computer readable storage medium, is stored in computer readable storage medium Instruction, when run on a computer, so that computer executes Fig. 1, Fig. 2 or link state providing method shown in Fig. 3.
If function described in the embodiment of the present application method is realized in the form of SFU software functional unit and as independent production Product when selling or using, can store in a storage medium readable by a compute device.Based on this understanding, the application is real The part for applying a part that contributes to existing technology or the technical solution can be embodied in the form of software products, The software product is stored in a storage medium, including some instructions are used so that a calculating equipment (can be personal meter Calculation machine, server, mobile computing device or network equipment etc.) execute each embodiment the method for the application whole or portion Step by step.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), with Machine accesses various Jie that can store program code such as memory (RAM, Random Access Memory), magnetic or disk Matter.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with it is other The difference of embodiment, same or similar part may refer to each other between each embodiment.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (16)

1. a kind of link state providing method characterized by comprising
According to preset configuration information, the probe data packet of preset kind is sent by identical port, the preset kind includes Preset multiple types;
According to the probe data packet and the data packet received, the status information of the link including the port is determined, it is described Status information includes the status information of the preset kind, wherein the status information of any one type is used to indicate the chain Road is available or unavailable for the data packet of the type;
According to the types of customization of status information customization side, the status information customization side Xiang Suoshu sends the state letter of the types of customization Breath, the types of customization are that at least one of the preset kind type, the status information of the types of customization are used to indicate The link is available or unavailable for the data packet of the types of customization.
2. the method according to claim 1, wherein any one type in the preset kind matches confidence Breath includes: the corresponding destination address of the type, and the quantity of the destination address is multiple;
The probe data packet of any one type in the preset kind configures according to the multiple destination address generate respectively.
3. method according to claim 1 or 2, which is characterized in that the preset kind includes: Ping, Dns and Arp At least one of;
Before the probe data packet for sending preset kind by identical port, further includes:
After the probe data packet for generating the preset kind according to the configuration information, the detection number of the preset kind is stored According to the mark of packet, wherein the mark of the probe data packet of any one Ping type by the probe data packet sequence number and with The ID that machine generates determines, the mark of the probe data packet of any one Dns type by the probe data packet the ID generated at random Determined with the information of sending port, the mark of the probe data packet of any one Arp type by the probe data packet source address and Destination address determines.
4. according to the method described in claim 3, it is characterized in that, in the probe data packet for storing the preset kind After mark, further includes:
Any one mark in the mark is deleted in the case where the setting duration of the mark is more than preset duration The stored mark and have the mark probe data packet;
In the case where probe data packet is not present in any one type, the probe data packet of the type is regenerated;
Store the mark of the probe data packet regenerated.
5. according to the method described in claim 4, it is characterized in that, any one type in the preset kind matches confidence Breath further include:
Send interval and the frequency of failure;
It is described according to preset configuration information, pass through the probe data packet that identical port sends preset kind, comprising:
In the case where the number of any one type continuous probe failure is less than the frequency of failure, according to the configuration of the type The transmission interval of information instruction sends the probe data packet of the corresponding the type of stored mark.
6. according to the method described in claim 4, it is characterized in that, described according to the probe data packet and the data received Packet determines the status information of the link including the port, comprising:
The first process is called, realizes according to the probe data packet and the data packet received, determines the chain including the port The process of the status information on road;
First process is also used to: after the status information for determining the link including the port, merging the same port The status information of link, and the status information according to preset interval duration, after periodicity sending merging.
7. the method according to claim 1, wherein described send the customization to the status information customization side The status information of type includes:
It is the types of customization in case of change in the case where the status information of the link of the port sends change Status information then sends the status information of the types of customization to the status information customization side.
8. a kind of link state provides device characterized by comprising
Sending module, it is described for sending the probe data packet of preset kind by identical port according to preset configuration information Preset kind includes preset multiple types;
Determining module, for determining the link including the port according to the probe data packet and the data packet received Status information, the status information include the status information of the preset kind, wherein the status information of any one type is used It is available or unavailable in data packet of the instruction link for the type;
State provides module, and for the types of customization according to status information customization side, the status information customization side Xiang Suoshu sends institute The status information of types of customization is stated, the types of customization is at least one of preset kind type, the types of customization Status information to be used to indicate the link available for the data packet of the types of customization or unavailable.
9. device according to claim 8, which is characterized in that any one type in the preset kind matches confidence Breath includes: the corresponding destination address of the type, and the quantity of the destination address is multiple;
The probe data packet of any one type in the preset kind configures according to the multiple destination address generate respectively.
10. device according to claim 8 or claim 9, which is characterized in that the preset kind includes: Ping, Dns and Arp At least one of;
Described device further include:
Memory module, for the sending module by identical port send preset kind probe data packet before, according to After the probe data packet for generating the preset kind according to the configuration information, the mark of the probe data packet of the preset kind is stored Know, wherein the mark of the probe data packet of any one Ping type by the probe data packet sequence number and at random generate ID determines, the mark of the probe data packet of any one Dns type by the probe data packet the ID generated at random and transmitting terminal The information of mouth determines that the mark of the probe data packet of any one Arp type is by the probe data packet source address and destination address It determines.
11. device according to claim 10, which is characterized in that the memory module is also used to:
After the mark of the probe data packet of the storage preset kind, for any one mark in the mark Know, in the case where the setting duration of the mark is more than preset duration, deletes the stored mark and there is mark detection Data packet;In the case where probe data packet is not present in any one type, the probe data packet of the type is regenerated;Storage The mark of the probe data packet regenerated.
12. device according to claim 11, which is characterized in that the configuration of any one type in the preset kind Information further include:
Send interval and the frequency of failure;
The sending module is used to send the probe data packet of preset kind by identical port according to preset configuration information, Include:
The sending module is specifically used for, and is less than the feelings of the frequency of failure in the number of any one type continuous probe failure Under condition, according to the transmission interval that the configuration information of the type indicates, the spy of the corresponding the type of stored mark is sent Measured data packet.
13. device according to claim 11, which is characterized in that the determining module is used for according to the probe data packet With the data packet received, the status information of the link including the port is determined, comprising:
The determining module is specifically used for, and calls the first process, realizes according to the probe data packet and the data packet received, Determine the process of the status information of the link including the port;
First process is also used to: after the status information for determining the link including the port, merging the same port The status information of link, and the status information according to preset interval duration, after periodicity sending merging.
14. device according to claim 8, which is characterized in that the state provides module and is used for the status information The status information that customization side sends the types of customization includes:
The state provides module and is specifically used for, in the case where the status information of the link of the port sends change, if Change be the types of customization status information, then the shape of the types of customization is sent to the status information customization side State information.
15. a kind of router characterized by comprising
Processor and memory;
The processor is used for, and according to preset configuration information, the probe data packet of preset kind is sent by identical port, according to According to the probe data packet and the data packet received, the status information of the link including the port is determined, believe according to state The types of customization of customization side is ceased, the status information customization side Xiang Suoshu sends the status information of the types of customization;
Wherein, the preset kind includes preset multiple types, and the status information includes the state letter of the preset kind Breath, it is available or unavailable for the data packet of the type that the status information of any one type is used to indicate the link;It is described Types of customization is that at least one of the preset kind type, the status information of the types of customization are used to indicate the link It is available or unavailable for the data packet of the types of customization;
What the memory generated in the application program and the processor operational process for storing the processor operation Data.
16. a kind of computer readable storage medium, which is characterized in that instruction is stored in the computer readable storage medium, When run on a computer, so that computer perform claim requires the described in any item link state providing methods of 1-7.
CN201910356835.3A 2019-04-29 2019-04-29 Link state providing method, device, router and computer readable storage medium Active CN110098982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910356835.3A CN110098982B (en) 2019-04-29 2019-04-29 Link state providing method, device, router and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910356835.3A CN110098982B (en) 2019-04-29 2019-04-29 Link state providing method, device, router and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110098982A true CN110098982A (en) 2019-08-06
CN110098982B CN110098982B (en) 2021-04-09

Family

ID=67446528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910356835.3A Active CN110098982B (en) 2019-04-29 2019-04-29 Link state providing method, device, router and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110098982B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1655899A1 (en) * 2004-11-01 2006-05-10 Alcatel Device and method for port enabling based on link status monitoring
CN1909487A (en) * 2006-08-24 2007-02-07 华为数字技术有限公司 Method and system for set testing of router
CN101123542A (en) * 2007-07-30 2008-02-13 华为技术有限公司 Method and system for link failure detection and device for link failure detection
US20150106669A1 (en) * 2013-10-10 2015-04-16 Ixia Methods, systems, and computer readable media for providing for specification or autodiscovery of device under test (dut) topology information
CN107528746A (en) * 2016-06-21 2017-12-29 丛林网络公司 Communication means and source network device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1655899A1 (en) * 2004-11-01 2006-05-10 Alcatel Device and method for port enabling based on link status monitoring
CN1909487A (en) * 2006-08-24 2007-02-07 华为数字技术有限公司 Method and system for set testing of router
CN101123542A (en) * 2007-07-30 2008-02-13 华为技术有限公司 Method and system for link failure detection and device for link failure detection
US20150106669A1 (en) * 2013-10-10 2015-04-16 Ixia Methods, systems, and computer readable media for providing for specification or autodiscovery of device under test (dut) topology information
CN107528746A (en) * 2016-06-21 2017-12-29 丛林网络公司 Communication means and source network device

Also Published As

Publication number Publication date
CN110098982B (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN103401726B (en) Network path detection method and device, system
EP2562970B1 (en) Switch, and flow table control method
CA2968964C (en) Source ip address transparency systems and methods
CN105721318B (en) The method and apparatus of network topology are found in a kind of software defined network SDN
CN100413290C (en) Method for setting up notification function for route selection according to border gateway protocol
CN106559246B (en) Cluster implementation method and server
WO2014022183A1 (en) Adaptive infrastructure for distributed virtual switch
CN108141416A (en) A kind of message processing method, computing device and message process device
CN100433729C (en) Load sharing apparatus and method for realizing multi-chain circuit transmission
CN101789949B (en) Method and router equipment for realizing load sharing
US20060209830A1 (en) Packet processing system including control device and packet forwarding device
CN104717081A (en) Gateway function realization method and device
CN112887229B (en) Session information synchronization method and device
CN105391635A (en) Network virtualization method based on software defined network (SDN)
CN105991347A (en) Redirection method of DNS request message and device
CN103200100A (en) Method and device for packet transmitting
CN105743687B (en) Method and device for judging node fault
WO2020173424A1 (en) Message processing method, and gateway device
CN106464745A (en) Dns server, client and data synchronization method
CN104283780A (en) Method and device for establishing data transmission route
CN106789438A (en) A kind of device connectivity detection method and device
CN113890816A (en) Network health state analysis method and device, computer equipment and storage medium
CN105634977A (en) Method and device for discovering a path maximum transmission unit (PMTU)
CN107465621A (en) A kind of router finds method, SDN controllers, router and network system
CN101102231B (en) An automatic discovery method and device of PPP link routing 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
GR01 Patent grant
GR01 Patent grant