Disclosure of Invention
In order to solve the problems in the prior art, the invention provides an IPV6 Internet surfing IAPD self-adaption method and system.
The invention provides an IPV6 Internet surfing IAPD self-adaption method, which comprises the steps of requesting a default option with a prefix proxy by using a DHCPV 6-Solitit in a DHCPV6 dialing process, automatically judging whether a current environment supports the prefix proxy according to a DHCPV6 advertisement response of a server, and completing an IPV6 networking process by using preset configuration.
As a further improvement of the invention, the method comprises the following steps:
s1, a router starts IPV 6-DHCPV 6 dialing;
s2, actively sending a router advertisement RS (Router Solicitation), and after receiving a router request RA (Router Advertisemen), sending a DHCPV 6-Solict request, wherein the request carries a prefix agent option;
s3, the router receives the DHCPV6 advertisement response, judges whether the server supports the prefix proxy according to whether the response carries the prefix proxy option, if so, extracts and stores the prefix in the prefix proxy option, continues to complete the DHCPV6 process, starts the DHCP6S process by using the stored prefix, and if not, restarts the IPV 6-DHCPV 6 dialing process in a mode of not supporting the prefix proxy;
s4, distributing addresses for the clients through the DHCP 6S.
As a further improvement of the present invention, restarting the IPV 6-DHCPV 6 dialing process in a manner that does not support prefix brokering in step S3 includes: and sending the DHCPV 6-Solitit request again, wherein the request does not carry a prefix agent option, finishing the DHCPV6 process, and starting the DHCP6S process by using a default prefix preset by the system.
As a further improvement of the present invention, in step S3, if the server does not support a prefix proxy, the DHCP6C informs the application program through a message mechanism.
As a further improvement of the invention, the method also comprises the step S0, configuring the contact way of the router by the user, completing the networking process by adopting default lan side configuration and ending if the user is configured to be statically accessed, and entering the step S1 if the user is configured not to be statically accessed before the step S1.
As a further improvement of the present invention, in step S4, if the server supports prefix proxy, the client is assigned an address via DHCP6S and the NAT66 function is not started at this time.
As a further improvement of the present invention, in step S4, if the server does not support the prefix proxy, the address is allocated to the client through DHCP6S, and the normal surfing of the client is ensured by combining address conflict detection and NAT66 functions.
As a further improvement of the present invention, in step S3, when the router receives the DHCPV6 advertisement response, if the response times out, the current environment is considered to not support the prefix proxy.
The invention also provides an IPV6 Internet surfing IAPD self-adapting system, which comprises a readable storage medium, wherein the readable storage medium is stored with execution instructions, and the execution instructions are used for realizing the method according to any one of the above when being executed by a processor.
The beneficial effects of the invention are as follows: the user can complete the whole internet surfing operation of the ipv6 by only configuring one networking mode, and the router can automatically identify whether the current environment supports IAPD and select proper configuration to complete the whole dialing process, so that the usability of the product is greatly improved.
Detailed Description
It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other.
In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on the drawings, are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the scope of the present invention. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first", "a second", etc. may explicitly or implicitly include one or more such feature. In the description of the present invention, unless otherwise indicated, the meaning of "a plurality" is two or more.
In the description of the present invention, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art in a specific case.
The invention is further described with reference to the following description of the drawings and detailed description.
As shown in fig. 1 to 2, a method for adapting IPV6 internet surfing IAPD automatically identifies whether an IPV6 (Internet Protocol Version, internet protocol version 6) network supports a prefix proxy when a routing product uses IPV6 for surfing, and automatically selects an appropriate mode for networking.
The invention only needs to make minimum change on the basis of the original IPV6 internet surfing flow to achieve the IAPD self-adapting effect. The user uses more conveniently, and the networking mode is more nimble, and the commonality is stronger.
The core idea of the invention is that: in the dialing process of DHCPV6 and pppore+dhcpv 6, the first DHCPV6 Solicit requests a default with prefix proxy (Identity Association for Prefix Delegation, IAPD) option, then automatically judges whether the current environment supports prefix proxy or not according to the DHCPV6 advertisement response of the server, and completes the IPV6 networking process by using proper preset configuration.
DHCPv6 is a network protocol used to configure IP addresses, IP prefixes, and/or other configurations required by IPv6 hosts operating on an IPv6 network.
The self-adaptive method for IPV6 Internet surfing IAPD provided by the invention can automatically detect and judge whether the network supports the prefix agent and automatically select a proper mode for networking in order to facilitate the user to surf the Internet on the basis of the existing network without configuring other options when the IPV6 surfs the Internet.
The specific operation is shown in fig. 2 (taking DHCPV6 stateful scenario as an example):
1. simplifying the user configuration interface into: only networking modes such as 'IAPD adaptive supporting router configuration diagram' need to be configured;
2. after user configuration, if static access, the networking process is completed using the default lan side configuration. In addition to static access, the router automatically starts the dialing process with default support IAPD, with Identity Association for Prefix Delegation options in DHCPV6 solution.
3. When the DHCP6c process receives the DHCPV6 advertisement response, it will check if the response carries IAPD option, if so, extract and save the prefix, and then use this prefix to start DHCP6S to assign an address to the client, and at this time, the NAT66 function need not be started.
4. If the IAPD option is not included in the response, or the option replies that no prefix exists, or the response times out, the current environment is not considered to support the prefix agent. The dhcp6c will inform the application program via a messaging mechanism to redial in a manner that does not support IAPD. During the new dialing procedure, the dhcp6c request will not carry the IAPD option. After dhcpv6 interaction is completed, the router starts the DHCP6S using a default configuration preset by the system, and assigns an address to the client. And the normal surfing of the client is ensured by combining address conflict detection and NAT66 functions.
The self-adaptive method and system for IPV6 Internet surfing IAPD provided by the invention have the following advantages:
1. the user can complete the whole internet surfing operation of the ipv6 by only configuring one networking mode, and the router can automatically identify whether the current environment supports IAPD and select proper configuration to complete the whole dialing process, so that the usability of the product is greatly improved.
2. Under the condition that the networking mode is unchanged, the user does not need to care whether the IPV6 network environment is changed, and the router can automatically adapt to the network environment change. The router can be plug and play even if the network operator is replaced, so that the network maintenance cost is reduced.
The foregoing is a further detailed description of the invention in connection with the preferred embodiments, and it is not intended that the invention be limited to the specific embodiments described. It will be apparent to those skilled in the art that several simple deductions or substitutions may be made without departing from the spirit of the invention, and these should be considered to be within the scope of the invention.