WO2020042899A1 - 一种重复地址检测方法及装置、计算机可读存储介质 - Google Patents

一种重复地址检测方法及装置、计算机可读存储介质 Download PDF

Info

Publication number
WO2020042899A1
WO2020042899A1 PCT/CN2019/100247 CN2019100247W WO2020042899A1 WO 2020042899 A1 WO2020042899 A1 WO 2020042899A1 CN 2019100247 W CN2019100247 W CN 2019100247W WO 2020042899 A1 WO2020042899 A1 WO 2020042899A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
local area
access device
duplicate address
address detection
Prior art date
Application number
PCT/CN2019/100247
Other languages
English (en)
French (fr)
Inventor
高飞
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2020042899A1 publication Critical patent/WO2020042899A1/zh

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/5046Resolving address allocation conflicts; Testing of addresses

Definitions

  • the embodiments of the present application relate to, but are not limited to, a method and device for detecting duplicate addresses, and a computer-readable storage medium.
  • IPv4 Internet protocol version 4, network protocol version 4
  • IPv6 Internet protocol version 6, network protocol version 6
  • IPv6 address including: automatically obtaining an IPv6 address and manually setting an IPv6 address
  • At least one embodiment of the present application provides a method and device for detecting duplicate addresses, and a computer-readable storage medium, to implement the detection of duplicate addresses under a cascaded router, so as to prevent the same address from being unable to access the Internet.
  • At least one embodiment of the present application provides a duplicate address detection method, including: after receiving a first duplicate address detection request sent by a first node in a first local area network where the network access device is located, a network access device sends a The second duplicate address detection request of the first node is sent to a node in another local area network where the network access device is located; when a node in the other local area network receives an address conflict in response to the second duplicate address detection request When indicating information, the network access device sends address conflict indication information to the first node.
  • At least one embodiment of the present application provides a duplicate address detection device, including a memory and a processor.
  • the memory stores a program.
  • the duplicate address according to any embodiment is implemented. Address detection method.
  • At least one embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement any The duplicate address detection method according to an embodiment.
  • the network access device after receiving a first duplicate address detection request sent by a first node in a first local area network where the network access device is located, the network access device sends A second duplicate address detection request of a node is given to a node in another local area network where the network access device is located; when receiving the address conflict indication information returned by the node in the other local area network in response to the second duplicate address detection request When the network access device sends address conflict indication information to the first node.
  • the solution provided by this embodiment can detect duplicate addresses in different local area networks, and avoid being unable to access the Internet due to the same addresses.
  • FIG. 1a is a schematic diagram of a network architecture according to an embodiment of the present application.
  • FIG. 1b is a flowchart of a duplicate address detection method according to an embodiment of the present application.
  • 1c to 1e are schematic diagrams of other network architectures provided by the present application.
  • FIG. 2 is a network architecture diagram provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of a duplicate address detection method according to an embodiment of the present application.
  • FIG. 4 is a network architecture diagram provided by another embodiment of the present application.
  • FIG. 5 is a block diagram of a duplicate address detection device according to an embodiment of the present application.
  • FIG. 6 is a block diagram of a duplicate address detection apparatus according to another embodiment of the present application.
  • FIG. 7 is a block diagram of a computer storage medium according to an embodiment of the present application.
  • FIG. 1a it is a network architecture diagram including multiple local area networks.
  • the network access device 10 is located in the first local area network 13 and the first node 11 is also located in the first local area network 13. It should be noted that the first local area network 13 may also include other nodes.
  • the network access device 10 is also Located in the local area network 14, the local area network 14 further includes at least one second node 12.
  • the first node 11 may be a network access device or a client.
  • the first node 11 When the first node 11 is a network access device, the first node 11 may be an uplink network access device of the network access device 10 (the network access device 10 obtains an address from its uplink network access device), or it may be a network The downlink network access device of the access device 10 (the downlink network access device of the network access device 10 obtains an address from the network access device 10). It should be noted that only two local area networks are shown here, and the network access device 10 may also be in more local area networks.
  • an embodiment of the present application provides a duplicate address detection method, including:
  • Step 101 After receiving the first duplicate address detection request sent by the first node 11 in the first local area network 13 where the network access device 10 is located, the network access device 10 sends a second duplicate address for the first node 11. An address detection request to a node in another local area network (such as the local area network 14) where the network access device is located;
  • Step 102 When receiving the address conflict indication information returned by a node (such as node 12) in the other local area network in response to the second duplicate address detection request, the network access device 10 sends the address conflict indication information to the ⁇ ⁇ node11.
  • a node such as node 12
  • a network access device sends a duplicate address detection request to different local area networks to implement the detection of duplicate addresses in different local area networks, thereby avoiding address conflicts.
  • the network access device 10 is, for example, a routing device such as a router or a switch.
  • the first local area network 13 is a local area network (where the network is formed by the network access device 10 and a node (for example, the first node 11) subordinate to the network access device 10
  • the node subordinate to the access device refers to a node assigned an address by the network access device
  • the other local area networks are the uplink network access device 15 of the network access device 10 and the node subordinate to the uplink network access device 15 (Such as node 12).
  • the other local area network is a local area network formed by the network access device 10 and a node (such as the second node 12) under the network access device 10
  • the first local area network 13 is a local area network formed by the uplink network access device 15 of the network access device 10 and a node (such as the first node 11) under the uplink network access device 14.
  • the first node 11 may also be the network access device 15.
  • the first node 11 is the uplink network access device of the network access device 10.
  • the network access device 10 is router A
  • the nodes subordinate to router A are client D
  • router A and client D form a local area network N1 (the first local area network in this embodiment)
  • the uplink network of router A The access device is router B.
  • the nodes under router B are router A and client C.
  • Router A, router B, and client C form another local area network N2 (the other local area network in this embodiment).
  • the network access device is router A
  • the node subordinate to router A is client D
  • the uplink network access device of router A is router B
  • the nodes subordinate to router B are router A and client C.
  • Router A, router B, and client C constitute another local area network N2 (the other local area networks in this embodiment).
  • the router A and the client D constitute a local area network N1 (the first local area network in this embodiment).
  • the other local area networks may be one local area network or multiple local area networks.
  • the network access device 10 has multiple uplink networks.
  • the receiving the address conflict indication information returned by a node in the other local area network in response to the second duplicate address detection request refers to: receiving the node in the other local area network within a preset time The address conflict indication information returned in response to the second duplicate address detection request. If the address conflict indication information is not received within a preset time, it means that there is no address conflict. In addition, if the address conflict indication information is received after a preset time, the address conflict indication information is discarded.
  • the preset time can be set as required, for example, 2s.
  • the first duplicate address detection request and the second duplicate address detection request carry the IPv6 address of the first node 11. It should be noted that this application is not limited to IPv6 addresses. When an IPv6 address is upgraded to another version of the address, this application can still be applied.
  • the sending a second duplicate address detection request for the first node 11 to a node in another local area network where the network access device 10 is located includes: sending the address for the first node 11 in a multicast manner.
  • the second duplicate address detection request is sent to a node in another local area network where the network access device 10 is located. That is, it is sent to multiple nodes in other local area networks.
  • the first node 11 is another network access device or a client. Taking the network shown in FIG. 2 as an example, the first node is, for example, client D, or client C or router B.
  • the sending the second duplicate address detection request for the first node 11 to a node in another local area network where the network access device 10 is located means: sending the second duplicate address detection request for the first node 11 to all nodes.
  • the other local area network where the network access device 10 is located is a node located on a different local area network from the first node 11.
  • a duplicate address detection request is sent to another local area network, which implements the detection of duplicate addresses of nodes in different local area networks, and avoids address conflicts that prevent Internet access.
  • the first duplicate address detection request is an NS message
  • the second duplicate address detection request is an NS message
  • the address conflict indication information is carried in a NA (Neighbor Advertisement) message.
  • NA Neighbor Advertisement
  • the method further includes that after receiving the address conflict indication information, the first node 11 releases the current address of the first node 11 and obtains the address again.
  • the method for reacquiring the address is, for example, reconstructing an IPv6 address using the current IPv6 prefix, or applying for a new IPv6 prefix to construct an IPv6 address, or applying for a new IPv6 address.
  • the network access device is a router and the node is a client or a router as an example to further describe this application, but this application is not limited thereto.
  • the router reconstructs a new NS message and sends it to the upstream of the router after receiving the NS message sent by the first node (which may be the client or the router) connected to the router.
  • Each node in the LAN where the router is located detects whether the same IPv6 address is used in the LAN where the upstream router is located. If the router receives a response NA packet, it constructs a new NA packet and sends the new NA packet to The first node, after receiving the NA packet, reconstructs an IPv6 address.
  • a router listens to an NS message for IPv6 duplicate address detection sent by a second node (which may be a client or a router) of a local area network where an uplink router is located, and constructs an NS message after receiving the NS message. New NS message and multicast the new NS message in the local area network of the current router (the router and its subordinate nodes). If a response NA message is received, a new NA message is constructed and a new The NA packet is sent to the second node in the local area network where the uplink router is located. After receiving the NA packet, the second node reconstructs an IPv6 address, or applies for an IPv6 prefix to construct an IPv6 address, or applies for an IPv6 address.
  • the client D is connected to the router A through a network cable or a WiFi or USB cable, and the router A is connected to the uplink router B through a network cable or WiFi.
  • the client C is connected below the uplink router B.
  • Router A and client D form LAN N1, and router B, client C, and router A form LAN N2.
  • the NS packet sent by the client D in the local area network N1 to detect an IPv6 duplicate address can only be received by the devices in the local area network N1 and cannot be received by the devices in the local area network N2 (such as router B and client C)
  • the NS message sent by the device C in the local area network N2 can only be received by the device in the local area network N2 and cannot be received by the device in the local area network N1 (for example, the client D).
  • Step 301 Router A connects to uplink router B through a network cable or WiFi and obtains a full 128-bit IPv6 address or a 64-bit IPv6 prefix from uplink router B and generates a 128-bit IPv6 address with the 64-bit suffix generated by itself or router A statically specifies itself 128-bit IPv6 address. After obtaining the IPv6 address, Router A sends an NS message to perform IPv6 duplicate address detection to ensure that the IPv6 address obtained by itself is unique in the local area network formed by Router B.
  • the client D is connected to the router A through a network cable or WiFi or other methods.
  • the router A allocates a complete 128-bit IPv6 address to the client D, or the client D obtains a 64-bit IPv6 prefix from the router A and generates the prefix with itself
  • the 64-bit suffix generates a 128-bit IPv6 address or Client D statically specifies its own 128-bit IPv6 address.
  • Step 303 At this time, the downlink of the router A connects to the client D to form the local area network N1, the uplink of the router A is connected to the router B and the router B forms the local area network N2.
  • Router A receives a Duplicate Address Detect (DAD) message from the first node of a local area network, that is, a duplicate address detection request.
  • DAD Duplicate Address Detect
  • a DAD packet is received from the client D of the local area network N1.
  • Step 304 Router A sends a DAD message to a node in another local area network.
  • DAD packets are sent to router B and client C in LAN N2.
  • step 305 it is determined that router A has received an NA packet from another local area network. If yes, it indicates that there is an address conflict, and step 306 is performed, otherwise, the process ends.
  • Router A receives NA packets from Client C.
  • Step 306 Router A constructs and sends an NA message to the first node, and ends.
  • router A sends a NA message to client D.
  • router A As router A, on the one hand, it must complete the duplicate address detection of client D in LAN N1, and on the other hand, it must receive and detect duplicate address detection packets from nodes in LAN N2. Specifically:
  • a new NS message is constructed and the new NS message (new and old NS message)
  • the same information used for duplicate address detection is sent to another local area network N2, and then wait for a preset time (for example: 2 seconds) to see if any node in the local area network N2 sends a NA message.
  • the currently detected IPv6 address is the only IPv6 address in LAN N1 and LAN N2; if a NA packet is received indicating that the IPv6 address currently being detected has been used, client D is informed to give up the IPv6 address Specifically, after receiving the NA message from the node in the local area network N2, a new NA message is constructed and sent to the client D in the local area network N1.
  • NS packet received by Router A comes from LAN N2, it means that the client (for example, client C) in LAN N2 or the upstream router B is to perform IPv6 duplicate address detection.
  • client for example, client C
  • the upstream router B is to perform IPv6 duplicate address detection.
  • a new NS packet is constructed and the The text is sent to the local area network N1 by multicast, and then waits for a preset time (for example: 2 seconds) to check whether any node in the local area network N1 sends a NA message.
  • the currently detected IPv6 address is the only IPv6 address in LAN N1 and LAN N2; if a NA packet is received indicating that the IPv6 address currently being detected has been used, client C is notified to give up the IPv6 address Specifically, after receiving the NA message from the node in the local area network N1, a new NA message is constructed and sent to the client C in the local area network N2.
  • This embodiment provides a solution.
  • the nodes in different LANs are found to use the same IPv6 address in time and the corresponding nodes are notified to regenerate the IPv6 address in time to avoid the inability to access the network normally due to the use of the same IPv6 address happening.
  • FIG. 4 it is a schematic diagram of networking according to another embodiment of the present application.
  • router A is connected to router E and router E is connected to Client F, Router E, and Client F form LAN N3.
  • Router E is included.
  • Router A After receiving the duplicate address detection request from Client C, Router A sends a duplicate address detection. Request to router E and client D.
  • Router E sends a duplicate address request to client F. If there is a conflict between the address of client F and client D, it sends a NA message to router E, and router E sends a NA message to the router.
  • Router A sends a NA message to client C. At this time, the duplicate address detection of client C and client F is implemented to avoid address conflicts.
  • the technology of duplicate address detection provided in this application can be applied to products such as CPE (Customer-Premises Equipment) and data cards.
  • An embodiment of the present application provides a duplicate address detection device. As shown in FIG. 5, it includes a duplicate address detection module 501.
  • the duplicate address detection module 501 is configured to, after receiving a first duplicate address detection request sent by a first node in a first local area network, send a second duplicate address detection request for the first node to another local area network.
  • a node when receiving address conflict indication information returned by a node in the other local area network in response to the second duplicate address detection request, sending the address conflict indication information to the first node.
  • the duplicate address detection device further includes an address allocation module 502, which is configured to allocate an IPv6 prefix or an IPv6 address (that is, a complete 128-bit address) to a node.
  • an IPv6 prefix is assigned to a node
  • the node generates the suffix after receiving the prefix and combines it to form a complete 128-bit IPv6 address; if the node is assigned a complete 128-bit IPv6 global unicast address, the node does not need to generate Suffix, directly perform duplicate address detection on the 128-bit IPv6 address obtained.
  • An embodiment of the present application provides a duplicate address detection device 60. As shown in FIG. 6, it includes a memory 610 and a processor 620.
  • the memory 610 stores a program. When the program is read and executed by the processor 620, To implement the duplicate address detection method described in any of the embodiments.
  • An embodiment of the present application provides a network access device including the foregoing duplicate address detection device 60.
  • An embodiment of the present application provides a network including the foregoing network access device.
  • an embodiment of the present application provides a computer-readable storage medium 70.
  • the computer-readable storage medium 70 stores one or more programs 80.
  • the one or more programs 80 may be stored in one or more programs 80.
  • Multiple processors execute to implement the duplicate address detection method described in any embodiment.
  • computer storage medium includes volatile and non-volatile implemented in any method or technology used to store information such as computer-readable instructions, data structures, program modules or other data.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or Any other medium used to store desired information and which can be accessed by a computer.
  • a communication medium typically contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供了一种重复地址检测方法及装置,计算机可读存储介质,该重复地址检测方法包括:网络接入设备接收到所述网络接入设备所在的第一局域网中的第一节点发送的第一重复地址检测请求后,发送针对该第一节点的第二重复地址检测请求给所述网络接入设备所在的其他局域网中的节点(101);当接收到所述其他局域网中的节点返回的响应所述第二重复地址检测请求的地址冲突指示信息时,所述网络接入设备发送地址冲突指示信息给所述第一节点(102)。

Description

一种重复地址检测方法及装置、计算机可读存储介质
交叉引用
本申请引用于2018年8月27日递交的名称为“一种重复地址检测方法及装置、计算机可读存储介质”的第201810980178.5号中国专利申请,其通过引用被全部并入本申请。
技术领域
本申请实施例涉及但不限于重复地址检测方法及装置、计算机可读存储介质。
背景技术
随着互联网技术的发展,IPv4(Internet protocol version 4,第四版网络协议)地址已经耗尽再无可用地址分配,因此IPv6Internet protocol version 6,第六版网络协议)的广泛应用已经成为一种必然,IPv6有广阔的前景。
客户端获取到IPv6地址(包括:自动获取到IPv6地址、手动设置IPv6地址)后需要确认当前局域网中该IPv6地址是否是唯一的IPv6地址,如果是唯一地址则可以使用该IPv6地址进行通信。在级联路由器场景下存在多个局域网时,由于不同局域网中未进行重复地址检测,可能出现两台处于不同局域网中的客户端使用相同的IPv6地址情况,造成二者无法正常访问互联网。
发明内容
本申请至少一实施例提供了一种重复地址检测方法及装置、计算机可读存储介质,实现级联路由器下重复地址检测,避免地址相同造成无法上网。
本申请至少一实施例提供一种重复地址检测方法,包括:网络接入设 备接收到所述网络接入设备所在的第一局域网中的第一节点发送的第一重复地址检测请求后,发送针对该第一节点的第二重复地址检测请求给所述网络接入设备所在的其他局域网中的节点;当接收到所述其他局域网中的节点返回的响应所述第二重复地址检测请求的地址冲突指示信息时,所述网络接入设备发送地址冲突指示信息给所述第一节点。
本申请至少一实施例提供一种重复地址检测装置,包括存储器和处理器,所述存储器存储有程序,所述程序在被所述处理器读取执行时,实现任一实施例所述的重复地址检测方法。
本申请至少一实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现任一实施例所述的重复地址检测方法。
与相关技术相比,本申请至少一实施例中,网络接入设备接收到所述网络接入设备所在的第一局域网中的第一节点发送的第一重复地址检测请求后,发送针对该第一节点的第二重复地址检测请求给所述网络接入设备所在的其他局域网中的节点;当接收到所述其他局域网中的节点返回的响应所述第二重复地址检测请求的地址冲突指示信息时,所述网络接入设备发送地址冲突指示信息给所述第一节点。本实施例提供的方案,能检测出不同局域网中的重复地址,避免地址相同造成无法上网。
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。
附图说明
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申 请技术方案的限制。
图1a为本申请一实施例提供的网络架构示意图;
图1b为本申请一实施例提供的重复地址检测方法流程图;
图1c~图1e为本申请提供的其他网络架构示意图;
图2为本申请一实施例提供的组网架构图;
图3为本申请一实施例提供的重复地址检测方法流程图;
图4为本申请另一实施例提供的组网架构图;
图5为本申请一实施例提供的重复地址检测装置框图;
图6为本申请另一实施例提供的重复地址检测装置框图;
图7为本申请一实施例提供的计算机存储介质框图。
具体实施例
为使本申请的目的、技术方案和优点更加清楚明白,下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
相关技术中,客户端发出的检测IPv6地址唯一性的NS(Neighbor Solicitation,邻居请求)报文仅局域网中的用户可以收到,局域网外的用户无法收到,从而导致出现两台处于不同局域网中的客户端使用相同的IPv6地址情况,造成二者无法正常访问互联网。本申请中,对不同局域网中的相同的重复地址进行检测,从而降低出现不同局域网中的客户端使用相同的IPv6地址的情况。
如图1a所示,为包括多个局域网的网络架构图。其中,网络接入设备10处于第一局域网13中,第一节点11也处于第一局域网13中,需要说明的 是,第一局域网13中还可能包括其他节点,另外,网络接入设备10还处于局域网14中,局域网14中还包括至少一个第二节点12。第一节点11可能是一网络接入设备,也可能是一客户端。第一节点11为网络接入设备时,第一节点11可能是网络接入设备10的上行网络接入设备(网络接入设备10从其上行网络接入设备处获得地址),也可能是网络接入设备10的下行网络接入设备(网络接入设备10的下行网络接入设备从网络接入设备10处获得地址)。需要说明的是,此处仅示出两个局域网,网络接入设备10也可能处于更多局域网中。
如图1所示,本申请一实施例提供一种重复地址检测方法,包括:
步骤101,网络接入设备10接收到所述网络接入设备10所在的第一局域网13中的第一节点11发送的第一重复地址检测请求后,发送针对该第一节点11的第二重复地址检测请求给所述网络接入设备所在的其他局域网(比如局域网14)中的节点;
步骤102,当接收到所述其他局域网中的节点(比如节点12)返回的响应所述第二重复地址检测请求的地址冲突指示信息时,所述网络接入设备10发送地址冲突指示信息给所述第一节点11。
本实施例提供的方案,网络接入设备将重复地址检测请求发送到不同局域网,实现不同局域网中的重复地址的检测,从而避免地址冲突。
其中,网络接入设备10比如为路由器、交换机等路由设备。
在一实施例中,如图1c所示,所述第一局域网13为所述网络接入设备10及该网络接入设备10下属的节点(比如第一节点11)构成的局域网(其中,网络接入设备下属的节点是指由该网络接入设备分配地址的节点),所述其他局域网为所述网络接入设备10的上行网络接入设备15以及该上行网络接入设备15下属的节点(比如节点12)构成的局域网。
在一实施例中,如图1d所示,所述其他局域网为所述网络接入设备10及该网络接入设备10下属的节点(比如第二节点12)构成的局域网,所述第一 局域网13为所述网络接入设备10的上行网络接入设备15以及该上行网络接入设备14下属的节点(比如第一节点11)构成的局域网。需要说明的是,第一节点11也可能是网络接入设备15,此时如图1e所示,第一节点11为网络接入设备10的上行网络接入设备。
以图2为例,网络接入设备10为路由器A,路由器A下属的节点为客户端D,路由器A和客户端D构成局域网N1(本实施例中的第一局域网),路由器A的上行网络接入设备为路由器B,路由器B下属的节点为路由器A和客户端C,路由器A、路由器B和客户端C构成另一局域网N2(本实施例中的其他局域网)。
以图2为例,网络接入设备为路由器A,路由器A下属的节点为客户端D,路由器A的上行网络接入设备为路由器B,路由器B下属的节点为路由器A和客户端C。路由器A、路由器B和客户端C构成另一局域网N2(本实施例中的其他局域网)。路由器A和客户端D构成局域网N1(本实施例中的第一局域网)。
其中,其他局域网可以是一个局域网,也可以是多个局域网,多个局域网情况下,该网络接入设备10有多个上行网络。
在一实施例中,所述接收到所述其他局域网中的节点返回的响应所述第二重复地址检测请求的地址冲突指示信息是指:在预设时间内接收到所述其他局域网中的节点返回的响应所述第二重复地址检测请求的地址冲突指示信息。如果在预设时间内未接收到地址冲突指示信息,则表示不存在地址冲突。另外,如果在超过预设时间才收到地址冲突指示信息,则丢弃该地址冲突指示信息。其中,所述预设时间可以根据需要设定,比如为2s。
在一实施例中,所述第一重复地址检测请求和所述第二重复地址检测请求中携带所述第一节点11的IPv6地址。需要说明的是,本申请不限于IPv6地址,当IPv6地址升级为其他版本的地址,仍可应用本申请。
在一实施例中,所述发送针对该第一节点11的第二重复地址检测请求 给所述网络接入设备10所在的其他局域网中的节点包括:通过多播方式发送针对该第一节点11的第二重复地址检测请求给所述网络接入设备10所在的其他局域网中的节点。即发送给其他局域网中的多个节点。
在一实施例中,所述第一节点11为其他网络接入设备或者客户端。以图2所示网络为例,第一节点比如为客户端D,或者,为客户端C或者路由器B。
在一实施例中,所述其他局域网与所述第一局域网13存在不同的节点。
所述发送针对该第一节点11的第二重复地址检测请求给所述网络接入设备10所在的其他局域网中的节点是指:发送针对该第一节点11的第二重复地址检测请求给所述网络接入设备10所在的其他局域网中与所述第一节点11处于不同局域网的节点。本实施例将重复地址检测请求发送给了其他局域网中,实现了不同局域网的节点的重复地址的检测,避免了地址冲突导致无法上网。
在一实施例中,所述第一重复地址检测请求为NS报文,所述第二重复地址检测请求为NS报文,所述地址冲突指示信息通过NA(Neighbor Advertisement,邻居通告)报文携带,具体的,接收到NA报文,即表示接收到地址冲突指示信息。
在一实施例中,所述方法还包括,所述第一节点11接收到所述地址冲突指示信息后,释放所述第一节点11当前的地址,重新获取地址。重新获取地址的方法比如为:使用当前IPv6前缀重新构造IPv6地址,或申请新的IPv6前缀构造IPv6地址,或申请新的IPv6地址。
下述实施例中,以网络接入设备为路由器,节点为客户端或路由器为例对本申请作进一步说明,但本申请不限于此。
本申请一实施例中,路由器在收到连接到路由器下属的第一节点(可能是客户端,也可能是路由器)发出的NS报文后重新构造一个新的NS报文发送到该路由器的上行路由器所在的局域网中的各节点,检测上行路由器所 在的局域网中是否使用了相同的IPv6地址,如果路由器收到回应的NA报文则构造新的NA报文并将该新的NA报文发送给第一节点,第一节点收到该NA报文后,重新构造IPv6地址。
本申请另一实施例中,路由器监听其上行路由器所在局域网的第二节点(可能是客户端,也可能是路由器)发出的IPv6重复地址检测的NS报文,收到该NS报文后构造一个新的NS报文并在当前路由器所在局域网(该路由器及其下属节点构成的局域网)多播发送新的NS报文,如果收到回应的NA报文则构造新的NA报文并将新的NA报文发送到上行路由器所在局域网中的第二节点,第二节点收到该NA报文后,重新构造IPv6地址,或申请IPv6前缀构造IPv6地址,或申请IPv6地址。
如图2所示,客户端D通过网线或WiFi或USB线等方式连接到路由器A,路由器A以网线或WiFi方式连接到上行路由器B,上行路由器B下面连接了客户端C。路由器A和客户端D组成了局域网N1,路由器B、客户端C和路由器A组成了局域网N2。相关技术中,局域网N1中的客户端D发送的检测IPv6重复地址的NS报文只能被局域网N1中的设备收到无法被局域网N2中的设备(比如:路由器B、客户端C)收到;同样,局域网N2中的设备C发出的NS报文只能被局域网N2中的设备收到无法被局域网N1中的设备(比如:客户端D)收到。本实施例对此进行了改进,如图3所示,包括:
步骤301,路由器A通过网线或WiFi连接到上行路由器B并且从上行路由器B获得完整128位IPv6地址或获得64位IPv6前缀并与自身产生的64位后缀生成128位IPv6地址或者路由器A静态指定自己的128位IPv6地址。在获得IPv6地址后路由器A发送NS报文进行IPv6重复地址检测确保自身获得的IPv6地址在路由器B组成的局域网中是唯一的。
步骤302,客户端D通过网线或WiFi或其他方式连接到路由器A,此时路由器A为客户端D分配完整128位IPv6地址,或者,客户端D从路由器A获得64位IPv6前缀并与自身产生的64位后缀生成128位IPv6地址或 者客户端D静态指定自己的128位IPv6地址。
步骤303:此时路由器A的下行接入了客户端D组成了局域网N1,上行连接了路由器B且路由器B组成局域网N2。路由器A从一个局域网的第一节点收到DAD(Duplicate Address Detect,重复地址检测)报文,即重复地址检测请求。
比如,从局域网N1的客户端D收到DAD报文。
步骤304,路由器A发送DAD报文至另一局域网中的节点。
比如,发送DAD报文至局域网N2中的路由器B和客户端C。
步骤305,判断路由器A从另一局域网中接收到NA报文,如果是,说明存在地址冲突,执行步骤306,否则,结束。
比如,路由器A从客户端C收到NA报文。
步骤306,路由器A构造并发送NA报文给第一节点,结束。
比如,路由器A发送NA报文给客户端D。
下面以路由器A为例进行说明。作为路由器A来说,一方面要完成局域网N1中客户端D的重复地址检测,另一方面要接收局域网N2中的节点发来的重复地址检测报文并对其进行检测,具体的:
当收到局域网N1中节点(比如:客户端D)发来的用于重复地址检测的NS多播报文时,构造一个新的NS报文并将所述新的NS报文(新旧NS报文中用于重复地址检测的信息相同)发送到另一局域网N2中,然后等待预设时间(比如:2秒)查看局域网N2中是否有节点发送NA报文。如果没有则当前检测的IPv6地址在局域网N1、局域网N2中都是唯一的IPv6地址;如果收到了NA报文说明当前正在检测的IPv6地址已被使用,此时告知客户端D放弃对该IPv6地址的使用,具体的,在收到局域网N2内节点发来的NA报文后构造一个新的NA报文并将其发送给局域网N1中的客户端D。
如果路由器A收到的NS报文来自局域网N2则说明是局域网N2中的客户端(比如:客户端C)或上行路由器B要进行IPv6重复地址检测,此时 构造新的NS报文并将报文通过多播形式发送到局域网N1中,然后等待预设时间(比如:2秒)查看局域网N1中是否有节点发送NA报文。如果没有说明当前检测的IPv6地址在局域网N1、局域网N2中都是唯一的IPv6地址;如果收到了NA报文说明当前正在检测的IPv6地址已被使用,此时告知客户端C放弃对该IPv6地址的使用,具体的,在收到局域网N1内节点发来的NA报文后构造一个新的NA报文并将其发送给局域网N2中的客户端C。
本实施例提供方案,在级联路由器场景下,及时发现处于不同局域网内的节点使用相同IPv6地址的情况并及时通知对应节点重新生成IPv6地址,避免了因为使用相同IPv6地址导致无法正常访问网络的情况。
如图4所示,为本申请另一实施例的组网示意图,本实施例中,存在多个局域网,在图2所示网络基础上,路由器A下接入路由器E,路由器E下接入客户端F,路由器E和客户端F构成局域网N3,局域网N1中除路由器A和客户端D外,还包括路由器E,则路由器A收到客户端C的重复地址检测请求后,发送重复地址检测请求给路由器E和客户端D,路由器E发送重复地址请求给客户端F,如果客户端F与客户端D的地址存在冲突,则发送NA报文给路由器E,路由器E发送NA报文给路由器A,路由器A发送NA报文给客户端C。此时,实现了客户端C和客户端F的重复地址检测,避免了地址冲突。
本申请提供的重复地址检测相关技术可以应用于CPE(Customer-Premises Equipment,用户前端设备)、数据卡等产品上。
本申请一实施例提供一种重复地址检测装置,如图5所示,包括,重复地址检测模块501。
其中,所述重复地址检测模块501用于,接收到第一局域网中的第一节点发送的第一重复地址检测请求后,发送针对该第一节点的第二重复地址检测请求给其他局域网中的节点;当接收到所述其他局域网中的节点返回的响应所述第二重复地址检测请求的地址冲突指示信息时,发送地址冲突指示 信息给所述第一节点。
在另一实施例中,所述重复地址检测装置还包括地址分配模块502,所述地址分配模块502用于,向节点分配IPv6前缀或IPv6地址(即完整128位地址)。其中,如果向节点分配的是IPv6前缀,节点收到该前缀后再自行产生后缀然后组合成完整128位IPv6地址;如果向节点分配的是完整的128位IPv6全球单播地址,则节点无需产生后缀,直接对获得的128位IPv6地址进行重复地址检测。
本申请一实施例提供一种重复地址检测装置60,如图6所示,包括存储器610和处理器620,所述存储器610存储有程序,所述程序在被所述处理器620读取执行时,实现任一实施例所述的重复地址检测方法。
本申请一实施例提供一种包括上述重复地址检测装置60的网络接入设备。
本申请一实施例提供一种网络,包括上述网络接入设备。
如图7所示,本申请一实施例提供一种计算机可读存储介质70,所述计算机可读存储介质70存储有一个或者多个程序80,所述一个或者多个程序80可被一个或者多个处理器执行,以实现任一实施例所述的重复地址检测方法。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施例中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计 算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。

Claims (11)

  1. 一种重复地址检测方法,包括:
    网络接入设备接收到所述网络接入设备所在的第一局域网中的第一节点发送的第一重复地址检测请求后,发送针对该第一节点的第二重复地址检测请求给所述网络接入设备所在的其他局域网中的节点;
    当接收到所述其他局域网中的节点返回的响应所述第二重复地址检测请求的地址冲突指示信息时,所述网络接入设备发送地址冲突指示信息给所述第一节点。
  2. 根据权利要求1所述的重复地址检测方法,其中,所述第一局域网为所述网络接入设备及该网络接入设备下属的节点构成的局域网,所述其他局域网为所述网络接入设备的上行网络接入设备以及该上行网络接入设备下属的节点构成的局域网;或者,所述其他局域网为所述网络接入设备及该网络接入设备下属的节点构成的局域网,所述第一局域网为所述网络接入设备的上行网络接入设备以及该上行网络接入设备下属的节点构成的局域网。
  3. 根据权利要求1所述的重复地址检测方法,其中,所述接收到所述其他局域网中的节点返回的响应所述第二重复地址检测请求的地址冲突指示信息是指:在预设时间内接收到所述其他局域网中的节点返回的响应所述第二重复地址检测请求的地址冲突指示信息。
  4. 根据权利要求1所述的重复地址检测方法,其中,所述第一重复地址检测请求和所述第二重复地址检测请求中携带所述第一节点的IPv6地址。
  5. 根据权利要求1所述的重复地址检测方法,其中,所述发送针对该第一节点的第二重复地址检测请求给所述网络接入设备所在的其他局域网中的节点包括:通过多播方式发送针对该第一节点的第二重复地址检测请求给所述网络接入设备所在的其他局域网中的节点。
  6. 根据权利要求1至5任一所述的重复地址检测方法,其中,所述第一节点为其他网络接入设备或者客户端。
  7. 根据权利要求1至5任一所述的重复地址检测方法,其中,所述其他局域网与所述第一局域网存在不同的节点;
    所述发送针对该第一节点的第二重复地址检测请求给所述网络接入设备所在的其他局域网中的节点是指:发送针对该第一节点的第二重复地址检测请求给所述网络接入设备所在的其他局域网中且与所述第一节点处于不同局域网的节点。
  8. 根据权利要求1至5任一所述的重复地址检测方法,其中,所述第一重复地址检测请求为邻居请求报文,所述第二重复地址检测请求为邻居请求报文,所述地址冲突指示信息通过邻居通告报文携带。
  9. 根据权利要求1至5任一所述的重复地址检测方法,其中,所述方法还包括,所述第一节点接收到所述地址冲突指示信息后,释放所述第一节点当前的地址,重新获取地址。
  10. 一种重复地址检测装置,包括存储器和处理器,所述存储器存储有程序,所述程序在被所述处理器读取执行时,实现如权利要求1至9任一所述的重复地址检测方法。
  11. 一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如权利要求1至9任一所述的重复地址检测方法。
PCT/CN2019/100247 2018-08-27 2019-08-12 一种重复地址检测方法及装置、计算机可读存储介质 WO2020042899A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810980178.5 2018-08-27
CN201810980178.5A CN109120741B (zh) 2018-08-27 2018-08-27 一种重复地址检测方法及装置、计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2020042899A1 true WO2020042899A1 (zh) 2020-03-05

Family

ID=64860176

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/100247 WO2020042899A1 (zh) 2018-08-27 2019-08-12 一种重复地址检测方法及装置、计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN109120741B (zh)
WO (1) WO2020042899A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114765600A (zh) * 2020-12-31 2022-07-19 华为技术有限公司 一种IPv6地址的配置方法及路由设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109120741B (zh) * 2018-08-27 2020-10-02 南京中兴新软件有限责任公司 一种重复地址检测方法及装置、计算机可读存储介质
WO2020152691A1 (en) * 2019-01-21 2020-07-30 Telefonaktiebolaget Lm Ericsson (Publ) Multi-network internet protocol version 6 (ipv6) duplicate address detection using ethernet virtual private network (evpn)
CN110996373B (zh) * 2019-11-27 2020-12-25 腾讯科技(深圳)有限公司 重复无线网络标识的处理方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050036471A1 (en) * 2003-08-13 2005-02-17 Samsung Electronics Co., Ltd. Fast duplicate address detection entity for managing information for fast duplicate address detection in distribution system and fast duplicate address detection method using the same
CN1901551A (zh) * 2005-07-19 2007-01-24 上海贝尔阿尔卡特股份有限公司 一种支持IPv6的二层接入网中重复地址检测方法及其装置
CN101222513A (zh) * 2008-01-28 2008-07-16 杭州华三通信技术有限公司 一种防止重复地址检测攻击的方法及网络设备
CN101764734A (zh) * 2008-12-25 2010-06-30 中兴通讯股份有限公司 IPv6环境下提高邻居发现安全性的方法及宽带接入设备
CN109120741A (zh) * 2018-08-27 2019-01-01 中兴通讯股份有限公司 一种重复地址检测方法及装置、计算机可读存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6101499A (en) * 1998-04-08 2000-08-08 Microsoft Corporation Method and computer program product for automatically generating an internet protocol (IP) address
FR2936387B1 (fr) * 2008-09-25 2016-01-08 Canon Kk Procede de gestion d'espaces d'adressage lors d'une ouverture d'un tunnel de communication, tete de tunnel, produit programme d'ordinateur et moyen de stockage correspondant.
CN101562639B (zh) * 2009-05-14 2012-08-08 华为终端有限公司 信息同步方法、装置和系统
CN102413194B (zh) * 2010-09-20 2015-04-01 中国电信股份有限公司 节点设备、网络接入设备、地址冲突处理方法和系统
CN102201951B (zh) * 2011-06-15 2014-06-25 杭州华三通信技术有限公司 一种源地址重复性检测方法和设备
CN105516381A (zh) * 2014-10-14 2016-04-20 中国电信股份有限公司 用于生成IPv6地址的方法、装置和系统
CN104601414B (zh) * 2015-02-15 2018-12-11 新华三技术有限公司 一种软件定义网络中的ip地址冲突检测方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050036471A1 (en) * 2003-08-13 2005-02-17 Samsung Electronics Co., Ltd. Fast duplicate address detection entity for managing information for fast duplicate address detection in distribution system and fast duplicate address detection method using the same
CN1901551A (zh) * 2005-07-19 2007-01-24 上海贝尔阿尔卡特股份有限公司 一种支持IPv6的二层接入网中重复地址检测方法及其装置
CN101222513A (zh) * 2008-01-28 2008-07-16 杭州华三通信技术有限公司 一种防止重复地址检测攻击的方法及网络设备
CN101764734A (zh) * 2008-12-25 2010-06-30 中兴通讯股份有限公司 IPv6环境下提高邻居发现安全性的方法及宽带接入设备
CN109120741A (zh) * 2018-08-27 2019-01-01 中兴通讯股份有限公司 一种重复地址检测方法及装置、计算机可读存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114765600A (zh) * 2020-12-31 2022-07-19 华为技术有限公司 一种IPv6地址的配置方法及路由设备
CN114765600B (zh) * 2020-12-31 2023-10-20 华为技术有限公司 一种IPv6地址的配置方法及路由设备

Also Published As

Publication number Publication date
CN109120741A (zh) 2019-01-01
CN109120741B (zh) 2020-10-02

Similar Documents

Publication Publication Date Title
WO2020042899A1 (zh) 一种重复地址检测方法及装置、计算机可读存储介质
US10122679B2 (en) Method, relay agent, and system for acquiring internet protocol address in network
US20120324063A1 (en) Method, network device, and system for automatically configuring network device in ipv6 network
CN113497754B (zh) 转发路径建立方法、装置以及计算机可读存储介质
CN107547665B (zh) 一种dhcp地址分配的方法、设备及系统
JP2018518867A5 (zh)
WO2014047919A1 (zh) 一种分配地址的方法、装置及系统
US20120082110A1 (en) Method and terminal for transmitting service data
WO2016197689A1 (zh) 处理报文的方法、装置和系统
JP2017528052A5 (zh)
WO2014101891A1 (zh) 一种配置ip地址方法和设备
CN109039918B (zh) 一种报文发送方法及装置
WO2015000384A1 (zh) 一种标签处理的方法及装置
CN112152928A (zh) 一种邻居表项学习方法、装置及路由设备
US11936614B2 (en) Method and apparatus for sending reply packet, computing device, and storage medium
EP3496431B1 (en) Message transmission method and apparatus
US8806043B1 (en) Server selection during retransmit of a request
WO2017045106A1 (zh) 基于光网络系统的通信方法与设备
JP5392097B2 (ja) アドレス決定装置、通信システム、アドレス決定方法及びプログラム
WO2011157141A2 (zh) IPv6地址分配的方法及设备
KR20210079341A (ko) 서비스 흐름 처리 방법 및 장치
WO2018006684A1 (zh) 报文处理方法、装置及路由器
WO2016177185A1 (zh) 媒体访问控制mac地址的处理方法及装置
CN108718280B (zh) 一种报文转发方法及装置
WO2021190029A1 (zh) 实现运营商级网络地址转换的方法、装置和系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19856206

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 29/06/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19856206

Country of ref document: EP

Kind code of ref document: A1