A kind of broad band access method based on PPPoE
Technical field
The present invention relates to network communications technology field, relate in particular to a kind of broad band access method based on PPPoE (Point-to-Point Protocol over Ethernet, the peer-peer protocol on the Ethernet).
Background technology
More typical broadband user's access way is PPPoE and DHCP+Web (DynamicHost Configuration Protocol, DHCP) mode at present.
PPPoE is based on the peer-peer protocol of Ethernet, pppoe session comprises discovery stage and PPP (The Point-to-Point Protocol, peer-peer protocol) two stages of session stage, the discovery stage is stateless customer end/server mode, purpose is MAC Address (the Media Access Control that obtains the PPPoE terminating end, and set up a unique pppoe session sign medium access control system).The discovery stage just enters the PPP session stage after finishing.The PPP session stage mainly is the negotiations process of LCP (Link Control Protocol, LCP), authentication, three agreements of NCP (Network ControlProtocol, Network Control Protocol).Ppp protocol is the agreement of data link layer, provides a kind of mode of standard to transmit the data message of a plurality of network layer protocols on point-to-point link.
Adopt the advantage of PPP over Ethernet to be: have ripe subscriber management function, as authentication, note take, functions such as link detecting and maintenance.But because the point-to-point characteristic of PPPoE makes carrying out of metropolitan area network multicast service be subjected to great restriction.Especially, because PPPoE is to each IP (InternetProtocol, internet protocol) message all will be encapsulated in the PPPoE frame, therefore efficiency of transmission is not high, and the MTU (Maximum Transmission Unit, MTU) of common router or client is to set 1500 bytes for, therefore the payload of message just only is left 1492 bytes, when running into size and being the message of 1500 bytes, just must unpack, cause extra pressure to router and client.
The DHCP+Web access way has mainly solved the automatic configuration and the authentication question of client computer IP address.Its flow process is that the user starts shooting and by Dynamic Host Configuration Protocol server distributing IP address, local side apparatus is by forcing to be redirected to Web server to this IP address, and the user visits again the web login page and authenticates.
Adopt the advantage of DHCP+Web mode to be: stronger to the multicast tenability, there is not the low and problem of unpacking of efficiency of transmission of PPPoE.But as access technology, the DHCP agreement itself lacks subscriber management function: the functions such as collection, authentification of user and charging of user's online detection and session maintenance, user's online duration are definition and realization not.Though the DHCP+Web mode has solved authentification of user problem above-mentioned, require the user to obtain IP address, network access authentication more earlier, caused the waste of IP address, and the web authentication server is exposed fully for the user, easily by malicious attack, and makes whole network users to authenticate.In addition since web authentication need seven layer protocol supports, the network problem below four layers often detect less than.Must do detection at two layers as unusual off-line case such as outage, catastrophic failure, and Web feels simply helpless to this.Therefore web authentication user connectivity is poor, is not easy to detect user's off-line, and time-based charging is difficult to be realized.
Summary of the invention
Main purpose of the present invention is to provide a kind of broad band access method based on PPPoE, be mainly used in solve PPPoE insert do not support multicast, efficiency of transmission is low and effective leading subscriber and the IP address problem of wasting of a difficult problem of unpacking and DHCP+Web, satisfied the requirement of Virtual network operator to new business, be used to improve the operation management uniformity of multibusiness network, convenient multiple services the development.
For achieving the above object, technical scheme of the present invention is as follows:
A kind of broad band access method based on PPPoE, it is realized between pppoe client that connects by ethernet link and PPPoE server, it is characterized in that it may further comprise the steps:
A:PPPoE client and PPPoE server come negotiation data forwarding performance information by the session of finding the stage;
B: client and PPPoE server carry out data forwarding according to the data forwarding performance of consulting.
Described steps A further comprises:
The A1:PPPoE client at first initiatively sends broadcast packet PADI (PPPoE ActiveDiscovery Initiation, PPPoE initiatively find beginning) and seeks the PPPoE server, wherein, can comprise data forwarding performance information in this PADI bag;
The A2:PPPoE server is checked the service of client-requested after receiving the PADI bag, if the service of main frame requirement can be provided, then responds PADO of pppoe client (PPPoE Active Discovery Offer, PPPoE initiatively finds to provide) bag; Wherein, if the PPPoE server is supported the function that data forwarding performance is consulted, it can comprise data forwarding performance and other information that it is supported in the PADO bag, perhaps only comprise data forwarding performance and other information of the pppoe client request of its support, perhaps only comprise the out of Memory except data forwarding performance; If the PPPoE server is not supported the function that data forwarding performance is consulted, then ignore the data forwarding performance information in the PADI bag;
The A3:PPPoE client is selected a suitable servers in the PPPoE server of responding the PADO bag, and transmission PADR (PPPoE Active Discovery Request, PPPoE active discovery request) bag is informed the PPPoE server; Wherein, if pppoe client is supported the function that data forwarding performance is consulted, then check the data forwarding performance information in the PADO bag, if in the PADO bag data forwarding performance information of oneself supporting or asking is arranged, then in the PADR bag, comprise the data forwarding performance of oneself asking, if there is not the own data forwarding performance information of supporting or asking in the PADO bag, perhaps there is not data forwarding performance information in the PADO bag, then in the PADR bag, do not comprise data forwarding performance information, perhaps continue to comprise the data forwarding performance information of request; If pppoe client is not supported the data forwarding performance negotiation functionality, then ignore the data forwarding performance information in the PADO bag;
After the A4:PPPoE server is received the PADR bag, confirm whether to support the pppoe client requested service, if support, then begin to distribute a unique Session ID for the user, start the ppp state machine to prepare beginning PPP session, and send session and confirm bag PADS (PPPoE Active Discovery Session-confirmation, PPPoE initiatively find that session confirm) bag; Wherein, if server is supported the data forwarding performance of client-requested, the data forwarding performance that then comprises client-requested in the PADS bag, if do not support the data forwarding performance of client-requested, perhaps do not support the function that data forwarding performance is consulted, then in the PADS bag, do not comprise data forwarding performance information;
To A4, described step B is according to above-mentioned steps A1: pppoe client after receiving PADS bag, if the PPPoE server-assignment Session ID, then start the ppp state machine to prepare beginning PPP session; Wherein,
If the pppoe client request negotiation of data forwarding performance, then check the data forwarding performance information in the PADS bag, if in the PADS bag data forwarding performance information of oneself asking is arranged, then when carrying out data forwarding, use the data forwarding performance of consulting to transmit; If there is not own data forwarding performance information of asking in the PADS bag, perhaps client does not have the negotiation of request msg forwarding performance, then ignores the data forwarding performance information among the PADS, when carrying out data forwarding, using default data forwarding performance is PPP over Ethernet, transmits.
Described data forwarding performance information is to utilize the existing TAG of PPPoE to realize.
Described data forwarding performance information is that the TAG of expansion PPPoE realizes.
The data forwarding mode of described negotiation is the IPoE mode.
Among the described step B, when carrying out data forwarding, the PPPoE protocol massages uses the mode of PPPoE to transmit, and other data use the data forwarding performance of consulting to carry out data forwarding.
Described PPPoE protocol massages comprises: PPPoE finds the message of message, LCP, authentication protocol and Network Control Protocol.
By technique scheme, the present invention has realized following technique effect:
The present invention uses the PPPoE agreement to carry out user access control and management on control plane, on datum plane, use PPPoE or IPoE mode to carry out data forwarding, for the former, compatible existing P PPoE realizes, for the latter, the access that can guarantee the user is easy to management, and it is more efficient on data forwarding, support simultaneously multicast service effectively, solve the PPPoE access and do not supported multicast, low and the difficult problem of unpacking of efficiency of transmission has also solved the effectively problem of leading subscriber and IP address waste of DHCP+Web, has satisfied the requirement of Virtual network operator to new business, be used to improve the operation management uniformity of multibusiness network, convenient multiple services the development.
Description of drawings
Fig. 1 is the flow chart of the inventive method;
Fig. 2 is the network structure of facilities and equipments in the inventive method one specific embodiment;
Fig. 3 is the pppoe session flow chart of embodiments of the invention;
The TAG form of the expansion PPPoE that Fig. 4 is in the embodiments of the invention to be adopted.
Embodiment
The invention provides a kind of broad band access method based on PPPoE, see also Fig. 1, it is the step of this method:
The first step (S101): negotiation data forwarding performance information is come by the session of finding the stage in the PPPoE two ends;
Second step (S102): data forwarding is carried out according to the data forwarding performance of consulting in the PPPoE two ends.
Please consult Fig. 2,3 in conjunction with Fig. 1 again, we further introduce the inventive method by a specific embodiment:
As shown in Figure 2, it is the network structure of the equipment of this enforcement the inventive method.This PPPoE terminal (pppoe client) 10 is connected to access server (PPPoE server) 30 by Ethernet switch 20, and the network side of access server 30 is connected to Internet 40.Between PPPoE terminal 10 and Ethernet switch 20, the link between Ethernet switch 20 and access server 30 is an ethernet link.This PPPoE terminal 10 has pppoe feature, and Ethernet switch 20 has the bridges forward function, and access server 30 has PPPoE termination function.
By said apparatus, the concrete steps of this embodiment as shown in Figure 2, wherein step B1-B4 is the inventive method first step pppoe client and server come negotiation data forwarding performance information by the session of finding the stage a detailed process:
B1) pppoe client at first initiatively sends broadcast packet PADI and seeks the PPPoE server.Wherein, optionally, can comprise data forwarding performance information in the PADI bag;
B2) after the PPPoE server is received the PADI bag, check the service of client-requested,, then respond PADO bag of pppoe client if the service of main frame requirement can be provided.Wherein, if the PPPoE server is supported the function that data forwarding performance is consulted, optionally, it can comprise data forwarding performance and other information that it is supported in the PADO bag, perhaps only comprise data forwarding performance and other information of the client-requested of its support, perhaps only comprise the out of Memory except data forwarding performance; If the PPPoE server is not supported the function that data forwarding performance is consulted, then ignore the data forwarding performance information in the PADI bag;
B3) pppoe client is selected a suitable servers in the PPPoE server of responding the PADO bag, and transmission PADR bag is informed the PPPoE server.Wherein, if client is supported the function that data forwarding performance is consulted, then check the data forwarding performance information in the PADO bag, if in the PADO bag data forwarding performance information of oneself supporting or asking is arranged, then in the PADR bag, comprise the data forwarding performance of oneself asking, if there is not the own data forwarding performance information of supporting or asking in the PADO bag, perhaps there is not data forwarding performance information in the PADO bag, then in the PADR bag, do not comprise data forwarding performance information, perhaps continue to comprise the data forwarding performance information of request; If client is not supported the data forwarding performance negotiation functionality, then ignore the data forwarding performance information in the PADO bag;
B4) after the PPPoE server is received the PADR bag, confirm whether to support the service of client-requested,, then begin to distribute a unique Session ID for the user if support, start the ppp state machine with preparation beginning PPP session, and send a session affirmation bag PADS bag.Wherein, if server is supported the data forwarding performance of client-requested, the data forwarding performance that then comprises client-requested in the PADS bag, if do not support the data forwarding performance of client-requested, perhaps do not support the function that data forwarding performance is consulted, then in the PADS bag, do not comprise data forwarding performance information.
The PPPoE two ends comprise by the method for the session negotiation data forwarding performance information in discovery stage in the above-mentioned steps:
(1) utilize the existing TAG of PPPoE (label) to come negotiation data forwarding performance information.As: Service-Name and Vendor-Specific TAG.
(2) TAG of expansion PPPoE supports the negotiation of data forwarding performance information.
During PPPoE two ends negotiation data forwarding performances,, can ignore this TAG if any end of PPPoE is not supported data forwarding performance TAG.
In the present embodiment, adopt the mode of the TAG of expansion PPPoE, support the negotiation of data forwarding performance.The data forwarding performance TAG that PPPoE expands adopts the TAG definition format the same with PPPoE to define.The TAG definition format of this PPPoE as shown in Figure 4, among the figure:
The TAG_TYPE territory is 16 place values (network bytes prefaces), the type of expression TAG.
The TAG_LENGTH territory is 16, is no value of symbol (network bytes preface), shows the byte number of TAG_VALUE.
The data forwarding performance TAG of described expansion is described below:
This TAG is used for consulting described data forwarding mode information, and the TAG_TYPE value defined is 0x0112, also can be defined as other value, as long as guarantee that types value does not conflict just passable.TAG_VALUE length is 1 byte, expression data forwarding mode, and desirable value has: PPP over Ethernet and IPoE mode.
Data forwarding performance TAG is an option, and its default value is a PPP over Ethernet.If do not consult this option, then use PPP over Ethernet to transmit data, so just realize compatible mutually with existing P PPoE.
In the present embodiment, the data forwarding performance negotiation result at PPPoE two ends is: the data forwarding mode is the IPoE mode.
This embodiment second the step be:
Pppoe client after receiving PADS bag, if the PPPoE server-assignment Session ID, then start the ppp state machine to prepare beginning PPP session.Wherein, if client-requested the negotiation of data forwarding performance, then check the data forwarding performance information in the PADS bag, if own data forwarding performance information of asking is arranged in the PADS bag, then when carrying out data forwarding, use the data forwarding performance of consulting to transmit; If there is not the data forwarding performance information of own request in the PADS bag, perhaps client does not have the negotiation of request msg forwarding performance, then ignores the data forwarding performance information of PADS in wrapping, when carrying out data forwarding, use default data forwarding performance, promptly PPP over Ethernet is transmitted.
As shown in Figure 3, the PPPoE protocol massages still uses the mode of PPPoE to transmit in the present embodiment, and other data use the data forwarding performance of consulting to carry out data forwarding.The PPPoE protocol massages comprises: PPPoE finds the message of message, LCP, authentication protocol and Network Control Protocol.Therefore, negotiation result is: the PPPoE protocol massages uses the mode of PPPoE to transmit, and data message is transmitted in the IPoE mode.
Present embodiment uses the PPPoE agreement to carry out user access control and management on control plane by above-mentioned steps, uses PPPoE or IPoE mode to carry out data forwarding on datum plane.For the former, compatible existing P PPoE realizes, for the latter, can guarantee that user's access is easy to management, and also more efficient on data forwarding, support simultaneously multicast service effectively, solved PPPoE insert do not support multicast, efficiency of transmission is low and a difficult problem of unpacking, and has also solved effectively leading subscriber and the IP address problem of wasting of DHCP+Web, has satisfied the requirement of Virtual network operator to new business, be used to improve the operation management uniformity of multibusiness network, convenient multiple services the development.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.