[go: up one dir, main page]

CN114051019B - Network device and method for automatically detecting address configuration mode supported by IPv6 network - Google Patents

Network device and method for automatically detecting address configuration mode supported by IPv6 network Download PDF

Info

Publication number
CN114051019B
CN114051019B CN202111199227.XA CN202111199227A CN114051019B CN 114051019 B CN114051019 B CN 114051019B CN 202111199227 A CN202111199227 A CN 202111199227A CN 114051019 B CN114051019 B CN 114051019B
Authority
CN
China
Prior art keywords
address configuration
ipv6
configuration mode
automatic detection
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
CN202111199227.XA
Other languages
Chinese (zh)
Other versions
CN114051019A (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.)
Shenzhen Lianzhou International Technology Co Ltd
Original Assignee
Shenzhen Lianzhou International 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 Shenzhen Lianzhou International Technology Co Ltd filed Critical Shenzhen Lianzhou International Technology Co Ltd
Priority to CN202111199227.XA priority Critical patent/CN114051019B/en
Publication of CN114051019A publication Critical patent/CN114051019A/en
Application granted granted Critical
Publication of CN114051019B publication Critical patent/CN114051019B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a network device and a method for automatically detecting an address configuration mode supported by an IPv6 network, wherein the network device comprises a WAN port and an automatic detection module connected with the WAN port, the automatic detection module is specifically used for responding to an automatic detection instruction, sending a router request message from the WAN port according to a preset sending period to trigger an upper gateway of the network device to generate a router notification message aiming at the router request message and send the router notification message to the network device, acquiring a managed address configuration zone bit in the router notification message when the router notification message is received, and determining the address configuration mode supported by the IPv6 network accessed by the network device according to the managed configuration zone bit. The invention can simplify the process of automatically detecting the address configuration mode, improve the speed of automatically detecting the address configuration mode and improve the user experience.

Description

Network device and method for automatically detecting address configuration mode supported by IPv6 network
Technical Field
The present invention relates to the field of automatic detection technology of address configuration modes, and in particular, to a network device and a method for automatically detecting an address configuration mode supported by an IPv6 network.
Background
Since the internet protocol version 6 (IPv 6, internet Protocol Version 6) has advantages of sufficient address resources and the like compared with the internet protocol version 4 (IPv 4, internet Protocol Version), the network device needs to access the IPv6 network and also needs to follow the corresponding protocol regulations
The address configuration of the host is required to be carried out by different network connection or network service modes, and the corresponding network connection or network service can be established only by adopting the corresponding address configuration mode for dialing, for example, after the IPv6 network is accessed, the address configuration mode of the Linux equipment or other embedded equipment has a static configuration mode, a stateful configuration mode based on the DHCPv6 protocol and a stateless configuration mode based on the SLAAC protocol, and the address configuration mode is required to be selected according to the address configuration mode supported by the accessed IPv6 network. Therefore, the user needs to know the address configuration mode supported by the IPv6 network accessed by the network equipment, and the address configuration of the network equipment is completed to acquire the IPv6 address of the network equipment.
However, in the prior art, after the automatic detection of the address configuration mode is usually performed by accessing the IPv6 network, the network device sequentially enters into the discover process of different address configuration modes, and directly broadcasts the corresponding initialization message outwards, when receiving the reply, the address configuration mode is determined, otherwise, the network device enters into the discover process of the next address configuration mode until determining the address configuration mode, similarly, sequentially sends probe packets corresponding to different configuration modes, when receiving the reply of the corresponding server or gateway, determines the address configuration mode, otherwise, sends the probe packet of the next configuration mode until determining the address configuration mode.
The method adopts the scheme of the prior art to detect the address configuration mode supported by the accessed IPv6 network, needs to execute the discover process corresponding to different address configuration modes or send different detection packets in sequence, and cannot rapidly detect the address configuration mode supported by the IPv6 network.
Disclosure of Invention
The technical problem to be solved by the embodiment of the invention is to provide a network device and a method for automatically detecting an address configuration mode supported by an IPv6 network, which can simplify the process of automatically detecting the address configuration mode, improve the speed of automatically detecting the address configuration mode and improve the user experience.
In order to solve the above technical problems, in a first aspect, the present invention provides a network device for automatically detecting an address configuration mode supported by an IPv6 network, where the network device includes a WAN port and an automatic detection module connected to the WAN port, where the automatic detection module is specifically configured to:
Responding to an automatic detection instruction, sending a router request message from the WAN port according to a preset sending period, triggering an upper gateway of the network equipment to generate a router advertisement message aiming at the router request message, and sending the router advertisement message to the network equipment;
when receiving the router advertisement message, acquiring a managed address configuration zone bit in the router advertisement message;
And determining an address configuration mode supported by the IPv6 network accessed by the network equipment according to the managed configuration flag bit.
Further, the network device further comprises an IPv6 dialing control module, wherein before the automatic detection module responds to the automatic detection instruction, the IPv6 dialing control module is used for:
After the network equipment is accessed to an IPv6 network, detecting whether a user inputs a dial-up connection creation instruction or not;
When the dial-up connection creation instruction is detected, triggering the response of the automatic detection instruction, and creating a dial-up connection with an unspecified address configuration mode according to the connection information input by the user so that the network equipment can communicate with the superior gateway.
Further, the automatic detection module is further configured to:
setting parameter values of dialing zone bits according to the determined address configuration mode, wherein different parameter values of the dialing zone bits correspond to different address configuration modes;
the network device further includes an IPv6 dial control module, where the IPv6 dial control module is configured to:
obtaining the parameter value of the dialing zone bit according to a preset obtaining mode and a obtaining period;
And automatically starting an address configuration process of the address configuration mode corresponding to the parameter value of the dialing zone bit according to the acquired parameter value of the dialing zone bit.
Further, the learning mode is an active learning mode that the IPv6 dialing control module actively queries the automatic detection module for the parameter value of the dialing zone bit, or,
The learning mode is a passive learning mode that the automatic detection module reports the parameter value of the dialing zone bit to the IPv6 dialing control module.
Further, the automatic detection module is further configured to:
For each transmitted router solicitation message, when the router advertisement message corresponding to the router solicitation message is not received, increasing the value of the preset transmission times statistics parameter according to the preset value step length, and,
Judging whether the numerical value of the sending frequency statistical parameter is larger than a preset frequency threshold value or not;
When the numerical value of the sending frequency statistical parameter is larger than the frequency threshold, determining a preset default address configuration mode according to an address configuration mode supported by an IPv6 network accessed by the network equipment, and setting the parameter value of the dialing zone bit to correspond to the default address configuration mode;
Then, after the IPv6 dial control module automatically starts an address configuration process of the address configuration mode corresponding to the parameter value of the dial indicator, the automatic detection module is further configured to:
and restoring the numerical value of the sending frequency statistical parameter to a preset initial numerical value.
Further, the default address configuration mode is a static configuration mode.
Further, the managed address configuration flag bit is in a flag bit field of the router advertisement message, and the numerical value of the managed address configuration flag bit includes 1 and 0, and when determining, according to the managed configuration flag bit, an address configuration mode supported by an IPv6 network accessed by the network device, the automatic detection module is specifically configured to:
When the value of the managed address configuration flag bit is 1, determining that the address configuration mode is a stateful address configuration mode based on a DHCPv6 protocol;
When the value of the managed address configuration flag bit is 0, judging whether a prefix option in the router advertisement message is a valid prefix option, when the prefix option is the valid prefix option, determining that the address configuration mode is a stateless address configuration mode based on the SLAAC protocol, and when the prefix option is not the valid prefix option, determining that the address configuration mode is a static configuration mode.
Further, when determining whether the prefix option in the router advertisement message is a valid prefix option, the automatic detection module is specifically configured to:
judging whether the format of the prefix option in the router advertisement message accords with SLAAC protocol regulation;
If the format of the prefix option accords with SLAAC protocol regulation, judging that the prefix option is a valid prefix option;
And if the format of the prefix option does not accord with SLAAC protocol regulation, judging that the prefix option is not a valid prefix option.
In order to solve the corresponding technical problem, in a second aspect, the present invention further provides a method for automatically detecting an address configuration mode supported by an IPv6 network, where the method is performed by a network device, and the network device includes a WAN port and an automatic detection module connected to the WAN port, and the method includes:
the automatic detection module responds to an automatic detection instruction, and sends a router solicitation message from the WAN port according to a preset sending period so as to trigger an upper gateway of the network equipment to generate a router advertisement message aiming at the router solicitation message, and sends the router advertisement message to the network equipment;
when receiving the router advertisement message, the automatic detection module acquires a managed address configuration zone bit in the router advertisement message;
and the automatic detection module determines an address configuration mode supported by the IPv6 network accessed by the network equipment according to the managed configuration zone bit.
Further, the network device further comprises an IPv6 dialing control module, wherein before the automatic detection module responds to the automatic detection instruction, the method further comprises the following steps:
The IPv6 dialing control module detects whether a user inputs a dialing connection creation instruction after the network equipment is accessed to an IPv6 network;
When the dial-up connection creation instruction is detected, the IPv6 dial-up control module triggers the response of the automatic detection instruction, and creates a dial-up connection with an unspecified address configuration mode according to the connection information input by the user so that the network equipment can communicate with the superior gateway.
According to the network equipment and the method for automatically detecting the address configuration mode supported by the IPv6 network, the RS message can be actively sent to the upper gateway during detection, the RA message replied by the upper gateway is received, the address configuration mode supported by the IPv6 network which is accessed by the network equipment can be directly determined according to the address configuration mode required to be adopted by the network equipment indicated by the upper gateway, the network equipment can acquire the IPv6 address of the network equipment according to the determined address configuration mode, and the network equipment does not need to continuously probe different address configuration modes to detect the address configuration mode.
Drawings
Fig. 1 is a schematic diagram of a first application scenario of a network device provided by the present invention;
FIG. 2 is a flow chart of a first preferred embodiment of the steps performed by the network device provided by the present invention;
fig. 3 is a schematic diagram of a second application scenario of the network device provided by the present invention;
FIG. 4 is a flow chart of a second preferred embodiment of the steps performed by the network device provided by the present invention;
Fig. 5 is a flowchart of a preferred embodiment of a method for automatically detecting an address configuration mode supported by an IPv6 network according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides a network device for automatically detecting an address configuration mode supported by an IPv6 network, referring to fig. 1 to 2, fig. 1 is a schematic diagram of a first application scenario of the network device provided by the invention, fig. 2 is a flowchart of a first preferred embodiment of the execution steps of the network device provided by the invention, specifically, the network device 1 includes a WAN port 12 and an automatic detection module 11 connected with the WAN port 12, wherein the automatic detection module 11 is specifically configured to:
responding to an automatic detection instruction, sending a router request message from the WAN port according to a preset sending period to trigger an upper gateway 2 of the network equipment to generate a router advertisement message aiming at the router request message, and sending the router advertisement message to the network equipment;
when receiving the router advertisement message, acquiring a managed address configuration zone bit in the router advertisement message;
And determining an address configuration mode supported by the IPv6 network accessed by the network equipment according to the managed configuration flag bit.
It should be noted that, the router requests the message, i.e. RS (Router Solicitation) message, and the network device broadcasts and sends the message outwards, the router announces the message, i.e. RA (Router Advertisement) message, and the upper gateway receiving the RS message generates the message aiming at the RS message and replies the message to the network device. The RA message contains a 64-bit prefix option, which is used for generating a 128-bit IPv6 address by combining with the MAC address of the network equipment at the user side in a stateless address configuration mode, and in the current communication protocol, the RFC 4861 (Neighbor Discovery for IPv) specifies that the RA message also contains a Flag field (zone bit field), wherein the RA message contains a managed configuration zone bit (MANAGED ADDRESS Configuration Flag or called M bit), and the value of the Flag field represents which protocol the upper gateway informs the network equipment of acquiring the address according to.
Specifically, when the automatic detection instruction is triggered, an automatic detection module of the network device responds to the automatic detection instruction, periodically sends a router request message from a WAN port according to a sending period, generates a router advertisement message and sends the router advertisement message outwards if the upper gateway receives the router request message, and when the network device receives the router advertisement message, acquires a managed address configuration flag bit in the router advertisement message to determine an address configuration mode supported by an IPv6 network accessed by the network device.
It should be noted that, when determining the address configuration mode according to the managed address configuration flag bit in the RA packet, the address configuration mode may be directly determined according to the managed address configuration flag bit, or may be determined according to the managed address configuration flag bit in combination with other information.
The triggering of the response of the automatic detection instruction may be that the response is triggered by receiving a corresponding operation of the user when the user needs to acquire the address configuration mode, or may be that the response of the automatic detection instruction is triggered when other modules of the network device execute a certain operation. Preferably, the automatic detection module comprises an RA/RS transceiver unit in the network device core, for performing all or part of the steps performed by the automatic detection module.
The network equipment for automatically detecting the address configuration mode supported by the IPv6 network can actively send the RS message to the upper gateway during detection, receive the RA message replied by the upper gateway, directly determine the address configuration mode supported by the IPv6 network to which the network equipment is connected according to the address configuration mode required to be adopted by the network equipment indicated by the upper gateway, acquire the IPv6 address of the network equipment according to the determined address configuration mode, and detect the address configuration mode without the network equipment continuously exploring different address configuration modes.
Preferably, referring to fig. 3, fig. 3 is a schematic diagram of a second application scenario of the network device provided by the present invention, and specifically, the network device 1 further includes an IPv6 dial control module 13, where before the automatic detection module 11 responds to an automatic detection instruction, the IPv6 dial control module 13 is configured to:
After the network equipment is accessed to an IPv6 network, detecting whether a user inputs a dial-up connection creation instruction or not;
When the dial-up connection creation instruction is detected, triggering the response of the automatic detection instruction, and creating a dial-up connection with an unspecified address configuration mode according to the connection information input by the user so that the network equipment can communicate with the superior gateway.
Specifically, after the network device accesses the IPv6 network, when the user needs to create a dial-up connection, the network device creates a dial-up connection with an unspecified address configuration mode according to a dial-up connection creation instruction input by the user, and for the address configuration mode, needs to trigger an automatic detection instruction to perform detection and determination. When creating dial-up connection, it can select IPoE dial-up or PPPoE dial-up according to user, if PPPoE dial-up, it needs user to provide user name and cipher to make authentication, in the course of dial-up negotiation the server can send out local link address, and has local link address, and the network equipment can only have the ability to communicate with upper gateway, and can only make interaction process of RS/RA message to obtain global IPv6 address for surfing Internet after detecting address configuration mode, if IPoE dial-up, network equipment already possesses local link address for local area network communication when creating IPoE interface, and network equipment has the ability to communicate with upper gateway, and can make interaction process of RS/RA message, and after further detecting address configuration mode, can obtain global IPv6 address for surfing Internet.
Preferably, as shown in fig. 2, the automatic detection module 11 is further configured to:
setting parameter values of dialing zone bits according to the determined address configuration mode, wherein different parameter values of the dialing zone bits correspond to different address configuration modes;
The network device further comprises an IPv6 dial control module 13, the IPv6 dial control module 13 being configured to:
obtaining the parameter value of the dialing zone bit according to a preset obtaining mode and a obtaining period;
And automatically starting an address configuration process of the address configuration mode corresponding to the parameter value of the dialing zone bit according to the acquired parameter value of the dialing zone bit.
Specifically, because the automatic detection module and the IPv6 dial control module for performing address configuration are relatively and independently set, generally, the RA message is not sent to the IPv6 dial control module for processing, and a condition that the RA message is not received may occur, so in order to ensure that the IPv6 dial control module has a basis for performing address configuration, the present invention informs the IPv6 dial control module of the address configuration mode to be performed by setting the dial flag bit. Specifically, the automatic detection module sets the parameter value of the dialing zone bit according to the address configuration mode determined by detection, the IPv6 dialing control module periodically acquires the parameter value of the dialing zone bit according to a feasible learning means, for example, the parameter value of the dialing zone bit set by the automatic detection module is queried according to a preset query period, or the parameter value of the dialing zone bit is periodically reported to the IPv6 dialing control module through the automatic detection module, and the IPv6 dialing control module automatically starts the address configuration process of the address configuration mode corresponding to the parameter value of the dialing zone bit after acquiring the parameter value of the dialing zone bit.
It should be noted that, parameter values of dialing flag bits corresponding to different address configuration modes may be set according to actual needs, for example, when the parameter value of the dialing flag bit is "N", the corresponding configuration process may be a static configuration mode, and the corresponding configuration process may be prompting a user to manually configure information such as an IPv6 address, a routing gateway, an IPv6 domain name server, etc. of the network device, and/or directly display an input interface of the static configuration for the user to input information, when the parameter value of the dialing flag bit is "D", the corresponding configuration process may be starting up DHCPv6 stateful dialing logic, and when the parameter value of the dialing flag bit is "S", the corresponding configuration process may be starting up SLAAC stateless dialing logic.
The network equipment for automatically detecting the address configuration mode supported by the IPv6 network can automatically detect the address configuration mode, automatically start the corresponding configuration process after the detection is completed, improve the configuration time of a user, and further improve the user experience without the need of the user to know network knowledge to select to start the corresponding configuration process.
Preferably, as shown in fig. 2, the automatic detection module 11 is further configured to:
For each transmitted router solicitation message, when the router advertisement message corresponding to the router solicitation message is not received, increasing the value of the preset transmission times statistics parameter according to the preset value step length, and,
Judging whether the numerical value of the sending frequency statistical parameter is larger than a preset frequency threshold value or not;
When the numerical value of the sending frequency statistical parameter is larger than the frequency threshold, determining a preset default address configuration mode according to an address configuration mode supported by an IPv6 network accessed by the network equipment, and setting the parameter value of the dialing zone bit to correspond to the default address configuration mode;
then, after the IPv6 dial control module 4 automatically starts the address configuration process of the address configuration mode corresponding to the parameter value of the dial indicator, the automatic detection module 1 is further configured to:
and restoring the numerical value of the sending frequency statistical parameter to a preset initial numerical value.
The automatic detection module sequentially sends the RS messages according to the sending period, if the corresponding RA messages are not received in five times, the number of the sending times statistics is gradually increased from the initial number 0 to 5, if the corresponding RA messages are still received in the RS messages sent in the sixth time, the number of the sending times statistics is increased to 6 and exceeds the number threshold 5, at the moment, the automatic detection module determines a preset default address configuration mode according to the address configuration mode supported by the IPv6 network accessed by the network equipment, and sets the parameter value of the dialing flag bit to correspond to the default address configuration mode. Thus, even if the RA message is not received, the following IPv6 dialing control module can still execute the corresponding configuration process, and the waiting time of the user is reduced.
Furthermore, when the RA message is not received, whether the accessed IPv6 network supports a stateful address configuration mode and a stateless address configuration mode cannot be determined, so that the default address configuration mode is a static configuration mode, and related addresses are manually configured by a user. Preferably, the parameter value of the dial flag bit is set to "N" at this time, and may be set to other parameter values according to actual needs.
Preferably, referring to fig. 4, fig. 4 is a flowchart of a second preferred embodiment of the step of executing a network device provided by the present invention, specifically, the managed address configuration flag bit is in a flag bit field of the router advertisement message, and the value of the managed address configuration flag bit includes 1 and 0, and when determining, according to the managed configuration flag bit, an address configuration mode supported by an IPv6 network accessed by the network device, the automatic detection module is specifically configured to:
When the value of the managed address configuration flag bit is 1, determining that the address configuration mode is a stateful address configuration mode based on a DHCPv6 protocol;
When the value of the managed address configuration flag bit is 0, judging whether a prefix option in the router advertisement message is a valid prefix option, when the prefix option is the valid prefix option, determining that the address configuration mode is a stateless address configuration mode based on the SLAAC protocol, and when the prefix option is not the valid prefix option, determining that the address configuration mode is a static configuration mode.
Specifically, in the existing communication rule, when the managed configuration flag bit (M bit) is specified to be 1, the managed configuration flag bit (M bit) is used for indicating that the network device obtains the IPv6 address through the stateful address configuration mode, then the address configuration mode is determined to be the stateful address configuration mode based on the DHCPv6 protocol, when the managed configuration flag bit (M bit) is 0, the managed configuration flag bit (M bit) is used for indicating that the network device obtains the IPv6 address through the stateless address configuration mode, but because the stateless address configuration mode needs to generate a complete IPv6 address according to the prefix option of the RA message, when the prefix option of the RA message is illegal, the address cannot be obtained through the stateless address configuration mode, so that when the managed configuration flag bit (M bit) is 0, if the prefix option is effective and legal, then the address configuration mode is determined to be the stateless address configuration mode based on the SLAAC protocol, and if the prefix option is not effective, then the address configuration mode is determined to be the static configuration mode, and the corresponding address information is manually configured by the user.
Preferably, when determining whether the prefix option in the router advertisement message is a valid prefix option, the automatic detection module 2 is specifically configured to:
judging whether the format of the prefix option in the router advertisement message accords with SLAAC protocol regulation;
If the format of the prefix option accords with SLAAC protocol regulation, judging that the prefix option is a valid prefix option;
And if the format of the prefix option does not accord with SLAAC protocol regulation, judging that the prefix option is not a valid prefix option.
Specifically, whether the prefix option in the router advertisement message is a valid prefix option is determined, whether the format of the prefix option in the router advertisement message accords with the SLAAC protocol specification or not needs to be determined, and when the format accords with the SLAAC protocol specification, the prefix option is determined to be the valid prefix option, otherwise, the prefix option is not the valid prefix option.
In specific implementation, the network device for automatically detecting the address configuration mode supported by the IPv6 network provided by any embodiment of the present invention can both implement that when the automatic detection instruction is triggered, the automatic detection module of the network device responds to the automatic detection instruction, and periodically sends, according to a sending period, a router request packet from the WAN port; and when the network equipment receives the router advertisement message, acquiring a managed address configuration flag bit in the router advertisement message, and determining an address configuration mode supported by an IPv6 network accessed by the network equipment.
The network equipment for automatically detecting the address configuration mode supported by the IPv6 network can actively send the RS message to the upper gateway during detection, receive the RA message replied by the upper gateway, directly determine the address configuration mode supported by the IPv6 network to which the network equipment is connected according to the address configuration mode required to be adopted by the network equipment indicated by the upper gateway, acquire the IPv6 address of the network equipment according to the determined address configuration mode, and detect the address configuration mode without the network equipment continuously exploring different address configuration modes.
The invention also provides a method for automatically detecting the address configuration mode supported by the IPv6 network, please refer to FIG. 5, FIG. 5 is a flow chart of a preferred embodiment of the method for automatically detecting the address configuration mode supported by the IPv6 network, the method is executed by a network device, the network device comprises a WAN port and an automatic detection module connected with the WAN port, the method comprises:
s1, the automatic detection module responds to an automatic detection instruction, sends a router request message from the WAN port according to a preset sending period, triggers a superior gateway of the network equipment to generate a router advertisement message aiming at the router request message, and sends the router advertisement message to the network equipment;
S2, when receiving the router advertisement message, the automatic detection module acquires a managed address configuration flag bit in the router advertisement message;
And S3, the automatic detection module determines an address configuration mode supported by the IPv6 network accessed by the network equipment according to the managed configuration zone bit.
Preferably, the network device further comprises an IPv6 dial control module, wherein before the automatic detection module responds to the automatic detection instruction, the method further comprises:
The IPv6 dialing control module detects whether a user inputs a dialing connection creation instruction after the network equipment is accessed to an IPv6 network;
When the dial-up connection creation instruction is detected, the IPv6 dial-up control module triggers the response of the automatic detection instruction, and creates a dial-up connection with an unspecified address configuration mode according to the connection information input by the user so that the network equipment can communicate with the superior gateway.
Preferably, the method further comprises:
The automatic detection module sets parameter values of the dialing zone bit according to the determined address configuration mode, wherein different parameter values of the dialing zone bit correspond to different address configuration modes;
the network device further comprises an IPv6 dial control module, the method comprising:
The IPv6 dialing control module acquires the parameter value of the dialing zone bit according to a preset acquisition mode and an acquisition period;
And the IPv6 dialing control module automatically starts an address configuration process of the address configuration mode corresponding to the parameter value of the dialing zone bit according to the acquired parameter value of the dialing zone bit.
Further, the learning mode is an active learning mode that the IPv6 dialing control module actively queries the automatic detection module for the parameter value of the dialing zone bit, or,
The learning mode is a passive learning mode that the automatic detection module reports the parameter value of the dialing zone bit to the IPv6 dialing control module.
Further, the method further comprises:
the automatic detection module increases the value of a preset sending frequency statistical parameter according to a preset value step length when the router advertisement message corresponding to the router request message is not received for each sent router request message;
The automatic detection module judges whether the numerical value of the sending frequency statistical parameter is larger than a preset frequency threshold value or not;
When the numerical value of the sending number statistics parameter is larger than the number threshold, the automatic detection module determines a preset default address configuration mode according to an address configuration mode supported by an IPv6 network accessed by the network equipment, and sets the parameter value of the dialing zone bit to correspond to the default address configuration mode;
Then, after the IPv6 dial control module automatically starts an address configuration process of the address configuration mode corresponding to the parameter value of the dial indicator, the method further includes:
And the automatic detection module restores the numerical value of the sending frequency statistical parameter to a preset initial numerical value.
Further, the default address configuration mode is a static configuration mode.
Further, the managed address configuration flag bit is in a flag bit field of the router advertisement message, and the numerical value of the managed address configuration flag bit comprises 1 and 0, and the automatic detection module determines, according to the managed configuration flag bit, that the address configuration mode supported by the IPv6 network to which the network device is connected is specifically:
When the value of the managed address configuration zone bit is 1, the automatic detection module determines that the address configuration mode is a stateful address configuration mode based on a DHCPv6 protocol;
When the value of the managed address configuration flag bit is 0, the automatic detection module judges whether a prefix option in the router advertisement message is a valid prefix option, when the prefix option is the valid prefix option, the automatic detection module determines that the address configuration mode is a stateless address configuration mode based on the SLAAC protocol, and when the prefix option is not the valid prefix option, the automatic detection module determines that the address configuration mode is a static configuration mode.
Further, the automatic detection module determines whether the prefix option in the router advertisement message is a valid prefix option, which specifically includes:
The automatic detection module judges whether the format of the prefix option in the router advertisement message accords with SLAAC protocol regulation;
If the format of the prefix option accords with SLAAC protocol regulation, the automatic detection module judges that the prefix option is a valid prefix option;
If the format of the prefix option does not accord with SLAAC protocol, the automatic detection module judges that the prefix option is not a valid prefix option.
According to the method for automatically detecting the address configuration mode supported by the IPv6 network, the RS message can be actively sent to the upper gateway during detection, the RA message replied by the upper gateway is received, the address configuration mode supported by the IPv6 network which is accessed by the network equipment can be directly determined according to the address configuration mode required to be adopted by the network equipment indicated by the upper gateway, the network equipment can acquire the IPv6 address of the network equipment according to the determined address configuration mode, and the network equipment does not need to continuously probe different address configuration modes to detect the address configuration mode.
It should be noted that, the method for automatically detecting the address configuration mode supported by the IPv6 network provided by the embodiment of the present invention corresponds to the functions of the network device described in the foregoing embodiment, and the working principles and beneficial effects of the two correspond to each other one by one, so that a detailed description is omitted.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, such changes and modifications are also intended to be within the scope of the invention.

Claims (8)

1. The network equipment for automatically detecting the address configuration mode supported by the IPv6 network is characterized by comprising a WAN port and an automatic detection module connected with the WAN port, wherein the automatic detection module is specifically used for:
Responding to an automatic detection instruction, sending a router request message from the WAN port according to a preset sending period, triggering an upper gateway of the network equipment to generate a router advertisement message aiming at the router request message, and sending the router advertisement message to the network equipment;
when receiving the router advertisement message, acquiring a managed address configuration zone bit in the router advertisement message;
determining an address configuration mode supported by an IPv6 network accessed by the network equipment according to the managed address configuration flag bit;
the network equipment further comprises an IPv6 dialing control module, wherein before the automatic detection module responds to the automatic detection instruction, the IPv6 dialing control module is used for:
After the network equipment is accessed to an IPv6 network, detecting whether a user inputs a dial-up connection creation instruction or not;
When the dial-up connection creation instruction is detected, triggering the response of the automatic detection instruction, and creating a dial-up connection with an unspecified address configuration mode according to the connection information input by the user so that the network equipment can communicate with the superior gateway.
2. The network device for automatically detecting an address configuration supported by an IPv6 network of claim 1, wherein the automatic detection module is further configured to:
setting parameter values of dialing zone bits according to the determined address configuration mode, wherein different parameter values of the dialing zone bits correspond to different address configuration modes;
the network device further includes an IPv6 dial control module, where the IPv6 dial control module is configured to:
obtaining the parameter value of the dialing zone bit according to a preset obtaining mode and a obtaining period;
And automatically starting an address configuration process of the address configuration mode corresponding to the parameter value of the dialing zone bit according to the acquired parameter value of the dialing zone bit.
3. The network device for automatically detecting an address configuration mode supported by an IPv6 network of claim 2, wherein the learning mode is an active learning mode in which the IPv6 dial control module actively queries the automatic detection module for a parameter value of the dial flag bit, or,
The learning mode is a passive learning mode that the automatic detection module reports the parameter value of the dialing zone bit to the IPv6 dialing control module.
4. The network device for automatically detecting an address configuration supported by an IPv6 network of claim 2, wherein the automatic detection module is further configured to:
For each transmitted router solicitation message, when the router advertisement message corresponding to the router solicitation message is not received, increasing the value of the preset transmission times statistics parameter according to the preset value step length, and,
Judging whether the numerical value of the sending frequency statistical parameter is larger than a preset frequency threshold value or not;
When the numerical value of the sending frequency statistical parameter is larger than the frequency threshold, determining a preset default address configuration mode according to an address configuration mode supported by an IPv6 network accessed by the network equipment, and setting the parameter value of the dialing zone bit to correspond to the default address configuration mode;
Then, after the IPv6 dial control module automatically starts an address configuration process of the address configuration mode corresponding to the parameter value of the dial indicator, the automatic detection module is further configured to:
and restoring the numerical value of the sending frequency statistical parameter to a preset initial numerical value.
5. The network device for automatically detecting an address configuration supported by an IPv6 network of claim 4 wherein said default address configuration is a static configuration.
6. The network device for automatically detecting an address configuration mode supported by an IPv6 network according to claim 1, wherein the managed address configuration flag bit is in a flag bit field of the router advertisement message, and a value of the managed address configuration flag bit includes 1 and 0, and when determining the address configuration mode supported by the IPv6 network accessed by the network device according to the managed address configuration flag bit, the automatic detection module is specifically configured to:
When the value of the managed address configuration flag bit is 1, determining that the address configuration mode is a stateful address configuration mode based on a DHCPv6 protocol;
When the value of the managed address configuration flag bit is 0, judging whether a prefix option in the router advertisement message is a valid prefix option, when the prefix option is the valid prefix option, determining that the address configuration mode is a stateless address configuration mode based on the SLAAC protocol, and when the prefix option is not the valid prefix option, determining that the address configuration mode is a static configuration mode.
7. The network device for automatically detecting address configuration supported by an IPv6 network according to claim 6, wherein when determining whether a prefix option in the router advertisement message is a valid prefix option, the automatic detection module is specifically configured for:
judging whether the format of the prefix option in the router advertisement message accords with SLAAC protocol regulation;
If the format of the prefix option accords with SLAAC protocol regulation, judging that the prefix option is a valid prefix option;
And if the format of the prefix option does not accord with SLAAC protocol regulation, judging that the prefix option is not a valid prefix option.
8. A method for automatically detecting an address configuration supported by an IPv6 network, the method performed by a network device, the network device including a WAN port and an automatic detection module coupled to the WAN port, the method comprising:
the automatic detection module responds to an automatic detection instruction, and sends a router solicitation message from the WAN port according to a preset sending period so as to trigger an upper gateway of the network equipment to generate a router advertisement message aiming at the router solicitation message, and sends the router advertisement message to the network equipment;
when receiving the router advertisement message, the automatic detection module acquires a managed address configuration zone bit in the router advertisement message;
The automatic detection module determines an address configuration mode supported by an IPv6 network accessed by the network equipment according to the managed address configuration flag bit;
the network device further comprises an IPv6 dialing control module, wherein before the automatic detection module responds to the automatic detection instruction, the method further comprises the following steps:
The IPv6 dialing control module detects whether a user inputs a dialing connection creation instruction after the network equipment is accessed to an IPv6 network;
When the dial-up connection creation instruction is detected, the IPv6 dial-up control module triggers the response of the automatic detection instruction, and creates a dial-up connection with an unspecified address configuration mode according to the connection information input by the user so that the network equipment can communicate with the superior gateway.
CN202111199227.XA 2021-10-14 2021-10-14 Network device and method for automatically detecting address configuration mode supported by IPv6 network Active CN114051019B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111199227.XA CN114051019B (en) 2021-10-14 2021-10-14 Network device and method for automatically detecting address configuration mode supported by IPv6 network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111199227.XA CN114051019B (en) 2021-10-14 2021-10-14 Network device and method for automatically detecting address configuration mode supported by IPv6 network

Publications (2)

Publication Number Publication Date
CN114051019A CN114051019A (en) 2022-02-15
CN114051019B true CN114051019B (en) 2024-12-24

Family

ID=80204497

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111199227.XA Active CN114051019B (en) 2021-10-14 2021-10-14 Network device and method for automatically detecting address configuration mode supported by IPv6 network

Country Status (1)

Country Link
CN (1) CN114051019B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115550165A (en) * 2022-08-30 2022-12-30 中国信息通信研究院 Method and device for IPv6 network configuration, network connection equipment, storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101330527A (en) * 2007-06-22 2008-12-24 华为技术有限公司 Address Configuration Method for Mobile Node, Access Router and Fast Handover

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833732B (en) * 2012-07-25 2017-03-29 中兴通讯股份有限公司 System, data card and its implementation that a kind of IPv6 addresses stateless is automatically configured
CN106161666A (en) * 2015-04-16 2016-11-23 中兴通讯股份有限公司 Internet protocol the 6th edition IPv6 message processing method and device
CN106302845B (en) * 2015-05-29 2020-07-17 西安中兴新软件有限责任公司 Domain name system address configuration method and device of data channel product
CN108848100B (en) * 2018-06-27 2020-10-20 清华大学 A stateful IPv6 address generation method and device
CN109921898A (en) * 2019-03-28 2019-06-21 新华三技术有限公司 IPv6 stateless address generation method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101330527A (en) * 2007-06-22 2008-12-24 华为技术有限公司 Address Configuration Method for Mobile Node, Access Router and Fast Handover

Also Published As

Publication number Publication date
CN114051019A (en) 2022-02-15

Similar Documents

Publication Publication Date Title
US8446843B2 (en) Rapid local address assignment for wireless communication networks
US9712559B2 (en) Identifying frames
US7181503B2 (en) Apparatus and method of searching for DNS server in outernet
EP2879419B1 (en) Ipv6 address stateless auto-configuration system, data card, and implementation method thereof
KR20190012775A (en) System and method for detecting rogue access point and user device and computer program for the same
WO2013131472A1 (en) Message processing method, device and system
KR20120025114A (en) Apparatus and method for determining validity of wifi connection in wireless communication system
KR101606352B1 (en) System, user terminal, and method for detecting rogue access point and computer program for the same
US20170180305A1 (en) Configuring a protocol address of a network device using an address resolution protocol request
EP3306901A1 (en) Domain name system address configuration method and apparatus, and computer storage medium
CN101888338B (en) information forwarding method and gateway
US20070183367A1 (en) Method and apparatus of searching for and acquiring handover information using dynamic host configuration protocol
CN105657055A (en) Local area network equipment finding method and device oriented to WEB page
CN114051019B (en) Network device and method for automatically detecting address configuration mode supported by IPv6 network
WO2013186969A1 (en) Communication information detecting device and communication information detecting method
CN104426816A (en) Virtual machine communication method and device
EP4529238A1 (en) Communication processing method and apparatus, and communication device and readable storage medium
JP3793193B2 (en) Mobile terminal and mobile terminal control method
CN110290230B (en) Method, device and storage medium for detecting dialing mode supported by network environment
JP2019041176A (en) Unauthorized connection blocking device and unauthorized connection blocking method
EP3200433A1 (en) Ipv6 address management method, device and terminal
WO2014132774A1 (en) Node information detection device, node information detection method, and program
EP2961110A1 (en) Packet transmission method and apparatus, and server
JP2002344481A (en) Router search system, router search method, and router search program
CN106067887B (en) Website connecting device and method based on network switching and router

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