CN112272244B - Router WAN end IPv6 internet mode configuration method and device - Google Patents

Router WAN end IPv6 internet mode configuration method and device Download PDF

Info

Publication number
CN112272244B
CN112272244B CN202011142211.0A CN202011142211A CN112272244B CN 112272244 B CN112272244 B CN 112272244B CN 202011142211 A CN202011142211 A CN 202011142211A CN 112272244 B CN112272244 B CN 112272244B
Authority
CN
China
Prior art keywords
router
mode
ipv6
address
ipv6 network
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.)
Active
Application number
CN202011142211.0A
Other languages
Chinese (zh)
Other versions
CN112272244A (en
Inventor
林业
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ziroom Information Technology Co Ltd
Original Assignee
Beijing Ziroom Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Ziroom Information Technology Co Ltd filed Critical Beijing Ziroom Information Technology Co Ltd
Priority to CN202011142211.0A priority Critical patent/CN112272244B/en
Publication of CN112272244A publication Critical patent/CN112272244A/en
Application granted granted Critical
Publication of CN112272244B publication Critical patent/CN112272244B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/659Internet protocol version 6 [IPv6] addresses

Abstract

The embodiment of the invention provides a method and a device for configuring an IPv6 internet mode of a WAN end of a router, which are applied to the router, wherein the method comprises the following steps: acquiring the IPv6 network requirements of a user; sending a DHCPv6Solicit request message to a preset request end, and receiving a DHCPv6 advertisement response message fed back by the preset request end; and determining the IPv6 internet access mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message and the IPv6 network requirement. By implementing the invention, the user can complete the configuration of the IPv6 internet mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message only by setting the IPv6 network requirement, and the manual configuration of the user is not needed, thereby realizing the automatic configuration of the internet mode, improving the network configuration efficiency and enhancing the internet use experience of the user.

Description

Router WAN end IPv6 internet mode configuration method and device
Technical Field
The invention relates to the technical field of communication, in particular to a method and a device for configuring an IPv6 internet surfing mode of a WAN (wide area network) end of a router.
Background
With the wider and wider use of the new generation IP protocol IPv6, the intelligent routers of various large manufacturers are also beginning to support the IPv6 protocol in succession.
The existing IPv6 internet access modes include various internet access modes such as DHCPv6, 6to4, pass Through, NAT6, PPPoEv6 and STATICv 6. In the prior art, due to the particularity of the IPv6 protocol, when a user needs to use a network service, the user needs to manually configure the internet access mode of the WAN end of the router, that is, manually select one of the multiple internet access modes, the manual internet access mode configuration has a high requirement on the user, and the user needs to know the characteristics and applicable conditions of each internet access mode to accurately select an available internet access mode. For a common user, if the characteristics and the applicable conditions of each internet mode of the IPv6 protocol are not known, then only various internet modes can be selected in sequence, whether the attempt is available or not is determined, and if the currently selected internet mode is unavailable, the current internet mode is switched to another mode to try again until the available mode is found, which affects the internet experience of the user.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for configuring an IPv6 internet access mode at a WAN end of a router, so as to overcome the problem in the prior art that the efficiency of manually configuring the internet access mode at the WAN end is low, which affects the internet access experience of a user.
The embodiment of the invention provides a router WAN end IPv6 internet mode configuration method, which is applied to a router and comprises the following steps:
acquiring IPv6 network requirements of a user;
sending a DHCPv6Solicit request message to a preset request end, and receiving a DHCPv6 advertisement response message fed back by the preset request end;
and determining the IPv6 internet surfing mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message and the IPv6 network requirement.
Optionally, the IPv6 internet access mode includes: the method for determining the router WAN end IPv6 internet access mode according to the content of the DHCPv6 advertisement response message and the IPv6 network requirement includes:
acquiring address parameter information in the DHCPv6 advertisement response message;
judging whether the WAN end of the router is allocated with an address or not and whether the LAN end of the router is allocated with an address prefix or not according to the address parameter information;
and when the WAN end of the router is allocated with an address and the LAN end is allocated with an address prefix, determining that the Internet access mode is a DHCPv6 mode.
Optionally, when an address is allocated to the WAN end of the router and an address prefix is not allocated to the LAN end, determining whether the router needs an IPv6 network according to the IPv6 network requirement;
and if the IPv6 network requirement is that the router needs an IPv6 network, determining that the Internet access mode is an NAT6 mode.
Optionally, if the IPv6 network requirement indicates that the router does not need an IPv6 network, determining that the internet access mode is a Pass through mode.
Optionally, when the WAN side of the router does not allocate an address, the method further includes:
sending a router request message to a preset request end, and receiving a router response message fed back by the preset request end;
judging whether the router response message contains address prefix information or not;
when the router response message contains address prefix information, judging whether an address prefix is distributed to the LAN end of the router;
and when the LAN end of the router is distributed with an address prefix, determining that the Internet access mode is a DHCPv6 mode.
Optionally, when the LAN end of the router does not allocate an address prefix, returning to the step of determining whether the router needs an IPv6 network according to the IPv6 network requirement.
Optionally, when the router response packet does not include address prefix information, it is determined that the internet access mode is a 6to4 mode.
The embodiment of the invention also provides a router WAN end IPv6 internet mode configuration device, which is applied to the router and comprises:
the acquisition module is used for acquiring the IPv6 network requirement of the user;
the message sending module is used for sending a DHCPv6Solicit request message to a preset request end and receiving a DHCPv6 advertisement response message fed back by the preset request end;
and the internet mode configuration module is used for determining the IPv6 internet mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message and the IPv6 network requirement.
An embodiment of the present invention further provides an electronic device, including: the device comprises a memory and a processor, wherein the memory and the processor are connected with each other in a communication mode, the memory stores computer instructions, and the processor executes the computer instructions so as to execute the method provided by the embodiment of the invention.
The embodiment of the invention also provides a computer-readable storage medium, which stores computer instructions for enabling a computer to execute the method provided by the embodiment of the invention.
The technical scheme of the invention has the following advantages:
the embodiment of the invention provides a method and a device for configuring an IPv6 internet access mode of a WAN (Wide area network) end of a router, which are used for acquiring the IPv6 network requirement of a user; sending a DHCPv6Solicit request message to a preset request end, and receiving a DHCPv6 advertisement response message fed back by the preset request end; and determining the IPv6 internet surfing mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message and the IPv6 network requirement. Therefore, the user can complete the configuration of the IPv6 internet mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message only by setting the IPv6 network requirement, the manual configuration of the user is not needed, the automatic configuration of the internet mode is realized, the network configuration efficiency is improved, and the internet use experience of the user is enhanced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of an IPv6 internet access mode configuration method at a WAN end of a router in an embodiment of the present invention;
fig. 2 is a schematic diagram of a specific application example of the router WAN end IPv6 internet access mode configuration method in the embodiment of the present invention;
fig. 3 is a schematic structural diagram of an IPv6 internet access mode configuration apparatus at a WAN end of a router in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical features mentioned in the different embodiments of the invention described below can be combined with each other as long as they do not conflict with each other.
With the wider and wider use of the new generation IP protocol IPv6, the intelligent routers of various large manufacturers are also beginning to support the IPv6 protocol in succession.
The existing IPv6 internet access modes include various internet access modes such as DHCPv6, 6to4, pass Through, NAT6, PPPoEv6 and STATICv 6. In the prior art, due to the particularity of the IPv6 protocol, when a user needs to use a network service, the user needs to manually configure the internet access mode of the WAN end of the router, that is, manually select one of the multiple internet access modes, the manual internet access mode configuration has a high requirement on the user, and the user needs to know the characteristics and applicable conditions of each internet access mode to accurately select an available internet access mode. For a common user, if the characteristics and the applicable conditions of each internet mode of the IPv6 protocol are not known, various internet modes can only be selected in sequence, whether the internet modes are available or not is tried, and if the currently selected internet mode is unavailable, the mode is switched to another mode to try again until the available mode is found, so that the internet experience of the user is influenced.
First, a simple introduction is made to the IPv6 internet access mode according to the embodiment of the present invention.
DHCPv6 mode: IPv6 addresses may be dynamically configured for routers.
6to4 mode: is to encapsulate the IPv6 packet into an IPv4 packet (6 over4 tunneling). 6to4 is an automatic tunnel construction method, which has the advantage that only one globally unique IPv4 address is needed to enable the whole site to obtain IPv6 connection.
NAT6 mode: like an IPv4 network, both the router and the following sub-devices have IPv6 addresses but belong to the intranet.
Pass through mode: in the penetration mode, the router does not have an IPv6 address, but the sub-equipment below the router has the IPv6 address; the child device does not allocate IPv6 through the router, but allocates IPv6 addresses directly from the upper level of the router.
Based on the above problem, an embodiment of the present invention provides a method for configuring an IPv6 internet access mode at a WAN end of a router, where as shown in fig. 1, the method specifically includes the following steps:
step S101: and acquiring the IPv6 network requirement of the user. Specifically, the IPv6 network requirement is set by the user, and is specifically divided into two types, namely a router requiring no IPv6 network and a router requiring an IPv6 network.
Step S102: sending a DHCPv6Solicit request message to a preset request end, and receiving a DHCPv6 advertisement response message fed back by the preset request end. Specifically, the preset request end may be set according to an actual connection condition of the current router, may be an upper-level router connected thereto, or may be a corresponding server, and the present invention is not limited thereto.
Step S103: and determining the IPv6 internet surfing mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message and the IPv6 network requirement. In the embodiment of the present invention, the IPv6 internet access mode includes: DHCPv6 internet mode, 6to4 internet mode, pass Through internet mode and NAT6 internet mode. It should be noted that, for the other internet access modes of IPv6, such as PPPOEv6 and STATICv6 internet access modes, since the specific attribute of the user needs to be input, automatic configuration cannot be implemented, and therefore, the automatic configuration is not considered in the embodiment of the present invention.
Specifically, in an embodiment, the step S103 includes the following steps:
step S301: and acquiring address parameter information in the DHCPv6 advertisement response message. Specifically, the address parameter information in the DHCPv6 advertisement response message is denoted as IA (identity association, IA for short).
Step S302: and judging whether the WAN end of the router is allocated with an address or not and whether the LAN end of the router is allocated with an address prefix or not according to the address parameter information. Specifically, the message represents the address parameter information in the form of IA _ NA and IA _ PD, wherein IA _ NA (Identity association for non-temporal addresses, abbreviated as IA _ NA) represents that a non-temporary address is allocated in IA; IA _ PD (Identity Association for Prefix deletion, abbreviated as IA _ PD) indicates that an address Prefix is allocated in IA. Because the address parameter information conditions required by different internet access modes are different, the internet access mode can be judged by judging whether the response message has IA _ NA and IA _ PD.
Step S303: and when the WAN end of the router is allocated with an address and the LAN end is allocated with an address prefix, determining that the Internet access mode is the DHCPv6 mode. In practical application, if the response message has IA _ NA and IA _ PD, it indicates that both WAN port and LAN port have IPv6 address, so the IPv6 Internet mode can select DHCPv6 mode.
Specifically, in an embodiment, the step S103 further includes the following steps:
step S304: and when the WAN end of the router is allocated with the address and the LAN end is not allocated with the address prefix, judging whether the router needs the IPv6 network or not according to the IPv6 network requirement.
Step S305: and if the IPv6 network needs the router to need the IPv6 network, determining that the internet access mode is the NAT6 mode.
Step S306: and if the IPv6 network requirement is that the router does not need the IPv6 network, determining that the internet access mode is a Pass through mode.
In practical application, if the response message has an IA _ NA but not an IA _ PD, it indicates that the WAN port has an IPv6 address and the LAN port does not have an IPv6 address, and at this time, it is determined that the router itself needs an IPv6 network. If the router needs an IPv6 network, the Internet access mode of the IPv6 selects an NAT6 mode; if the router does not need the IPv6 network, the Internet mode of the IPv6 selects a Pass through mode Internet mode.
Specifically, in an embodiment, when the WAN side of the router does not assign an address, the method further includes the following steps:
step S104: and sending a router request message to a preset request end, and receiving a router response message fed back by the preset request end. Specifically, because the router response message includes information of the WAN end address prefix, if the internet access mode cannot be obtained through the above steps, the router response message may be further utilized to select the internet access mode. The Router message (Router Solicitation, RS for short), the Router reply message (Router Advertisement, RA for short), the address prefix information in the Router reply message is represented by an Autonomous flag, a for short, a, if the bit value corresponding to a is 0, it indicates that the WAN end does not receive the address prefix, and if the bit value corresponding to a is 1, it indicates that the WAN end receives the address prefix.
Step S105: and judging whether the router response message contains address prefix information.
Step S106: and when the router response message contains the address prefix information, judging whether the LAN end of the router is allocated with the address prefix. When the LAN side of the router does not assign an address prefix, the above step S304 is performed.
Step S107: and when the LAN end of the router is distributed with the address prefix, determining that the Internet access mode is the DHCPv6 mode. Specifically, if the DHCPv6 response message has IA _ PD, it indicates that the RA message obtains the address prefix of the WAN end, and the DHCPv6 response message obtains the address prefix of the LAN end, and at this time, the IPv6 internet access mode selects the DHCPv6 mode.
Step S108: and when the router response message does not contain the address prefix information, determining that the internet access mode is a 6to4 mode. Specifically, if it is determined that the a bit in the RA message is 0, it indicates that the WAN end does not receive the address prefix, and at this time, the DHCPv6 and the RS message do not obtain the address of the WAN end, so the IPv6 internet mode can only select the 6to4 mode.
The following describes in detail the method for configuring the IPv6 internet access mode of the WAN end of the router according to the embodiment of the present invention, with reference to a specific application example. The specific implementation is shown in fig. 2.
1. The user first selects an IPv6 automatic configuration mode and selects whether the router itself needs an IPv6 network or whether only the device connected to the router can use the IPv6 network (i.e., the user selects the IPv6 network need).
2. The router sends a DHCPv6Solicit message request, receives a DHCPv6 advertisement response message, and judges whether the response message has IA _ NA and IA _ PD.
3. If the answer message has IA _ NA and IA _ PD in step 2, it shows that both WAN port and LAN port have IPv6 address, so the IPv6 network mode can select DHCPv6 mode.
4. If the answer message has IA _ NA without IA _ PD in step 2, it shows that the WAN port has IPv6 address and the LAN port has no IPv6 address, at this time, it is determined that the router itself needs IPv6 network.
5. If the IPv6 network selected by the user in the step 4 is required to be the IPv6 network required by the router, the NAT6 mode is selected by the Internet access mode of the IPv 6; if the router does not need the IPv6 network, the Pass through mode Internet mode is selected for the Internet mode of the IPv 6.
6. When the situations are not met, the Router sends a Router request RS (Router Solicitation) message, receives a Router response RA (Router Advertisement) message and judges whether an A bit in the RA message is 1 or not.
7. If the A bit in the RA message is judged to be 0 in the step 6, which indicates that the WAN end does not receive the address prefix, at this time, the DHCPv6 and the RS message do not obtain the address of the WAN end, so that the IPv6 internet mode can only select the 6to4 mode.
8. If the A bit in the RA message is judged to be 1 in the step 6, the WAN end receives the address prefix, and at the moment, whether the DHCPv6 response message has an IA _ PD is judged.
9. If the DHCPv6 response message is judged to have IA _ PD in step 8, it is indicated that the RA message obtains the address prefix of the WAN end, the DHCPv6 response message obtains the address prefix of the LAN end, and the IPv6 internet mode selects the DHCPv6 mode at this time.
10. If the DHCPv6 response message does not have IA _ PD in step 8, it indicates that the RA message obtains the address prefix of the WAN end, but the DHCPv6 response message does not obtain the address prefix of the LAN end, and at this time, the WAN port has an IPv6 address and the LAN port does not have an IPv6 address, and at this time, it determines that the router itself needs an IPv6 network.
11. If the IPv6 network selected by the user requires that the router needs the IPv6 network, the Internet access mode of the IPv6 selects the NAT6 mode; if the router does not need the IPv6 network, the internet mode of the IPv6 selects a Pass through mode internet mode.
12. The user can connect the IPv6 network through the automatically configured Internet access mode.
Through the process, the method for configuring-free WAN end IPv6 internet access mode is realized, the support condition of the current Internet to IPv6 is automatically detected by using DHCPv6 and ICMPv6 protocols, the most appropriate internet access mode is selected, and the complexity of the user for setting IPv6 is greatly reduced.
By executing the steps, the method for configuring the IPv6 internet access mode of the WAN end of the router provided by the embodiment of the invention acquires the IPv6 network requirements of the user; sending a DHCPv6Solicit request message to a preset request end, and receiving a DHCPv6 advertisement response message fed back by the preset request end; and determining the IPv6 internet access mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message and the IPv6 network requirement. Therefore, the user can complete the configuration of the IPv6 internet mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message only by setting the IPv6 network requirement, the manual configuration of the user is not needed, the automatic configuration of the internet mode is realized, the network configuration efficiency is improved, and the internet use experience of the user is enhanced.
An embodiment of the present invention further provides a device for configuring an IPv6 internet access mode at a WAN end of a router, where the device is applied to a router, and as shown in fig. 3, the device for configuring an IPv6 internet access mode at a WAN end of a router includes:
the obtaining module 101 is configured to obtain an IPv6 network requirement of a user. For details, refer to the related description of step S101 in the above method embodiment, and details are not repeated herein.
The message sending module 102 is configured to send a DHCPv6Solicit request message to the preset request end, and receive a DHCPv6 advertisement response message fed back by the preset request end. For details, refer to the related description of step S102 in the above method embodiment, and no further description is provided here.
And the internet mode configuration module 103 is configured to determine an IPv6 internet mode of the WAN end of the router according to the content of the DHCPv6 advertisement response packet and the IPv6 network requirement. For details, refer to the related description of step S103 in the above method embodiment, and no further description is provided here.
Through the cooperative cooperation of the above components, the router WAN end IPv6 internet access mode configuration apparatus provided by the embodiment of the present invention obtains the IPv6 network requirement of the user; sending a DHCPv6Solicit request message to a preset request end, and receiving a DHCPv6 advertisement response message fed back by the preset request end; and determining the IPv6 internet access mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message and the IPv6 network requirement. Therefore, a user can complete the configuration of the IPv6 internet mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message only by setting the IPv6 network requirement, manual configuration of the user is not needed, automatic configuration of the internet mode is realized, network configuration efficiency is improved, and the internet use experience of the user is enhanced.
There is also provided an electronic device according to an embodiment of the present invention, as shown in fig. 4, the electronic device may include a processor 901 and a memory 902, where the processor 901 and the memory 902 may be connected by a bus or in another manner, and fig. 4 takes the example of being connected by a bus as an example.
Processor 901 may be a Central Processing Unit (CPU). Processor 901 may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 902, which is a non-transitory computer readable storage medium, may be used for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the methods in the method embodiments of the present invention. The processor 901 executes various functional applications and data processing of the processor by executing non-transitory software programs, instructions and modules stored in the memory 902, that is, implements the methods in the above-described method embodiments.
The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 901, and the like. Further, the memory 902 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 902 may optionally include memory located remotely from the processor 901, which may be connected to the processor 901 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory 902, which when executed by the processor 901 performs the methods in the above-described method embodiments.
The specific details of the electronic device may be understood by referring to the corresponding related descriptions and effects in the above method embodiments, and are not described herein again.
Those skilled in the art will appreciate that all or part of the processes in the methods of the embodiments described above can be implemented by hardware instructed by a computer program, and the program can be stored in a computer readable storage medium, and when executed, the program can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk Drive (Hard Disk Drive, abbreviated as HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (9)

1. A router WAN end IPv6 Internet access mode configuration method is applied to a router, and is characterized by comprising the following steps:
acquiring the IPv6 network requirements of a user;
sending a DHCPv6Solicit request message to a preset request end, and receiving a DHCPv6 advertisement response message fed back by the preset request end;
determining an IPv6 internet access mode of a WAN end of the router according to the content of the DHCPv6 advertisement response message and the IPv6 network requirement;
the IPv6 internet access mode comprises the following steps: the method includes the following steps that a DHCPv6 internet surfing mode, a 6to4 internet surfing mode, a Pass Through internet surfing mode and an NAT6 internet surfing mode are determined, the router WAN end IPv6 internet surfing mode is determined according to the content of the DHCPv6 advertisement response message and the IPv6 network requirement, and the method includes the following steps:
acquiring address parameter information in the DHCPv6 advertisement response message;
judging whether the WAN end of the router is allocated with an address or not and whether the LAN end of the router is allocated with an address prefix or not according to the address parameter information;
when the WAN end of the router is allocated with an address and the LAN end is not allocated with an address prefix, judging whether the router needs an IPv6 network or not according to the IPv6 network requirement;
and if the IPv6 network requirement is that the router needs an IPv6 network, determining that the Internet access mode is an NAT6 mode.
2. The method of claim 1,
and when the WAN end of the router is allocated with an address and the LAN end is allocated with an address prefix, determining that the Internet access mode is a DHCPv6 mode.
3. The method of claim 1,
and if the IPv6 network requirement is that the router does not need the IPv6 network, determining that the Internet access mode is a Pass through mode.
4. The method of claim 2, wherein when the WAN side of the router does not have an address assigned, the method further comprises:
sending a router request message to a preset request end, and receiving a router response message fed back by the preset request end;
judging whether the router response message contains address prefix information or not;
when the router response message contains address prefix information, judging whether an address prefix is distributed to the LAN end of the router;
and when the LAN end of the router is distributed with an address prefix, determining that the Internet access mode is a DHCPv6 mode.
5. The method of claim 4,
and when the LAN end of the router does not distribute address prefixes, returning to the step of judging whether the router needs the IPv6 network according to the IPv6 network requirement.
6. The method of claim 4,
and when the router response message does not contain address prefix information, determining that the internet access mode is a 6to4 mode.
7. An IPv6 internet mode configuration device of a router WAN end is applied to a router, and is characterized by comprising the following steps:
the acquisition module is used for acquiring the IPv6 network requirement of the user;
the message sending module is used for sending a DHCPv6Solicit request message to a preset request end and receiving a DHCPv6 advertisement response message fed back by the preset request end;
the internet mode configuration module is used for determining the IPv6 internet mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message and the IPv6 network requirement; the IPv6 internet access mode comprises the following steps: the method for determining the IPv6 internet surfing mode of the WAN end of the router according to the content of the DHCPv6 advertisement response message and the IPv6 network requirement comprises the following steps of: acquiring address parameter information in the DHCPv6 advertisement response message; judging whether the WAN end of the router is allocated with an address or not and whether the LAN end of the router is allocated with an address prefix or not according to the address parameter information; when the WAN end of the router is allocated with an address and the LAN end is not allocated with an address prefix, judging whether the router needs an IPv6 network or not according to the IPv6 network requirement; and if the IPv6 network requirement is that the router needs an IPv6 network, determining that the Internet access mode is an NAT6 mode.
8. An electronic device, comprising:
a memory and a processor, the memory and the processor being communicatively coupled to each other, the memory having stored therein computer instructions, the processor performing the method of any of claims 1-6 by executing the computer instructions.
9. A computer-readable storage medium having stored thereon computer instructions for causing a computer to thereby perform the method of any one of claims 1-6.
CN202011142211.0A 2020-10-22 2020-10-22 Router WAN end IPv6 internet mode configuration method and device Active CN112272244B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011142211.0A CN112272244B (en) 2020-10-22 2020-10-22 Router WAN end IPv6 internet mode configuration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011142211.0A CN112272244B (en) 2020-10-22 2020-10-22 Router WAN end IPv6 internet mode configuration method and device

Publications (2)

Publication Number Publication Date
CN112272244A CN112272244A (en) 2021-01-26
CN112272244B true CN112272244B (en) 2023-02-17

Family

ID=74341806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011142211.0A Active CN112272244B (en) 2020-10-22 2020-10-22 Router WAN end IPv6 internet mode configuration method and device

Country Status (1)

Country Link
CN (1) CN112272244B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114938347A (en) * 2021-02-04 2022-08-23 青岛海信宽带多媒体技术有限公司 Router and router ipv6 self-adaption method and device
CN114785755B (en) * 2022-04-19 2024-03-29 深圳市和为顺网络技术有限公司 IPV6 Internet surfing IAPD self-adaption method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873320A (en) * 2010-06-17 2010-10-27 杭州华三通信技术有限公司 Client information verification method based on DHCPv6 relay and device thereof
CN102158563A (en) * 2010-02-12 2011-08-17 华为技术有限公司 Method, system and device for acquiring IPv6 (Internet Protocol Version 6) configuration information from IPv6 transition network
WO2011144036A1 (en) * 2010-05-19 2011-11-24 Liu Jian Method and device for home gateway obtaining wide area network side information
CN102439918A (en) * 2011-10-11 2012-05-02 华为技术有限公司 Method, device and system for transmittig message
CN102594940A (en) * 2012-02-20 2012-07-18 烽火通信科技股份有限公司 Method for dynamically configuring IPv6 (internet protocol version 6) for home gateway
CN110290230A (en) * 2019-06-10 2019-09-27 普联技术有限公司 Detection method, device and the storage medium for the dial mode that network environment is supported

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112449752A (en) * 2018-12-26 2021-03-05 华为技术有限公司 IPv6 address configuration method and routing equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158563A (en) * 2010-02-12 2011-08-17 华为技术有限公司 Method, system and device for acquiring IPv6 (Internet Protocol Version 6) configuration information from IPv6 transition network
WO2011144036A1 (en) * 2010-05-19 2011-11-24 Liu Jian Method and device for home gateway obtaining wide area network side information
CN101873320A (en) * 2010-06-17 2010-10-27 杭州华三通信技术有限公司 Client information verification method based on DHCPv6 relay and device thereof
CN102439918A (en) * 2011-10-11 2012-05-02 华为技术有限公司 Method, device and system for transmittig message
CN102594940A (en) * 2012-02-20 2012-07-18 烽火通信科技股份有限公司 Method for dynamically configuring IPv6 (internet protocol version 6) for home gateway
CN110290230A (en) * 2019-06-10 2019-09-27 普联技术有限公司 Detection method, device and the storage medium for the dial mode that network environment is supported

Also Published As

Publication number Publication date
CN112272244A (en) 2021-01-26

Similar Documents

Publication Publication Date Title
CN108307002B (en) DHCP message processing method and device
EP3264731B1 (en) Method, relay agent, and system for acquiring internet protocol address in network
CN112272244B (en) Router WAN end IPv6 internet mode configuration method and device
US20210119965A1 (en) Address Management Method and Apparatus
EP2704403A1 (en) Method and device for controlling address configuration manner
US10432579B2 (en) Internet protocol address allocation method and router
CN109120741B (en) Duplicate address detection method and device and computer readable storage medium
US20200274948A1 (en) Service flow configuration method and apparatus
CN112449752A (en) IPv6 address configuration method and routing equipment
CN112714027A (en) Method and system for accessing terminal equipment of Internet of things to gateway
CN113973102A (en) Network address acquisition method, system and network equipment
CN102025797A (en) Address prefix processing method, device, system and network equipment
WO2018006684A1 (en) Message processing method and device, and router
US20200336405A1 (en) Method and apparatus for obtaining cross-domain link
CN104780229A (en) Method of setting cloud server IP address through cloud terminal, system and cloud system
WO2017202034A1 (en) Data packet sending and receiving method and device, and electronic apparatus
CN107360095B (en) Method for realizing port forwarding in router based on client host name
CN108259636B (en) Message processing method and device
CN110460687B (en) Method, device and storage medium for identifying IP address allocation port
CN108848033B (en) Method, device and storage medium for avoiding route conflict
CN113079036A (en) Method and device for determining management VLAN (virtual local area network) of access point equipment and access point equipment
CN110636146B (en) User address allocation method and device
CN112804716B (en) Configuration method and device of data limit value and storage medium
US20240048644A1 (en) Message transmission method and system, and network device and storage medium
JP6256471B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant