CN106301997A - Gateway device response to network connectedness method and apparatus - Google Patents

Gateway device response to network connectedness method and apparatus Download PDF

Info

Publication number
CN106301997A
CN106301997A CN201510369825.5A CN201510369825A CN106301997A CN 106301997 A CN106301997 A CN 106301997A CN 201510369825 A CN201510369825 A CN 201510369825A CN 106301997 A CN106301997 A CN 106301997A
Authority
CN
China
Prior art keywords
message
address
gateway device
icmp message
icmp
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.)
Withdrawn
Application number
CN201510369825.5A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510369825.5A priority Critical patent/CN106301997A/en
Priority to PCT/CN2016/086017 priority patent/WO2017000790A1/en
Publication of CN106301997A publication Critical patent/CN106301997A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks

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

The invention discloses a kind of gateway device response to network connectedness method, when receiving control protocol message i.e. icmp message between the net that terminal sends, line card obtains ip address, source and the purpose ip address of described icmp message;Mate with the ip address of the gateway device at its place in described purpose ip address, and when ip address, described source is mated with the IP address in the routing table of described gateway device, described line card generates response icmp message based on described icmp message;Described line card feeds back described response icmp message to described terminal.The invention also discloses a kind of gateway device response to network connectivity means.The present invention improves the speed of gateway device response terminal ping request.

Description

Gateway device response to network connectedness method and apparatus
Technical field
The present invention relates to computer communication field, particularly relate to a kind of gateway device response to network connectedness side Method and device.
Background technology
Network connectivty detection technique ping technology is a kind of skill connective for test network in ip network Art.Gateway device currently as operator or enterprise data center is essentially all by master control and line card group Becoming, gateway device, when receiving the ping request that terminal sends, is essentially all and is obtained eventually by line card The control protocol message icmp message of end, then the icmp message got is reported entering of master control by line card Row processes, and when great amount of terminals user ping gateway device simultaneously, and other protocol massages is also in master control During process, the master control utilization rate of gateway device can raise, and causes master control to process the overlong time of icmp message, The time of response terminal ping request also extends, thus reduces gateway device response terminal ping request Speed.
Summary of the invention
Present invention is primarily targeted at a kind of gateway device response to network connectedness method and apparatus of proposition, When aiming to solve the problem that great amount of terminals user ping gateway device simultaneously, gateway device response terminal ping request The technical problem that speed is low.
For achieving the above object, a kind of gateway device response to network connectedness method that the present invention provides, institute State gateway device response to network connectedness method to comprise the following steps:
When receiving control protocol message i.e. icmp message between the net that terminal sends, line card obtains described The ip address, source of icmp message and purpose ip address;
Mate with the ip address of the gateway device at its place in described purpose ip address, and ip address, described source When mating with the IP address in the routing table of described gateway device, described line card is raw based on described icmp message Become response icmp message;
Described line card feeds back described response icmp message to described terminal.
Preferably, the step that described line card generates response icmp message based on described icmp message includes:
Whether described line card calculates the verification of described icmp message and and judges described verification and be 0;
If described verification and be 0, described line card exchanges ip address, source and purpose ip of described icmp message Address;
Described line card calculate exchange icmp heading in the icmp message behind ip address verification and, and will The position that verification after calculating is corresponding with being written to icmp heading;
Described line card calculate whole icmp message verification and, and will calculate after verification and be written to icmp The position that message is corresponding;
Described line card using the mac address of the described network equipment as mac address, source and by described terminal pair The mac address answered is as purpose mac address, and is encapsulated in mac address, described source and purpose mac address To described icmp message, to generate response icmp message.
Preferably, the described response icmp message of described line card feedback includes to the step of described terminal:
Described line card searches the output port of next skip list corresponding with ip address, described source in routing table;
Described response icmp message is sent to terminal by described output port by described line card.
Preferably, described when receiving control protocol message i.e. icmp message between the net that terminal sends, institute Before stating the ip address, source of the line card described icmp message of acquisition and the step of purpose ip address, described gateway Equipment response to network connectedness method includes:
When receiving the message that terminal sends, described line card detects whether described gateway device is in quickly The pattern of response icmp message;
If detecting, gateway device is in the pattern quickly responding icmp message, and described line card judges currently to connect Whether the message received is icmp message.
Preferably, described gateway device response to network connectedness method also includes:
Receiving the message that terminal sends, and when described message is not icmp message, described line card will connect The message received is sent to master control, responds described message for master control.
Additionally, for achieving the above object, the present invention also proposes a kind of gateway device response to network connectedness dress Putting, described gateway device response to network connectivity means includes:
Acquisition module, is used for when receiving control protocol message i.e. icmp message between the net that terminal sends, Obtain ip address, source and the purpose ip address of described icmp message;
Generation module, for mating with the ip address of the gateway device at its place in described purpose ip address, And ip address, described source is when mating with the ip address in the routing table of described gateway device, based on described icmp Message generates response icmp message;
Feedback module, is used for feeding back described response icmp message to described terminal.
Preferably, described generation module includes:
Whether computing unit, for calculating the verification of described icmp message and and judging described verification and be 0;
Exchange unit, if for described verification and be 0, exchanging ip address, source and the mesh of described icmp message Ip address;
Processing unit, for calculate the verification exchanging icmp heading in the icmp message behind ip address and, And the verification position corresponding with being written to icmp heading after calculating;
Described processing unit, be additionally operable to calculate whole icmp message verification and, and the verification after calculating The position corresponding with being written to icmp message;
Signal generating unit, is used for the mac address of the described network equipment as mac address, source and by described Mac address corresponding to terminal is as purpose mac address, and by mac address, described source and purpose mac ground In location encapsulation extremely described icmp message, to generate response icmp message.
Preferably, described feedback module includes:
Search unit, for searching the outfan of next skip list corresponding with ip address, described source in routing table Mouthful;
Transmitting element, for being sent to terminal by described response icmp message by described output port.
Preferably, described gateway device response to network connectivity means also includes:
Detection module, for when receiving the message that terminal sends, detecting whether described gateway device is located In quickly response icmp message pattern;
Judge module, if for detecting that gateway device is in quickly response icmp message pattern, it is judged that when Before the message that receives whether be icmp message.
Preferably, described gateway device response to network connectivity means also includes:
Processing module, for receiving the message that terminal sends, and when described message is not icmp message, The message received is sent to master control, responds described message for master control.
The gateway device response to network connectedness method and apparatus that the present invention proposes, the line card of gateway device is first Obtain ip address, source and the purpose ip address of icmp message, more described icmp message is processed with life Become response icmp message, finally described response icmp message is sent to terminal, to respond terminal ping The icmp message asking rather than being obtained by line card terminal of gateway device, then line card will obtain again To icmp message report master control and process because master control to process all kinds of message, therefore respond icmp The time of message can be elongated, and by the way of line card directly processes icmp message and is sent to terminal, carries The high speed of gateway device response terminal ping request.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of gateway device response to network connectedness method first embodiment of the present invention;
Fig. 2 is that line card of the present invention generates response icmp message preferred embodiment based on described icmp message Schematic flow sheet;
Fig. 3 is that line card of the present invention feeds back described response icmp message to described terminal preferred embodiment Schematic flow sheet;
Fig. 4 is the schematic flow sheet of gateway device response to network connectedness method the 4th embodiment of the present invention;
Fig. 5 is the functional module signal of gateway device response to network connectivity means first embodiment of the present invention Figure;
Fig. 6 is the preferred embodiment refinement high-level schematic functional block diagram of generation module in Fig. 5;
Fig. 7 is the preferred embodiment refinement high-level schematic functional block diagram of feedback module in Fig. 5;
Fig. 8 is the functional module signal of gateway device response to network connectivity means the 4th embodiment of the present invention Figure.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, do referring to the drawings further Explanation.
Detailed description of the invention
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not used to limit Determine the present invention.
The present invention provides a kind of gateway device response to network connectedness method.
With reference to the flow process that Fig. 1, Fig. 1 are gateway device response to network connectedness method first embodiment of the present invention Schematic diagram.
The present embodiment proposes a kind of gateway device response to network connectedness method, described gateway device response net Network connectedness method includes:
Step S10, when receiving control protocol message i.e. icmp message between the net that terminal sends, line card Obtain ip address, source and the purpose ip address of described icmp message;
In the present embodiment, if the message receiving terminal transmission is icmp message, described line card first extracts The pointer of described icmp message, described pointer is the pointer of 2 layers of heading, needs by skew 12 Byte, points to the vlan field of message, and described line card judges whether described icmp message is many vlan mark again Sign the message of type, obtain the number of the vlan-label of icmp message further, it is to be understood that icmp Message source mac address and purpose mac address respectively take 6 bytes, take altogether 12 bytes, one Vlan takies 4 bytes, then the number of tags being multiplied by vlan obtains the byte number that vlan information takies altogether, The byte number that so mac address takies altogether plus vlan is exactly that 3 layers of heading are relative to 2 layers of heading Side-play amount, 2 layers of head pointer of message will point to 3 layers of information header of message plus this side-play amount, 3 Front 4 bytes of layer information header are exactly the purpose ip address of message, and 5-8 byte is the source ip ground of message Location, we have just got source ip and the purpose ip address of message by this method.
Step S20, mates with the ip address of the gateway device at its place in described purpose ip address, and institute Stating ip address, source when mating with the IP address in the routing table of described gateway device, described line card is based on described Icmp message generates response icmp message;
In the present embodiment, described step S20 includes step:
Step A, described line card judges that whether described purpose ip address is the gateway of the gateway device at its place Ip address;
In the present embodiment, described line card judges that whether described purpose ip address is the gateway ip of gateway device Address optimal way is: after line card gets purpose ip of icmp message, it is judged that whether described ip is net Close ip.In general, configuring gateway ip when, gateway device can issue Host routes to hardware core The gateway ip of sheet routing table, i.e. gateway device, gateway device also can preserve a identical record and exists simultaneously In software routing table, different types of ip has different type marks, and gateway ip can be by device flag Local ip mark, the loopback port address of gateway also has loopback (loop-back address) mark.With Purpose ip goes to search software routing table, if find this ip in Host routes table, and the mark of this ip It is local ip mark or loopback mark, then proves that this icmp message is other equipment ping net Close ip address, need us quickly to return bag and process, i.e. need to carry out the response of ping request.
Step B, described line card judges in the routing table whether ip address, described source exists described gateway device;
In the present embodiment, described line card judges whether ip address, described source exists the road of described gateway device By optimal way in table it is: described line card judges that whether the ip address, source of icmp message is on the road of gateway device By in table, the purpose done so be need to judge follow-up middle ip address, source and purpose ip address are exchanged after, Purpose ip (the source ip of the icmp message i.e. received) of the message finally sent can find the road of response By table, that i.e. can find reality goes out port.Further, if it is determined that ip address, source is not at gateway In the routing table of equipment, then flow process below would not be continued, but icmp message up sending to master control Carrying out process.
Step C, described line card processes described icmp message, to generate the icmp message of response.
In the present embodiment, the most described line card to the verification of described icmp message and calculates and checks Deng operation, and according to the assay of verification sum, ip address, source and purpose ip address are interchangeable, with Purpose ip (the source ip of the icmp message i.e. received) of the icmp message for finally sending can find The routing table of response, i.e. can find the output port of reality, and finally, described line card obtains described network The mac address, source of equipment and the purpose mac address of described routing table, by mac address, described source and purpose In mac address encapsulation extremely described icmp message, to generate response icmp message.Step S30, described line Card feeds back described response icmp message to described terminal.
The gateway device response to network connectedness method that the present embodiment proposes, the line card of gateway device first obtains The ip address, source of icmp message and purpose ip address, then process described icmp message to generate sound Answer icmp message, finally described response icmp message is sent to terminal, to respond terminal ping gateway The request of equipment rather than obtained the icmp message of terminal by line card, then line card will get again Icmp message reports master control and processes, because master control to process all kinds of message, therefore response icmp report The time of literary composition can be elongated, and by the way of line card directly processes icmp message and is sent to terminal, improves The speed of gateway device response terminal ping request.
Further, the motility connective in order to increase gateway device response to network, implement based on first Example proposes the second embodiment of gateway device response to network connectedness method of the present invention, in the present embodiment, ginseng According to Fig. 2, described step S20 includes:
Step S21, described line card calculates the verification of described icmp message and and judges described verification and whether It is 0;
In the present embodiment, whether line card first calculates the verification of icmp message and and judges described verification and be 0, specific algorithm is exactly: the stem of icmp message is regarded as the numeral composition in units of 16, successively Carrying out complement of one's summation, such as, the stem of the current icmp message obtained is the numeral of 32, The numeral of 32 is divided into two 16 system numbers, carries out complement of one's calculating, and the knot that will calculate respectively Structure is sued for peace;Whether the result then checking the verification sum calculated is 0, if not being 0 to represent verification exactly Do not carry out follow-up process with wrong, return mistake, i.e. stop the following step operation.
Step S22, if described verification and be 0, described line card exchanges the ip address, source of described icmp message With purpose ip address;
In the present embodiment, described line card according to find before point to message 3 layers of head pointer information, Get ip address, source and the purpose ip address of message, then the purpose ip address after changing is write 3 layers and refer to In front 4 bytes of pin, the ip address, source after changing is write in 5 to 8 bytes of 3 layers of pointer offset, So complete ip address, source and the exchange of purpose ip address of message.
Step S23, described line card calculates the school of icmp heading in the icmp message after exchanging ip address Test and, and the verification position corresponding with being written to icmp heading after calculating;
In the present embodiment, the described line card school to having exchanged the message behind ip address, source and purpose ip address Testing and recalculate, the algorithm of calculating is: the data that need to verify are regarded as the number in units of 16 Word forms, and carries out complement of one's summation successively;The result obtained is deposited into icmp heading corresponding In position.
Step S24, described line card calculate whole icmp message verification and, and will calculate after verification and It is written to the position that icmp message is corresponding;
In the present embodiment, described line card also can arrange the ttl value of ip message in advance, preferably by ttl value Use as default 255, it is to be understood that the time to live field of described ip message is i.e. specified Ip is coated router and abandons the maximum web hop count amount allowing to pass through before and use as default 255, and again counts Calculate whole ip message verification and, the position corresponding with being written to icmp message by the verification of calculating.
Step S25, the mac address of the described network equipment as mac address, source and is incited somebody to action by described line card Mac address corresponding to described terminal is as purpose mac address, and by mac address, described source and purpose In mac address encapsulation extremely described icmp message, to generate response icmp message.
In the present embodiment, mac address, described source and purpose mac address are encapsulated to described by described line card Mode in icmp message is preferably described line card and first adds next skip list that described routing table is associated Mac address is in the purpose mac address of icmp message, and the gateway mac address adding gateway device is arrived In the mac address, source of icmp message, then by the ip address, source according to described icmp message at described net The next skip list of the corresponding routing table in the equipment of pass, finds next of routing table of ip address, described source Skip list, using the described next skip list found as going out port, and will encapsulate mac address, source and purpose The icmp message of mac address is sent to terminal, to complete to respond the request of terminal ping gateway device.
Further, the motility connective in order to increase gateway device response to network, implement based on first Example proposes the 3rd embodiment of gateway device response to network connectedness method of the present invention, in the present embodiment, ginseng According to Fig. 3, described step S30 includes:
Step S31, described line card searches next skip list corresponding with ip address, described source in routing table Output port;
Step S32, described response icmp message is sent to terminal by described output port by described line card.
In the present embodiment, it is to be understood that routing table stores the address information that ip address, source is corresponding, But, but not to be ip address, source corresponding goes out port for this address information, the address in the most described routing table Information is quickly to respond the index information of icmp message, when finding ip address pair, described source in described routing table When answering address information, according in described index for address information to next skip list, and confirm described next skip list The position of middle correspondence is the output port of response icmp message.
Further, the motility connective in order to increase gateway device response to network, implement based on first Example proposes the 4th embodiment of gateway device response to network connectedness method of the present invention, in the present embodiment, ginseng According to Fig. 4, before described step S10, described gateway device response to network connectedness method includes:
Step S40, when receiving the message that terminal sends, whether described line card detects described gateway device It is in quickly response icmp message pattern;
Step S50, if detecting, gateway device is in quickly response icmp message pattern, and described line card is sentenced Whether the disconnected message being currently received is icmp message.
In the present embodiment, include before step S40 that the step quickly responding ping request instruction is opened in configuration Suddenly, i.e. user can quickly respond the finger of ping gateway device by the instruction triggers of quickly response icmp message Order, when user is in the pattern of quickly response ping gateway device, is receiving the ping that terminal sends During request, gateway device is by triggering command, and enters the flow process quickly processing icmp message;If detecting Gateway device is in quickly response icmp message pattern, and whether the message that the judgement of described line card is currently received First obtain, for icmp message, i.e. line card, the message that described terminal is corresponding, and judge that the message of described acquisition is No for icmp message, whether the described message judging described acquisition is that the mode of icmp message is preferably passed through Acl rule (a kind of access control technology) judges, the mode that the described acl of utilization judges preferably is passed through Obtain unique mark such as protocol number of message, i.e. can determine whether the message currently obtained according to the protocol number obtained Type whether with the type matching of icmp message, if coupling, line card i.e. can determine whether that the message received is Icmp message.And quickly respond the process that ping asks, if it is not, enter message normal process stream Journey, i.e. by line card obtain message, line card again by obtain message up sending to master control, carried out by master control A series of response processes.
Further, the motility connective in order to increase gateway device response to network, implement based on first Example proposes the 5th embodiment of gateway device response to network connectedness method of the present invention, in the present embodiment, institute State gateway device response to network connectedness method also to include:
Receiving the message that terminal sends, and when described message is not icmp message, described line card will connect The message received is sent to master control, responds described message for master control.
In the present embodiment, whether what preferably judgement received is icmp message, if it is not, according to normally Flow process send master control, for master control respond described message.
The present invention further provides a kind of gateway device response to network connectivity means.
With reference to the function that Fig. 5, Fig. 5 are gateway device response to network connectivity means preferred embodiment of the present invention Module diagram.
It is emphasized that it will be apparent to those skilled in the art that functional block diagram shown in Fig. 5 is only The exemplary plot of one preferred embodiment, those skilled in the art responds around the gateway device shown in Fig. 5 The functional module of network connectivty device, can carry out supplementing of new functional module easily;Each functional module Title be self-defined title, be only used for assisting and understand each of this gateway device response to network connectivity means Individual program function block, is not used in restriction technical scheme, and the core of technical solution of the present invention is, The function that the functional module of each self-defined title is to be reached.
The present embodiment proposes a kind of gateway device response to network connectivity means, described gateway device response net Network connectivity means includes:
Acquisition module 10, is used for when receiving control protocol message i.e. icmp message between the net that terminal sends, Obtain ip address, source and the purpose ip address of described icmp message;
In the present embodiment, if the message receiving terminal transmission is icmp message, described acquisition module 10 First extracting the pointer of described icmp message, described pointer is the pointer of 2 layers of heading, needs by skew 12 bytes, point to the vlan field of message, then judge whether described icmp message is many vlan-labels The message of type, described acquisition module 10 obtains the number of the vlan-label of icmp message further, can To be understood by, icmp message source mac address and purpose mac address respectively take 6 bytes, Yi Gongzhan By 12 bytes, a vlan takies 4 bytes, then the number of tags being multiplied by vlan obtains vlan information The byte number taken altogether, the byte number that such mac address takies altogether plus vlan is exactly 3 layers of message Head will point to plus this side-play amount relative to the side-play amount of 2 layers of heading, 2 layers of head pointer of message 3 layers of information header of message, front 4 bytes of 3 layers of information header are exactly the purpose ip address of message, 5-8 Byte is the ip address, source of message, and we have just got source ip and purpose ip of message by this method Address.
Generation module 20, for mating with the ip address of the gateway device at its place in described purpose ip address, And ip address, described source is when mating with the IP address in the routing table of described gateway device, based on described icmp Message generates response icmp message;
In the present embodiment, described generation module 20 includes:
Judging unit, for judging that whether described purpose ip address is the gateway ip of the gateway device at its place Address;
In the present embodiment, described judging unit judges that whether described purpose ip address is the net of gateway device Closing ip address optimal way is: after acquisition module 10 gets purpose ip of icmp message, it is judged that unit Judge whether described ip is gateway ip.In general, configure gateway ip when, gateway device can under Send out Host routes to the gateway ip of hardware chip routing table, i.e. gateway device, gateway device also can be protected simultaneously Depositing a identical record in software routing table, different types of ip has different type marks, net Closing ip to be identified for local ip by device flag, the loopback port address of gateway also has a loopback (ring Go back to address) mark.With purpose ip go search software routing table, if find this ip in Host routes table, And the mark of this ip is local ip mark or loopback mark, then prove that this icmp message is Other equipment ping gateway ip address, need us quickly to return bag and process, i.e. need to carry out ping The response of request.
Described judging unit, is additionally operable to judge the route whether ip address, described source exists described gateway device In table;
In the present embodiment, described judging unit judges whether ip address, described source exists described gateway device Routing table in optimal way be: described judging unit judges that whether the ip address, source of icmp message is at gateway In the routing table of equipment, the purpose done so be need to judge follow-up middle by ip address, source and purpose ip address After exchange, purpose ip (the source ip of the icmp message i.e. received) of the message finally sent can be looked for To the routing table of response, that i.e. can find reality goes out port.Further, if described judging unit Ip address, judgement source is not in the routing table of gateway device, then would not continue flow process below, and It is that the carrying out of icmp message up sending to master control is processed.
Signal generating unit, is used for processing described icmp message, to generate the icmp message of response.
In the present embodiment, the most described signal generating unit the verification of described icmp message and carrying out is calculated and The operations such as inspection, and according to the assay of verification sum, ip address, source and purpose ip address are interchangeable, Purpose ip (the source ip of the icmp message i.e. received) for the icmp message finally sent can be looked for To the routing table of response, i.e. can find the output port of reality, finally, obtain the described network equipment Mac address, source and the purpose mac address of described routing table, by mac address, described source and purpose mac ground In location encapsulation extremely described icmp message, generate response icmp message for signal generating unit.
The gateway device response to network connectivity means that the present embodiment proposes, the line card of gateway device first obtains The ip address, source of icmp message and purpose ip address, then process described icmp message to generate sound Answer icmp message, finally described response icmp message is sent to terminal, to respond terminal ping gateway The request of equipment rather than obtained the icmp message of terminal by line card, then line card will get again Icmp message reports master control and processes, because master control to process all kinds of message, therefore response icmp report The time of literary composition can be elongated, and by the way of line card directly processes icmp message and is sent to terminal, improves The speed of gateway device response terminal ping request.
Further, the motility connective in order to increase gateway device response to network, implement based on first Example proposes the second embodiment of gateway device response to network connectivity means of the present invention, in the present embodiment, ginseng According to Fig. 6, described generation module 20 includes:
Whether computing unit 21, for calculating the verification of described icmp message and and judging described verification and be 0;
In the present embodiment, computing unit 21 first calculates the verification of icmp message and and judges described verification Whether be 0, specific algorithm is exactly: the stem of icmp message is regarded as the blockette in units of 16 Becoming, carry out complement of one's summation successively, such as, the stem of the current icmp message obtained is 32 Numeral, the numeral of 32 is divided into two 16 system numbers, carries out complement of one's calculating respectively, and will The structure summation calculated;Whether the result then checking the verification sum calculated is 0, if not being 0 to be exactly Represent verification and do not carry out follow-up process with wrong, return mistake, i.e. stop the following step operation.
Exchange unit 22, if for described verification and be 0, exchange described icmp message ip address, source and Purpose ip address;
In the present embodiment, described exchange unit 22 is according to the 3 layers of head pointer pointing to message found before Information, gets ip address, source and the purpose ip address of message, then the purpose ip address write after changing In front 4 bytes of 3 layers of pointer, the ip address, source after changing is write 5 to 8 words of 3 layers of pointer offset In joint, so complete ip address, source and the exchange of purpose ip address of message.
Processing unit 23, for calculating the verification of icmp heading in the icmp message after exchanging ip address With, and the verification position corresponding with being written to icmp heading after calculating;
In the present embodiment, after described processing unit 23 is to having exchanged ip address, source and purpose ip address The verification of message and recalculating, the algorithm of calculating is: the data that need to verify are regarded as with 16 be The numeral composition of unit, carries out complement of one's summation successively;The result obtained is deposited into icmp message In the position that head is corresponding.
Described processing unit 23, be additionally operable to calculate whole icmp message verification and, and the school after calculating Test the position corresponding with being written to icmp message;
In the present embodiment, described processing unit 23 also can arrange the ttl value of ip message in advance, preferably Ttl value is used as default 255, it is to be understood that the time to live field of described ip message I.e. specify ip to be coated router to abandon the maximum web hop count amount allowing to pass through before and use as default 255, And again calculate whole ip message verification and, the position corresponding with being written to icmp message by the verification of calculating Put.
Signal generating unit 24, is used for the mac address of the described network equipment as mac address, source and by institute State mac address corresponding to terminal as purpose mac address, and by mac address, described source and purpose mac In address encapsulation extremely described icmp message, to generate response icmp message.
In the present embodiment, first mac address, described source and purpose mac address are encapsulated to described icmp Mode in message is preferably described signal generating unit 24 and first adds the mac address of described routing table to icmp In the purpose mac address of message, add the gateway mac address source mac to icmp message of gateway device In address, then by corresponding road in described gateway device, the ip address, source according to described icmp message By the next skip list of table, find the next skip list of the routing table of ip address, described source, find described Next skip list as going out port, and the icmp message of mac address, source and purpose mac address will be encapsulated It is sent to terminal, to complete to respond the request of terminal ping gateway device.
Further, the motility connective in order to increase gateway device response to network, implement based on first Example proposes the 3rd embodiment of gateway device response to network connectivity means of the present invention, in the present embodiment, ginseng According to Fig. 7, described feedback module 30 includes:
Search unit 31, for searching the output of next skip list corresponding with ip address, described source in routing table Port;
Transmitting element 32, for being sent to terminal by described response icmp message by described output port.
In the present embodiment, it is to be understood that routing table stores the address information that ip address, source is corresponding, But, but not to be ip address, source corresponding goes out port for this address information, the address in the most described routing table Information is quickly to respond the index information of icmp message, when finding ip address pair, described source in described routing table When answering address information, search unit 31 according in described index for address information to next skip list, and confirm institute State the output port that position corresponding in next skip list is response icmp message.
Further, the motility connective in order to increase gateway device response to network, implement based on first Example proposes the 4th embodiment of gateway device response to network connectivity means of the present invention, in the present embodiment, ginseng According to Fig. 8, described gateway device response to network connectivity means also includes:
Whether detection module 40, for when receiving the message that terminal sends, detecting described gateway device It is in quickly response icmp message pattern;
Judge module 50, if for detecting that gateway device is in quickly response icmp message pattern, it is judged that Whether the message being currently received is icmp message.
In the present embodiment, detection module 40 also includes dispensing unit, is used for configuring unlatching and quickly responds ping Request, i.e. user can quickly respond ping gateway device by the instruction triggers of quickly response icmp message Instruction, when user is in the pattern of quickly response ping gateway device, is receiving the ping that terminal sends During request, gateway device is by triggering command, and enters the flow process quickly processing icmp message;If detecting Gateway device is in quickly response icmp message pattern, and the judgement of described judge module 50 is currently received Whether message is icmp message, the most first obtains the message that described terminal is corresponding, and judges the report of described acquisition Whether literary composition is icmp message, and whether the described message judging described acquisition is that the mode of icmp message is preferred Being judged by acl rule (a kind of access control technology), the described mode utilizing acl to judge is preferred By obtaining unique mark such as protocol number of message, i.e. can determine whether currently to obtain according to the protocol number of acquisition The type of message whether with the type matching of icmp message, if coupling, described judge module 50 Judge that the message received is icmp message.And quickly respond the process that ping asks, if it is not, enter Enter message normal process flow process, i.e. obtain message by line card, then by the message up sending of acquisition to master control, A series of response process is carried out by master control.
Further, the motility connective in order to increase gateway device response to network, implement based on first Example proposes the 5th embodiment of gateway device response to network connectivity means of the present invention, in the present embodiment, institute State gateway device response to network connectivity means also to include:
Processing module, for receiving the message that terminal sends, and when described message is not icmp message, The message received is sent to master control, responds described message for master control.
In the present embodiment, whether what the judgement of the most described processing module received is icmp message, if not It is to send master control according to normal flow process, responds described message for master control.
It should be noted that in this article, term " include ", " comprising " or its other variant any Be intended to comprising of nonexcludability so that include the process of a series of key element, method, article or Person's system not only includes those key elements, but also includes other key element being not expressly set out, or also Including the key element intrinsic for this process, method, article or system.In the feelings not having more restriction Under condition, statement " including ... " key element limited, it is not excluded that include this key element process, Method, article or system there is also other identical element.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive above-mentioned Embodiment method can add the mode of required general hardware platform by software and realize, naturally it is also possible to logical Cross hardware, but a lot of in the case of the former is more preferably embodiment.Based on such understanding, the present invention's The part that prior art is contributed by technical scheme the most in other words can be with the form body of software product Revealing to come, this computer software product is stored in a storage medium (such as ROM/RAM, magnetic disc, light Dish) in, including some instructions with so that a station terminal equipment (can be mobile phone, computer, service Device, air-conditioner, or the network equipment etc.) perform the method described in each embodiment of the present invention.
These are only the preferred embodiments of the present invention, not thereby limit the scope of the claims of the present invention, every Utilize equivalent structure or equivalence flow process conversion that description of the invention and accompanying drawing content made, or directly or Connect and be used in other relevant technical field, be the most in like manner included in the scope of patent protection of the present invention.

Claims (10)

1. a gateway device response to network connectedness method, it is characterised in that described gateway device responds Network connectivty method comprises the following steps:
When receiving control protocol message i.e. icmp message between the net that terminal sends, line card obtains described The ip address, source of icmp message and purpose ip address;
Mate with the ip address of the gateway device at its place in described purpose ip address, and ip address, described source When mating with the IP address in the routing table of described gateway device, described line card is raw based on described icmp message Become response icmp message;
Described line card feeds back described response icmp message to described terminal.
2. gateway device response to network connectedness method as claimed in claim 1, it is characterised in that institute State line card step based on described icmp message generation response icmp message to include:
Whether described line card calculates the verification of described icmp message and and judges described verification and be 0;
If described verification and be 0, described line card exchanges ip address, source and purpose ip of described icmp message Address;
Described line card calculate exchange icmp heading in the icmp message behind ip address verification and, and will The position that verification after calculating is corresponding with being written to icmp heading;
Described line card calculate whole icmp message verification and, and will calculate after verification and be written to icmp The position that message is corresponding;
Described line card using the mac address of the described network equipment as mac address, source and by described terminal pair The mac address answered is as purpose mac address, and is encapsulated in mac address, described source and purpose mac address To described icmp message, to generate response icmp message.
3. gateway device response to network connectedness method as claimed in claim 1, it is characterised in that institute The step stating the line card described response icmp message of feedback extremely described terminal includes:
Described line card searches the output port of next skip list corresponding with ip address, described source in routing table;
Described response icmp message is sent to terminal by described output port by described line card.
4. gateway device response to network connectedness method as claimed in claim 1, it is characterised in that institute Stating when receiving control protocol message i.e. icmp message between the net that terminal sends, described line card obtains described Before the ip address, source of icmp message and the step of purpose ip address, described gateway device response to network connects Property method includes:
When receiving the message that terminal sends, described line card detects whether described gateway device is in quickly Response icmp message pattern;
If detecting, gateway device is in quickly response icmp message pattern, and described line card judges current reception To message whether be icmp message.
5. the gateway device response to network connectedness method as described in any one of claim 1-4, its feature Being, described gateway device response to network connectedness method also includes:
Receiving the message that terminal sends, and when described message is not icmp message, described line card will connect The message received is sent to master control, responds described message for master control.
6. a gateway device response to network connectivity means, it is characterised in that described gateway device responds Network connectivty device includes:
Acquisition module, is used for when receiving control protocol message i.e. icmp message between the net that terminal sends, Obtain ip address, source and the purpose ip address of described icmp message;
Generation module, for mating with the ip address of the gateway device at its place in described purpose ip address, And ip address, described source is when mating with the IP address in the routing table of described gateway device, based on described icmp Message generates response icmp message;
Feedback module, is used for feeding back described response icmp message to described terminal.
7. gateway device response to network connectivity means as claimed in claim 6, it is characterised in that institute State generation module to include:
Whether computing unit, for calculating the verification of described icmp message and and judging described verification and be 0;
Exchange unit, if for described verification and be 0, exchanging ip address, source and the mesh of described icmp message Ip address;
Processing unit, for calculate the verification exchanging icmp heading in the icmp message behind ip address and, And the verification position corresponding with being written to icmp heading after calculating;
Described processing unit, be additionally operable to calculate whole icmp message verification and, and the verification after calculating The position corresponding with being written to icmp message;
Signal generating unit, is used for the mac address of the described network equipment as mac address, source and by described Mac address corresponding to terminal is as purpose mac address, and by mac address, described source and purpose mac ground In location encapsulation extremely described icmp message, to generate response icmp message.
8. gateway device response to network connectivity means as claimed in claim 6, it is characterised in that institute State feedback module to include:
Search unit, for searching the outfan of next skip list corresponding with ip address, described source in routing table Mouthful;
Transmitting element, for being sent to terminal by described response icmp message by described output port.
9. gateway device response to network connectivity means as claimed in claim 6, it is characterised in that institute State gateway device response to network connectivity means also to include:
Detection module, for when receiving the message that terminal sends, detecting whether described gateway device is located In quickly response icmp message pattern;
Judge module, if for detecting that gateway device is in quickly response icmp message pattern, it is judged that when Before the message that receives whether be icmp message.
10. the gateway device response to network connectivity means as described in any one of claim 6-9, its feature Being, described gateway device response to network connectivity means also includes:
Processing module, for receiving the message that terminal sends, and when described message is not icmp message, The message received is sent to master control, responds described message for master control.
CN201510369825.5A 2015-06-29 2015-06-29 Gateway device response to network connectedness method and apparatus Withdrawn CN106301997A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510369825.5A CN106301997A (en) 2015-06-29 2015-06-29 Gateway device response to network connectedness method and apparatus
PCT/CN2016/086017 WO2017000790A1 (en) 2015-06-29 2016-06-16 Gateway device network connectivity response method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510369825.5A CN106301997A (en) 2015-06-29 2015-06-29 Gateway device response to network connectedness method and apparatus

Publications (1)

Publication Number Publication Date
CN106301997A true CN106301997A (en) 2017-01-04

Family

ID=57607666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510369825.5A Withdrawn CN106301997A (en) 2015-06-29 2015-06-29 Gateway device response to network connectedness method and apparatus

Country Status (2)

Country Link
CN (1) CN106301997A (en)
WO (1) WO2017000790A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111937358A (en) * 2018-04-17 2020-11-13 思科技术公司 Multiple VRF generic device internet protocol addresses for fabric edge devices
CN112333048A (en) * 2020-11-23 2021-02-05 中盈优创资讯科技有限公司 Method and device for detecting on-line user and connectivity of opened service
CN113890838A (en) * 2021-09-24 2022-01-04 天津津航计算技术研究所 Network connectivity judgment method based on ICMP (Internet control protocol)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110162437B (en) * 2019-05-15 2023-10-27 杭州迪普科技股份有限公司 Frame type equipment internal connectivity detection method and system
CN113364793A (en) * 2021-06-17 2021-09-07 北京天融信网络安全技术有限公司 ICMP hidden tunnel detection method, device and storage medium
CN115941560A (en) * 2021-08-23 2023-04-07 中兴通讯股份有限公司 Network diagnosis method and network access device for cross-device link aggregation networking

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026578A (en) * 2007-01-29 2007-08-29 中兴通讯股份有限公司 Method for rapid response to ICMP echo request message
CN101378333A (en) * 2008-10-08 2009-03-04 中兴通讯股份有限公司 System, apparatus and method for transmitting and receiving check information message continuously
CN101399697A (en) * 2007-09-30 2009-04-01 华为技术有限公司 System and method for automatically protection switching
US20090282291A1 (en) * 2008-05-08 2009-11-12 Nortel Networks Limited Internal maintenance association end point (mep) for sharing state information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026578A (en) * 2007-01-29 2007-08-29 中兴通讯股份有限公司 Method for rapid response to ICMP echo request message
CN101399697A (en) * 2007-09-30 2009-04-01 华为技术有限公司 System and method for automatically protection switching
US20090282291A1 (en) * 2008-05-08 2009-11-12 Nortel Networks Limited Internal maintenance association end point (mep) for sharing state information
CN101378333A (en) * 2008-10-08 2009-03-04 中兴通讯股份有限公司 System, apparatus and method for transmitting and receiving check information message continuously

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111937358A (en) * 2018-04-17 2020-11-13 思科技术公司 Multiple VRF generic device internet protocol addresses for fabric edge devices
CN111937358B (en) * 2018-04-17 2022-09-13 思科技术公司 Multiple VRF generic device internet protocol addresses for fabric edge devices
CN112333048A (en) * 2020-11-23 2021-02-05 中盈优创资讯科技有限公司 Method and device for detecting on-line user and connectivity of opened service
CN113890838A (en) * 2021-09-24 2022-01-04 天津津航计算技术研究所 Network connectivity judgment method based on ICMP (Internet control protocol)

Also Published As

Publication number Publication date
WO2017000790A1 (en) 2017-01-05

Similar Documents

Publication Publication Date Title
CN106301997A (en) Gateway device response to network connectedness method and apparatus
CN101536411B (en) Ethernet OAM at intrmediate nodes in a PBT network
CN103401726B (en) Network path detection method and device, system
CN106100999A (en) Image network flow control protocol in a kind of virtualized network environment
CN105490884B (en) A kind of VXLAN tunnel detection method and device
CN101699786A (en) Method, device and system for detecting packet loss
CN103166852B (en) The route tracing method of LSP and routing device in MPLS network
CN102571492B (en) Method and device for detecting failure of routing equipment
CN101433029A (en) Methods, systems, and computer program products for selective layer 2 port blocking using layer 2 source addresses
CN103840976B (en) Communication means, light device and the network equipment
CN106936661A (en) A kind of network monitoring method, apparatus and system
CN103581025B (en) Method and system for processing routing information and equipment
CN107026790B (en) A kind of transmission control method and equipment
CN105743687B (en) Method and device for judging node fault
CN103999406B (en) The processing method and device of communication path
CN106789387A (en) A kind of chain circuit detecting method and device for SDN
CN103200100A (en) Method and device for packet transmitting
CN106936656A (en) A kind of methods, devices and systems for realizing packet loss detection
CN102833161B (en) Tunnel load share method and device
CN106850268A (en) A kind of linear protection switching realizes device and method
CN107465621A (en) A kind of router finds method, SDN controllers, router and network system
CN102833122B (en) Loopback detection method and system
CN106911498A (en) The method of power distribution network distributed terminal intelligent modeling communication
CN107317691A (en) A kind of Fault Locating Method and equipment
CN103763196B (en) Method and device for processing multicast source filtering entry

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20170104

WW01 Invention patent application withdrawn after publication