Background technology
Continuous development along with broadband network technology, with xDSL, CableModem and Ethernet are popularizing of main several main flow broadband access technologys, IETF has made and transmitted PPP (Point to pointprotocol on Ethernet, peer-peer protocol) the agreement PPPoE of packet (Point To Point Protocol overEthernet), the canonical system networking of PPPoE agreement access user terminal as shown in Figure 1, comprise user terminal, access device and BRAS server (Broadband Remote Access Server, BAS Broadband Access Server), the PPPoE agreement can make user terminal be connected on the BRAS server of far-end by simple access device.The PPPoE agreement is in order to provide point-to-point connection on Ethernet, the Session ID that each PPP session must be known the other side's ethernet address and a user terminal of an energy unique identification is arranged, and the PPPoE agreement provides the discovery stage to solve this problem.
PPPoE finds the stage negotiations process as shown in Figure 2, and the PPPoE discovery stage is divided into four steps:
The first step: user terminal is broadcasted a PADI (Active DiscoveryInitialization activate find start packet) bag in this Ethernet, comprises user terminal and want the service type information that obtains in this bag.
Second step: all the BRAS servers in the Ethernet are after receiving this initialization bag, the requested service wherein and the service that oneself can provide are compared, wherein user terminal provides the BRAS server of this service to beam back PADO (Active Discovery Offer activates and finds to provide grouping) bag for this reason, can not provide the BRAS server of this service not send out the PADO bag.
The 3rd step: user terminal may be received the PADO bag of a plurality of servers, user terminal is by the content of PADO, from the service available BRAS server of beaming back the PADO bag, select one according to certain condition, and beam back a conversation request bag PADR (non-broadcasting) to it, in this bag, comprise once more the information of conceivable service.At present nearly all user terminal all is that the server of selecting to arrive at first sends the PADR request selecting server from the PADO message of receiving when.
The 4th step: chosen BRAS server just begins to prepare to enter the PPP session stage after receiving conversation request bag PADR.It can produce this section PPPOE session of a session identification with unique sign it and user terminal.And this specific session identification is included in session confirms to send back to user terminal among the bag PADS, if do not have the wrong PPP session stage that takes place just to enter into, and if user terminal is receiving there is not the wrong PPP session stage that takes place also to enter into after bag is confirmed in session.
At present, user terminal more for a long time on whole Ethernet, need provide PPPoE the server capability of access for user terminal by a plurality of BRAS servers, find in the stage negotiations process at PPPoE, if certain BRAS server is very fast to the response of user terminal, then in the 3rd step, all user terminals all can be preferentially authenticate to this server and surf the Net, it is bigger to cause some to respond faster on the server service traffics like this, produce congested or professional instability, and can not obtain utilizing some slower server resource free time of response.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of method, apparatus and system of sharing server traffic, and user terminal causes server congestion or professional problem of unstable all to responding server authentication faster on the Ethernet to solve.
The purpose of the embodiment of the invention is achieved through the following technical solutions:
The method of a kind of sharing server traffic of the embodiment of the invention, comprise the following steps: in the information of safeguarding the server that needs to insert load balancing on two layers of Ethernet on the access device, and maintenance customer's end message, and with user terminal and server binding, wherein said binding is used to represent the preferential PADO message that receives from the server of its binding of this user terminal; Described access device carries out matching judgment with the server info of the server info in the PADO message of receiving and purpose user terminal binding, and whether server is the server that the purpose user terminal needs in the PADO message of receiving with judgement; When described access device judges that server is the server of purpose user terminal needs in the PADO message of receiving, described PADO message is transmitted to described purpose user terminal, so that described purpose user terminal is to the server info corresponding server authentication of its binding; When described access device judges that server is not the server of purpose user terminal needs in the PADO message of receiving, abandon described PADO message, perhaps will send to described purpose user terminal behind the described PADO packet buffer.
The access device of the embodiment of the invention, described access device is provided with the binding relationship of user terminal and server, wherein, described binding relationship is used to represent the server of these user terminal needs, and the preferential PADO message that receives from the server of its binding of described user terminal; Described access device comprises: receiving element is used to receive the PADO message; Memory cell, the server info that user storage purpose user terminal needs; Processing unit, be used for the server info of described PADO message and the server info of purpose user terminal binding are carried out matching judgment, whether with server in the PADO message of determining to receive is the server that the purpose user terminal needs, and in described PADO message server be not the purpose user terminal need server the time, buffer memory or abandon described PADO message.
The system of the sharing server traffic of the embodiment of the invention comprises user terminal, access device and server; Described server is used to send the PADO message; Described access device is provided with the binding relationship of user terminal and server, described binding relationship is used to represent the server of these user terminal needs, and the preferential PADO message that receives from the server of its binding of described user terminal, described access device comprises: receiving element is used to receive described PADO message; Memory cell, the server info that user storage purpose user terminal needs; Processing unit, be used for the server info of described PADO message and the server info of described user terminal binding are carried out matching judgment, whether with server in the PADO message of determining to receive is the server that described user terminal needs, and in described PADO message server be described user terminal need server the time, described PADO message is transmitted to described user terminal, so that described user terminal is to the server info corresponding server authentication of its binding, and in described PADO message server be not described user terminal need server the time, buffer memory or abandon described PADO message.
The technical scheme that is provided by the invention described above embodiment as can be seen, the method of the embodiment of the invention is not changing current agreement and is not needing BRAS server end and user terminal to do under the situation of any particular arrangement, by judging at access device whether server is the server that the purpose user terminal needs in the PADO message of receiving, if the server that the purpose user terminal needs then is transmitted to described purpose user terminal with described PADO message; Server if not purpose user terminal needs, then access device abandons described PADO message, perhaps described purpose user terminal will be sent to behind the described PADO packet buffer, thereby make user terminal preferentially to given server, authenticate, realize the load balancing of server, solved at user terminal more, need be between different servers the problem of load balancing.
Embodiment
Below in conjunction with each accompanying drawing, the specific implementation process of the method for the sharing server traffic of the present invention that can realize These characteristics is explained in detail.
As shown in Figure 3, the schematic flow sheet of the method for a kind of sharing server traffic of providing of the embodiment of the invention.In the method, needing to safeguard the information of the server that needs to insert load balancing on these two layers of Ethernets on the access device, can be the information of BRAS MAC address of server (access control of Media Access Control medium), AC-NAME unique identification BRAS servers such as (Access Center Name access server names); Also need maintenance customer's end message in addition, as the information of identifying subscriber terminals such as the field information of user terminal access interface, user terminal MAC, pppoe plus or user terminal account number; With user terminal and server binding, represent that this user terminal preferentially receives the PADO (being the server of these user terminal needs) that comes on this binding server then.
S1, access device receive the PADO message of PPPoE.In the present embodiment, this PADO message is from the BRAS server.
S2, access device judge whether server is the server that the purpose user terminal needs in the described message, if the server that the purpose user terminal needs is then carried out S3; If not the server that the purpose user terminal needs, then carry out S4.
In the present embodiment, described access device judges whether server is that the server that the purpose user terminal needs comprises in the described message: the server info that access device is bound server in the described message and the purpose user terminal that is provided with in access device carries out matching judgment, if consistent, then server is the server that the purpose user terminal needs in the message; If inconsistent, then server is not the server that the purpose user terminal needs in the message.
S3, access device are transmitted to described purpose user terminal with described PADO message, carry out subsequent P PPoE and find the stage negotiations process.
S4, access device abandon described PADO message, perhaps will send to described purpose user terminal behind the described PADO packet buffer, carry out subsequent P PPoE and find the stage negotiations process.
Wherein said access device can be specifically according to configurations such as real network performances with the time of PADO packet buffer.
Shown in Figure 4, be another embodiment of the present invention, find in the stage negotiations process at PPPoE, with the access port identifier user terminal, the detailed process of this programme is described with AC-NAME sign BRAS server.
101, access device is monitored the PADO message from network side, and this PADO message is to find in the stage negotiations process at PPPoE, the PADO message of BRAS server response.
102, after access device is received the PADO message of BRAS server response, take out the purpose user terminal MAC in the message.
103, on this access device, search this purpose user terminal MAC user terminal port of study at present,, then carry out 104 if on this access device, do not find described purpose user terminal MAC; If on this access device, find described purpose user terminal MAC, then carry out 105.In the present embodiment, search corresponding port, show that this message should not be the message of a normal negotiations process less than purpose user terminal MAC.
104, other processing are broadcasted or done to message in the vlan inside of receiving.In the present embodiment, this inside broadcasting or other processing do not influence normal PPPoE negotiation flow process.
105, judge that whether described purpose user terminal MAC corresponding port is this access device user terminal side ports, if described corresponding port is not this access device user terminal side ports, then carries out 106; If described corresponding port is this equipment user end side port, then carry out 107.In the present embodiment, if described corresponding port is not this access device user terminal side ports, representing that then this PADO message is not the message to this access device access user terminal, may be the equipment that will arrive this access device cascade; If described corresponding port is this access device user terminal side ports, represent that then this PADO message is exactly the message that will go to this access device access user terminal.
106, will broadcast or be forwarded to corresponding port among the vlan at described PADO message place according to described purpose user terminal MAC.
107, the field that sign in the message is sent the BRAS server of this message is taken out.This is designated AC-NAME in the present embodiment.
108, judge in the BRAS server that sends this message whether be the server that the port needs, if the server that the port needs then carries out 109; If not the server that the port needs, then carry out 110.
In the present embodiment, the corresponding purpose user terminal of described the port, whether therefore described access device is judged in the BRAS server that sends this message is the server that the port needs, be that described access device judges in the BRAS server that sends this message whether be the server that the purpose user terminal needs, comprise: access device carries out matching judgment to the sign AC-NAME of the sign AC-NAME of BRAS server in the described message and the BRAS server of the purpose user terminal binding that is provided with in access device, if sign AC-NAME unanimity shows that then server is the server of purpose user terminal needs in the message; If AC-NAME is inconsistent for sign, show that then server is not the server of purpose user terminal needs in the message.
Be with AC-NAME sign BRAS server in the present embodiment, when concrete application is of the present invention, also can use the information of sign BRAS servers such as BRAS MAC address of server.
109, this PADO message is transmitted (be about to message and be transmitted to user terminal) to the port, user terminal is received the negotiations process that continues the PPPOE of back behind this PADO message.
110, judge whether buffer memory PADO message of the port, if the port buffer memory PADO message then carries out 111; If the port does not have buffer memory PADO message, then carry out 112.
111, with packet loss.
112, will send to described purpose user terminal behind the described PADO packet buffer, carry out subsequent P PPoE and find the stage negotiations process.
In the present embodiment, comprise sending to described purpose user terminal behind the described PADO packet buffer, to the port, to the port transmit behind the T time of delay with described message PADO packet buffer, and wherein access device can be according to configurations such as real network performances with the time T of packet buffer delay.
The technical scheme that is provided by the invention described above embodiment as can be seen, the method of the embodiment of the invention is not changing current agreement and is not needing BRAS server end and user terminal to do under the situation of any particular arrangement, by judging at access device whether server is the server that the purpose user terminal needs in the PADO message of receiving, if the server that the purpose user terminal needs then is transmitted to described purpose user terminal with described PADO message; Server if not purpose user terminal needs, then access device abandons described PADO message, perhaps described purpose user terminal will be sent to behind the described PADO packet buffer, thereby make user terminal preferentially to given server, authenticate, realize the load balancing of server, solved at user terminal more, need be between different servers the problem of load balancing.
The embodiment of the invention also provides a kind of system of sharing server traffic, comprises user terminal, access device and server.
Wherein access device comprises as shown in Figure 5: receiving element 501, processing unit 502 and memory cell 503.
Receiving element 501 is used to receive the PADO message.In the present embodiment, described PADO message comes from server.
Memory cell 503 is used for the server info of storage purpose user terminal needs.
Processing unit 502, when server in the described PADO message be not the purpose user terminal need server the time, buffer memory or abandon described PADO message.
In the present embodiment, the server info (MAC Address, AC-NAME etc.) that the purpose user terminal of storage needs in server and the memory cell 503 in 502 pairs of described messages of processing unit carries out matching judgment, if inconsistent, then being judged as server in the message is not the server that the purpose user terminal needs.
Concrete, processing unit 502 also is used for, and when server in the described PADO message is the server of purpose user terminal needs, sends described PADO message.
In the present embodiment, the server info (MAC Address, AC-NAME etc.) that the purpose user terminal of storage needs in server and the memory cell 503 in 502 pairs of described messages of processing unit carries out matching judgment, if consistent, be judged as then that server is the server that the purpose user terminal needs in the message.
The method of the sharing server traffic of the embodiment of the invention is to find on the basis of the existing defective of stage negotiations process and propose at the PPPoE that analyzes prior art, existing P PPoE finds that user terminal in the 3rd step of stage negotiations process is to select the server that arrives at first in the mechanism of selecting the server of authentication from the PADO message of receiving, if but certain BRAS server is very fast to the response of user terminal, then all user terminals all can be preferentially authenticate to this server and surf the Net, cause on this server service traffics bigger, produce congested or professional instability, the method of the embodiment of the invention is (to be the server that this user terminal needs by the binding relationship that user terminal and server are set on access device, this user terminal preferentially receives the PADO that comes on this binding server), compare by the server info of access device server info in the PADO message of receiving and the binding of purpose user terminal, when the server of determining this message of transmission is the server of purpose user terminal needs, preferentially the PADO message is transmitted to the purpose user terminal, and the user terminal in the present PPPOE mechanism of combination is always preferentially selected the mechanism of the server of response at first, make user terminal preferentially to given server, authenticate, realize the load balancing of server.
The method of the sharing server traffic of the embodiment of the invention is to find in the stage negotiations process at PPPoE, access device judges whether server is the server that the purpose user terminal needs in the PADO message of receiving, if the server that the purpose user terminal needs, then described PADO message is transmitted to described purpose user terminal, carries out subsequent P PPoE and find the stage negotiations process; If not the server that the purpose user terminal needs, then access device abandons described PADO message, perhaps will send to described purpose user terminal behind the described PADO packet buffer, carries out subsequent P PPoE and finds the stage negotiations process.
Described access device judges whether server is that the server that the purpose user terminal needs specifically refers in the PADO message of receiving, in advance the binding relationship that user terminal and server are set on the access device (being that this user terminal preferentially receives the PADO that comes on this binding server), access device carries out matching judgment to the server info of the server info in the PADO message of receiving and described purpose user terminal binding, and if consistent in the PADO message that expression is received server be the server that the purpose user terminal needs; If inconsistent in the PADO message received of expression server be not the server that the purpose user terminal needs.
Here it may be noted that the access device among the present invention not only comprises broadband access devices such as DSLAM, fiber access device, radio reception device or narrow band access equipment are suitable for the present invention equally.
In addition, the embodiment of the invention is that example is said with the PPPoE agreement only, but it will be recognized by those skilled in the art that the method for the invention is equally applicable to agreements such as PPPoA.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claims.