CN102065072A - 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 PDFInfo
- Publication number
- CN102065072A CN102065072A CN2010102888118A CN201010288811A CN102065072A CN 102065072 A CN102065072 A CN 102065072A CN 2010102888118 A CN2010102888118 A CN 2010102888118A CN 201010288811 A CN201010288811 A CN 201010288811A CN 102065072 A CN102065072 A CN 102065072A
- Authority
- CN
- China
- Prior art keywords
- line state
- packet
- service end
- client
- request data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Communication Control (AREA)
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
Technical field
The present invention relates to the link layer method of attachment, a kind of method and apparatus of setting up the connection of PPPOE link layer fast.
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 because the difference of service end and client design, which side initiates request (request) packet does not earlier have unified regulation, therefore causes the confusion of state easily.If both sides initiate request data package earlier, must have a side just receives the other side after initiating request request package, thereby both sides' state is affirmation or refusal (ACK/NAK) packet of waiting for the other side at this moment, but what obtain is a request data package, a solution is: do not send any feedback data bag, perhaps only return a request data package, causing easily like this need rebulid that LCP connects or the state confusion can't be set up the LCP link layer sessions after overtime, the overtime or failure that finally causes PPPOE to connect.
In addition, have on the terminal equipment of PPPOE access function at PC or other, often because the asynchronous PPPOE that causes of the state of LCP link session connects 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.
Present solution has: a side does not initiatively send earlier request data package, and the other side's request data package is returned response data packet after arriving by the time, and the request data package that sends oneself is again carried out both sides' information synchronization.This method need follow all when both sides design that an end is sent out earlier and the principle sent out behind the other end, if other PPPOE terminal equipment is not followed this mode, in addition, if terminal is also initiatively initiated request data package, the confusion that then can cause both sides' state finally causes the failure of LCP link establishment or overtime.
Summary of the invention
The technical problem to be solved in the present invention is, need set up PPPOE through the very long stand-by period connects, the confusion that can cause both sides' state when both sides send request data package, even cause the failure of LCP link establishment or overtime, at the above-mentioned defective of prior art, provide a kind of method and device that the PPPOE link layer connects of setting up fast.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of method of setting up the connection of PPPOE link layer is fast set up two line states in client, is respectively A line state, B line state, wherein, the A line state is used to handle the session that service end is initiatively initiated, and the B line state is used to handle the session of initiatively being initiated by client, and described method comprises:
A, client wait for the request data package of service end at the A line state, and handle the request data package that service end sends at the A line state, and described processing comprises to be confirmed and refusal;
B, client are directly initiated request data package at the B line state, and handle the handle packet that service end is returned at the B line state, and described handle packet comprises confirms packet and refusal packet;
C, when all handle at described A line state and described B line state confirm packet after, client is carried out state to described A line state, described B line state and is consulted, and described all handling at described A line state and described B line state confirms that packet is included in the A line state and sends to service end and confirm that packet and client receive the affirmation packet that service end is returned at the B line state.
Preferably, described method comprises that also described client carries out entering authentication state after state consults to finish to described A line state, described B line state.
Preferably,
Described request packet, affirmation packet and refusal packet all carry the selection field;
Described client comprised also 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 client is returned LCP Echo reply data bag.
Preferably,
Client is waited for the request data package of service end at the A line state, and handle the request data package that service end sends at the A line state and specifically comprise: when the selection field that the request data package that sends when service end is carried is not conflicted with the selection field that client is carried in the request data package of B line state transmission, client sends to service end at the A line state confirms packet, otherwise client sends the refusal packet at the A line state to service end, service end continues to send and the corresponding request data package of this refusal packet, sends to service end at the A line state up to client and confirms packet;
Described client is directly initiated request data package at the B line state, and handle the handle packet that service end returns at the B line state and specifically comprise: when client when the B line state receives service end to refusal packet that client is returned after service end sends request data package, client continues to send and the corresponding request data package of this refusal packet at the B line state, returns the affirmation packet up to service end.
Preferably,
Described client is carried out state to described A line state, described B line state and is consulted specifically to comprise:
The selection field of carrying with the affirmation packet that is sent by service end is a benchmark, if the described selection field that is sent by service end is clashed by the selection field of client in the transmission of B line state with described, then need send the corresponding request data package of selection field of conflicting at the B line state with this, again hold consultation after receiving the confirmation packet, do not conflict with the selection field that the packet of client carries up to the selection field that the affirmation packet that is sent by described service end carries.
The present invention also provides a kind of device of realizing said method;
A kind of device of setting up the connection of PPPOE link layer fast, client is provided with two line states, is respectively A line state, B line state, wherein, the A line state is used to handle the session that service end is initiatively initiated, and the B line state is used to handle the session of initiatively being initiated by client, and described device comprises:
Be used for client and wait for the request data package of service end at the A line state, and handle the A road processing module of the request data package that service end sends at the A line state, described processing comprises to be confirmed and refusal;
Be used for client and directly initiate request package at the B line state, and handle the B road processing module of the handle packet that service end returns at the B line state, described handle packet comprises confirms packet and refusal packet;
After service end and client are all received the other side's affirmation packet, be used for client described A line state, described B line state are carried out the negotiation module that state is consulted.
Preferably, described device also comprises the authentication module that is used to enter authentication state.
Preferably,
The described request packet carries the selection field;
Described A road processing module comprises:
Be used to receive the A road receiver module of the request data package that service end sends;
Be used to judge the afoul A of the selection field road judge module 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 of service end transmission is conflicted mutually with the request data package that client sends at the B line state, the request data package that is used to produce the refusal packet and sends when service end and client are used to produce the A road feedback module of affirmation packet when the entrained selection field of the request data package of B line state transmission is not conflicted;
Be used to send the A road sending module of confirming packet and refusal packet;
Described B road processing module comprises:
Be used to receive the B road receiver module of the handle packet that service end sends;
When service end sends the refusal packet, be used to produce the B road feedback module with the corresponding request data package of this refusal packet;
Be used for sending the B road sending module of request data package to service end.
Preferably,
Described affirmation packet and refusal packet all carry the selection field;
Described negotiation module comprises:
Be used to judge the judge module whether selection field that the affirmation packet that is sent by service end that receives at the A line state carries and described selection field of being carried at the affirmation packet of B line state transmission by client clash;
Be used for correspondingly starting the control module of B line state processing module according to the judged result of described judge module.
Preferably,
Described B road sending module also is used for sending LCP Echo request data package to service end; And
Described B road receiver module also is used to receive the PADS packet of service end transmission and the LCP Echo reply data bag that service end is returned.
Implement technical scheme of the present invention, has following beneficial effect: in the technical scheme of the present invention, adopt the thought of two-way state, wherein a line state is handled the session that client is initiatively initiated, an other line state is handled the session of initiatively being initiated by service end, can avoid the confusion of data packet transceive like this, can guarantee both sides' state synchronization to large extent, 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, and reduces the link layer connection to a certain extent and sets up failed probability, has improved the efficient that link layer connects.
Description of drawings
The invention will be further described below in conjunction with drawings and Examples, in the accompanying drawing:
Fig. 1 is a kind of structure drawing of device that the PPPOE link layer connects of setting up fast of the present invention;
Fig. 2 is a kind of method flow diagram that the PPPOE link layer connects of setting up fast of the present invention;
Fig. 3 is a kind of structure drawing of device of setting up the connection of PPPOE link layer fast of one embodiment of the invention;
Fig. 4 is a kind of method flow diagram of setting up the connection of PPPOE link layer fast of one embodiment of the invention;
Fig. 5 is a kind of method flow diagram of setting up the connection of PPPOE link layer fast of another embodiment of the present invention.
Embodiment
The present invention relates to a kind of method and apparatus that the PPPOE link layer connects of setting up fast, client is provided with two line states, is respectively A line state, B line state, wherein, the A line state is used to handle the session that service end is initiatively initiated, and the B line state is used to handle the session of initiatively being initiated by client.
As shown in Figure 1, be a kind of device schematic diagram of setting up the connection of PPPOE link layer fast of the embodiment of the invention, wherein, this device comprises: A line state processing module 101, B line state processing module 102, negotiation module 103.
In the process that the PPPOE link layer connects, the request data package that is sent by service end is waited for and handled 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 data package to service end, and the corresponding handle packet of request data package that send with this B line state processing module 102 of handling that service end returns, particularly, this handle packet comprises confirms packet and refusal packet, when all handle at described A line state and described B line state confirm packet after, client is to described A line state, described B line state carries out state to be consulted, described handling at the A line state confirms that packet is included in the A line state and sends the affirmation packet to service end, described all handling at the B line state confirms that packet comprises that client receives the affirmation packet that service end is returned at the B line state, and 103 pairs of A line states of negotiation module and B line state carry out state to be consulted.
Fig. 2 is a kind of schematic flow sheet of setting up the method for PPPOE link layer connection fast of the present invention, as shown in Figure 2, in step 201, A line state processing module 101 is waited for the request data package that service end sends at the A line state, and handle this request data package, particularly, this processing comprises affirmation and refusal; Then in the step 202, B line state processing module 102 directly sends request data package to service end at the B line state, and handle and to return by service end, the corresponding handle packet of request data package with 102 transmissions of B line state processing module, particularly, this handle packet comprises confirms packet and refusal packet, in step 203, when all handle at described A line state and described B line state confirm packet after, client is to described A line state, described B line state carries out state to be consulted, described handling at the A line state confirms that packet is included in the A line state and sends the affirmation packet to service end, described all handling at the B line state confirms that packet comprises that client receives the affirmation packet that service end is returned at the B line state, be that service end and client are all received after the affirmation 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, promptly at first carry out step 202, then carry out step 201, in addition, can also be: step 201 be carried out simultaneously with step 202, but can reduce the link failed probability that causes because state is asynchronous to a certain extent equally, also can improve the efficient of LCP link layer link, therefore, not limit herein.
In the present embodiment, adopt the two-way state to handle request data package and handle packet, avoid the confusion of both sides' state effectively, increase PPPOE and connected the success rate of setting up, in addition, in the present embodiment, the employing state is consulted to improve the efficient of setting up the LCP connection to greatest extent.
Fig. 3 is a kind of device schematic diagram of setting up the connection of PPPOE link layer fast of one embodiment of the invention, 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: first judge module, 30311, the second judge modules 30312.
In the process that the PPPOE link layer connects, start A line state processing module 301 and wait for the request data package that service end sends, and handle this request data package, particularly, A line state receiver module 3011 receives the request data package that is 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 that is received, judge selection field that this request data package carries whether with B line state sending module in the request data package selection field of carrying conflict mutually, if do not conflict, then start A road feedback module 3013 and generate the affirmation packet, then send this and confirm packet by A line state sending module 3014; 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 data package, sends to service end at the A line state up to client and confirms packet.
Start B line state processing module 302 and directly send request data package to service end, and handle return by service end with the corresponding handle packet of this request data package, particularly, B line state sending module 3023 sends request data package 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 the refusal packet; B line state judge module 3022 is judged this handle packet, the handle packet that sends when service end is when refusing packet, starting B line state feedback module 3023 produces and the corresponding request data package of this refusal packet, B line state sending module 3024 sends this request data package to service end, sends up to this service end and confirms packet.
When all handle at described A line state and described B line state confirm packet after, client is carried out state to described A line state, described B line state and is consulted, described handling at the A line state confirms that packet is included in the A line state and sends the affirmation packet to service end, and described all handling at the B line state confirms that packet comprises that client receives the affirmation packet that service end is returned at the B line state.Start 303 pairs of A roads of negotiation module and B line state and carry out the state negotiation, the selection field that the affirmation packet that send with service end this moment carries is that benchmark is as the state consulting principle, particularly, this affirmation packet carries the selection field, this selection field comprises, wherein this selection field comprises codomain ID, the indication of packet size and authentication mode, the selection field that first judge module 30311 carries with the affirmation packet in the B line state receiver module 3021 is a benchmark, judge in the A line state feedback module 3014 whether the selection field that selection field that the affirmation packet that produces carries and affirmation packet in the B line state receiver module 3021 carry is consistent, when the two selects field inconsistent, be that the selection of them field clashes, need carry out the state negotiation this moment to A line state and B line state, control module 3032 generates instruction, this instruction is used to start the selection field that B line state processing module 3024 is adjusted client self, then second judge module 30312 judges whether adjustment selection field is successful, if success, then B line state sending module 3024 sends to service end and confirms packet, if it is unsuccessful, B line state sending module 3024 sends the refusal packet to service end, then send request data package to service end, re-execute the step that receives and handle the handle packet of service end transmission at the B line state, return the affirmation packet up to service end, again the state negotiation is carried out on A road and B line state afterwards, do not conflict with the selection field that the packet of client carries up to the selection field that the affirmation packet that is sent by described service end carries, be that A line state and B line state do not clash, this moment, state was consulted to finish.
After state was consulted to finish, B line state sending module 3024 sent LCP Echo request data package to service end, and B line state receiver module 3024 receives after the replying that service end returns, and starts authentication module 304, enters authentication phase.
In the present embodiment, start A line state processing module 301 and start B line state processing module 302 and do not have strict sequencing, can start A line state processing module 301 earlier, then start B line state processing module 302, also can start B line state processing module 302 earlier, 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, do not limit herein.
Fig. 4 is a kind of method flow diagram of setting up the connection of PPPOE link layer fast of one embodiment of the invention, 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 the LCP link layer exactly 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, wherein the A line state is used to handle the session that service end is initiatively initiated, and the B line state is used to handle the session that client is initiatively initiated, after having set up the two-way state in client, client sends request data package (number in the figure 403) at the B line state to service end immediately, wait for the request data package (number in the figure 402) that service end sends at the A line state, 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, in the A line state, analyze the request data package that is received, 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, then send the refusal packet to service end at the A line state, and service end can continue to send and the corresponding request data package of this refusal packet, send affirmation packet at the A line state to this service end up to client, if do not conflict, then send and confirm packet to service end; Receive the handle packet of service end at the B line state after,, return the affirmation packet up to service end if this handle packet then sends the corresponding request data package of selection field of carrying with this refusal packet at the B line state for the refusal packet.
The affirmation packet that receives the service end transmission at the A line state reaches after the B line state receives the affirmation packet of service end transmission, the negotiation state that gets the hang of (number in the figure 404), the state negotiation is carried out on 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, judge the selection field that the affirmation packet that sends to service end at the A line state this moment carries and receive the whether mutually conflict of selection field that affirmation packet that service end sends carries at the B line state, if conflict mutually, then think state negotiation failure, need send the corresponding request data package of selection field of conflicting with this this moment at the B line state to service end, if what service end was returned is the refusal packet, client can continue to send request data package at the B line state, return the affirmation packet up to service end, carrying out state afterwards again consults, if the selection field that the affirmation packet that send to service end at the A line state this moment carries is conflicted mutually with the selection field that the affirmation packet that receives the service end transmission at the B line state carries, then continue to carry out above-mentioned continue to send at the B line state to service end conflict the corresponding request data package of field with this and receive this step of affirmation packet of service end transmission, the selection field of carrying when the affirmation packet that sends to service end at the A line state and receive selection field that affirmation packet that service end sends carries when not conflicting at the B line state, be that A line state and B line state do not clash, the expression state is consulted to finish, and enters authentication state (number in the figure 405) afterwards.
Need to prove, in the present embodiment, judge selection field that the request data package selection field of carrying and the request data package that sends at the B line state that receive at the A line state are carried whether conflict mutually and judge selection field that the affirmation packet that sends at the A line state carries and the selection field of carrying at the affirmation packet of B line state reception whether afoul determination methods is the same.
Fig. 5 is a kind of method flow diagram of setting up the connection of PPPOE link layer fast of one embodiment of the invention, as shown in Figure 5, in step 501, service end sends request data package to client, this packet carries choosing and selects field, and particularly, this selection field comprises codomain ID, the packet size, the indication of authentication mode, in step 502, client sends request data package 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, forwards step 504 to after A line state receiver module 3011 receives request data package, the request data package that is received in the analysis of A line state, similarly, this packet carries the selection field, and particularly, this selection field comprises that this selection field comprises codomain ID, the packet size, the indication of authentication mode, wherein, which kind of data what this codomain ID showed follow on the heels of data indication is, A condition judge module 3012 is at first analyzed the request data package that is received, and then forwards step 505 to.
In step 505, the selection field that the affirmation packet that sends with service end carries is that benchmark is as the state consulting principle, A line state judge module 3012 judges whether the selection field that this request data package is carried conflicts mutually with the selection field that the request data package that client sends to service end at the B line state is carried, if do not conflict, then 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 step 503 afterwards to, continue execution in step 503, step 504 and step 505, do not conflict in the selection field that the B line state carries to the request data package of service end transmission up to selection field and client that the request data package of service end transmission is carried, then forward step 5054 to.
In step 505, the selection field that the affirmation packet that sends with service end carries is that benchmark is as the state consulting principle, if judging the selection field that this request data package selection field of carrying and the request data package that client sends to service end at the B line state are carried does not conflict, then forward step 5054 to, A line state feedback module 3013 produces confirms packet, then in step 5055, A road sending module 3014 sends to service end confirms packet, then forwards step 508 to.
When service end when client sends handle packet, particularly, this handle packet comprises confirms packet and refusal packet, forward step 506 to, client receives the handle packet that service end sends at the B line state, 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, then 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 are the affirmation packet up to this handle packet; If this handle packet directly forwards step 508 to for confirming packet.
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 the state negotiation.
In the present embodiment, the affirmation packet that client and service end send all carries the selection field, this selection field comprises codomain ID, the packet size, the indication of authentication mode, wherein, which kind of data what codomain ID showed follow on the heels of data indication is, codomain ID and packet size are used for the state negotiation is carried out on A road and B line state, and the indication of authentication mode is the mode that link layer connects selected authentication when entering authentication state.
Particularly, the selection field that the affirmation packet that receives with B line state receiver module 3021 carries is a benchmark, start first judge module 30311, relatively whether the codomain ID of the affirmation packet that produces in the A line state feedback module 3013 selection field of carrying and affirmation packet that B line state receiver module 3021 the receives selection field of carrying has codomain ID consistent, particularly, the expression state clashes if the codomain ID of the two is inconsistent, then forwards step 5081 to; If the codomain ID unanimity of the two then judge that then the value of codomain ID correspondence of the two is whether consistent, if corresponding value unanimity then show that state does not clash, and forwards step 509 to; If inconsistent, show that then 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, then client need be provided with the information of the corresponding selection field of field of conflicting with this, if the codomain ID unanimity of the two, and the value of the codomain ID correspondence of the two is inconsistent, client need be adjusted the value of the codomain ID correspondence of oneself at the B line state, then forward step 5082 to, second judge module 30312 judges and adjusts whether success, if adjust successfully then forward step 5083 to, client sends to service end at the B line state confirms packet, then forwards step 509 to; Get nowhere if adjust, then forward step 5084 to; In step 5084, start-up control module 3032 generates the refusal instruction, order B line state feedback module 3023 generates the refusal packet, show the conflict of generation state, wherein, the selection field that this refusal packet carries comprises the value of the codomain ID that adjusted and this codomain ID correspondence, B line state sending module 3024 sends this this refusal packet to service end, then forward step 5071 to, continue execution in step 5071, step 506 and step 507, return the affirmation packet up to service end, again A line state and B line state are carried out the state negotiation afterwards, continue to carry out above-mentioned state negotiation step, do not conflict with the selection field that the packet of client carries up to the selection field that the affirmation packet that is sent by described service end carries, be that A line state and B line state do not clash, this moment, state was consulted to finish, and forwarded step 509 afterwards 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, does not limit herein.
In the present embodiment, judge selection field that the request data package selection field of carrying and the request data package that sends at the B line state that receive at the A line state are carried whether conflict mutually and judge selection field that the affirmation packet that sends at the A line state carries and the selection field of carrying at the affirmation packet of B line state reception whether afoul determination methods is the same.
Need to prove, present embodiment is just realized a kind of execution mode of method of the present invention, send the sequencing of request data package to service end to client transmission request data package and client for service end, do not limit herein, service end can send request data package to client earlier, then client can send handle packet to service end again after service end sends request data package, also can send request data package again after service end sends handle packet; Can also be, client sends request data package to service end earlier, and service end sends handle packet again after client sends request data package, and service end also can send request data package again after client sends handle packet, do not limit herein.
In the technical scheme of the present invention, adopt the thought of two-way state, wherein a line state is handled the session that client is initiatively initiated, an other line state is handled the session of initiatively being initiated by service end, can avoid the confusion of data packet transceive like this, can guarantee both sides' state synchronization to large extent, 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 the link layer connection to a certain extent and set up failed probability, improved the efficient that link layer connects.
Claims (10)
1. set up the method that the PPPOE link layer connects fast for one kind, it is characterized in that, set up two line states in client, be respectively A line state, B line state, wherein, the A line state is used to handle the session that service end is initiatively initiated, and the B line state is used to handle the session of initiatively being initiated by client, and described method comprises:
A, client wait for the request data package of service end at the A line state, and handle the request data package that service end sends at the A line state, and described processing comprises to be confirmed and refusal;
B, client are directly initiated request data package at the B line state, and handle the handle packet that service end is returned at the B line state, and described handle packet comprises confirms packet and refusal packet;
C, when all handle at described A line state and described B line state confirm packet after, client is carried out state to described A line state, described B line state and is consulted, and described all handling at described A line state and described B line state confirms that packet is included in the A line state and sends to service end and confirm that packet and client receive the affirmation packet that service end is returned at the B line state.
2. method according to claim 1 is characterized in that, described method comprises that also described client carries out entering authentication state after state consults to finish to described A line state, described B line state.
3. method according to claim 2 is characterized in that, also comprises:
Described client comprised also 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 client is returned LCP Echo reply data bag.
4. method according to claim 1 is characterized in that, comprising:
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 handle the request data package that service end sends at the A line state and specifically comprise: when the selection field that the request data package that sends when service end is carried is not conflicted with the selection field that client is carried in the request data package of B line state transmission, client sends to service end at the A line state confirms packet, otherwise client sends the refusal packet at the A line state to service end, service end continues to send and the corresponding request data package of this refusal packet, sends to service end at the A line state up to client and confirms packet;
Described client is directly initiated request data package at the B line state, and handle the handle packet that service end returns at the B line state and specifically comprise: when client when the B line state receives service end to refusal packet that client is returned after service end sends request data package, client continues to send and the corresponding request data package of this refusal packet at the B line state, returns the affirmation packet up to service end.
5. method according to claim 1 is characterized in that,
Described affirmation packet and refusal packet all carry the selection field;
Described client is carried out state to described A line state, described B line state and is consulted specifically to comprise:
The selection field of carrying with the affirmation packet that is sent by service end is a benchmark, if the described selection field that is sent by service end is clashed by the selection field of client in the transmission of B line state with described, then need send the corresponding request data package of selection field of conflicting at the B line state with this, again hold consultation after receiving the confirmation packet, do not conflict with the selection field that the packet of client carries up to the selection field that the affirmation packet that is sent by described service end carries.
6. set up the device that the PPPOE link layer connects fast for one kind, it is characterized in that, client is provided with two line states, be respectively A line state, B line state, wherein, the A line state is used to handle the session that service end is initiatively initiated, and the B line state is used to handle the session of initiatively being initiated by client, and described device comprises:
Be used for client and wait for the request data package of service end at the A line state, and handle the A road processing module of the request data package that service end sends at the A line state, described processing comprises to be confirmed and refusal;
Be used for client and directly initiate request package at the B line state, and handle the B road processing module of the handle packet that service end returns at the B line state, described handle packet comprises confirms packet and refusal packet;
After service end and client are all received the other side's affirmation packet, be used for client described A line state, described B line state are carried out the negotiation module that state is consulted.
7. device according to claim 6 is characterized in that described device also comprises the authentication module that is used to enter authentication state.
8. device according to claim 6 is characterized in that, comprising:
The described request packet carries the selection field;
Described A road processing module comprises:
Be used to receive the A road receiver module of the request data package that service end sends;
Be used to judge the afoul A of the selection field road judge module 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 of service end transmission is conflicted mutually with the request data package that client sends at the B line state, the request data package that is used to produce the refusal packet and sends when service end and client are used to produce the A road feedback module of affirmation packet when the entrained selection field of the request data package of B line state transmission is not conflicted;
Be used to send the A road sending module of confirming packet and refusal packet;
Described B road processing module comprises:
Be used to receive the B road receiver module of the handle packet that service end sends;
When service end sends the refusal packet, be used to produce the B road feedback module with the corresponding request data package of this refusal packet;
Be used for sending the B road sending module of request data package to service end.
9. device according to claim 6 is characterized in that, comprising:
Described affirmation packet and refusal packet all carry the selection field;
Described negotiation module comprises:
Be used to judge the judge module whether selection field that the affirmation packet that is sent by service end that receives at the A line state carries and described selection field of being carried at the affirmation packet of B line state transmission by client clash;
Be used for correspondingly starting the control module of B line state processing module according to the judged result of described judge module.
10. device according to claim 8 is characterized in that, comprising:
Described B road sending module also is used for sending LCP Echo request data package to service end; And
Described B road receiver module also is used to receive the PADS packet of service end transmission and the LCP Echo reply data bag that service end is returned.
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 true CN102065072A (en) | 2011-05-18 |
CN102065072B 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106817318A (en) * | 2015-11-30 | 2017-06-09 | 中国电信股份有限公司 | 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)
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 |
-
2010
- 2010-09-21 CN CN2010102888118A patent/CN102065072B/en not_active Expired - Fee Related
Patent Citations (4)
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 |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106817318A (en) * | 2015-11-30 | 2017-06-09 | 中国电信股份有限公司 | The machinery of consultation of robust Header compression state, transmitting terminal and system |
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 |
CN114745450B (en) * | 2022-04-19 | 2024-06-25 | 苏州盛科科技有限公司 | Method for training and connecting chip port link and application |
Also Published As
Publication number | Publication date |
---|---|
CN102065072B (en) | 2013-12-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109088723B (en) | Remote control method based on MQTT protocol | |
US20190312938A1 (en) | Data Transmission Method And Apparatus | |
WO2013143342A1 (en) | Home gateway, cloud server and method for communication therebetween | |
EP2986042B1 (en) | Client, server, and remote authentication dial in user service capability negotiation method and system | |
WO2011006324A1 (en) | Method and terminal for file transmission | |
CN103825881A (en) | Method and apparatus for realizing redirection of WLAN user based on wireless access controller (AC) | |
US20150215214A1 (en) | Method and system for increasing data flow transmission | |
CN106961426B (en) | Communication method and device of intelligent equipment | |
US20120290728A1 (en) | Data card and method for quickly establishing dial-up connection thereof | |
CN115118524B (en) | Interface equipment and free intercommunication data transparent transmission method, system and device of Internet of things | |
WO2016192282A1 (en) | Link detection method and device | |
KR20160075698A (en) | Method, device and system for redirecting data service proxy | |
WO2011029248A1 (en) | Method and interface platform for implementing multi-protocol access | |
US9191312B2 (en) | Method and system for implementing PW control bit capability negotiation | |
JP6548445B2 (en) | Communication device, communication method and program | |
CN103685398B (en) | Communication connection method for building up and communication system | |
CN104780231B (en) | Double stack application access method and apparatus | |
CN102065072B (en) | Method and device for fast establishing PPPOE (Point-to-Point Protocol over Ethernet) link layer connection | |
CN103297449B (en) | A kind of document transmission method, instant communication terminal and system | |
US9648159B2 (en) | Single-PDP dual stack serial dialing method and system | |
WO2012068972A1 (en) | Method for activating configuration and user equipment | |
CN106603559B (en) | A kind of method of wireless communication terminal data transmission anti-intercepting and capturing | |
WO2009011968A1 (en) | Endpoint discriminator in network transport protocol startup packets | |
WO2012175024A1 (en) | Method, system and device for realizing concurrency of wireless data transmission and short message transceiving | |
CN104285424A (en) | Method for transmitting data in packet-oriented communications network and correspondingly configured user terminal in said communications network |
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 |
Granted publication date: 20131225 Termination date: 20180921 |
|
CF01 | Termination of patent right due to non-payment of annual fee |