Summary of the invention
The object of the present invention is to provide a kind of IPv6 stateless authentication method and device of configuration automatically, separateThe certainly IPv6 stateless ND access of configuration automatically, thereby owing to not having special option to start shootingThe problem of certification.
In order to solve the problems of the technologies described above, a kind of IPv6 stateless that the embodiment of the present invention provides configures automaticallyAuthentication method, be applied to access entity in, described authentication method comprises:
Obtain the router solicitation RS message that is inserted with access information option;
Utilize Neighbor Discovery agreement that described RS message is sent to Broadband Remote Access Server BRASEntity, is authenticated described RS message by described BRAS entity;
Receive the router advertisement RA message that described BRAS entity returns, wherein said RA message is carriedThere is the network parameter with IPv6 address prefix of described access information option and described BRAS entity partitioning.
Further, described access entity is the access device of first user terminal, correspondingly, described in obtainThe step that is inserted with the router solicitation RS message of access information option comprises:
Obtain and monitor the described RS message of described first user terminal;
The described first user terminal listening to and the access information of described access device corresponding ports;
Insert in described RS message the access information listening to as access information option.
Further, described network parameter also comprises: domain name service dns address, correspondingly, described in connectThe step of receiving the router advertisement RA message that described BRAS entity returns comprises:
Receive the described RA message that described BRAS entity returns, described in judging and comprising in described RA messageWhen access information option, delete described access information option;
According to the described IPv6 address prefix and the described dns address that distribute, send the described RA after deletingMessage is to described first user terminal.
Further, described access entity is while comprising the user terminal of described first user terminal, described in obtainThe step of getting the router solicitation RS message that is inserted with access information option comprises:
Obtain the RS message of described user terminal;
Directly insert described RS message using what construct in advance as access information option.
Further, described in, obtain the step being inserted with after the router solicitation RS message of access information optionSuddenly, also comprise:
The overtime timer that the time to returning to described RA message of obtaining is carried out timing.
Further, step when the described BRAS entity of described reception returns router advertisement RA messageAlso comprise:
If do not receive the described RA message of returning in described overtime timer Preset Time, recover ShenThe state of the described user terminal before please authenticating.
Further, the described Neighbor Discovery agreement of utilizing sends to broad band remote to connect described RS messageEnter server B RAS entity, the step described RS message being authenticated by described BRAS entity comprises:
Described access information option is configured to ND option, and described ND option is encapsulated into described RSIn message, and send described RS message and authenticate to described BRAS entity.
Further, the step that described BRAS entity authenticates comprises:
Receive described RS message, and parse described access information option;
According to described access information option, described access entity is authenticated, obtain authentication result;
Described authentication result for certification by time, distribute and encapsulate described network parameter and/or described accessInformation option, to described RA message, sends described RA message to described access entity.
Accordingly, in order to solve the problems of the technologies described above, the present invention also provides a kind of IPv6 stateless automatically to joinThe authenticate device of putting, is applied in access entity, and described authenticate device comprises:
The first acquisition module, for obtaining the router solicitation RS message that is inserted with access information option;
Sending module, for utilizing Neighbor Discovery agreement to send to broad band remote to connect described RS messageEnter server B RAS entity, by described BRAS entity, described RS message is authenticated;
Receiver module, the router advertisement RA message of returning for receiving described BRAS entity, Qi ZhongsuoThat states that RA message carries described access information option and described BRAS entity partitioning has an IPv6 addressThe network parameter of prefix.
Further, when described access entity is the access device of first user terminal, described first obtains mouldPiece comprises:
The first acquiring unit, for obtaining and monitor the described RS message of described first user terminal;
Second acquisition unit, for the described first user terminal and the described access device corresponding ports that listen toAccess information;
The first processing unit, for inserting described RS using the access information listening to as access information optionIn message.
Further, described network parameter also comprises: domain name service dns address, described receiver module bagDraw together:
The first Neighbor Discovery unit, the described RA message of returning for receiving described BRAS entity,Judge while comprising described access information option in described RA message, delete described access information option;
Transmitting element, for according to distribute described IPv6 address prefix and described dns address, transmission is deletedDescribed RA message after removing is to described first user terminal.
Further, described access entity is while comprising the user terminal of described first user terminal, describedOne acquisition module comprises:
The 3rd acquiring unit, for obtaining the RS message of described user terminal;
The second processing unit, for direct inserting described RS as access information option and disappear structure in advanceBreath.
Wherein said IPv6 stateless is the authenticate device of configuration automatically, also comprises:
The second acquisition module, carries out the overtime timing of timing for the time to returning to described RA message of obtainingDevice.
Wherein said IPv6 stateless is the authenticate device of configuration automatically, also comprises:
Processing module, if for not receiving the described RA returning in described overtime timer Preset TimeMessage, recovers the state of the described user terminal before application authentication.
Further, described sending module comprises:
The 2nd ND unit, for described access information option is configured to ND option, and by described NDOption is encapsulated in described RS message, and sends described RS message and authenticate to described BRAS entity.The beneficial effect of technique scheme of the present invention is as follows:
In the solution of the present invention, by sending to getting the RS message that is inserted with access information optionAfter BRAS entity authenticates, receive carrying that described BRAS entity returns and have before IPv6 addressThe RA message of the network parameter of sewing, completes certification and address assignment. Realize like this IPv6 of user terminalStateless configures certification automatically, solves described stateless and is automatically configured in the limitation in certification.
Detailed description of the invention
For making the technical problem to be solved in the present invention, technical scheme and advantage clearer, below in conjunction with attachedFigure and specific embodiment are described in detail.
The present invention is directed to the ND access that in prior art, Set Top Box IPv6 stateless configures automatically cannot start shootingThe problem of certification, the invention provides a kind of IPv6 stateless authentication method and device of configuration automatically, passes throughRS at the insertion access information option of access device repeating authenticates to BRAS entity, or usesFamily terminal is directly initiated stateless and is automatically configured, and sends and the RS message of the access information of insertion is issuedBRAS entity authenticates, and certification is by rear distribution address. The IPv6 that realizes like this user terminal is ill-manneredState configures certification automatically, solves described stateless and is automatically configured in the limitation in certification.
As shown in Figures 1 to 5, in the authentication method that the IPv6 stateless of the embodiment of the present invention configures automatically,Be applied in access entity, comprise:
Entity of the present invention comprises two entities (access entity and BRAS entity). Wherein access entity toolBody can be the access device (for example switch) of user terminal (for example Set Top Box) or user terminal.BRAS is broadband access Resource Management Point and the authentication points of user terminal, is responsible for network parameter and distributes and userThe certification of terminal.
Step 101, obtains the router solicitation RS message that is inserted with access information option;
Wherein said RS (abbreviation of Routersrequest, router solicitation) message.
Wherein said access information option refers to accessing position information option, if access device be switch justBe to monitor RS message, at which port receive to forward to be accessing position information, accessing position information is rawBecome option insert in RS message and forward. If access device is Set Top Box, each Set Top Box has differenceNumbering (the specifically Set Top Box at which or which family), needs typing in advance in numbering certificate server, pushes up at machineWhen box application, insert numbering in RS message, certificate server is relatively resolved the information of insertion and record in advanceThe difference entering, after certification is passed through, distributes address.
Step 102, utilizes Neighbor Discovery agreement that described RS message is sent to broad band remote access clothesBusiness device BRAS entity, is authenticated described RS message by described BRAS entity;
Wherein automatically configure by sending RS message initiation stateless.
Step 103, receives the router advertisement RA message that described BRAS entity returns, wherein saidRA message carries having before IPv6 address of described access information option and described BRAS entity partitioningThe network parameter of sewing.
Wherein said RA (abbreviation of RouterAdvertisement, router advertisement) message.
When wherein said ND (neighbours' discovery) agreement, a key protocol of IPv6, is some association of IPv4Upgrading and improvement that view integrates at IPv6, as the ARP (letter of AddressResolutionProtocolClaim address resolution protocol), ICMP (abbreviation of InternetControlMessageProtocol, InternetInternet Control Message Protocol) router find and ICMP redirected etc. ND agreement specifically comprises: prefix discovery,The unreachable monitoring of neighbours, the automatic configuration of repeat to address (RA) monitoring and address etc.
In ND message, comprise Option Field, can fill one or more option, carry out address such as working asAutomatically, while configuration, issue dns server address by ND option. ND has defined some standard option,Also the privately owned option of definable is expanded the function of ND as required, this shows that ND has wellAutgmentability.
RS message step 101 being got by step 102 sends to BRAS entity to carry out, by instituteState BRAS entity described RS message is authenticated, then step 103 is returned to the certification of BRAS entityAfter RA message, so just can carry access information, IPv6 stateless by the support of expansion ND optionAutomatically configuration can realize start certification, and solve described stateless and be automatically configured in the limitation in certification,The mode of plurality of distribution address is not only provided, and has facilitated configuration to use.
As shown in Figure 2, because access entity can be the access device of subscriber equipment, therefore the invention processIn the authentication method that the IPv6 stateless of example configures automatically, described access entity is connecing of first user terminalEnter equipment, correspondingly, step 101 comprises:
Step 201, obtains and monitors the described RS message of described first user terminal;
Step 202, the described first user terminal listening to and the access of described access device corresponding ports letterBreath;
Step 203, inserts in described RS message the access information listening to as access information option.
In the authentication method that the IPv6 stateless of another embodiment of the present invention configures automatically, described network ginsengNumber also comprises: domain name service dns address, and correspondingly, step 103 comprises:
Step 21, receives the described RA message that described BRAS entity returns, and judges described RA messageIn while comprising described access information option, delete described access information option;
Step 22, according to the described IPv6 address prefix and the described dns address that distribute, sends after deletionDescribed RA message to described first user terminal.
Wherein said network parameter includes but not limited to: IPv6 address prefix and domain name service dns address,Can also there be other network parameters.
In the time that access entity is the access device of first user terminal, monitor the RS forwarding by step 201Message, the port being connected with first user terminal by access device due to meeting receives or forwards, then logicalCross step 202 and step 203 in the time forwarding, after access information option is inserted in RS message, then willRS message sends to BRAS entity authentication, receives by step 21 recognizing that described BRAS entity returnsCard access RA message, deletes described access information option, and final step 22 is transmitted to RA message to instituteState first user terminal. Thereby carry access information by the support of expansion ND option, IPv6 stateless is automaticConfiguration can realize start certification, solves described stateless and is automatically configured in the limitation in certification, not onlyThe mode of plurality of distribution address is provided, and has facilitated configuration to use.
The interaction of concrete enforcement when as shown in Figure 3, concrete access entity of the present invention is access deviceSpecific as follows.
Step 301: starting up of terminal sends RS message while startup, application IPv6 address, the interface ID of terminalFor 221:97ff:fe85:9204.
Step 302: switch switch1 listens to RS message on port port5. By switchName and user terminal connect the port producing authentication information of switch, are specially " switch1:port5 ", certificationInformation structuring becomes ND option, is encapsulated in RS message. Switch forwards the RS message after encapsulation.
Step 303:BRAS receives RS message, parses authentication information, is specially " switch1:port5 ".BRAS is encapsulated into authentication information in authentication message, to send to certificate server.
Step 304: certificate server is received authentication message, parses authentication information. According to authentication information,Be specially switch1:port5 ", certificate server certification is passed through, and responds BRAS authentication success message.
Step 305:BRAS receives authentication success message, and distributing IP v6 address prefix, is specially 2001: :/64,Prefix and authentication information option are encapsulated in RA message and to terminal and are sent.
Step 306: switch listens to RA message is deleted authentication information option from RA message,Forward the RA message of deleting after authentication information option.
Step 307: user terminal is received RA message, parses prefix 2001: :/64, and according to user terminalInterface ID generate IPv6 address, the concrete IPv6 address generating is 2001::221:97ff:fe85:9204/64.
So far, after user terminal start certification, IPv6 address has been arrived in application. Only address for example of this deployment examplesApplication, the application of other network parameters is similar.
In the time that access entity is user terminal, therefore the IPv6 stateless of the embodiment of the present invention configures automaticallyIn authentication method, described access entity is while comprising the user terminal of described first user terminal, step 101Comprise:
Step 31, obtains the RS message of described user terminal;
Step 32, directly inserts described RS message using what construct in advance as access information option.
The access information wherein listening to and construct in advance access information and all refer to an access positional information.
Wherein said user terminal refers to the first user terminal being connected with access device, also can refer to independenceSubscriber equipment, also can refer to and without the subscriber equipment of access function equipment connection, insert access information choosingThe RS message of item can be both to send by the user terminal of isolated user terminal or connection access device,Also can be the access device transmission by connecting user terminal, according to user's option and installment in advance.
In the time that access entity is user terminal, because user terminal need to be asked application authentication, so correspondingNeed the message that judges request whether to have response, therefore the IPv6 stateless of the embodiment of the present invention configures automaticallyAuthentication method in, also comprise after step 101:
Step 41, the overtime timer that the time to returning to described RA message of obtaining is carried out timing.
Return to the timing of the time of RA message by overtime timer, determine whether application requestThere is response, improved like this accuracy of certification.
Concrete, in the authentication method that the IPv6 stateless of another embodiment of the present invention configures automatically, holdWhen row step 103, also comprise:
Step 51, if be to receive the described RA message of returning in described overtime timer Preset Time,Recover the state of the described user terminal before application authentication.
If receive RA message being greater than Preset Time length, also think invalid message, discard processing.
Wherein said Preset Time can obtain according to many experiments, and also user sets according to demand,The time span of any guarantee data validity all belongs to protection scope of the present invention.
Concrete, in the authentication method that the IPv6 stateless of another embodiment of the present invention configures automatically, stepRapid 103 comprise:
Step 61, is configured to ND option by described access information option, and by described ND option encapsulationIn described RS message, and send described RS message and authenticate to described BRAS entity.
Wherein access information is inserted in the ND option of expansion, send RS message and carry out to BRAS entityCertification, configures start certification automatically thereby can realize IPv6 stateless, solves described stateless automaticBe configured in the limitation in certification, the mode of plurality of distribution address is not only provided, and facilitated configuration to makeWith.
As shown in Figure 4, concrete, the IPv6 stateless of another embodiment of the present invention is recognizing of configuration automaticallyIn card method, the step that described BRAS entity authenticates comprises:
Step 401, receives described RS message, and parses described access information option;
The implementor name that wherein access information can be specially switch adds interface name, if user opens accessService, the name that operator's switch that typing user terminal accesses on certificate server is corresponding and accessPort. When typing on the authentication information certificate server that certificate server is received, certification is passed through, otherwiseCertification is not passed through.
Step 402, authenticates described access entity according to described access information option, obtains certification knotReally;
Step 403, described authentication result for certification by time, distribute and encapsulate described network parameter and/Or described access information option is to described RA message, sends described RA message to described access entity.
To user end certification, if authentication information is kept at this locality, can authenticate this locality; Also can beAuthentication information sends to special certificate server (as RADIUS (RemoteAuthenticationDialInThe abbreviation of UserService, remote customer dialing authentication system) server) go to authenticate.
In the time that described authentication result is authentification failure, mourns in silence and do not process.
As shown in Figure 5, the access entity of the embodiment of the present invention sends certification to BRAS entity, and passes throughThe handling process that BRAS entity authentication passes through is exemplified below.
Step 501, while accessing entity as terminal, sends RS message initiation stateless and automatically configures and obtainNetwork parameter inserts access information option in RS, opens and obtains network parameter overtime timer; OrAccess entity, as access device, is monitored the RS message forwarding, and inserts access information option.
Step 502, BRAS entity receives RS message, parses access information option, according to accessInformation option authenticates.
Step 503, BRAS entity is authenticated and passes through user by access information option, distributing IP v6 addressPrefix and other network parameters, be encapsulated in RA message, and RA message is sent to user.
Step 504, access entity is monitored RA message. Access entity, as terminal, parses IPv6 addressPrefix and other network parameters, apply these network parameters, and delete and obtain network parameter overtime timer;Or access entity is deleted the access information option in RA message as access device, and forward processAfter RA message.
Accordingly, in order to solve the problems of the technologies described above, as shown in Figure 6, the embodiment of the present invention provides a kind of IPv6Stateless is the authenticate device of configuration automatically, is applied in access entity, comprising:
The first acquisition module 601, for obtaining the router solicitation RS message that is inserted with access information option;Sending module 602, for utilizing Neighbor Discovery agreement to send to broad band remote to connect described RS messageEnter server B RAS entity, by described BRAS entity, described RS message is authenticated;
Receiver module 603, the router advertisement RA message of returning for receiving described BRAS entity, itsDescribed in RA message carry the IPv6 that has of described access information option and described BRAS entity partitioningThe network parameter of address prefix.
The RS message the first acquisition module 601 being got by sending module 602 sends to BRAS realBody is carried out, and by described BRAS entity, described RS message is authenticated, and then receiver module 603 returnsRA message after the certification of BRAS entity, so just can carry access by the support of expansion ND optionInformation, the automatic configuration of IPv6 stateless can realize start certification, solves described stateless and automatically configuresLimitation in certification, not only provides the mode of plurality of distribution address, and has facilitated configuration to use.
In the authenticate device that the IPv6 stateless of another embodiment of the present invention configures automatically, described access is realWhen body is the access device of first user terminal, described the first acquisition module 601 comprises:
The first acquiring unit, for obtaining and monitor the described RS message of described first user terminal;
Second acquisition unit, for the described first user terminal and the described access device corresponding ports that listen toAccess information;
The first processing unit, for inserting described RS using the access information listening to as access information optionIn message.
In the authenticate device that the IPv6 stateless of another embodiment of the present invention configures automatically, described network ginsengNumber also comprises: domain name service dns address, and described receiver module 603 comprises:
The first Neighbor Discovery unit, the described RA message of returning for receiving described BRAS entity,Judge while comprising described access information option in described RA message, delete described access information option;
Transmitting element, for according to distribute described IPv6 address prefix and described dns address, transmission is deletedDescribed RA message after removing is to described first user terminal.
In the authenticate device that the IPv6 stateless of another embodiment of the present invention configures automatically, described access is realBody is while comprising the user terminal of described first user terminal, and described the first acquisition module comprises:
The 3rd acquiring unit, for obtaining the RS message of described user terminal;
The second processing unit, for direct inserting described RS as access information option and disappear structure in advanceBreath.
The IPv6 stateless of another embodiment of the present invention is the authenticate device of configuration automatically, also comprises:
The second acquisition module, carries out the overtime timing of timing for the time to returning to described RA message of obtainingDevice.
The IPv6 stateless of the another embodiment of the present invention automatically authenticate device of configuration also comprises:
Processing module, if for not receiving the described RA returning in described overtime timer Preset TimeMessage, recovers the state of the described user terminal before application authentication.
In the authenticate device that the IPv6 stateless of another embodiment of the present invention configures automatically, described transmission mouldPiece 602 comprises:
The 2nd ND unit, for described access information option is configured to ND option, and by described NDOption is encapsulated in described RS message, and sends described RS message and authenticate to described BRAS entity.As shown in Figure 7, a ND unit of the present invention and the 2nd ND unit can be same access entitiesND unit, and access entity 701 comprises access information administrative unit and ND unit; BRAS entity 702Comprise the ND unit of authentication unit and BRAS entity.
The access information of described authentication information managing Single Component Management access entity 701, described authentication informationCan configure in the following manner, include but not limited to: human configuration authentication information is also saved in storage;Uniqueness information (as MAC (abbreviation of MediaAccessControl)) by certification entity generatesAuthentication information.
The authentication unit effect of described BRAS is to user end certification, if authentication information is kept atThis locality, authentication unit can be carried out this locality; Also can authentication information send to special certificate server (asRADIUS (abbreviation of RemoteAuthenticationDialInUserService, recognize by remote customer dialingCard system) server) go to authenticate.
As shown in Figure 8, the interaction flow between each unit when the concrete authentication success of the present invention for example asUnder.
Step 801: if access entity 701 is access devices of user terminal, the ND of access entity is mono-Unit listens to the RS message of forwarding; If access entity 701 is user terminals, the ND of access entity is mono-Unit initiates stateless and automatically configures and obtain network parameter, and network parameter overtime timer is obtained in startup.
Step 802: the ND unit of access entity authenticates to authentication information managing unit requests.
Step 803: the ND unit of authentication information managing unit notice access entity accesses entity 701Authentication information.
Step 804: the ND unit of access entity is configured to authentication information the authentication information choosing of ND messageItem is encapsulated in RS message, and RS message is sent to BRAS entity 702.
The access information of described authentication information managing Single Component Management access entity, described authentication information is passableConfiguration, includes but not limited to: human configuration authentication information is also saved in storage in the following manner; Pass throughUniqueness information (as the MAC) producing authentication information of certification entity.
Thereby ND agreement has good autgmentability by the option information of expansion ND, described certification letterBreath option is realized by the option of expansion ND message.
RS message is received in the ND unit of step 805:BRAS entity, parses authentication information, andAuthentication information notification authentication unit.
The authentication unit user end certification of step 806:BRAS entity 702 by and notify BRAS realThe ND unit of body.
Step 807: after user end certification passes through, the ND unit of BRAS entity obtains network parameter envelopeInstall in the response message RA message of RS message, and send it back user terminal.
Wherein said user terminal refers to the first user terminal of access device, independently user terminal or itsHe with without the user terminal of access function equipment connection.
Step 808: the ND unit of access entity receives RA message. If access entity 701 is to useThe access device of family terminal, checks in RA message whether comprise authentication information option, if comprised,Authentication information option is deleted. If access entity 701 is user terminals, resolves RA message and obtain netNetwork message application, cancel and obtain network parameter overtime timer.
As shown in Figure 9, the each list when authentification failure between each unit when the concrete authentication success of the present inventionInteraction flow between unit is exemplified below.
Step 901: if access entity 701 is access devices of user terminal, the ND of access entity is mono-Unit listens to the RS message of forwarding; If access entity 701 is user terminals, the ND of access entity is mono-Unit initiates stateless and automatically configures and obtain network parameter, and network parameter overtime timer is obtained in startup.
Step 902: the ND unit of access entity authenticates to authentication information managing unit requests.
Step 903: the ND unit of authentication information managing unit notice access entity accesses entity 701Authentication information.
The access information of described authentication information managing Single Component Management access entity, described authentication information is passableConfiguration, includes but not limited to: human configuration authentication information is also saved in storage in the following manner; Pass throughUniqueness information (as the MAC) producing authentication information of certification entity.
Step 904: the ND unit of access entity is configured to authentication information the authentication information choosing of ND messageItem is encapsulated in RS message, and RS message is sent to BRAS entity 702.
Thereby ND agreement has good autgmentability by the option information of expansion ND, described certification letterBreath option is realized by the option of expansion ND message.
RS message is received in the ND unit of step 905:BRAS entity, parses authentication information, andAuthentication information notification authentication unit.
The authentication unit user end certification failure of step 906:BRAS entity 702, and notify BRASThe ND unit of entity. Mourning in silence in the ND unit of BRAS entity, does not send the RA message of response.
Step 907: if access entity 701 is access devices of user terminal, the ND of access entity is mono-Unit is left intact. If access entity 701 is user terminals, when obtaining network parameter timer expiry,Application IPv6 address prefix and the failure of other network address, return to the front state of application user terminal.
Wherein said user terminal refers to the first user terminal of access device, independently user terminal or itsHe with without the user terminal of access function equipment connection.
As shown in figure 10, terminal connects the switch of operator's Access Network, and terminal is by ND protocol configurationIPv6 address prefix. Switch is that access entity 701 carries out insertion and the deletion of authentication information option. FortuneBRAS in battalion's business network is terminal distribution IPv6 address prefix by ND agreement, distribute address itBefore, authenticate to the certificate server of operator according to authentication information option.
It should be noted that, device provided by the invention is application above-mentioned IP v6 stateless recognizing of configuration automaticallyThe device of card method, all embodiment of the authentication method that above-mentioned IP v6 stateless configures automatically are all suitable forIn this device, and all can reach same or analogous beneficial effect.
The above is the preferred embodiment of the present invention, it should be pointed out that the common skill for the artArt personnel, not departing under the prerequisite of principle of the present invention, can also make some improvements and modifications,These improvements and modifications also should be considered as protection scope of the present invention.