CN100583884C - Method and device for transmitting handshake message in communication system - Google Patents

Method and device for transmitting handshake message in communication system Download PDF

Info

Publication number
CN100583884C
CN100583884C CN200510114502A CN200510114502A CN100583884C CN 100583884 C CN100583884 C CN 100583884C CN 200510114502 A CN200510114502 A CN 200510114502A CN 200510114502 A CN200510114502 A CN 200510114502A CN 100583884 C CN100583884 C CN 100583884C
Authority
CN
China
Prior art keywords
handshake message
link
sends
message
send
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.)
Expired - Fee Related
Application number
CN200510114502A
Other languages
Chinese (zh)
Other versions
CN1956444A (en
Inventor
夏开军
张轶炯
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN200510114502A priority Critical patent/CN100583884C/en
Publication of CN1956444A publication Critical patent/CN1956444A/en
Application granted granted Critical
Publication of CN100583884C publication Critical patent/CN100583884C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

This invention relates to a method for transmitting handshake messages in a communication system including: first of all, testing the change of data flow in a period of time in a network link, then judging the state of the link according to non-variance of the data flow to determine the transmission mode of PPP handshake messages, if the flow is changed, then it is considered that the work of the link is normal and the transmission of the messages is reduced, if there is no change, then the work may not be normal and the work state is further judged by transmission of the messages, which can solve the problem of off-line of users caused by the lost of handshake messages when the users are on-line or meaningless network cost brought with too much transmission.

Description

Send the method and the device of handshake message in the communication system
Technical field
The present invention relates to network communication field, relate in particular to the method and the device that send handshake message in a kind of communication system.
Background technology
In present network communicating system, PPP (point-to-point) agreement is the agreement of data link layer in TCP/IP (transmission control protocol/IP(Internet Protocol)) protocol stack, it provides a kind of communication mode of standard, promptly the data message of transmission network layer protocol on point-to-point link is one of topmost communication mode in the broadband network access way in the present real life.Ppp protocol mainly is made up of two quasi-protocols: LCP (LCP family) and NCP (network layer control protocol family), LCP is mainly used in foundation, remove and the monitor data link, network layer control protocol family is mainly used in the form and the type of negotiation institute's data packets for transmission on this data link.
Ppp protocol also provides PAP of indentification protocol family (password authentication protocol) and the CHAP (challenge handshake authentication protocol) that is used for the network security aspect.Ppp protocol is owing to can provide authentication function, and protocol contents and function are expanded easily, and support synchronous transfer module and asynchronous transfer mode again.Therefore, this agreement obtains to use comparatively widely, and has produced PPPoE (setting up point-to-point connection on the Ethernet), PPPoA many Extended Protocols such as (point-to-point connections on asynchronous transfer mode) again.
Set up in the point-to-point link communication process in the applying PPP agreement, at first, must send test and the configuration that the LCP information bag carries out data link, after link is set up fully by the time, just verify at the two ends of ppp protocol link.Then, adopt ppp protocol to send the NCP packet and select and dispose one or more network layer protocols, after selected network layer protocol configuration successful, the packet that each network layer sends just can transmit on link, up to having clear and definite LCP or NCP packet to have the disconnecting link solicited message or incident that some is external takes place and link is disconnected, for example timer expiry or network manager interfere, otherwise link will remain the connection status of having set up always.
In the prior art, after the ppp protocol link establishment was got up, the hello packet that regularly initiation is used to shake hands was understood at the two ends of link, kept and detect the state of link.The receiving terminal of message must be replied after receiving handshake message.Transmit leg can correspondingly be set a stand-by period after sending handshake message, receive that in this time back message using thinks that then link is normal, as if the response of not receiving handshake message yet above this time, think that then link is undesired for a certain reason, as the opposite end user offline, physical connection interruptions etc. can notify local transmitting terminal to carry out work such as link dismounting then.Except that ppp protocol, also there are the identical or similar situation that detects the communication link corresponding state by this handshake mechanism in other agreements such as ARP agreement etc. in communication.
But, prior art is in the process of practical application, ppp protocol and some other agreement etc., all exist some defectives, wherein there is data link layer protocol itself can not guarantee to send the reliability of message, so the handshake message that sends may be lost in the process that sends, and causes the opposite end can't receive handshake message, also causes certainly and can't respond to transmit leg.
Because this defective is finished in the later time in link establishment, even link does not have fault, but after surpassing the stand-by period of transmit leg setting, data link still will be removed, and can have influence on normal communication like this.Especially when the user was online, if the situation that handshake message is lost occurred, then transmit leg can think that link is undesired, can remove link by force, causes the user under normal circumstances to be forced to roll off the production line.
In addition, in the prior art, these agreements unnecessarily frequently send handshake message owing to do not consider the state of current link, can bring meaningless expense to the link under the normal condition, have increased the weight of the load of link.
Summary of the invention
In view of above-mentioned existing in prior technology problem, the invention provides the method that sends handshake message in a kind of communication system, alleviate handshake message and lose the user offline problem that causes, also solved simultaneously the also frequent problem that sends handshake message when link is normal, avoid owing to the frequent handshake message that sends brings the busy of meaningless network system, and might have influence on the network system performance.
The objective of the invention is to be achieved through the following technical solutions:
The invention provides the method that sends handshake message in a kind of communication system, comprising:
A, the data traffic on the communication link in the monitoring predetermined amount of time on the entity of communication link or between the entity;
The data traffic situation of change determines to send the handshake message mode in the described communication link of B, foundation monitoring;
The described transmission handshake message mode that C, basis are determined sends handshake message.
Described step B comprises:
B1, when the data traffic on the communication link changes, then think the working properly of communication link, and adopt the handshake message mode that sends that reduces;
B2, when the data traffic on the communication link does not change, adopt to increase send the handshake message mode.
Described minimizing sends the handshake message mode and comprises:
Reducing transmission handshake message mode can be not send handshake message, or the big or small inversely proportional relation of the variation of data traffic on transmission frequency and the communication link, or need not to be provided with the time that awaits a response after sending handshake message.
Described step B1 comprises:
When employing reduced transmission handshake message mode, if the recipient receives the handshake message that transmit leg sends, then the receive direction transmit leg sent the back message using of shaking hands, and transmit leg is cancelled the response stand-by period of setting after receiving the back message using of shaking hands.
Described step B2 comprises:
The response stand-by period of B21, a setting of startup, if surpassing, the time of system wait responds the stand-by period, then carry out B23, if do not have, then carry out B22;
B22, responding in the stand-by period, adopting to increase to send the handshake message mode, if receive the back message using of shaking hands of opposite end, then the operating state of this communication link is normal;
B23, if after surpassing the stand-by period, still confiscate response message, then this communication link state is undesired, the notice local terminal is removed this communication link.
Described increase sends the handshake message mode and comprises:
Increasing transmission handshake message mode can be to increase the quantity of each handshake message that sends or shorten the time interval that sends handshake message.
Described increase sends the handshake message mode and comprises:
The inversely proportional relation of variation size of data traffic on the transmission frequency of increase transmission handshake message mode and the communication link.
The present invention also provides the device that sends handshake message in a kind of communication system, comprising:
Flow monitoring unit: be used to monitor the data traffic in the predetermined period of time on the communication link;
Send mode processing unit: be used for the definite frequency that sends handshake message of data traffic situation of change according to the communication link of monitoring;
Handshake message transmitting element: send handshake message according to the frequency of determining.
Described device also comprises:
Timer: if need to improve the frequency that handshake message sends, then start timer after sending handshake message, stop timing when receiving the response message of handshake message, when overtime, trigger link is removed module;
Link is removed module: the dismantling operation that is used for communicating according to the triggering of timer link.
As seen from the above technical solution provided by the invention, the present invention changes according to the data traffic according to link, adjusts the mode that sends handshake message.When how many data traffics in the link changes, reduce the frequency that handshake message sends; When the data traffic of link when a period of time does not change, then increase the frequency that handshake message sends, the size of the data traffic of frequency that handshake message sends and link is inversely proportional to.Can reduce handshake message like this and lose the user offline problem that causes, and solve link just often, frequently send handshake message and bring meaningless network overhead.
Description of drawings
The point-to-point connection diagram that Fig. 1 sets up for ppp protocol;
Fig. 2 is for controlling the flow chart that sends the message frequency by detecting data traffic;
Fig. 3 is the structural representation of device of the present invention.
Embodiment
The solution of the present invention is the situation of change according to data traffic on the link in a period of time, dynamically adjust and send the handshake message frequency, promptly when having data traffic to change on the link, do not send or send less handshake message, need not to be provided with the time that awaits a response after perhaps sending.When the data traffic in link the preceding paragraph time does not change, at this moment, link might break down, increase the frequency that sends handshake message, and according to the transmission of existing technical finesse message with reply, start an overtime stand-by period simultaneously, in the stand-by period, make the inversely proportional trend of variation size of data traffic on the frequency that sends handshake message and the link, and the judgement link has or not and may break down.
With concrete example implementation is described below, in the communication network link, use the solution of the present invention to communicate, suppose in the communication network link to exist to set up between Host (main frame) A and the Host B as shown in Figure 1 and set up point-to-point the connection, setting Host A is transmitting apparatus, Host B is made as receiving equipment, otherwise also can.To only send handshake message with Host A to Host B below is example, and the process of utilizing the present invention that the transmission handshake message is handled is described.
The specific implementation of method of the present invention may further comprise the steps as shown in Figure 2:
Step 21: detect the situation of change of the data traffic on the network link in a period of time, the event data stream amount changes, execution in step 22, otherwise, execution in step 23.
Be specially: in the link between Host A and Host B two ends, can be by certain unit interval, data to link in a time cycle detect, the variation that the result sizes that detects before and after the comparing data is come the judgment data flow, or the comparison of the flow size of the beginning in a period of time and the finish time, judge that Host A sends the variation that data bulk has or not to be increased or reduce to Host B.
Step 22: data traffic changes, and thinks that then communication work is normal on this link, can adopt the handshake message mode that sends that reduces.And execution in step 21, turn back to beginning, continue to detect the variation of data traffic.
When between Host A and Host B since the generation of data traffic during variation, then determine to have data communication between them always, think that communication work is normal on this link.Promptly work as Host A and send data, and Host B is also receiving these data to Host B.Host A determines to adopt the handshake message mode that sends that reduces according to the variation of data traffic, to Host B transmission handshake message.This mode can be that Host A does not send handshake message to Host B, or the inversely proportional relation of variation size of Host A data traffic on Host B transmission handshake message frequency and communication link, or Host A need not to be provided with the time of waiting for that Host B responds after Host B sends handshake message.Host A during Host B sends data if receive the message that the other side Host B sends, send back message using according to existing technology to transmit leg Host B.This transmission message mode can reduce the load of link, increases the bandwidth of data message on the link.
Step 23: when the data traffic on the link does not change, think that then link may have problems, adopt increase to send the handshake message mode and determine Link State.
It is constant to exist the data communication flow to be maintained fixed between Host A and Host B, Host A sends data to opposite end Host B, wait for that opposite end Host B receives this data, and the opposite end does not have corresponding back message using, then link might break down between Host A and the Host B, for this reason, need to increase transmission and confirm Link State them to the frequency of Host B handshake message from Host A.
The concrete increase adopted Host A sends the mode of handshake message, this mode can be to increase the quantity of each handshake message that sends or shorten the time interval that sends handshake message, the frequency of transmission handshake message should with the big or small corresponding inversely proportional trend of the variation of flow on the link.Can determine the situation of link by this transmission message mode, inform user and system, avoid invalid wait, can save time and the resource of system.
Step 24: according to whether receive the situation that back message using is judged link during the predefined stand-by period, promptly judge in the time period that is provided with whether receive back message using, if after surpassing the stand-by period, still confiscate response message, then execution in step 25; In stand-by period, if receive the other side's the back message using of shaking hands, then execution in step 26 at response timeout.
Can be in the detailed process at data sending terminal, as Host A place, preestablish a response timeout stand-by period, this time can be determined according to the whole system working condition, can be generally to communicate by letter under the normal condition, the time that awaits a response, also can be according to the size of data volume or the concrete conditions such as situation of link, this condition also can set up on their own according to needs.Start waiting time, judge Link State between Host A and the Host B according to this time.If data sending terminal Host A waits for the time of receiving terminal Host B transmission back message using above after preestablishing the response stand-by period, Host A still confiscates the response message that Host B sends, and then execution in step 25; If Host A waits for the time of the back message using that Host B sends in the restriction of response timeout stand-by period, Host A receives the back message using that the other side Host B sends, and then execution in step 26.
Step 25: preestablishing the handshake message of confiscating the other side in the response stand-by period, think that then Link State is undesired, discharge the resource of this link.
This link circuit condition might be receiving terminal Host B rolled off the production line and data sending terminal Host A in time do not obtain the notice, or certain the link work in the link is undesired and data can not be transmitted, or is the serious super negative cisco unity malfunction of data traffic in the link.In a word, link fault effects occurred to normal communication between Host A and the Host B, and then this transmitting terminal of notifications Host A removes the link between this Host A and the Host B, discharges the resource of this link, can rebulid the communication at two ends.
Step 26: receive the other side's the back message using of shaking hands, think that Link State is normal, the then stand-by period that stops to set according to existing technology, and employing reduces transmission handshake message mode, execution in step 21.
Detailed process is received the response handshake message that the other side's receiving terminal Host B sends for this transmitting terminal Host A, think that then Link State is normal between Host A and the Host B, and local terminal Host A adopts the handshake message mode that sends that reduces to the mode that opposite end HostB sends handshake message, turn back to beginning, continue to detect the situation of change of data traffic between Host A and the Host B.
The present invention also provides in a kind of communication system the device that sends handshake message, and described device can be arranged in the communication entity in the communication system, as shown in Figure 3, specifically comprises following component units:
Flow monitoring unit: be used to monitor the data traffic in the predetermined period of time on the communication link;
Send mode processing unit: be used for the definite frequency that sends handshake message of data traffic situation of change according to the communication link of monitoring;
Handshake message transmitting element: send handshake message according to the frequency of determining.
Device of the present invention also comprises:
Timer: if need to improve the frequency that handshake message sends, then start timer after sending handshake message, stop timing when receiving the response message of handshake message, when overtime, trigger link is removed module;
Link is removed module: the dismantling operation that is used for communicating according to the triggering of timer link.
In sum, the present invention utilizes the variation of real-time detection link flow, dynamically adjusts the mode that sends handshake message, has improved present technical deficiency.When flow changed, the link communication operating state was normal, guaranteeing to send message less under the communication normal condition, reduced data traffic in the link.When flow does not change, the link communication operating state may abnormal conditions under, receiving terminal verified in the pilosity literary composition of delivering newspaper, and handles this abnormal conditions.In sum, the present invention utilizes the variation of real-time detection link flow, dynamically adjusts the mode that sends handshake message, has improved present technical deficiency.When flow changed, the link communication operating state was normal, guaranteeing to send message less under the communication normal condition, reduced data traffic in the link.When flow does not change, the link communication operating state may abnormal conditions under, receiving terminal verified in the pilosity literary composition of delivering newspaper, and handles this abnormal conditions.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.

Claims (8)

1, send the method for handshake message in a kind of communication system, it is characterized in that, comprising:
A, the data traffic on the communication link in the monitoring predetermined amount of time on the entity of communication link or between the entity;
The data traffic situation of change determines to send the handshake message mode in the described communication link of B, foundation monitoring;
The described transmission handshake message mode that C, basis are determined sends handshake message;
Wherein said step B comprises:
B1, when the data traffic on the communication link changes, then think the working properly of communication link, and adopt the handshake message mode that sends that reduces;
B2, when the data traffic on the communication link does not change, adopt to increase send the handshake message mode.
2, send the method for handshake message in the communication system according to claim 1, it is characterized in that, described minimizing sends the handshake message mode and comprises:
Reducing transmission handshake message mode is not send handshake message, or the big or small inversely proportional relation of the variation of data traffic on transmission frequency and the communication link, or need not to be provided with the time that awaits a response after sending handshake message.
3, send the method for handshake message in the communication system according to claim 1 and 2, it is characterized in that described step B1 comprises:
When employing reduced transmission handshake message mode, if the recipient receives the handshake message that transmit leg sends, then the receive direction transmit leg sent the back message using of shaking hands, and transmit leg is cancelled the response stand-by period of setting after receiving the back message using of shaking hands.
4, send the method for handshake message in the communication system according to claim 1, it is characterized in that described step B2 comprises:
The response stand-by period of B21, a setting of startup, if surpassing, the time of system wait responds the stand-by period, then carry out B23, if do not have, then carry out B22;
B22, responding in the stand-by period, adopting to increase to send the handshake message mode, if receive the back message using of shaking hands of opposite end, then the operating state of this communication link is normal;
B23, if after surpassing the stand-by period, still confiscate response message, then this communication link state is undesired, the notice local terminal is removed this communication link.
According to the method that sends handshake message in claim 1 or the 4 described communication systems, it is characterized in that 5, described increase sends the handshake message mode and comprises:
Increasing transmission handshake message mode is to increase the quantity of each handshake message that sends or shorten the time interval that sends handshake message.
According to the method that sends handshake message in claim 1 or the 4 described communication systems, it is characterized in that 6, described increase sends the handshake message mode and comprises:
The inversely proportional relation of variation size of data traffic on the transmission frequency of increase transmission handshake message mode and the communication link.
7, send the device of handshake message in a kind of communication system, it is characterized in that, comprising:
Flow monitoring unit: be used to monitor the data traffic in the predetermined period of time on the communication link;
Send mode processing unit: be used for the definite frequency that sends handshake message of data traffic situation of change according to the communication link of monitoring;
Handshake message transmitting element: send handshake message according to the frequency of determining.
8, send the device of handshake message in the communication system according to claim 7, it is characterized in that described device also comprises:
Timer: if need to improve the frequency that handshake message sends, then start timer after sending handshake message, stop timing when receiving the response message of handshake message, when overtime, trigger link is removed module;
Link is removed module: the dismantling operation that is used for communicating according to the triggering of timer link.
CN200510114502A 2005-10-24 2005-10-24 Method and device for transmitting handshake message in communication system Expired - Fee Related CN100583884C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200510114502A CN100583884C (en) 2005-10-24 2005-10-24 Method and device for transmitting handshake message in communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200510114502A CN100583884C (en) 2005-10-24 2005-10-24 Method and device for transmitting handshake message in communication system

Publications (2)

Publication Number Publication Date
CN1956444A CN1956444A (en) 2007-05-02
CN100583884C true CN100583884C (en) 2010-01-20

Family

ID=38063539

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200510114502A Expired - Fee Related CN100583884C (en) 2005-10-24 2005-10-24 Method and device for transmitting handshake message in communication system

Country Status (1)

Country Link
CN (1) CN100583884C (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101772194B (en) * 2008-12-26 2013-02-27 中兴通讯股份有限公司 General packet radio service tunnel user plane path keep-alive method and system
CN103249077B (en) * 2012-02-09 2016-12-14 ***通信集团公司 The method, system and device that a kind of WLAN service connection controls
CN103901823B (en) * 2012-12-25 2017-11-03 联合汽车电子有限公司 Mounted remote terminal
CN103368794A (en) * 2013-07-30 2013-10-23 上海斐讯数据通信技术有限公司 ppp link detection method
CN104917580B (en) * 2014-03-14 2017-12-15 华为技术有限公司 It is a kind of to detect the synchronous method, apparatus and system of clock
CN108880696B (en) * 2017-05-12 2022-04-15 中兴通讯股份有限公司 Frequency configuration handshaking method and system, terminal and computer readable storage medium
CN113472593B (en) * 2021-07-30 2022-05-17 天津卓越信通科技有限公司 Solution method for link instantaneous change caused by clutter in PHY in auto-negotiation mode
CN117240748A (en) * 2022-06-08 2023-12-15 华为技术有限公司 Communication link detection method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PPP简介与实例详解. 杨涛,吕强,钱培德,杨季文.计算机工程与设计,第25卷第1期. 2004
PPP简介与实例详解. 杨涛,吕强,钱培德,杨季文.计算机工程与设计,第25卷第1期. 2004 *

Also Published As

Publication number Publication date
CN1956444A (en) 2007-05-02

Similar Documents

Publication Publication Date Title
CN100583884C (en) Method and device for transmitting handshake message in communication system
WO2009023996A1 (en) Method for implementing network interconnect via link aggregation
JP2009218752A (en) Electric power supply device, electric power supply method, electric power supply control program, and network system
WO2008048937A3 (en) Network connection fast recovery
CN100399751C (en) Method of detection and maintenance of PPP link
CN101951345A (en) Message transmitting method and equipment
CN114422571B (en) Quantum communication client disconnection reconnection system and method
CN101051957B (en) Dynamically regulating method and device for link state and bundled link state
CN107360020A (en) A kind of Large Volume Data business unit keep-alive system and its application method
CN1859423B (en) Synchronous switching method for host and repeat device
CN111654435A (en) Link protection fault processing system and method based on LACP
CN101232406A (en) OAM fast detecting method, apparatus and system
CN101599882B (en) Method and device for achieving point-to-point far end loopback of Ethernet
US20050021760A1 (en) PPPoE network system and reconnection method thereof
CN101420318B (en) Method for detecting connection state of digital customer line and access terminal
CN101299764B (en) Method for backupping broadband access server for PPPOE access service
CN103856571B (en) A kind of adaptive networking connection method and system
TWI394402B (en) Network detecting device and method of network quality detecting thereof
CN201742446U (en) Automatic starting up or awakening set-top box
CN104683189A (en) Keep-alive detection method and device of PPP sessions
WO2014090194A1 (en) Dialing method of terminal device, and access device
CN101562563B (en) Fast re-dial method after user is off line improperly
CN101599858B (en) Method for managing host computer and standby computer and server
JP2738362B2 (en) Network connection device
CN101340320B (en) Link detection method, apparatus and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20170919

Address after: 075000 Zhangjiakou City, Hebei province Qiaodong District cemetery South Street No. 7, No. 22 East yuan Bei yuan building 2 unit 801

Patentee after: Ding Shijuan

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: Huawei Technologies Co., Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100120

Termination date: 20171024

CF01 Termination of patent right due to non-payment of annual fee