WO2016202059A1 - Ipv6 network access method and gateway - Google Patents

Ipv6 network access method and gateway Download PDF

Info

Publication number
WO2016202059A1
WO2016202059A1 PCT/CN2016/078721 CN2016078721W WO2016202059A1 WO 2016202059 A1 WO2016202059 A1 WO 2016202059A1 CN 2016078721 W CN2016078721 W CN 2016078721W WO 2016202059 A1 WO2016202059 A1 WO 2016202059A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
feature information
ipv6
network
packet
Prior art date
Application number
PCT/CN2016/078721
Other languages
French (fr)
Chinese (zh)
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 WO2016202059A1 publication Critical patent/WO2016202059A1/en

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/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/659Internet protocol version 6 [IPv6] addresses

Definitions

  • This document relates to but not limited to the field of data communication, and relates to a method and a gateway for accessing an IPv6 network.
  • IPv6 Internet Protocol Version 6
  • FIG. 1 is a schematic diagram of a related art network networking.
  • a gateway device accesses two IPv6 networks at the same time, and the connected device accesses the Internet through a gateway device.
  • each network environment may assign a prefix to the gateway.
  • the gateway sends these prefixes to the attached device, the connected device may configure multiple addresses.
  • the source address used by the connected device to access the network does not match the prefix assigned by the target network, the network may fail. This is the source network address filtering of the carrier. Request for decision.
  • the gateway obtains the network address prefix from IPv6 network A and IPv6 network B, and sends the two network address prefixes to the attached PC.
  • the attached device generates two IPv6 addresses.
  • IPv6 network B When the device uses the Ping program to access the destination IP address (Internet Protocol) 2300::1, the source address is 2000::200::1, and the source address of the packet enters IPv6 network B. If the network address prefix is not assigned by IPv6 network B, the packet will be discarded by the BRAS (Broadband Remote Access Server) of IPv6 network B, causing the communication to fail.
  • BRAS Broadband Remote Access Server
  • the embodiments of the present invention provide a method and a gateway for accessing an IPv6 network, which ensure correct forwarding of packets.
  • the embodiment of the invention provides a method for accessing an IPv6 network, including:
  • the gateway obtains the address feature information of the multiple IPv6 networks
  • the address device information of one of the IPv6 networks is allocated to the attached device, or the address generated by the address feature information of one of the IPv6 networks is allocated to the attached device.
  • the packet After receiving the packet sent by the device, analyzing the destination IPv6 network of the packet, if the address feature information of the destination IPv6 network is inconsistent with the address feature information of the source address of the packet, After the address feature information of the source address of the packet is replaced with the address feature information of the destination IPv6 network, the packet is forwarded.
  • the method further includes:
  • the gateway After receiving the packet replied by the destination IPv6 network, the gateway replaces the address feature information of the destination address of the packet replied by the destination IPv6 network with the address feature information currently used by the downlink device.
  • the assigning the address feature information of one of the IPv6 networks to the downlink device, or the address generated by the downlink device to the address feature information of one of the IPv6 networks includes:
  • the gateway uses the neighbor discovery protocol or the dynamic host configuration protocol of the IPV6 to allocate the address feature information of one of the IPv6 networks to the attached device, or assign the address generated by the address feature information of one of the IPv6 networks to the attached device. of.
  • the address feature information includes a network address prefix.
  • the embodiment of the invention further provides a gateway, including:
  • the allocation module is configured to allocate the address feature information of one of the IPv6 networks to the attached device after the address feature information of the plurality of IPv6 networks is obtained, or allocate the information to the attached device An address generated by address feature information of an IPv6 network;
  • the forwarding module is configured to analyze, after receiving the packet sent by the device, the destination IPv6 network that is forwarded by the packet, if the address feature information of the destination IPv6 network and the source address of the packet If the address feature information is inconsistent, the address feature information of the source address of the packet is replaced with the address feature information of the destination IPv6 network, and then the packet is forwarded.
  • the forwarding module is further configured to receive the packet replied by the destination IPv6 network, and replace the address feature information of the destination address of the packet replied by the destination IPv6 network with the current use of the downlink device. Address feature information.
  • the allocation module is configured to:
  • the neighbor discovery protocol or the dynamic host configuration protocol of the IPV6 is used to allocate the address feature information of one of the networks to the attached device, or to allocate the address generated by the address feature information of one of the networks to the attached device.
  • the address feature information includes a network address prefix.
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores computer executable instructions, and when the computer executable instructions are executed, a method for accessing an IPv6 network is implemented.
  • the above technical solution can enable the IPv6 host to be accessed normally in a multi-network environment without configuring multiple IPv6 addresses, thereby avoiding the situation that the source address selection error cannot access the network.
  • FIG. 1 is a schematic diagram of a network networking of the related art
  • FIG. 2 is a schematic diagram of a problem of multiple network access in an IPv6 network of the related art
  • FIG. 3 is a flowchart of a method for accessing a network according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of an effect of a method for accessing a network according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a gateway according to an embodiment of the present invention.
  • FIG. 6 is a flowchart of a method for accessing a multiple IPv6 network according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a method for accessing an IPv6 network according to an embodiment of the present invention. As shown in FIG. 3, the method in this embodiment includes:
  • Step 11 After obtaining the address feature information of the multiple IPv6 networks, the gateway allocates the address feature information of one of the IPv6 networks to the attached device, or allocates the address feature information generated by the IPv6 network of the IPv6 network. address;
  • the address feature information includes a network address prefix.
  • the address feature information of one of the IPv6 networks is allocated to the downlink device, or the address generated by the address feature information of one of the IPv6 networks is allocated to the downlink device by using the following manner:
  • the gateway uses the neighbor discovery protocol or the dynamic host configuration protocol of the IPV6 to allocate the address feature information of one of the IPv6 networks to the attached device, or assign the address generated by the address feature information of one of the IPv6 networks to the attached device. of.
  • Step 12 After receiving the packet sent by the downlink device, analyzing the destination IPv6 network that is forwarded by the packet, if the address feature information of the destination IPv6 network and the address feature of the source address of the packet If the information is inconsistent, the address feature information of the source address of the packet is replaced with the address feature information of the destination IPv6 network, and then the packet is forwarded.
  • the method for accessing an IPv6 network in the embodiment of the present invention further includes:
  • the gateway After receiving the packet replied by the destination IPv6 network, the gateway replaces the address feature information of the destination address of the packet replied by the destination IPv6 network with the address feature information currently used by the downlink device.
  • the gateway when the gateway accesses multiple IPv6 network environments, the gateway can assign a network address prefix to the connected device.
  • the network address prefix of the address and the network address assigned by the network are used. If the prefix is inconsistent, the gateway can replace the network address prefix part of the source address of the packet with the network address prefix that matches the currently accessed network, so that the network can be correctly accessed.
  • the reverse response is processed for the reply message, and the prefix part of the destination address is replaced with the network address prefix currently used by the attached device.
  • FIG. 5 is a schematic diagram of a gateway according to an embodiment of the present invention. As shown in FIG. 5, the gateway in this embodiment includes:
  • the allocation module is configured to: after obtaining the address feature information of the plurality of IPv6 networks, assign the address feature information of one of the IPv6 networks to the attached device, or allocate the address feature information of the one of the IPv6 networks to the connected device. the address of;
  • the allocation module is responsible for assigning an IPv6 address to the IPv6 host of the gateway.
  • the module uses the standard ND (Neighbor Discovery) protocol or the DHCPv6 (Dynamic Host Configuration Protocol for IPV6) protocol.
  • the allocation module is configured to: use the neighbor discovery protocol or the dynamic host configuration protocol of the IPV6 to allocate address feature information of one of the networks to the attached device, or allocate the information to the attached device.
  • the address generated by the address feature information of one of the networks.
  • the address feature information includes a network address prefix.
  • the forwarding module is configured to: after receiving the packet sent by the device, analyze the destination network of the packet, if the address feature information of the destination network and the address feature information of the source address of the packet If the address feature information of the source address of the packet is replaced with the address feature information of the destination network, the packet is forwarded.
  • the forwarding module is configured to analyze the forwarding destination of the data packet, and determine whether the network address prefix authorized by the destination network to the gateway is consistent with the network address prefix of the source address of the data packet. If not, the network address prefix is replaced. For the packet replied by the destination network, the network address prefix part of the destination address of the packet is replaced with the network address prefix currently used by the host.
  • the forwarding module is further configured to receive the destination The packet replied by the IPv6 network replaces the address feature information of the destination address of the packet replied by the destination IPv6 network with the address feature information currently used by the hanged device.
  • the embodiment of the present invention provides a method for accessing a plurality of IPv6 networks based on a gateway device. As shown in FIG. 6, the method in this embodiment includes:
  • Step 101 The gateway establishes two IPv6 connections, and accesses the IPv6 network A and the IPv6 network B.
  • Step 102 The gateway obtains a PD (Prefix Delegation) named "PDA” from the network A, and obtains a PD from the network B, and is named "PDB";
  • PDA Prefix Delegation
  • the PDA is 2000:200::/64 and the PDB is 3000:300::/64.
  • Step 103 The gateway address delivery module allocates only one network address prefix to the attached device, or assigns the downlink device to an address generated by one of the network address prefixes.
  • the "PDA" 2000:200::/64 is sent to the attached device, or the downloaded device is assigned the address generated by the PDA.
  • Step 104 The attached device generates a GUA (Global Unique Address) according to the received network address prefix configuration.
  • GUA Global Unique Address
  • the generated GUA is 2000:200::1.
  • Step 105 The connected device starts to access the network, as shown in FIG. 3;
  • the source IP address of the Ping is 2000:200::1 and the destination IP is 2300::1.
  • Step 106 The gateway performs routing. If network B is selected (if the destination of 2300::1 is out of network B), step 107 is performed, if network A is selected (if the destination of 2300::1 is outgoing from network A) , without changing the message, directly performing step 108;
  • Step 107 If the destination of 2300::1 goes out from network B, replace the network address prefix part of the source address, and replace the address to become 3000:300::1;
  • Step 108 Forward the message to the WAN of the wide area network
  • Step 109 The gateway receives the network side packet, and checks the network address prefix part of the destination IP, such as If the PDA (2000::200::) is not processed directly, step 111; if it is a PDB, step 110;
  • Step 110 If it is a PDB (3000:300::), replace the network address prefix portion of the destination address with the PDA;
  • Step 111 Forward the packet to the LAN (Local Area Network) side.
  • LAN Local Area Network
  • this document provides a method for accessing a multi-IPv6 network environment based on a gateway device. This method avoids the difficulty in selecting a source address when a connected device accesses multiple IPv6 networks due to multiple IPv6 addresses. The problem is that the message cannot be correctly forwarded due to incorrect source address selection.
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores computer executable instructions, and when the computer executable instructions are executed, a method for accessing an IPv6 network is implemented.
  • each module/unit in the above embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program stored in the memory by a processor. / instruction to achieve its corresponding function.
  • This application is not limited to any specific combination of hardware and software.
  • the above technology prevents the device from being incorrectly forwarded due to incorrect source address selection.

Landscapes

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

Abstract

A network access method, comprising: after obtaining address feature information of multiple IPv6 networks, a gateway allocates address feature information of one IPv6 network to a connected device, or allocates an address generated from address feature information of one IPv6 network to a connected device; and after receiving a packet sent by the connected device, analyze a target IPv6 network to which the packet is forwarded, and if address feature information of the target IPv6 network is inconsistent with address feature information of a source address of the packet, replace the address feature information of the source address of the packet with the address feature information of the target IPv6 network, and forward the packet. The foregoing technical solution enables a connected IPv6 host to implement normal access in a multi-network environment without the need of configuring multiple IPv6 addresses for the connected IPv6 host, and avoids the problem of network access failure due to incorrect selection of a source address.

Description

一种访问IPv6网络的方法及网关Method and gateway for accessing IPv6 network 技术领域Technical field
本文涉及但不限于数据通信领域,涉及一种访问IPv6网络的方法及网关。This document relates to but not limited to the field of data communication, and relates to a method and a gateway for accessing an IPv6 network.
背景技术Background technique
随着IPv6(Internet Protocol Version 6)网络逐渐普及,IPv6新特性带来的问题也出现了。With the increasing popularity of IPv6 (Internet Protocol Version 6) networks, problems with the new features of IPv6 have emerged.
在IPv4中,网关下挂设备可以先分配私网地址,当网关接入多个网络环境的情况下,只需要通过NAT(Network Address Translation,网络地址转换)技术,将私网地址转化为对应网络连接的公网地址即可。但是目前IPv6网络中,下挂设备不通过这种NAT方式连接网络,下挂设备的IP(Internet Protocol,网络互连协议)地址是通过网关在WAN(Wide Area Network,广域网)侧获取的前缀衍生而来。图1为相关技术的网络组网的示意图,网关设备同时接入两个IPv6网络,下挂设备通过网关设备上网。In IPv4, the device connected to the gateway can be assigned a private network address. When the gateway accesses multiple network environments, the network address translation (NAT) is used to translate the private network address into the corresponding network. The connected public address can be. However, in the current IPv6 network, the connected device does not connect to the network through the NAT. The IP (Internet Protocol) address of the attached device is derived from the prefix obtained by the gateway on the WAN (Wide Area Network). Come. FIG. 1 is a schematic diagram of a related art network networking. A gateway device accesses two IPv6 networks at the same time, and the connected device accesses the Internet through a gateway device.
在访问多个IPv6网络环境的情况下,每个网络环境可能都会分配一个前缀给网关,而网关将这些前缀下发给下挂设备使用,则下挂设备有可能会配置多个地址。下挂设备访问网络时就必须选择一个源地址使用,但当下挂设备访问网络使用的源地址和目标网络分配的前缀不匹配时,就可能出现网络不通的情况,这是运营商网络源地址过滤要求决定的。如图2所示,网关分别从IPv6网络A和IPv6网络B获取到网络地址前缀,并将两个网络地址前缀都下发给下挂的PC,下挂设备会生成两个IPv6地址,当下挂设备使用Ping程序访问目的IP(Internet Protocol,网络之间互联协议)地址2300::1时,可能会使用源地址为2000::200::1,而该源地址的报文在进入IPv6网络B时会因为网络地址前缀不是IPv6网络B分配的,报文会被IPv6网络B的BRAS(Broadband Remote Access Server,宽带远程接入服务器)丢弃,导致通讯失败。 In the case of accessing multiple IPv6 network environments, each network environment may assign a prefix to the gateway. When the gateway sends these prefixes to the attached device, the connected device may configure multiple addresses. When the connected device accesses the network, you must select a source address to use. However, when the source address used by the connected device to access the network does not match the prefix assigned by the target network, the network may fail. This is the source network address filtering of the carrier. Request for decision. As shown in Figure 2, the gateway obtains the network address prefix from IPv6 network A and IPv6 network B, and sends the two network address prefixes to the attached PC. The attached device generates two IPv6 addresses. When the device uses the Ping program to access the destination IP address (Internet Protocol) 2300::1, the source address is 2000::200::1, and the source address of the packet enters IPv6 network B. If the network address prefix is not assigned by IPv6 network B, the packet will be discarded by the BRAS (Broadband Remote Access Server) of IPv6 network B, causing the communication to fail.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供一种访问IPv6网络的方法及网关,确保了报文的正确转发。The embodiments of the present invention provide a method and a gateway for accessing an IPv6 network, which ensure correct forwarding of packets.
本发明实施例提供了一种访问IPv6网络的方法,包括:The embodiment of the invention provides a method for accessing an IPv6 network, including:
在网关获取到多个IPv6网络的地址特征信息后,为下挂设备分配其中一个IPv6网络的地址特征信息,或者为所述下挂设备分配由其中一个IPv6网络的地址特征信息生成的地址;After the gateway obtains the address feature information of the multiple IPv6 networks, the address device information of one of the IPv6 networks is allocated to the attached device, or the address generated by the address feature information of one of the IPv6 networks is allocated to the attached device.
在接收到所述下挂设备发送的报文后,分析所述报文的转发的目的IPv6网络,若所述目的IPv6网络的地址特征信息与所述报文的源地址的地址特征信息不一致,则将所述报文的源地址的地址特征信息替换为所述目的IPv6网络的地址特征信息后,再转发所述报文。After receiving the packet sent by the device, analyzing the destination IPv6 network of the packet, if the address feature information of the destination IPv6 network is inconsistent with the address feature information of the source address of the packet, After the address feature information of the source address of the packet is replaced with the address feature information of the destination IPv6 network, the packet is forwarded.
可选地,所述方法还包括:Optionally, the method further includes:
所述网关接收到所述目的IPv6网络回复的报文后,则将所述目的Ipv6网络回复的报文的目的地址的地址特征信息替换为所述下挂设备当前使用的地址特征信息。After receiving the packet replied by the destination IPv6 network, the gateway replaces the address feature information of the destination address of the packet replied by the destination IPv6 network with the address feature information currently used by the downlink device.
可选地,所述为下挂设备分配其中一个IPv6网络的地址特征信息,或者为所述下挂设备分配由其中一个IPv6网络的地址特征信息生成的地址包括:Optionally, the assigning the address feature information of one of the IPv6 networks to the downlink device, or the address generated by the downlink device to the address feature information of one of the IPv6 networks includes:
所述网关是使用邻居发现协议或IPV6的动态主机配置协议,为下挂设备分配其中一个IPv6网络的地址特征信息,或者为所述下挂设备分配由其中一个IPv6网络的地址特征信息生成的地址的。The gateway uses the neighbor discovery protocol or the dynamic host configuration protocol of the IPV6 to allocate the address feature information of one of the IPv6 networks to the attached device, or assign the address generated by the address feature information of one of the IPv6 networks to the attached device. of.
可选地,所述地址特征信息包括网络地址前缀。Optionally, the address feature information includes a network address prefix.
本发明实施例还提供了一种网关,包括:The embodiment of the invention further provides a gateway, including:
分配模块,设置为在获取到多个IPv6网络的地址特征信息后,为下挂设备分配其中一个IPv6网络的地址特征信息,或者为所述下挂设备分配由其中 一个IPv6网络的地址特征信息生成的地址;The allocation module is configured to allocate the address feature information of one of the IPv6 networks to the attached device after the address feature information of the plurality of IPv6 networks is obtained, or allocate the information to the attached device An address generated by address feature information of an IPv6 network;
转发模块,设置为在接收到所述下挂设备发送的报文后,分析所述报文的转发的目的IPv6网络,若所述目的IPv6网络的地址特征信息与所述报文的源地址的地址特征信息不一致,则将所述报文的源地址的地址特征信息替换为所述目的IPv6网络的地址特征信息后,再转发所述报文。The forwarding module is configured to analyze, after receiving the packet sent by the device, the destination IPv6 network that is forwarded by the packet, if the address feature information of the destination IPv6 network and the source address of the packet If the address feature information is inconsistent, the address feature information of the source address of the packet is replaced with the address feature information of the destination IPv6 network, and then the packet is forwarded.
可选地,所述转发模块,还设置为接收所述目的IPv6网络回复的报文,则将所述目的Ipv6网络回复的报文的目的地址的地址特征信息替换为所述下挂设备当前使用的地址特征信息。Optionally, the forwarding module is further configured to receive the packet replied by the destination IPv6 network, and replace the address feature information of the destination address of the packet replied by the destination IPv6 network with the current use of the downlink device. Address feature information.
可选地,所述分配模块,是设置为:Optionally, the allocation module is configured to:
使用邻居发现协议或IPV6的动态主机配置协议为下挂设备分配其中一个网络的地址特征信息,或者为所述下挂设备分配由其中一个网络的地址特征信息生成的地址的。The neighbor discovery protocol or the dynamic host configuration protocol of the IPV6 is used to allocate the address feature information of one of the networks to the attached device, or to allocate the address generated by the address feature information of one of the networks to the attached device.
可选地,所述地址特征信息包括网络地址前缀。Optionally, the address feature information includes a network address prefix.
本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机可执行指令,所述计算机可执行指令被执行时实现访问IPv6网络的方法。The embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores computer executable instructions, and when the computer executable instructions are executed, a method for accessing an IPv6 network is implemented.
上述技术方案不用配置多个IPv6地址就可以使下挂的IPv6主机实现多网络环境的正常访问,避免了出现源地址选择错误无法访问网络的情况。The above technical solution can enable the IPv6 host to be accessed normally in a multi-network environment without configuring multiple IPv6 addresses, thereby avoiding the situation that the source address selection error cannot access the network.
在阅读并理解了附图和详细描述后,可以明白其它方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图说明DRAWINGS
图1为相关技术的网络组网的示意图;1 is a schematic diagram of a network networking of the related art;
图2为相关技术的IPv6网络下多网络访问存在的问题的示意图;2 is a schematic diagram of a problem of multiple network access in an IPv6 network of the related art;
图3为本发明实施例的访问网络的方法的流程图;3 is a flowchart of a method for accessing a network according to an embodiment of the present invention;
图4为本发明实施例的访问网络的方法实现的效果的示意图; 4 is a schematic diagram of an effect of a method for accessing a network according to an embodiment of the present invention;
图5为本发明实施例的网关的示意图;FIG. 5 is a schematic diagram of a gateway according to an embodiment of the present invention; FIG.
图6为本发明实施例的访问多IPv6网络的方法的流程图。FIG. 6 is a flowchart of a method for accessing a multiple IPv6 network according to an embodiment of the present invention.
具体实施方式detailed description
下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。Embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
图3为本发明实施例的一种访问IPv6网络的方法的流程图,如图3所示,本实施例的方法包括:FIG. 3 is a flowchart of a method for accessing an IPv6 network according to an embodiment of the present invention. As shown in FIG. 3, the method in this embodiment includes:
步骤11、在网关获取到多个IPv6网络的地址特征信息后,为下挂设备分配其中一个IPv6网络的地址特征信息,或者为所述下挂设备分配由其中一个IPv6网络的地址特征信息生成的地址;Step 11: After obtaining the address feature information of the multiple IPv6 networks, the gateway allocates the address feature information of one of the IPv6 networks to the attached device, or allocates the address feature information generated by the IPv6 network of the IPv6 network. address;
可选地,在本发明实施例中,所述地址特征信息包括网络地址前缀。Optionally, in the embodiment of the present invention, the address feature information includes a network address prefix.
可选地,在本实施例中,为下挂设备分配其中一个IPv6网络的地址特征信息,或者为所述下挂设备分配由其中一个IPv6网络的地址特征信息生成的地址可以通过以下方式实现:Optionally, in this embodiment, the address feature information of one of the IPv6 networks is allocated to the downlink device, or the address generated by the address feature information of one of the IPv6 networks is allocated to the downlink device by using the following manner:
所述网关是使用邻居发现协议或IPV6的动态主机配置协议,为下挂设备分配其中一个IPv6网络的地址特征信息,或者为所述下挂设备分配由其中一个IPv6网络的地址特征信息生成的地址的。The gateway uses the neighbor discovery protocol or the dynamic host configuration protocol of the IPV6 to allocate the address feature information of one of the IPv6 networks to the attached device, or assign the address generated by the address feature information of one of the IPv6 networks to the attached device. of.
步骤12、在接收到所述下挂设备发送的报文后,分析所述报文的转发的目的IPv6网络,若所述目的IPv6网络的地址特征信息与所述报文的源地址的地址特征信息不一致,则将所述报文的源地址的地址特征信息替换为所述目的IPv6网络的地址特征信息后,再转发所述报文。Step 12: After receiving the packet sent by the downlink device, analyzing the destination IPv6 network that is forwarded by the packet, if the address feature information of the destination IPv6 network and the address feature of the source address of the packet If the information is inconsistent, the address feature information of the source address of the packet is replaced with the address feature information of the destination IPv6 network, and then the packet is forwarded.
可选地,本发明实施例的访问IPv6网络的方法还包括:Optionally, the method for accessing an IPv6 network in the embodiment of the present invention further includes:
所述网关接收到所述目的IPv6网络回复的报文后,则将所述目的Ipv6网络回复的报文的目的地址的地址特征信息替换为所述下挂设备当前使用的地址特征信息。 After receiving the packet replied by the destination IPv6 network, the gateway replaces the address feature information of the destination address of the packet replied by the destination IPv6 network with the address feature information currently used by the downlink device.
如图4所示,当网关接入多个IPv6网络环境时,网关可以给下挂设备分配一个网络地址前缀,当下挂设备访问其中任一网络,使用地址的网络地址前缀和网络分配的网络地址前缀不一致时,利用网关将报文源地址的网络地址前缀部分替换为和当前访问的网络匹配的网络地址前缀,即可正确访问网络。对回复的报文则做相反的处理,将目的地址的前缀部分替换为下挂设备当前使用的网络地址前缀。As shown in Figure 4, when the gateway accesses multiple IPv6 network environments, the gateway can assign a network address prefix to the connected device. When the connected device accesses any of the networks, the network address prefix of the address and the network address assigned by the network are used. If the prefix is inconsistent, the gateway can replace the network address prefix part of the source address of the packet with the network address prefix that matches the currently accessed network, so that the network can be correctly accessed. The reverse response is processed for the reply message, and the prefix part of the destination address is replaced with the network address prefix currently used by the attached device.
图5为本发明实施例的网关的示意图,如图5所示,本实施例的网关包括:FIG. 5 is a schematic diagram of a gateway according to an embodiment of the present invention. As shown in FIG. 5, the gateway in this embodiment includes:
分配模块:设置为在获取到多个IPv6网络的地址特征信息后,为下挂设备分配其中一个IPv6网络的地址特征信息,或者为所述下挂设备分配由其中一个IPv6网络的地址特征信息生成的地址;The allocation module is configured to: after obtaining the address feature information of the plurality of IPv6 networks, assign the address feature information of one of the IPv6 networks to the attached device, or allocate the address feature information of the one of the IPv6 networks to the connected device. the address of;
分配模块负责给网关的下挂IPv6主机分配一个IPv6地址。该模块使用标准的ND(邻居发现)协议或DHCPv6(Dynamic Host Configuration Protocol for IPV6,IPV6的动态主机配置协议)协议。The allocation module is responsible for assigning an IPv6 address to the IPv6 host of the gateway. The module uses the standard ND (Neighbor Discovery) protocol or the DHCPv6 (Dynamic Host Configuration Protocol for IPV6) protocol.
可选地,在本发明实施例中,分配模块,是设置为:使用邻居发现协议或IPV6的动态主机配置协议为下挂设备分配其中一个网络的地址特征信息,或者为所述下挂设备分配由其中一个网络的地址特征信息生成的地址的。Optionally, in the embodiment of the present invention, the allocation module is configured to: use the neighbor discovery protocol or the dynamic host configuration protocol of the IPV6 to allocate address feature information of one of the networks to the attached device, or allocate the information to the attached device. The address generated by the address feature information of one of the networks.
所述地址特征信息包括网络地址前缀。The address feature information includes a network address prefix.
转发模块:设置为接收到所述下挂设备发送的报文后,分析所述报文的转发的目的网络,若所述目的网络的地址特征信息与所述报文的源地址的地址特征信息不一致,则将所述报文的源地址的地址特征信息替换为所述目的网络的地址特征信息后,再转发所述报文。The forwarding module is configured to: after receiving the packet sent by the device, analyze the destination network of the packet, if the address feature information of the destination network and the address feature information of the source address of the packet If the address feature information of the source address of the packet is replaced with the address feature information of the destination network, the packet is forwarded.
转发模块负责分析数据报文的转发目的地,判断目的地网络授权给网关的网络地址前缀是否和该数据报文源地址的网络地址前缀相一致,如果不一致,则进行网络地址前缀的替换。而对于目的地网络回复的报文,则将报文的目的地址的网络地址前缀部分替换为下挂主机当前使用的网络地址前缀。The forwarding module is configured to analyze the forwarding destination of the data packet, and determine whether the network address prefix authorized by the destination network to the gateway is consistent with the network address prefix of the source address of the data packet. If not, the network address prefix is replaced. For the packet replied by the destination network, the network address prefix part of the destination address of the packet is replaced with the network address prefix currently used by the host.
可选地,在本发明实施例中,所述转发模块,还设置为接收所述目的 IPv6网络回复的报文,则将所述目的Ipv6网络回复的报文的目的地址的地址特征信息替换为所述下挂设备当前使用的地址特征信息。Optionally, in the embodiment of the present invention, the forwarding module is further configured to receive the destination The packet replied by the IPv6 network replaces the address feature information of the destination address of the packet replied by the destination IPv6 network with the address feature information currently used by the hanged device.
下面结合具体示例进一步说明本申请的技术方案。The technical solution of the present application will be further described below with reference to specific examples.
本发明实施例提供一种基于网关设备访问多IPv6网络的方法,如图6所示,本实施例的方法包括:The embodiment of the present invention provides a method for accessing a plurality of IPv6 networks based on a gateway device. As shown in FIG. 6, the method in this embodiment includes:
步骤101:网关建立两条IPv6连接,接入IPv6网络A和IPv6网络B;Step 101: The gateway establishes two IPv6 connections, and accesses the IPv6 network A and the IPv6 network B.
步骤102:网关分别从网络A获取到PD(Prefix Delegation,前缀授权)命名为“PDA”,从网络B获取到PD,命名为“PDB”;Step 102: The gateway obtains a PD (Prefix Delegation) named "PDA" from the network A, and obtains a PD from the network B, and is named "PDB";
例如,PDA为2000:200::/64,PDB为3000:300::/64。For example, the PDA is 2000:200::/64 and the PDB is 3000:300::/64.
步骤103:网关地址下发模块只给下挂设备分配其中一个网络地址前缀;或者给下挂设备分配由其中一个网络地址前缀生成的地址;Step 103: The gateway address delivery module allocates only one network address prefix to the attached device, or assigns the downlink device to an address generated by one of the network address prefixes.
例如将“PDA”2000:200::/64下发给下挂设备,或者给下挂设备分配由PDA生成的地址。For example, the "PDA" 2000:200::/64 is sent to the attached device, or the downloaded device is assigned the address generated by the PDA.
步骤104:下挂设备根据接收到的网络地址前缀配置生成GUA(Global Unique Address,全球唯一地址);Step 104: The attached device generates a GUA (Global Unique Address) according to the received network address prefix configuration.
例如,生成的GUA为2000:200::1。For example, the generated GUA is 2000:200::1.
步骤105:下挂设备开始访问网络,如图3所示;Step 105: The connected device starts to access the network, as shown in FIG. 3;
例如,下挂设备Ping(Packet Internet Groper,因特网包探索器)源IP地址为2000:200::1,目的地IP为2300::1.For example, the source IP address of the Ping (Pet Internet Groper) is 2000:200::1 and the destination IP is 2300::1.
步骤106:网关进行路由选择,如果选择网络B(如果2300::1的目的地从网络B出去),则执行步骤107,如果选择网络A(如果2300::1的目的地从网络A出去),则不改变报文,直接执行步骤108;Step 106: The gateway performs routing. If network B is selected (if the destination of 2300::1 is out of network B), step 107 is performed, if network A is selected (if the destination of 2300::1 is outgoing from network A) , without changing the message, directly performing step 108;
步骤107:如果2300::1的目的地从网络B出去,则替换源地址的网络地址前缀部分,替换后地址变为3000:300::1;Step 107: If the destination of 2300::1 goes out from network B, replace the network address prefix part of the source address, and replace the address to become 3000:300::1;
步骤108:将报文转发到广域网WAN;Step 108: Forward the message to the WAN of the wide area network;
步骤109:网关收到网络侧报文,查看目的IP的网络地址前缀部分,如 果是PDA(2000::200::)则不做处理直接,执行步骤111;如果是PDB则执行步骤110;Step 109: The gateway receives the network side packet, and checks the network address prefix part of the destination IP, such as If the PDA (2000::200::) is not processed directly, step 111; if it is a PDB, step 110;
步骤110:如果是PDB(3000:300::)则将目的地址的网络地址前缀部分替换为PDA;Step 110: If it is a PDB (3000:300::), replace the network address prefix portion of the destination address with the PDA;
步骤111:转发报文到LAN(Local Area Network,局域网)侧。Step 111: Forward the packet to the LAN (Local Area Network) side.
综上所述,本文提供一种基于网关设备访问多IPv6网络环境的方法,该方法避免了下挂设备在接入多IPv6网络时,由于配置了多IPv6地址,而面临的源地址选择困难的问题,避免了因源地址选择错误,报文无法正确转发的情况。In summary, this document provides a method for accessing a multi-IPv6 network environment based on a gateway device. This method avoids the difficulty in selecting a source address when a connected device accesses multiple IPv6 networks due to multiple IPv6 addresses. The problem is that the message cannot be correctly forwarded due to incorrect source address selection.
本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机可执行指令,所述计算机可执行指令被执行时实现访问IPv6网络的方法。The embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores computer executable instructions, and when the computer executable instructions are executed, a method for accessing an IPv6 network is implemented.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本申请不限制于任何特定形式的硬件和软件的结合。本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或者等同替换,而不脱离本申请技术方案的精神和范围,均应涵盖在本申请的权利要求范围当中。One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct related hardware, such as a processor, which may be stored in a computer readable storage medium, such as a read only memory, disk or optical disk. Wait. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the above embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program stored in the memory by a processor. / instruction to achieve its corresponding function. This application is not limited to any specific combination of hardware and software. A person skilled in the art should understand that the technical solutions of the present application can be modified or equivalent, without departing from the spirit and scope of the technical solutions of the present application, and should be included in the scope of the claims of the present application.
工业实用性Industrial applicability
上述技术避免了下挂设备因源地址选择错误,报文无法正确转发的情况。 The above technology prevents the device from being incorrectly forwarded due to incorrect source address selection.

Claims (8)

  1. 一种访问IPv6网络的方法,包括:A method of accessing an IPv6 network, including:
    在网关获取到多个IPv6网络的地址特征信息后,为下挂设备分配其中一个IPv6网络的地址特征信息,或者为所述下挂设备分配由其中一个IPv6网络的地址特征信息生成的地址;After the gateway obtains the address feature information of the multiple IPv6 networks, the address device information of one of the IPv6 networks is allocated to the attached device, or the address generated by the address feature information of one of the IPv6 networks is allocated to the attached device.
    在接收到所述下挂设备发送的报文后,分析所述报文的转发的目的IPv6网络,若所述目的IPv6网络的地址特征信息与所述报文的源地址的地址特征信息不一致,则将所述报文的源地址的地址特征信息替换为所述目的IPv6网络的地址特征信息后,转发所述报文。After receiving the packet sent by the device, analyzing the destination IPv6 network of the packet, if the address feature information of the destination IPv6 network is inconsistent with the address feature information of the source address of the packet, After the address feature information of the source address of the packet is replaced with the address feature information of the destination IPv6 network, the packet is forwarded.
  2. 如权利要求1所述的方法,所述方法还包括:The method of claim 1 further comprising:
    所述网关接收到所述目的IPv6网络回复的报文后,则将所述目的Ipv6网络回复的报文的目的地址的地址特征信息替换为所述下挂设备当前使用的地址特征信息。After receiving the packet replied by the destination IPv6 network, the gateway replaces the address feature information of the destination address of the packet replied by the destination IPv6 network with the address feature information currently used by the downlink device.
  3. 如权利要求1或2所述的方法,其中,所述为下挂设备分配其中一个IPv6网络的地址特征信息,或者为所述下挂设备分配由其中一个IPv6网络的地址特征信息生成的地址包括:The method according to claim 1 or 2, wherein the assigning address characteristics information of one of the IPv6 networks to the attached device, or assigning the address generated by the address feature information of one of the IPv6 networks to the attached device includes: :
    所述网关是使用邻居发现协议或IPV6的动态主机配置协议,为下挂设备分配其中一个IPv6网络的地址特征信息,或者为所述下挂设备分配由其中一个IPv6网络的地址特征信息生成的地址的。The gateway uses the neighbor discovery protocol or the dynamic host configuration protocol of the IPV6 to allocate the address feature information of one of the IPv6 networks to the attached device, or assign the address generated by the address feature information of one of the IPv6 networks to the attached device. of.
  4. 如权利要求1或2所述的方法,其中:The method of claim 1 or 2 wherein:
    所述地址特征信息包括网络地址前缀。The address feature information includes a network address prefix.
  5. 一种网关,包括:A gateway that includes:
    分配模块,设置为在获取到多个IPv6网络的地址特征信息后,为下挂设备分配其中一个IPv6网络的地址特征信息,或者为所述下挂设备分配由其中一个IPv6网络的地址特征信息生成的地址;The allocation module is configured to allocate the address feature information of one of the IPv6 networks to the attached device after the address feature information of the plurality of IPv6 networks is obtained, or generate the address feature information of the IPv6 network by assigning the address information of the IPv6 network to the attached device. the address of;
    转发模块,设置为在接收到所述下挂设备发送的报文后,分析所述报文的转发的目的IPv6网络,若所述目的IPv6网络的地址特征信息与所述报文 的源地址的地址特征信息不一致,则将所述报文的源地址的地址特征信息替换为所述目的IPv6网络的地址特征信息后,转发所述报文。a forwarding module, configured to analyze, after receiving the packet sent by the device, the destination IPv6 network that is forwarded by the packet, and the address feature information of the destination IPv6 network and the packet If the address feature information of the source address is inconsistent, the address feature information of the source address of the packet is replaced with the address feature information of the destination IPv6 network, and the packet is forwarded.
  6. 如权利要求5所述的网关:The gateway of claim 5:
    所述转发模块,还设置为接收所述目的IPv6网络回复的报文,则将所述目的Ipv6网络回复的报文的目的地址的地址特征信息替换为所述下挂设备当前使用的地址特征信息。The forwarding module is further configured to receive the packet replied by the destination IPv6 network, and replace the address feature information of the destination address of the packet replied by the destination IPv6 network with the address feature information currently used by the downlink device. .
  7. 如权利要求5或6所述的网关,其中,所述分配模块,是设置为:The gateway according to claim 5 or 6, wherein the allocation module is configured to:
    使用邻居发现协议或IPV6的动态主机配置协议为下挂设备分配其中一个网络的地址特征信息,或者为所述下挂设备分配由其中一个网络的地址特征信息生成的地址的。The neighbor discovery protocol or the dynamic host configuration protocol of the IPV6 is used to allocate the address feature information of one of the networks to the attached device, or to allocate the address generated by the address feature information of one of the networks to the attached device.
  8. 如权利要求5或6所述的网关,其中,A gateway according to claim 5 or 6, wherein
    所述地址特征信息包括网络地址前缀。 The address feature information includes a network address prefix.
PCT/CN2016/078721 2015-06-19 2016-04-07 Ipv6 network access method and gateway WO2016202059A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510347238.6A CN106331191A (en) 2015-06-19 2015-06-19 IPv6 network access method and gateway
CN201510347238.6 2015-06-19

Publications (1)

Publication Number Publication Date
WO2016202059A1 true WO2016202059A1 (en) 2016-12-22

Family

ID=57544756

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/078721 WO2016202059A1 (en) 2015-06-19 2016-04-07 Ipv6 network access method and gateway

Country Status (2)

Country Link
CN (1) CN106331191A (en)
WO (1) WO2016202059A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887186A (en) * 2019-11-29 2021-06-01 中兴通讯股份有限公司 Multi-plane network access method, device and computer storage medium
CN114945013A (en) * 2022-04-28 2022-08-26 中国电信股份有限公司 Data forwarding method and device, electronic equipment and computer readable storage medium
CN115334036A (en) * 2022-08-11 2022-11-11 江苏安超云软件有限公司 Method and device for intelligently controlling source address conversion, electronic equipment and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109688057B (en) * 2018-12-13 2021-08-24 Ut斯达康通讯有限公司 Message forwarding method and device of segment routing network based on IPV6
CN114765600B (en) * 2020-12-31 2023-10-20 华为技术有限公司 IPv6 address configuration method and routing equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060056420A1 (en) * 2004-09-16 2006-03-16 Fujitsu Limited Communication apparatus selecting a source address
US7161897B1 (en) * 2000-11-27 2007-01-09 Nortel Networks Limited Communications system, apparatus and method therefor
US7894433B2 (en) * 2005-08-08 2011-02-22 Cisco Technology, Inc. Default gateway router supplying IP address prefixes ordered for source address selection by host device
CN102801826A (en) * 2012-08-29 2012-11-28 清华大学 IPv6 (Internet Protocol Version 6) site multi-homing application method on basis of IPv6 address translation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7161897B1 (en) * 2000-11-27 2007-01-09 Nortel Networks Limited Communications system, apparatus and method therefor
US20060056420A1 (en) * 2004-09-16 2006-03-16 Fujitsu Limited Communication apparatus selecting a source address
US7894433B2 (en) * 2005-08-08 2011-02-22 Cisco Technology, Inc. Default gateway router supplying IP address prefixes ordered for source address selection by host device
CN102801826A (en) * 2012-08-29 2012-11-28 清华大学 IPv6 (Internet Protocol Version 6) site multi-homing application method on basis of IPv6 address translation

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887186A (en) * 2019-11-29 2021-06-01 中兴通讯股份有限公司 Multi-plane network access method, device and computer storage medium
CN112887186B (en) * 2019-11-29 2024-03-22 中兴通讯股份有限公司 Multi-plane network access method, device and computer storage medium
CN114945013A (en) * 2022-04-28 2022-08-26 中国电信股份有限公司 Data forwarding method and device, electronic equipment and computer readable storage medium
CN114945013B (en) * 2022-04-28 2023-10-27 中国电信股份有限公司 Data forwarding method, device, electronic equipment and computer readable storage medium
CN115334036A (en) * 2022-08-11 2022-11-11 江苏安超云软件有限公司 Method and device for intelligently controlling source address conversion, electronic equipment and storage medium
CN115334036B (en) * 2022-08-11 2023-07-07 安超云软件有限公司 Method and device for intelligently controlling source address conversion, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN106331191A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
JP5711754B2 (en) Smart client routing
US8289968B1 (en) Distributed network address translation in computer networks
US7830878B2 (en) Virtual network connection system, virtual network connection apparatus, and computer-readable medium
WO2016202059A1 (en) Ipv6 network access method and gateway
US8122113B2 (en) Dynamic host configuration protocol (DHCP) message interception and modification
Cheshire et al. Nat port mapping protocol (nat-pmp)
US8458303B2 (en) Utilizing a gateway for the assignment of internet protocol addresses to client devices in a shared subset
CN107094110B (en) DHCP message forwarding method and device
US20140294009A1 (en) Communication apparatus, communication system, control method of communication apparatus and program
US20130205040A1 (en) Ensuring symmetric routing to private network
WO2013155302A1 (en) Asset detection system
JP5816293B2 (en) Private device identification in the public network
JP2017517971A (en) Network packet encapsulation and routing
WO2018019216A1 (en) Ap access control
US20140032782A1 (en) Method and apparatus for route selection of host in multihoming site
JP2019176511A (en) Network apparatus
US7693091B2 (en) Teredo connectivity between clients behind symmetric NATs
WO2016177185A1 (en) Method and apparatus for processing media access control (mac) address
WO2017219816A1 (en) Data transmission method and network address translation device
US20160065536A1 (en) Home gateway apparatus and packet transfer method
US20090292796A1 (en) Method and device for providing routing policies to user terminals according to applications executed on user terminals
Rajput et al. The helping protocol “DHCP”
CN113014680A (en) Broadband access method, device, equipment and storage medium
Horley Practical IPv6 for Windows Administrators
US20170208031A1 (en) Method for modifying a portmap of a cpe device, respective cpe device and computer/program

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: 16810800

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16810800

Country of ref document: EP

Kind code of ref document: A1