CN102065072B - Method and device for fast establishing PPPOE (Point-to-Point Protocol over Ethernet) link layer connection - Google Patents

Method and device for fast establishing PPPOE (Point-to-Point Protocol over Ethernet) link layer connection Download PDF

Info

Publication number
CN102065072B
CN102065072B CN2010102888118A CN201010288811A CN102065072B CN 102065072 B CN102065072 B CN 102065072B CN 2010102888118 A CN2010102888118 A CN 2010102888118A CN 201010288811 A CN201010288811 A CN 201010288811A CN 102065072 B CN102065072 B CN 102065072B
Authority
CN
China
Prior art keywords
line state
packet
service end
client
data package
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
CN2010102888118A
Other languages
Chinese (zh)
Other versions
CN102065072A (en
Inventor
邓锋贤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jiuzhou Electric Appliance Co Ltd
Original Assignee
Shenzhen Jiuzhou Electric Appliance 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 Shenzhen Jiuzhou Electric Appliance Co Ltd filed Critical Shenzhen Jiuzhou Electric Appliance Co Ltd
Priority to CN2010102888118A priority Critical patent/CN102065072B/en
Publication of CN102065072A publication Critical patent/CN102065072A/en
Application granted granted Critical
Publication of CN102065072B publication Critical patent/CN102065072B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and a device for fast establishing PPPOE (Point-to-Point Protocol over Ethernet) link layer connection. The method comprises the following steps: a client end waits for request data packets of a service end in an A-path state, and processes the request data packets sent by the service end in the A-path state; the client end directly initiates request packets in a B-path state and processes processed data packets returned by the service end in the B-path state; the processed data packets comprise confirmed data packets and rejected data packets; and when the confirmed data packets can be processed completely in the A-path state and the B-path state, the client end carries out state negotiation on the A-path state and the B-path state. In the technical scheme of the invention, the idea of two-path states is adopted, one path of the two-path state is used for processing session initiated actively by the client end, and the other path thereof is used for processing session initiated actively by the service end, so that the disorder of data packet receiving and transmitting is avoided, synchronization of the states of the two parties is guaranteed, the probability of failed connection is reduced, and the time for establishing link layer connection is shortened. In addition, the scheme disclosed by the invention adopts two-path states for negotiation, thus improving the efficiency of link layer connection.

Description

The method and apparatus that a kind of Rapid Establishment PPPOE link layer connects
Technical field
The present invention relates to the link layer method of attachment, the method and apparatus that a kind of Rapid Establishment PPPOE link layer connects.
Background technology
Set up PPPOE (point-to-point protocol over Ethernet) connection and generally all will experience discovery stage (Discover) and session stage (Session), after finding that the stage service end sends the PADS packet to client, service end and client just enter session stage, and it is exactly to set up the LCP link layer to connect that first step of session stage connects.But, due to the difference of service end and Client Design, which side first initiates request (request) packet does not have unified regulation, therefore easily causes the confusion of state.If both sides first initiate request data package, must have a side and just receive the other side's request bag after initiating request, thereby now both sides' state is confirmation or refusal (ACK/NAK) packet of waiting for the other side, but what obtain is a request data package, a solution is: the packet that does not send any feedback, perhaps only return to a request data package, easily causing after overtime like this needs to re-establish that LCP connects or the state confusion can't be set up the LCP link layer sessions, and what finally cause PPPOE to connect is overtime or failed.
In addition, have on the terminal equipment of PPPOE access function at PC or other, often because the state of LCP link session is asynchronous, cause PPPOE to connect the failure of setting up, network jitter postpones and other destabilizing factors, set up a PPPOE and connect, often need a very long stand-by period.
Current solution has: a side does not first initiatively send request packet, and the other side's request data package is returned to response data packet after arriving by the time, then the request data package of transmission oneself to carry out both sides' information synchronous.This method need to all be followed the principle that an end is first sent out and send out after the other end when both sides design, if other PPPOE terminal equipment is not followed this mode, in addition, if terminal is also initiatively initiated request data package, can cause the confusion of both sides' state, finally cause the failure of LCP link establishment or overtime.
Summary of the invention
The technical problem to be solved in the present invention is, need to set up PPPOE through the very long stand-by period connects, when sending request packet, both sides can cause the confusion of both sides' state, even cause the failure of LCP link establishment or overtime, for the above-mentioned defect of prior art, the method and the device that provide a kind of Rapid Establishment PPPOE link layer to connect.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of method that provides Rapid Establishment PPPOE link layer to connect, set up two line states in client, is respectively A line state, B line state, wherein, the session that the A line state is initiatively initiated for the treatment of service end, the B line state is for the treatment of the session of initiatively being initiated by client, and described method comprises:
A, client are waited for the request data package of service end at the A line state, and process at the A line state request data package that service end sends, and described processing comprises to be confirmed and refusal;
B, client are directly initiated request data package at the B line state, and process at the B line state handle packet that service end is returned, and described handle packet comprises confirms packet and refusal packet;
C, after all handling at described A line state and described B line state and confirming packet, client is carried out the state negotiation to described A line state, described B line state, describedly at described A line state and described B line state, all handles and confirms that packet is included in the A line state and sends and confirm that packet and client receive at the B line state confirmation packet that service end is returned to service end;
Wherein, the described request packet carries the selection field;
Client is waited for the request data package of service end at the A line state, and the request data package sent in A line state processing service end specifically comprises: when the selection field that the request data package that the selection field of carrying when the request data package of service end transmission sends at the B line state with client is carried is not conflicted, client sends and confirms packet to service end at the A line state, otherwise client sends the refusal packet at the A line state to service end, service end continues to send the request data package corresponding with this refusal packet, until client sends and confirms packet to service end at the A line state,
Described client is directly initiated request data package at the B line state, and process at the B line state handle packet that service end returns and specifically comprise: when client when the B line state receives the refusal packet that service end returns to client after service end sends request packet, client continues to send the request data package corresponding with the refusal packet at the B line state, until service end is returned to the confirmation packet;
Described specified data bag and described refusal packet all carry the selection field;
After all handling at described A line state and described B line state and confirming packet, client is to described A line state, described B line state carries out the state negotiation and specifically comprises: the selection field that the confirmation packet that sent by server of take carries is benchmark, if the selection field that the selection field that the described confirmation packet sent by service end carries and the described confirmation packet sent at the A line state by client carry clashes, need client to send the request data package corresponding with the selection field of this conflict at the B line state, re-start negotiation after receiving the confirmation packet, until the selection field that the confirmation packet that the selection field that the confirmation packet sent by described service end carries sends at the A line state with client carries is not conflicted.
Preferably, described method also comprises that described client carries out after state consulted, entering authentication state to described A line state, described B line state.
Preferably, method of the present invention also comprises:
Described client also comprised that before the request data package of A line state wait service end service end sends the PADS packet to client;
Described client is carried out state to described A line state, described B line state and is consulted also to comprise afterwards that client sends LCP Echo request data package to service end, and service end is returned to LCP Echo reply data bag.
The device that provides a kind of Rapid Establishment PPPOE link layer to connect, client is provided with two line states, is respectively A line state, B line state, wherein, the session that the A line state is initiatively initiated for the treatment of service end, the B line state is for the treatment of the session of initiatively being initiated by client, and described device comprises:
Wait for the request data package of service end for client at the A line state, and process the A road processing module of the request data package of service end transmission at the A line state, described processing comprises to be confirmed and refusal;
Directly initiate the request bag for client at the B line state, and the B road processing module of the handle packet of returning in B line state processing service end, described handle packet comprises confirms packet and refusal packet;
After service end and client are all received the other side's confirmation packet, the negotiation module of described A line state, described B line state being carried out to the state negotiation for client;
Wherein, the described request packet carries the selection field;
Described A road processing module comprises:
For receiving the A road receiver module of the request data package that service end sends;
For the afoul A of the selection field road judge module that judges that request data package that whether selection field that request data package that service end sends carries sends at the B line state with client is carried;
When the request data package that the request data package sent when service end sends at the B line state with client is conflicted mutually, for generation of the refusal packet and when the request data package of the service end transmission selection field entrained in the request data package of B line state transmission with client do not conflicted, for generation of the A road feedback module of confirming packet;
For sending the A road sending module of confirming packet and refusal packet;
Described B road processing module comprises:
For receiving the B road receiver module of the handle packet that service end sends;
When service end sends the refusal packet, for generation of the B road feedback module of the request data package corresponding with this refusal packet;
For send request the B road sending module of packet to service end;
Described confirmation packet and refusal packet all carry the selection field;
Described negotiation module comprises:
The judge module whether the selection field that the selection field that the confirmation packet sent by service end received at the B line state for judgement carries and the confirmation packet sent at the A line state by client carry clashes;
For correspondingly start the control module of B line state processing module according to the judged result of described judge module.
Preferably, described device also comprises for entering the authentication module of authentication state.
Preferably, described B road sending module is also for sending LCP Echo request data package to service end; And
The LCP Echo reply data bag that described B road receiver module also returns for receiving PADS packet that service end sends and service end.
Implement technical scheme of the present invention, there is following beneficial effect: in technical scheme of the present invention, adopt the thought of two-way state, wherein a line state is processed the session that client is initiatively initiated, an other line state is processed the session of initiatively being initiated by service end, can avoid the confusion of data packet transceive like this, can guarantee to large extent the synchronous of both sides' state, reduce the connection failure probability and reduce link layer and connect the time of setting up, in addition, the present invention program adopts the two-way state to consult, reduce to a certain extent the link layer connection and set up failed probability, improved the efficiency that link layer connects.
The accompanying drawing explanation
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is the structure drawing of device that a kind of Rapid Establishment PPPOE link layer of the present invention connects;
Fig. 2 is the method flow diagram that a kind of Rapid Establishment PPPOE link layer of the present invention connects;
Fig. 3 is the structure drawing of device that a kind of Rapid Establishment PPPOE link layer of one embodiment of the invention connects;
Fig. 4 is the method flow diagram that a kind of Rapid Establishment PPPOE link layer of one embodiment of the invention connects;
Fig. 5 is the method flow diagram that a kind of Rapid Establishment PPPOE link layer of another embodiment of the present invention connects.
Embodiment
The present invention relates to the method and apparatus that a kind of Rapid Establishment PPPOE link layer connects, client is provided with two line states, is respectively A line state, B line state, wherein, the session that the A line state is initiatively initiated for the treatment of service end, the B line state is for the treatment of the session of initiatively being initiated by client.
As shown in Figure 1, be the device schematic diagram of a kind of Rapid Establishment PPPOE link layer connection of the embodiment of the present invention, wherein, this device comprises: A line state processing module 101, B line state processing module 102, negotiation module 103.
In the process connected at the PPPOE link layer, the request data package sent by service end is waited for and processed to A line state processing module 101, and particularly, described processing comprises to be confirmed and refusal, B line state processing module 102 directly sends request packet to service end, and process the corresponding handle packet of the request data package sent with this B line state processing module 102 that service end is returned, particularly, this handle packet comprises confirms packet and refusal packet, after all handling at described A line state and described B line state and confirming packet, client is to described A line state, described B line state carries out the state negotiation, describedly at the A line state, handle and confirm that packet is included in the A line state and sends and confirm packet to service end, describedly at the B line state, all handle and confirm that packet comprises that client receives at the B line state confirmation packet that service end is returned, 103 pairs of A line states of negotiation module and B line state carry out the state negotiation.
Fig. 2 is the schematic flow sheet of the method for a kind of Rapid Establishment PPPOE link layer connection of the present invention, as shown in Figure 2, in step 201, A line state processing module 101 waits at the A line state request data package that service end sends, and process this request data package, particularly, this processing comprises confirmation and refusal, then in step 202, B line state processing module 102 directly sends request packet to service end at the B line state, and process and to be returned by service end, the handle packet that the request data package sent with B line state processing module 102 is corresponding, particularly, this handle packet comprises confirms packet and refusal packet, in step 203, after all handling at described A line state and described B line state and confirming packet, client is to described A line state, described B line state carries out the state negotiation, describedly at the A line state, handle and confirm that packet is included in the A line state and sends and confirm packet to service end, describedly at the B line state, all handle and confirm that packet comprises that client receives at the B line state confirmation packet that service end is returned, be after service end and client are all received the confirmation packet, start 103 pairs of these A line states of negotiation module and B line state and carry out the state negotiation.
In the present embodiment, step 201 and step 202 interchangeable order, at first carry out step 202, then carry out step 201, in addition, can also be: step 201 be carried out with step 202 simultaneously, but can reduce to a certain extent equally the probability of the link failure caused because state is asynchronous, also can improve the efficiency of LCP link layer link, therefore, not be restricted herein.
In the present embodiment, adopt the two-way state to process request data package and handle packet, effectively avoid the confusion of both sides' state, increase PPPOE and connected the success rate of setting up, in addition, in the present embodiment, the employing state is consulted to improve to greatest extent the efficiency of setting up the LCP connection.
Fig. 3 is the device schematic diagram that a kind of Rapid Establishment PPPOE link layer of one embodiment of the invention connects, as shown in Figure 3, described device comprises: A line state processing module 301, B line state processing module 302, negotiation module 303, authentication module 304, wherein, A line state processing module 301 specifically comprises: A line state receiver module 3011, A line state judge module 3012, A line state feedback module 3013, A line state sending module 3014; B line state processing module 302 specifically comprises: B line state receiver module 3021, B line state feedback module 3022, B line state sending module 3023; Negotiation module 303 specifically comprises judge module 3031, control module 3032, and particularly, this judge module 3031 also comprises: the first judge module 30311, the second judge modules 30312.
In the process connected at the PPPOE link layer, start A line state processing module 301 and wait for the request data package that service end sends, and process this request data package, particularly, A line state receiver module 3011 receives the request data package sent by service end, wherein, this request data package is carried the selection field, A line state judge module 3012 is analyzed the request data package received, judge that the selection field whether selection field that this request data package is carried carries with the request data package in B line state sending module conflicts mutually, if do not conflict, start A road feedback module 3013 and generate the confirmation packet, then by A line state sending module 3014, send this and confirm packet, generate the refusal packet otherwise start A road feedback module 3013, A line state sending module 3014 sends the refusal packet to service end, and service end can continue to send request packet, until client sends and confirms packet to service end at the A line state.
Start B line state processing module 302 and directly to service end, send request packet, and process the handle packet corresponding with this request data package returned by service end, particularly, B line state sending module 3023 sends request packet to service end, then B line state receiver module 3021 receives the handle packet that service end is returned, wherein, this handle packet comprises confirms packet and refusal packet, but the handle packet of at every turn returning can only be to confirm a kind of in packet and refusal packet; B line state judge module 3022 these handle packet of judgement, the handle packet sent when service end is while refusing packet, start B line state feedback module 3023 and produce the request data package corresponding with this refusal packet, B line state sending module 3024 sends this request data package to service end, until this service end sends, confirms packet.
After all handling at described A line state and described B line state and confirming packet, client is carried out the state negotiation to described A line state, described B line state, describedly at the A line state, handle and confirm that packet is included in the A line state and sends and confirm packet to service end, describedly at the B line state, all handle and confirm that packet comprises that client receives at the B line state confirmation packet that service end is returned., start 303 pairs of A roads of negotiation module and B line state and carry out the state negotiation, the selection field that the confirmation packet that the service end of now usining sends carries as benchmark as the state consulting principle, particularly, this confirmation packet carries the selection field, this selection field comprises, wherein this selection field comprises codomain ID, the indication of data package size and authentication mode, the selection field that the confirmation packet that the first judge module 30311 be take in B line state receiver module 3021 carries is benchmark, judge in A line state feedback module 3014 that whether the selection field that selection field that the confirmation packet that produces carries carries with confirmation packet in B line state receiver module 3021 is consistent, when the two selects field inconsistent, the selection field that is the two clashes, now need A line state and B line state are carried out to the state negotiation, control module 3032 generates instruction, the selection field of client self is adjusted in this instruction for starting B line state processing module 3024, then whether the second judge module 30312 judgement adjustment select field successful, if success, B line state sending module 3024 sends and confirms packet to service end, if unsuccessful, B line state sending module 3024 sends the refusal packet to service end, then to service end, send request packet, re-execute the step that receives and process the handle packet of service end transmission at the B line state, until service end is returned to the confirmation packet, again the state negotiation is carried out in A road and B line state afterwards, until the selection field that the selection field that the confirmation packet sent by described service end carries is carried with the packet of client is not conflicted, be that A line state and B line state do not clash, now state has been consulted.
After state has been consulted, B line state sending module 3024 sends LCP Echo request data package to service end, and B line state receiver module 3024 starts authentication module 304 after receiving replying that service end returns, and enters authentication phase.
In the present embodiment, start A line state processing module 301 and start B line state processing module 302 and there is no strict sequencing, can first start A line state processing module 301, then start B line state processing module 302, also can first start B line state processing module 302, then start A line state processing module 301, can also start A line state processing module 301 and B line state processing module 302 simultaneously, be not restricted herein.
Fig. 4 is the method flow diagram that a kind of Rapid Establishment PPPOE link layer of one embodiment of the invention connects, in the present embodiment, set up the PPPOE connection and need experience discovery stage and session stage, after the discovery stage (number in the figure 401) finishes, connect and enter session stage, first step of session stage is set up exactly the LCP link layer and is connected, as shown in Figure 4, client is set up the two-way state, be respectively A line state and B line state, the session that wherein the A line state is initiatively initiated for the treatment of service end, and the session that the B line state is initiatively initiated for the treatment of client, after in client, establishing the two-way state, client sends request packet (number in the figure 403) at the B line state to service end immediately, wait at the A line state request data package (number in the figure 402) that service end sends, wherein, the request data package of A line state and B line state is all carried the selection field.
In the process of setting up the connection of LCP link layer, as shown in Figure 4, analyze received request data package in the A line state, if the selection field that this request data package is carried is conflicted mutually with the selection field that the request data package that client sends at the B line state is carried, at the A line state, to service end, send the refusal packet, and service end can continue to send the request data package corresponding with this refusal packet, until client sends and confirms packet to this service end at the A line state, if do not conflict, to service end, send and confirm packet; Receive the handle packet of service end at the B line state after, if this handle packet sends the corresponding request data package of selection field of carrying with this refusal packet at the B line state, until service end is returned to the confirmation packet for the refusal packet.
The confirmation packet that receives the service end transmission at the A line state reaches after the B line state receives the confirmation packet of service end transmission, the negotiation state that gets the hang of (number in the figure 404), the state negotiation is carried out in A road and B line state, particularly, handle packet comprises confirms packet and refusal packet, request data package, confirm that packet and refusal packet all carry the selection field, mutually whether the selection field that the selection field that the confirmation packet that judgement now sends to service end at the A line state carries is carried with the confirmation packet that receives the service end transmission at the B line state conflict, if conflict mutually, think that state consults unsuccessfully, now need to send the request data package corresponding with the selection field of this conflict to service end at the B line state, if what service end was returned is the refusal packet, client can continue to send request packet at the B line state, until service end is returned to the confirmation packet, carry out again afterwards the state negotiation, if the selection field that the confirmation packet now sent to service end at the A line state carries is conflicted mutually with the selection field that the confirmation packet that receives the service end transmission at the B line state carries, continue to carry out the above-mentioned request data package corresponding with this conflict field to the service end transmission in the continuation of B line state and receive this step of confirmation packet that service end sends, the selection field of carrying when the confirmation packet sent to service end at the A line state and when the B line state receives selection field that confirmation packet that service end sends carries and do not conflict, be that A line state and B line state do not clash, the expression state has been consulted, enter afterwards authentication state (number in the figure 405).
It should be noted that, in the present embodiment, whether the selection field that the selection field that the request data package that judgement receives at the A line state is carried is carried with the request data package sent at the B line state is conflicted mutually and is judged that the confirmation packet selection field of carrying and the whether afoul determination methods of selection field that the confirmation packet received at the B line state carries that send at the A line state are the same.
Fig. 5 is the method flow diagram that a kind of Rapid Establishment PPPOE link layer of one embodiment of the invention connects, as shown in Figure 5, in step 501, service end sends request packet to client, this packet carries choosing and selects field, particularly, this selection field comprises codomain ID, data package size, the indication of authentication mode, in step 502, client sends request packet at the B line state to service end, forward in step 503, client receives the request data package of service end at the A line state, after receiving request data package, A line state receiver module 3011 forwards step 504 to, the request data package received in the analysis of A line state, similarly, this packet carries the selection field, particularly, this selection field comprises that this selection field comprises codomain ID, data package size, the indication of authentication mode, wherein, which kind of data what this codomain ID showed the indication of data follow on the heels of is, at first A condition judge module 3012 analyzes the request data package received, then forward step 505 to.
In step 505, the selection field that the confirmation packet that the service end of usining sends carries as benchmark as the state consulting principle, A line state judge module 3012 judges that the selection field that request data package that whether selection field that this request data package carries sends to service end at the B line state with client is carried conflicts mutually, if do not conflict, forward step 5051 to, start A line state feedback module 3013 and produce the refusal packet, then in step 5052, A road sending module 3014 sends this refusal packet to service end, in step 5053, service end continues to send the corresponding request data package of selection field of carrying with this refusal packet to client after receiving this refusal packet, forward afterwards step 503 to, continue execution step 503, step 504 and step 505, until the selection field that the request data package that the selection field that the request data package that service end sends is carried sends to service end at the B line state with client is carried is not conflicted, then forward step 5054 to.
In step 505, the selection field that the confirmation packet that the service end of usining sends carries as benchmark as the state consulting principle, if judging the selection field that request data package that selection field that this request data package carries sends to service end at the B line state with client is carried does not conflict, forward step 5054 to, A line state feedback module 3013 produces confirms packet, then, in step 5055, A road sending module 3014 sends and confirms packet to service end, then forwards step 508 to.
When service end during to client transmission processing packet, particularly, this handle packet comprises confirms packet and refusal packet, forward step 506 to, client receives at the B line state handle packet that service end sends, be connected in step 507, start B line state judge module 3022 and analyze this handle packet, if this handle packet is the refusal packet, forward step 5071 to, B line state feedback module 3023 produces the corresponding request data package of selection field of carrying with this refusal packet, and startup B line state sending module 3034 sends this request data package to service end, then forward step 506 to, repeating step 506 and step 507, until this handle packet is for confirming packet, if this handle packet, for confirming packet, directly forwards step 508 to.
In step 508, client is carried out the state negotiation to A line state and B line state, starts negotiation module 303, and A line state and B line state are carried out to the state negotiation.
In the present embodiment, the confirmation packet that client and service end send all carries the selection field, this selection field comprises codomain ID, data package size, the indication of authentication mode, wherein, which kind of data what codomain ID showed the indication of data follow on the heels of is, codomain ID and data package size are for the state negotiation is carried out in A road and B line state, and the indication of authentication mode is the mode that link layer connects selected authentication while entering authentication state.
Particularly, the selection field that the confirmation packet that the B line state receiver module 3021 of take receives carries is benchmark, start the first judge module 30311, the selection field that the confirmation packet that the codomain ID of the selection field that the confirmation packet relatively produced in A line state feedback module 3013 carries receives with B line state receiver module 3021 carries have codomain ID whether consistent, particularly, if the codomain ID of the two is inconsistent, the expression state clashes, and forwards step 5081 to; Then judge that if the codomain ID of the two is consistent whether the value that the two codomain ID is corresponding is consistent, if corresponding value unanimously show that state does not clash, and forwards step 509 to; If inconsistent, show that state clashes, forward step 5081 to.
In step 5081, client is adjusted the selection field of self, particularly, if the codomain ID of the two is inconsistent, client need to arrange the information of the selection field corresponding with this conflict field, if the codomain ID of the two is consistent, and value corresponding to the codomain ID of the two is inconsistent, client need to be adjusted at the B line state value corresponding to codomain ID of oneself, then forward step 5082 to, whether the second judge module 30312 judgements are adjusted successful, if adjust successfully forward step 5083 to, client sends and confirms packet to service end at the B line state, then forward step 509 to, if adjust unsuccessfully, forward step 5084 to, in step 5084, start control module 3032 and generate the refusal instruction, order B line state feedback module 3023 generates the refusal packet, show to occur state conflict, wherein, the selection field that this refusal packet carries comprises adjusted codomain ID and value corresponding to this codomain ID, B line state sending module 3024 sends this this refusal packet to service end, then forward step 5071 to, continue execution step 5071, step 506 and step 507, until service end is returned to the confirmation packet, again A line state and B line state are carried out to the state negotiation afterwards, continue to carry out above-mentioned state negotiation step, until the selection field that the selection field that the confirmation packet sent by described service end carries is carried with the packet of client is not conflicted, be that A line state and B line state do not clash, now state has been consulted, forward afterwards step 509 to.
In step 509, start B line state sending module 3024 and send LCP Echo request data package to service end, and obtain that service end returns reply after forward step 510 to, the link layer connection enters authentication state, particularly, whether the PPPOE account number cipher that starts 304 pairs of clients of authentication module is correctly verified, in the present embodiment, the mode of authentication has multiple, is not restricted herein.
In the present embodiment, whether the selection field that the selection field that the request data package that judgement receives at the A line state is carried is carried with the request data package sent at the B line state is conflicted mutually and is judged that the confirmation packet selection field of carrying and the whether afoul determination methods of selection field that the confirmation packet received at the B line state carries that send at the A line state are the same.
It should be noted that, the present embodiment is just realized a kind of execution mode of method of the present invention, send request packet and client sends request the sequencing of packet to service end for service end to client, be not restricted herein, service end can first send request packet to client, then client can, again to service end transmission processing packet after service end sends request packet, also can send request packet after service end transmission processing packet again; Can also be, client first sends request packet to service end, service end transmission processing packet again after client sends request packet, and service end also can send request packet after client transmission processing packet again, is not restricted herein.
In technical scheme of the present invention, adopt the thought of two-way state, wherein a line state is processed the session that client is initiatively initiated, an other line state is processed the session of initiatively being initiated by service end, can avoid the confusion of data packet transceive like this, can guarantee to large extent the synchronous of both sides' state, reduce the connection failure probability and reduce link layer and connect the time of setting up, in addition, the present invention program adopts the two-way state to consult, reduce to a certain extent the link layer connection and set up failed probability, improved the efficiency that link layer connects.

Claims (6)

1. the method that a Rapid Establishment PPPOE link layer connects, it is characterized in that, set up two line states in client, be respectively A line state, B line state, wherein, the session that the A line state is initiatively initiated for the treatment of service end, the B line state is for the treatment of the session of initiatively being initiated by client, and described method comprises:
A, client are waited for the request data package of service end at the A line state, and process at the A line state request data package that service end sends, and described processing comprises to be confirmed and refusal;
B, client are directly initiated request data package at the B line state, and process at the B line state handle packet that service end is returned, and described handle packet comprises confirms packet and refusal packet;
C, after all handling at described A line state and described B line state and confirming packet, client is carried out the state negotiation to described A line state, described B line state, describedly at described A line state and described B line state, all handles and confirms that packet is included in the A line state and sends and confirm that packet and client receive at the B line state confirmation packet that service end is returned to service end;
Wherein, the described request packet carries the selection field;
Client is waited for the request data package of service end at the A line state, and the request data package sent in A line state processing service end specifically comprises: when the selection field that the request data package that the selection field of carrying when the request data package of service end transmission sends at the B line state with client is carried is not conflicted, client sends and confirms packet to service end at the A line state, otherwise client sends the refusal packet at the A line state to service end, service end continues to send the request data package corresponding with this refusal packet, until client sends and confirms packet to service end at the A line state,
Described client is directly initiated request data package at the B line state, and process at the B line state handle packet that service end returns and specifically comprise: when client when the B line state receives the refusal packet that service end returns to client after service end sends request packet, client continues to send the request data package corresponding with the refusal packet at the B line state, until service end is returned to the confirmation packet;
Described confirmation packet and described refusal packet all carry the selection field;
After all handling at described A line state and described B line state and confirming packet, client is to described A line state, described B line state carries out the state negotiation and specifically comprises: the selection field that the confirmation packet that sent by service end of take carries is benchmark, if the selection field that the selection field that the described confirmation packet sent by service end carries and the described confirmation packet sent at the A line state by client carry clashes, need client to send the request data package corresponding with the selection field of this conflict at the B line state, re-start negotiation after receiving the confirmation packet, until the selection field that the confirmation packet that the selection field that the confirmation packet sent by described service end carries sends at the A line state with client carries is not conflicted.
2. method according to claim 1, is characterized in that, described method also comprises that described client carries out after state consulted, entering authentication state to described A line state, described B line state.
3. method according to claim 2, is characterized in that, also comprises:
Described client also comprised that before the request data package of A line state wait service end service end sends the PADS packet to client;
Described client is carried out state to described A line state, described B line state and is consulted also to comprise afterwards that client sends LCP Echo request data package to service end, and service end is returned to LCP Echo reply data bag.
4. the device that a Rapid Establishment PPPOE link layer connects, it is characterized in that, client is provided with two line states, be respectively A line state, B line state, wherein, the session that the A line state is initiatively initiated for the treatment of service end, the B line state is for the treatment of the session of initiatively being initiated by client, and described device comprises:
Wait for the request data package of service end for client at the A line state, and process the A line state processing module of the request data package of service end transmission at the A line state, described processing comprises to be confirmed and refusal;
Directly initiate the request bag for client at the B line state, and the B line state processing module of the handle packet of returning in B line state processing service end, described handle packet comprises confirms packet and refusal packet;
After service end and client are all received the other side's confirmation packet, the negotiation module of described A line state, described B line state being carried out to the state negotiation for client;
Wherein, the described request packet carries the selection field;
Described A line state processing module comprises:
For receiving the A line state receiver module of the request data package that service end sends;
For the afoul A line state of the selection field judge module that judges that request data package that whether selection field that request data package that service end sends carries sends at the B line state with client is carried;
When the request data package that the request data package sent when service end sends at the B line state with client is conflicted mutually, for generation of the refusal packet and when the request data package of the service end transmission selection field entrained in the request data package of B line state transmission with client do not conflicted, for generation of the A line state feedback module of confirming packet;
For sending the A line state sending module of confirming packet and refusal packet;
Described B line state processing module comprises:
For receiving the B line state receiver module of the handle packet that service end sends;
For judging whether handle packet is the B line state judge module of refusal packet;
When service end sends the refusal packet, for generation of the B line state feedback module of the request data package corresponding with this refusal packet;
For send request the B line state sending module of packet to service end;
Described confirmation packet and refusal packet all carry the selection field;
Described negotiation module comprises:
The judge module whether the selection field that the selection field that the confirmation packet sent by service end received at the B line state for judgement carries and the confirmation packet sent at the A line state by client carry clashes;
For correspondingly start the control module of B line state processing module according to the judged result of described judge module.
5. device according to claim 4, is characterized in that, described device also comprises for entering the authentication module of authentication state.
6. device according to claim 4, is characterized in that, comprising:
Described B line state sending module is also for sending LCP Echo request data package to service end; And
The LCP Echo reply data bag that described B line state receiver module also returns for receiving PADS packet that service end sends and service end.
CN2010102888118A 2010-09-21 2010-09-21 Method and device for fast establishing PPPOE (Point-to-Point Protocol over Ethernet) link layer connection Expired - Fee Related CN102065072B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102888118A CN102065072B (en) 2010-09-21 2010-09-21 Method and device for fast establishing PPPOE (Point-to-Point Protocol over Ethernet) link layer connection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102888118A CN102065072B (en) 2010-09-21 2010-09-21 Method and device for fast establishing PPPOE (Point-to-Point Protocol over Ethernet) link layer connection

Publications (2)

Publication Number Publication Date
CN102065072A CN102065072A (en) 2011-05-18
CN102065072B true CN102065072B (en) 2013-12-25

Family

ID=44000175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102888118A Expired - Fee Related CN102065072B (en) 2010-09-21 2010-09-21 Method and device for fast establishing PPPOE (Point-to-Point Protocol over Ethernet) link layer connection

Country Status (1)

Country Link
CN (1) CN102065072B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106817318B (en) * 2015-11-30 2019-11-15 中国电信股份有限公司 The machinery of consultation of robust Header compression state, transmitting terminal and system
CN114745450A (en) * 2022-04-19 2022-07-12 苏州盛科科技有限公司 Chip port link training connection method and application

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1571378A (en) * 2003-07-25 2005-01-26 华为技术有限公司 A method and apparatus for implementing network access control based on link layer protocol
US7263070B1 (en) * 2002-11-05 2007-08-28 Sprint Spectrum L.P. Method and system for automating node configuration to facilitate peer-to-peer communication
CN101035137A (en) * 2006-03-06 2007-09-12 中兴通讯股份有限公司 Method for dynamically establishing the point-to-point protocol channel in the different-mode link layer access
CN101079771A (en) * 2007-04-03 2007-11-28 中兴通讯股份有限公司 A broadband access method based on PPPoE

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7263070B1 (en) * 2002-11-05 2007-08-28 Sprint Spectrum L.P. Method and system for automating node configuration to facilitate peer-to-peer communication
CN1571378A (en) * 2003-07-25 2005-01-26 华为技术有限公司 A method and apparatus for implementing network access control based on link layer protocol
CN101035137A (en) * 2006-03-06 2007-09-12 中兴通讯股份有限公司 Method for dynamically establishing the point-to-point protocol channel in the different-mode link layer access
CN101079771A (en) * 2007-04-03 2007-11-28 中兴通讯股份有限公司 A broadband access method based on PPPoE

Also Published As

Publication number Publication date
CN102065072A (en) 2011-05-18

Similar Documents

Publication Publication Date Title
CN109088723B (en) Remote control method based on MQTT protocol
JP5242773B2 (en) Method and network element for controlling end-to-end overload based on diameter application
EP1914939B1 (en) A method for the triggering failure detection of bidirectional forwarding detection
US10250581B2 (en) Client, server, radius capability negotiation method and system between client and server
WO2009012730A1 (en) Message handling method, system, server and terminal
US9265075B2 (en) Data card and method for quickly establishing dial-up connection thereof
US20150215214A1 (en) Method and system for increasing data flow transmission
US20110258682A1 (en) Method, apparatus, and system for processing session context
CN103825881A (en) Method and apparatus for realizing redirection of WLAN user based on wireless access controller (AC)
KR20160075698A (en) Method, device and system for redirecting data service proxy
US10819623B2 (en) Method and device for transmitting data
RU2007107401A (en) QUICK INSTALLATION FOR NETWORK ACCESS
US10110642B2 (en) Communication apparatus, communication system, communication method, and storage medium
EP2621133B1 (en) Method and system for implementing pw control bit capability negotiation
CN115118524A (en) Interface equipment and free intercommunication data transparent transmission method, system and device of Internet of things
CN103685398B (en) Communication connection method for building up and communication system
CN102065072B (en) Method and device for fast establishing PPPOE (Point-to-Point Protocol over Ethernet) link layer connection
CN114070494A (en) Data transmission method, device, equipment and storage medium
EP1593230B1 (en) Terminating a session in a network
US9596326B2 (en) Communication apparatus, communication method, and non-transitory computer-readable medium
WO2013071739A1 (en) Ipv4/ipv6 double-stack user billing method and device
WO2012051909A1 (en) Method and device for obtaining ipv6 interface identifier
JP2007265356A (en) Interconnection method and device using communication protocol
JP2012090025A (en) Communication device
US9769140B1 (en) Authentication support for autonomous requests

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20131225

Termination date: 20180921