WO2013167072A2 - 网络终端及其配置网际协议地址方法 - Google Patents

网络终端及其配置网际协议地址方法 Download PDF

Info

Publication number
WO2013167072A2
WO2013167072A2 PCT/CN2013/079915 CN2013079915W WO2013167072A2 WO 2013167072 A2 WO2013167072 A2 WO 2013167072A2 CN 2013079915 W CN2013079915 W CN 2013079915W WO 2013167072 A2 WO2013167072 A2 WO 2013167072A2
Authority
WO
WIPO (PCT)
Prior art keywords
address
terminal
network
message
ipv6
Prior art date
Application number
PCT/CN2013/079915
Other languages
English (en)
French (fr)
Other versions
WO2013167072A3 (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 WO2013167072A2 publication Critical patent/WO2013167072A2/zh
Publication of WO2013167072A3 publication Critical patent/WO2013167072A3/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses

Definitions

  • the present invention relates to network communication technologies, and in particular, to a network terminal and its configuration internet protocol
  • IP Internet Protocol
  • IPv6 Internet Protocol Version 6
  • the terminal As a network terminal that connects a terminal to an IPv6 network, the terminal only supports the stateless automatic configuration mode to configure an IPv6 address, that is, the terminal configuration is randomly generated by itself.
  • the IPv6 address formed by the interface identifier and the network address prefix advertised by the IPv6 network router. If the current address of the IPv6 network is assigned to the network address prefix and the interface identifier, the IP address of the terminal cannot be correctly routed due to the interface identifier conflict. As a result, the terminal fails to access the IPv6 network.
  • IPv4 Internet Protocol Version 4
  • DHCP Dynamic Host Configuration Protocol
  • the related art has no effective solution to the problem that the network interface identifier conflicts, the terminal DHCP Client service is disabled, or the network terminal access network fails due to abnormality.
  • the main purpose of the embodiments of the present invention is to provide a network terminal and a method for configuring the IP address thereof, so as to at least solve the problem that the terminal accesses the network through the network terminal due to the network interface identifier conflict, the terminal DHCP client service is prohibited, or abnormal.
  • the problem of failure is implemented as follows:
  • the embodiment of the present invention provides a method for configuring an Internet Protocol IP address, and the method includes: verifying whether a terminal IP address is valid;
  • the IP address carried in the Packet Data Protocol (PDP) context accept message is activated and sent to the terminal in the static configuration message, so that the terminal configures the IP address.
  • PDP Packet Data Protocol
  • the method further includes:
  • a router advertisement (RA, Router Advertisement) message sent by the IPv6 network is sent to the terminal, so that the terminal configuration combines with the random generated interface identifier and the IPv6 address formed by the RA message carrying the network address prefix.
  • RA Router Advertisement
  • whether the risk terminal end IP address is valid includes:
  • ICMP Internet Control Message Protocol
  • DNS domain name system
  • whether the IP address of the insurance terminal is valid includes:
  • the method further includes:
  • the embodiment of the invention further provides a network terminal, where the network terminal comprises: a verification module and Static configuration module;
  • the verification module is configured to verify whether the terminal IP address is valid
  • the static configuration module is configured to: when the verification module verifies that the terminal IP address is invalid, the IP address carried in the PDP context accepting message is activated, and is carried in the static configuration message and sent to the terminal, so that the terminal configures the IP address.
  • the network terminal further includes:
  • the router message processing module is configured to send the RA message sent by the IPv6 network to the terminal before the module verifies that the terminal is stateless and automatically configures the IPv6 address to be valid, so that the terminal configuration combines with the random generated interface identifier and the RA message carries the network address.
  • the IPv6 address formed by the prefix.
  • the verification module is further configured to: when the terminal IP address is valid, and the terminal IP address is a stateless automatic configuration IPv6 address, send an ICMP echo request message to the DNS server, and the ICMP echo request message
  • the source IP address is the terminal IP address. If an ICMP echo reply message is received, it is determined that the terminal IP address is valid; otherwise, it is determined that the terminal IP address is invalid.
  • the verification module is further configured to determine whether the terminal IP address is APIPA when the terminal IP address is valid, and the terminal IP address is a DHCP IPv4 address, and if yes, determine that the terminal IP address is valid; , It is determined that the terminal IP address is invalid.
  • the router message processing module is further configured to detect and discard the RA message delivered by the IPv6 network after the verification module verifies that the terminal is automatically configured and the IPv6 address is invalid.
  • the IP address carried in the PDP context accepting message is activated, and is carried in the static configuration message and sent to the terminal, so that the terminal configures the IP address.
  • the terminal when the terminal accesses the IPv6 network with the network address prefix and the interface identifier, the terminal statically configures the IPv6 address carried in the activated PDP context accept message returned by the IPv6 network, so as to ensure that the terminal can access the IPv6 network;
  • the terminal When the terminal accesses the IPv4 network and the terminal DHCP client service is disabled or abnormal, the terminal is configured to statically configure the IPv4 address carried in the activated PDP context accept message returned by the IPv4 network, and the terminal cannot obtain the DHCP client service is prohibited or abnormal.
  • a valid IPv4 address causes a failure to access the IPv4 network.
  • FIG. 1 is a schematic flowchart of an implementation process of configuring an IP address according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a network terminal according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of an implementation process of configuring an IPv6 address for a network terminal according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart of an implementation process for configuring an IPv4 address of a network terminal according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart of an implementation method of configuring an IP address according to an embodiment of the present invention. As shown in FIG. 1 , the method includes:
  • Step 101 Verify that the terminal IP address is valid.
  • the method further includes: activating a PDP context with an IPv4 network or an IPv6 network.
  • an Activate PDP Context Request message is sent to the IPv4 network or the IPv6 network, and an Activated PDP Context Accept message returned by the corresponding IPv4 network or IPv6 network is received.
  • the service GPRS (General Packet Radio Service) support node (SGSN) and the GPRS Support Node (GGSN) in the IPv4 network or the IPv6 network respond to the activation of the PDP context request. Message, perform business interaction, and return to activate PDP context accept message.
  • the method further includes:
  • the RA message sent by the IPv6 network is sent to the terminal, so that the terminal configuration combines with the random generation interface identifier and the network address prefix carried by the RA message to form an IPv6 address.
  • the RA message is periodically sent by the IPv6 network router, or is sent by the IPv6 network router after receiving the router request (RS, Router Solicitation) message.
  • whether the risk terminal end IP address is valid includes:
  • the DNS server Sending an ICMP echo request message to the DNS server, and the source IP address of the ICMP echo request message is the terminal IP address. If the ICMP echo reply message is received, it determines that the terminal IP address is valid; otherwise, it determines that the terminal IP address is invalid.
  • the stateless auto-configuration IPv6 address is an IPv6 address configured by the terminal according to the network address prefix carried by the RA message sent by the IPv6 network.
  • the terminal can obtain the stateless auto-configuration IPv6 address of the terminal by analyzing the source IP address carried by the data packet sent by the terminal to send the source IP address to the DNS server.
  • the status of the IPv6 address is automatically configured with the ICMP echo request message of the IPv6 address.
  • the interface identifier conflicts with the interface identifier randomly generated by the terminal.
  • the IPv6 address assigned by the IPv6 network conflicts with the stateless auto-configuration IPv6 address of the terminal, so that the data packet of the ICMP echo request message whose source IP address is the stateless auto-configured IPv6 address cannot be correctly forwarded to the IPv6 network.
  • the DNS server is unable to receive an ICMP echo reply message. In this way, it can be verified whether the stateless automatic configuration IPv6 address of the terminal is valid according to whether an ICMP echo reply message is received.
  • whether the IP address of the insurance terminal is valid includes: It is judged whether the terminal IPv4 address is APIPA, and if so, it is determined that the terminal IP address is valid; otherwise, it is determined that the terminal IP address is invalid.
  • the terminal will configure the APIPA, that is, the link-local address of 169.254.1.0 to 169.254.254.255 when the DHCP IPv4 address fails to be obtained.
  • the terminal IPv4 address prefix is 169.254, It can be determined that the terminal IP address is invalid.
  • Step 102 When the terminal IP address is invalid, the IP address carried in the PDP context accept message is activated, and is sent to the terminal in the static configuration message, so that the terminal configures the IP address.
  • the IP address allocation type of the terminal accessing the IPv6 network is that the network prefix address and the interface identifier are simultaneously allocated, so that the active PDP context accept message returned by the IPv6 network is carried.
  • the IPv6 address which is carried in the static configuration message and sent to the terminal, enables the terminal to statically configure the IPv6 address assigned by the IPv6 network.
  • the static configuration message can be sent through a driving channel.
  • the method further includes:
  • the terminal After receiving the activated PDP context accept message returned by the IPv6 network, and activating the PDP context of the IPv6 network, if the RA message sent by the IPv6 network is detected, the RA message is discarded instead of being sent to the terminal.
  • the terminal After receiving the RA message, the terminal is configured to combine the self-generated interface identifier and the IPv6 address formed by the RA message carrying the network address prefix.
  • the network terminal includes: a verification module 21 and a static configuration module 22;
  • the verification module 21 is configured to verify whether the terminal IP address is valid
  • the static configuration module 22 configured to verify that the terminal IP address is invalid, activates the IP address carried in the PDP context accept message, and sends the IP address in the static configuration message to the terminal, so that the terminal configures the IP address.
  • the network terminal further includes:
  • the router message processing module 23 is configured to send the RA message sent by the IPv6 network to the terminal before the verification module 21 verifies that the terminal is automatically configured to automatically configure the IPv6 address, so that the terminal configuration is combined with the self-generated interface identifier and the RA message.
  • the verification module 21 is further configured to: when verifying that the terminal IP address is valid, and the terminal IP address is a stateless automatic configuration IPv6 address, send an ICMP echo request message to the DNS server, and the ICMP echo request The source IP address of the message is the terminal IP address. If an ICMP echo reply message is received, it is determined that the terminal IP address is valid; otherwise, it is determined that the terminal IP address is invalid.
  • the verification module 21 is further configured to determine whether the terminal IP address is an automatic private IP address APIPA when the terminal IP address is valid, and the terminal IP address is a DHCP IPv4 address, and if yes, determine the terminal. The IP address is valid; otherwise, it is determined that the terminal IP address is invalid.
  • the router message processing module 23 is further configured to detect and discard the RA message delivered by the IPv6 network after the verification module 21 verifies that the terminal stateless auto-configuration IPv6 address is invalid.
  • FIG. 3 is a schematic flowchart of an implementation process for configuring an IPv6 address of a network terminal according to an embodiment of the present invention. As shown in FIG. 3, the method includes:
  • Step 301 The network terminal receives the networking instruction issued by the terminal, and activates a PDP context with the IPv6 network.
  • step 301 when receiving the networking instruction issued by the terminal, the network terminal sends an activation PDP context request to the IPv6 network, and the SGSN and the GGSN in the IPv6 network comply with the 3GPP specifications, and perform the service in response to the activation PDP context request message. Interaction, returning an active PDP context accept message to the network terminal.
  • Step 302 The network terminal determines whether the stateless automatic configuration identifier is "Yes”; if yes, proceeds to step 303; otherwise, proceeds to step 307;
  • the stateless automatic configuration identifier initial state of the network terminal may be preset according to the IPv6 network address allocation manner; the stateless automatic configuration identifier state includes "Yes” or "No", and the corresponding representative allows or disallows the terminal to use the stateless automatic configuration.
  • Step 303 The network terminal sends the RS message of the terminal to the IPv6 network, and sends the RA message sent by the IPv6 network to the terminal.
  • the IPv6 address can be formed by the terminal configuration in combination with the self-generated interface identifier and the network address prefix carried by the RA message.
  • Step 304 The network terminal verifies whether the terminal IPv6 address is valid, if it is valid, then proceeds to step 306 to terminate the current processing; otherwise, proceeds to step 305;
  • the network terminal verifying whether the IPv6 address of the terminal is valid, the network terminal sends an ICMP echo request message to the DNS server, and the source IP address of the ICMP echo request message is the IPv6 address of the terminal, and if received, The ICMP echo response message determines that the terminal IPv6 address is valid; otherwise, it determines that the terminal IPv6 address is invalid.
  • the network terminal sends an ICMP echo request message to the DNS server, and the maximum number of transmissions can be set. If the ICMP echo request message is sent more than the maximum number of transmissions, the network terminal still does not receive the message. The ICMP echo response message determines that the terminal IPv6 address is invalid.
  • Step 305 Invert the stateless automatic configuration identifier, and proceeds to step 302;
  • step 305 if the stateless automatic configuration identifier is "Yes”, the stateless automatic configuration identifier is set to "No”; if the stateless automatic configuration flag is "No”, the stateless state is set to "No". The automatic configuration ID is set to "Yes”.
  • Step 306 Terminate the current processing
  • Step 307 The network terminal activates the IPv6 address carried in the PDP context accept message, and carries it to the terminal in a static configuration message.
  • the static configuration message carrying the IPv6 address is sent to the terminal, so that the terminal can statically configure the IPv6 address.
  • the network terminal After the network terminal activates the PDP context of the IPv6 network, if the RA message sent by the IPv6 network is detected, the RA message is discarded, instead of being sent to the terminal, to prevent the terminal from receiving the RA message. Combining the self-generated interface identifier with the IPv6 address formed by the RA message carrying the network address prefix.
  • the network terminal sends the static configuration message to the terminal by using a driving channel.
  • the network terminal is configured to connect the connected terminal to the IPv4 network, and the connected terminal is configured to obtain the IPv4 address by using the DHCP method.
  • FIG. 4 is a schematic flowchart of an implementation process for configuring an IPv4 address of a network terminal according to an embodiment of the present invention. As shown in FIG. 4, the method includes:
  • Step 401 The network terminal receives the networking instruction issued by the terminal, and activates a PDP context with the IPv6 network.
  • the network terminal sends an activation PDP context request to the IPv4 network when receiving the networking instruction issued by the terminal, and the SGSN and the GGSN in the IPv4 network comply with the 3GPP specifications, perform service interaction, and return to the network terminal. Activate PDP Context Acceptance Interest.
  • Step 402 The network terminal verifies whether the terminal IPv4 address is valid, if it is valid, proceeds to step 404, and terminates the current processing; otherwise, proceeds to step 403;
  • the network terminal determines whether the terminal IPv4 address prefix is 169.254. If yes, it determines that the terminal IPv4 address is valid; otherwise, determines that the terminal IPv4 address is invalid.
  • Step 403 The network terminal activates the IPv4 address carried in the PDP context accept message, and sends the packet to the terminal in a static configuration message.
  • the static configuration message carrying the IPv4 address is sent to the terminal, so that the terminal can statically configure the IPv4 address.
  • the static configuration message may also carry a DNS server address carried in the activation PDP context accept message to ensure that the terminal can use the domain name resolution service.
  • the IP address carried in the PDP context accepting message is activated, and is carried in the static configuration message and sent to the terminal, so that the terminal configures the IP address.
  • the terminal when the terminal accesses the IPv6 network with the network address prefix and the interface identifier, the terminal statically configures the IPv6 address carried in the activated PDP context accept message returned by the IPv6 network, thereby ensuring that the terminal can access the IPv6 network;
  • the terminal is configured to statically configure the IPv4 address of the active PDP context accept message returned by the IPv4 network. This prevents the terminal from obtaining the valid IPv4 when the DHCP client service is disabled or abnormal.
  • the address causes the access to the IPv4 network to fail.

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

本发明实施例公开了一种配置IP地址方法,包括:验证终端IP地址是否有效;验证终端IP地址无效时,将激活PDP上下文接受消息携带的IP地址,携带在静态配置消息中发送至终端,以使终端配置所述IP地址。本发明实施例同时还公开了一种网络终端,使用本发明实施例的技术方案,解决了终端采用无状态自动配置方式配置IPv6地址接入同时分配网络地址前缀和接口标识的IPv6网络失败,以及终端DHCP Client服务被禁止或异常,无法获取有效IPv4地址从而导致接入IPv4网络失败的情况。

Description

网络终端及其配置网际协议地址方法 技术领域
本发明涉及网络通信技术, 尤其涉及一种网络终端及其配置网际协议
( IP, Internet Protocol )地址的方法。 背景技术
当前, 网际协议版本 6 ( IPv6, Internet Protocol Version 6 ) 网络日益普 及, 作为将终端接入 IPv6网络的网络终端, 目前仅支持终端采用无状态自 动配置方式配置 IPv6地址, 即终端配置结合自身随机生成接口标识和 IPv6 网络路由器公告的网络地址前缀形成的 IPv6地址。如果当前接入 IPv6网络 的地址分配方式为同时分配网络地址前缀和接口标识, 则会由于接口标识 冲突,使终端发送的 IP数据包无法正确路由,导致终端接入 IPv6网络失败; 同时, 终端通过网络终端接入网际协议版本 4 ( IPv4, Internet Protocol Version 4 )网络时,如果终端没有开启动态主机设置协议( DHCP, Dynamic Host Configuration Protocol )客户端( Client )服务, 且当前网络终端仅支持 终端采用 DHCP方式配置 IPv4地址, 这就导致终端无法获取有效 IPv4地 址, 从而使终端无法接入 IPv4网络。
综上所述,相关技术对网络接口标识冲突、终端 DHCP Client服务被禁 止或者异常造成的网络终端接入网络失败的问题, 尚无有效的解决方案。 发明内容
有鉴于此, 本发明实施例的主要目的在于提供一种网络终端及其配置 IP地址方法, 以至少解决由于网络接口标识冲突、 终端 DHCP Client服务 被禁止或者异常, 导致终端通过网络终端接入网络失败的问题。 为达到上述目的, 本发明实施例的技术方案是这样实现的: 本发明实施例提供了一种配置网际协议 IP地址方法, 该方法包括: 验证终端 IP地址是否有效;
验证终端 IP 地址无效时, 将激活分组数据协议(PDP, Packet Data Protocol )上下文接受消息携带的 IP地址,携带在静态配置消息中发送至终 端, 以使终端配置所述 IP地址。
优选地, 所述终端 IP地址为无状态自动配置 IPv6地址时, 所述险证终 端 IP地址是否有效之前, 该方法还包括:
向终端发送 IPv6网络下发的路由器通告 ( RA, Router Advertisement ) 消息,以使终端配置结合自身随机生成接口标识和所述 RA消息携带网络地 址前缀形成的 IPv6地址。
优选地, 所述终端 IP地址为无状态自动配置 IPv6地址时, 所述险证终 端 IP地址是否有效包括:
向域名系统(DNS, Domain Name System )服务器发送互联网控制消 息协议(ICMP, Internet Control Message Protocol ) 回声清求消息, 且所述 ICMP回声请求消息的源 IP地址为所述终端 IP地址, 若接收到 ICMP回声 应答消息, 则判定终端 IP地址有效; 否则, 判定终端 IP地址无效。
优选地, 所述终端 IP地址为 DHCP IPv4地址时, 所述险证终端 IP地 址是否有效包括:
判断终端 IP地址是否为自动专用 IP地址( APIPA, Automatic Private IP
Address ), 如果是, 则判定终端 IP地址有效; 否则, 判定终端 IP地址无效。
优选地, 所述险证终端 IP地址无效之后,且所述终端 IP地址为无状态 自动配置 IPv6地址时, 该方法还包括:
检测并丟弃 IPv6网络下发的 RA消息。
本发明实施例还提供了一种网络终端, 该网络终端包括: 验证模块和 静态配置模块; 其中,
所述验证模块, 配置为验证终端 IP地址是否有效;
所述静态配置模块, 配置为验证模块验证终端 IP地址无效时, 将激活 PDP上下文接受消息携带的 IP地址, 携带在静态配置消息中发送至终端, 以使终端配置所述 IP地址。
优选地, 该网络终端还包括:
路由器消息处理模块, 配置为验证模块验证终端无状态自动配置 IPv6 地址是否有效之前, 向终端发送 IPv6网络下发的 RA消息, 以使终端配置 结合自身随机生成接口标识和所述 RA消息携带网络地址前缀形成的 IPv6 地址。
优选地, 所述验证模块, 还配置为在验证终端 IP地址是否有效, 且所 述终端 IP地址为无状态自动配置 IPv6地址时, 向 DNS服务器发送 ICMP 回声请求消息,且所述 ICMP回声请求消息的源 IP地址为所述终端 IP地址, 若接收到 ICMP回声应答消息, 则判定终端 IP地址有效; 否则, 判定终端 IP地址无效。
优选地, 所述验证模块, 还配置为在验证终端 IP地址是否有效, 且所 述终端 IP地址为 DHCP IPv4地址时, 判断终端 IP地址是否为 APIPA, 如 果是, 则判定终端 IP地址有效; 否则, 判定终端 IP地址无效。
优选地, 所述路由器消息处理模块, 还配置为在验证模块验证终端无 状态自动配置 IPv6地址无效之后, 检测并丟弃 IPv6网络下发的 RA消息。
本发明实施例所提供的技术方案中, 在验证终端配置 IP地址无效后, 将激活 PDP上下文接受消息携带的 IP地址,携带在静态配置消息中发送至 终端, 以使终端配置所述 IP地址, 如此: 在终端接入同时分配网络地址前 缀和接口标识的 IPv6网络时, 使终端静态配置 IPv6网络返回的激活 PDP 上下文接受消息携带的 IPv6地址, 从而保证终端能够接入所述 IPv6网络; 在终端接入 IPv4网络且终端 DHCP Client服务被禁止或者异常时, 使终端 静态配置 IPv4网络返回的激活 PDP上下文接受消息携带的 IPv4地址, 避 免了终端 DHCP Client服务被禁止或者异常时, 终端无法获取有效 IPv4地 址导致接入 IPv4网络失败的情况。 附图说明
图 1为本发明实施例的配置 IP地址方法的实现流程示意图;
图 2为本发明实施例的网络终端的组成结构示意图;
图 3为本发明实施例的网络终端配置 IPv6地址的实现流程示意图; 图 4为本发明实施例的网络终端配置 IPv4地址的实现流程示意图。
具体实施方式
下面结合附图及具体实施例对本发明实施例做进一步详细的说明。 图 1为本发明实施例配置 IP地址方法的实现流程示意图,如图 1所示, 该方法包括:
步骤 101 : 验证终端 IP地址是否有效;
优选地, 步骤 101之前, 还包括: 激活与 IPv4网络或 IPv6网络的 PDP 上下文。
在激活与 IPv4网络或 IPv6网络的 PDP上下文的一个优选的实施方式 中, 向 IPv4网络或 IPv6网络发送激活 PDP上下文请求消息, 并接收对应 的 IPv4网络或 IPv6网络返回的激活 PDP上下文接受消息。
其中, IPv4网络或 IPv6网络中的服务通用分组无线服务( GPRS, General Packet Radio Service )支持节点( SGSN, Serving GPRS Support Node )和网 关 GPRS支持节点 ( GGSN, Gateway GPRS Support Node )响应激活 PDP 上下文请求消息, 进行业务交互, 并返回激活 PDP上下文接受消息。 优选地, 所述终端 IP地址为无状态自动配置 IPv6地址时, 所述险证终 端 IP地址是否有效之前, 还包括:
向终端发送 IPv6网络下发的 RA消息, 以使终端配置结合自身随机生 成接口标识和所述 RA消息携带的网络地址前缀, 形成 IPv6地址。
其中, 所述 RA消息由 IPv6网络路由器定期主动下发, 或由 IPv6网络 路由器接收到终端的路由器请求(RS, Router Solicitation ) 消息后下发。
优选地, 所述终端 IP地址为无状态自动配置 IPv6地址时, 所述险证终 端 IP地址是否有效包括:
向 DNS服务器发送 ICMP回声请求消息, 且所述 ICMP回声请求消息 源 IP地址为终端 IP地址, 若接收到 ICMP回声应答消息, 则判定终端 IP 地址有效; 否则, 判定终端 IP地址无效。
其中, 所述无状态自动配置 IPv6地址为终端根据 IPv6网络下发的 RA 消息携带的网络地址前缀, 结合自身随机生成接口标识配置的 IPv6地址。
其中, 当终端配置所述无状态自动配置 IPv6地址后, 通过分析终端主 动发送的数据包携带的源 IP地址,可获取终端的无状态自动配置 IPv6地址, 以向 DNS服务器发送源 IP地址为所述无状态自动配置 IPv6地址的 ICMP 回声请求消息; 此时, 若 IPv6网络的 IPv6地址分配类型为同时分配网络前 缀地址和接口标识, 由于所述接口标识会和终端随机生成的接口标识冲突, 这就使 IPv6网络分配的 IPv6地址和终端的无状态自动配置 IPv6地址冲突, 从而,源 IP地址为所述无状态自动配置 IPv6地址的 ICMP回声请求消息的 数据包在 IPv6 网络中无法被正确转发至 DNS 服务器, 导致无法接收到 ICMP回声应答消息。 如此, 可根据是否接收到 ICMP回声应答消息, 验证 终端的无状态自动配置 IPv6地址是否有效。
优选地, 所述终端 IP地址为 DHCP IPv4地址时, 所述险证终端 IP地 址是否有效包括: 判断终端 IPv4地址是否为 APIPA, 如果是, 则判定终端 IP地址有效; 否则, 判定终端 IP地址无效。
其中, 当终端 DHCP Client服务异常或被禁止, 导致获取 DHCP IPv4 地址失败时, 终端会配置 APIPA, 即 169.254.1.0到 169.254.254.255的链路 本地地址, 如此, 当终端 IPv4地址前缀为 169.254时, 可判定终端 IP地址 无效。
步骤 102: 验证终端 IP地址无效时, 将激活 PDP上下文接受消息携带 的 IP地址,携带在静态配置消息中发送至终端,以使终端配置所述 IP地址。
其中, 验证终端无状态自动配置 IPv6地址无效时, 表明终端接入 IPv6 网络的 IP地址分配类型为同时分配网络前缀地址和接口标识, 如此, 通过 将所述 IPv6网络返回的激活 PDP上下文接受消息携带的 IPv6地址, 携带 在静态配置消息中发送至终端, 可使终端静态配置 IPv6 网络分配的 IPv6 地址。
其中, 所述静态配置消息可以通过驱动通道发送。
优选地,验证终端 IP地址无效之后,且所述终端 IP地址为无状态自动 配置 IPv6地址时, 还包括:
检测并丟弃 IPv6网络下发的 RA消息。
其中,在接收到 IPv6网络返回的激活 PDP上下文接受消息,激活与 IPv6 网络的 PDP上下文后, 若检测 IPv6网络下发的 RA消息, 则将所述 RA消 息丟弃, 而非发送到终端, 以避免终端接收到所述 RA消息后, 配置结合自 身随机生成接口标识和所述 RA消息携带网络地址前缀形成的 IPv6地址。
这里, 验证终端 DHCP IPv4地址无效时, 表明终端 DHCP Client服务 异常或被禁止, 无法主动发起 DHCP过程来获取 IPv4地址, 如此, 通过将 PDP上下文接受消息携带的 IPv4地址通过静态配置消息发送至终端, 可使 终端静态配置 IPv4网络分配的 IPv4地址。 图 2为本发明实施例的网络终端的组成结构示意图, 如图 2所示, 该 网络终端包括: 验证模块 21和静态配置模块 22; 其中,
所述验证模块 21, 配置为验证终端 IP地址是否有效;
所述静态配置模块 22, 配置为验证模块 21验证终端 IP地址无效时, 将激活 PDP上下文接受消息携带的 IP地址,携带在静态配置消息中发送至 终端, 以使终端配置所述 IP地址。
优选地, 该网络终端还包括:
路由器消息处理模块 23,配置为验证模块 21验证终端无状态自动配置 IPv6地址是否有效之前, 向终端发送 IPv6网络下发的 RA消息, 以使终端 配置结合自身随机生成接口标识和所述 RA 消息携带网络地址前缀形成的 IPv6地址。
优选地, 所述验证模块 21, 还配置为在验证终端 IP地址是否有效, 且 所述终端 IP地址为无状态自动配置 IPv6地址时,向 DNS服务器发送 ICMP 回声请求消息,且所述 ICMP回声请求消息的源 IP地址为所述终端 IP地址, 若接收到 ICMP回声应答消息, 则判定终端 IP地址有效; 否则, 判定终端 IP地址无效。
优选地, 所述验证模块 21, 还配置为在验证终端 IP地址是否有效, 且 所述终端 IP地址为 DHCP IPv4地址时, 判断终端 IP地址是否为自动专用 IP地址 APIPA, 如果是, 则判定终端 IP地址有效; 否则, 判定终端 IP地 址无效。
优选地, 所述路由器消息处理模块 23, 还配置为在验证模块 21验证终 端无状态自动配置 IPv6地址无效之后,检测并丟弃 IPv6网络下发的 RA消 息。
实施例一
本实施例中, 网络终端配置为将下挂终端接入 IPv6网络。 图 3为本发明实施例的网络终端配置 IPv6地址的实现流程示意图, 如 图 3所示, 包括:
步骤 301 : 网络终端接收终端下达的联网指令, 激活与 IPv6网络的 PDP 上下文;
在步骤 301的一个优选的实施方式中, 网络终端接收终端下达的联网指 令时,向 IPv6网络发送激活 PDP上下文请求, IPv6网络中的 SGSN和 GGSN 遵循 3GPP规范, 响应激活 PDP上下文请求消息, 进行业务交互, 向网络 终端返回激活 PDP上下文接受消息。
步骤 302: 网络终端判断无状态自动配置标识是否为 "是"; 如果是, 则 转入步骤 303 ; 否则, 转入步骤 307;
其中,网络终端无状态自动配置标识初始状态可才艮据 IPv6网络地址分配 方式预设; 无状态自动配置标识状态包括 "是" 或 "否", 对应代表允许或 不允许终端使用无状态自动配置方式配置 IPv6地址。
步骤 303: 网络终端将终端的 RS消息发送到 IPv6网络, 并将 IPv6网 络下发的 RA消息发送至终端;
如此,可由终端配置结合自身随机生成接口标识和所述 RA消息携带的 网络地址前缀形成 IPv6地址。
步骤 304: 网络终端验证终端 IPv6地址是否有效, 如果有效, 则转入步 骤 306, 终止本次处理; 否则, 转入步骤 305;
其中, 在网络终端验证终端 IPv6地址是否有效的一个优选的实施方式 中, 网络终端向 DNS服务器发送 ICMP回声请求消息, 且所述 ICMP回声 请求消息源 IP地址为所述终端 IPv6地址, 若接收到 ICMP回声应答消息, 则判定终端 IPv6地址有效; 否则, 判定终端 IPv6地址无效。
其中, 网络终端向 DNS服务器发送 ICMP回声请求消息, 可设置最大 发送次数, 若发送 ICMP 回声请求消息超过最大发送次数时, 仍没有收到 ICMP回声应答消息, 则判定终端 IPv6地址无效。
步骤 305: 将无状态自动配置标识取反, 并转入步骤 302;
在步骤 305的一个优选的实施方式中,若无状态自动配置标识为 "是", 则将无状态自动配置标识设置为 "否"; 若无状态自动配置标识为 "否", 则将无状态自动配置标识设置为 "是"。
步骤 306: 终止本次处理;
步骤 307: 网络终端将激活 PDP上下文接受消息携带的 IPv6地址, 携 带在静态配置消息中发送至终端。
其中, 通过将携带 IPv6地址的静态配置消息发送至终端, 可使终端静 态配置所述 IPv6地址。
其中, 网络终端激活与 IPv6网络的 PDP上下文后, 若检测 IPv6网络 下发的 RA消息, 则将所述 RA消息丟弃, 而非发送到终端, 以避免终端接 收到所述 RA消息后,配置结合自身随机生成接口标识和所述 RA消息携带 网络地址前缀形成的 IPv6地址。
其中, 网络终端通过驱动通道发送所述静态配置消息至终端。
实施例二
本实施例中, 网络终端配置为将下挂终端接入 IPv4网络, 且下挂终端 被配置为使用 DHCP方式获取 IPv4地址。
图 4为本发明实施例的网络终端配置 IPv4地址的实现流程示意图, 如 图 4所示, 包括:
步骤 401 : 网络终端接收终端下达的联网指令, 激活与 IPv6网络的 PDP 上下文;
在步骤 401—个优选的实施方式中, 网络终端接收到终端下达的联网指 令时,向 IPv4网络发送激活 PDP上下文请求, IPv4网络中的 SGSN和 GGSN 遵循 3GPP规范, 进行业务交互, 向网络终端返回激活 PDP上下文接受消 息。
步骤 402: 网络终端验证终端 IPv4地址是否有效, 如果有效, 则转入步 骤 404, 终止本次处理; 否则, 转入步骤 403;
在步骤 402—个优选的实施方式中, 网络终端判断终端 IPv4地址前缀 是否为 169.254, 如果是, 则判定终端 IPv4地址有效; 否则, 判定终端 IPv4 地址无效。
步骤 403: 网络终端将激活 PDP上下文接受消息携带的 IPv4地址, 携 带在静态配置消息中发送至终端。
其中, 通过将携带 IPv4地址的静态配置消息发送至终端, 可使终端静 态配置所述 IPv4地址。
其中, 所述静态配置消息还可以携带激活 PDP上下文接受消息携带的 DNS服务器地址, 以保证终端能够使用域名解析服务。
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围。 工业实用性
本发明实施例所提供的技术方案中, 在验证终端配置 IP地址无效后, 将激活 PDP上下文接受消息携带的 IP地址,携带在静态配置消息中发送至 终端, 以使终端配置所述 IP地址, 如此: 在终端接入同时分配网络地址前 缀和接口标识的 IPv6网络时, 使终端静态配置 IPv6网络返回的激活 PDP 上下文接受消息携带的 IPv6地址, 从而保证终端能够接入所述 IPv6网络; 在终端接入 IPv4网络且终端 DHCP Client服务被禁止或者异常时, 使终端 静态配置 IPv4网络返回的激活 PDP上下文接受消息携带的 IPv4地址, 避 免了终端 DHCP Client服务被禁止或者异常时, 终端无法获取有效 IPv4地 址导致接入 IPv4网络失败的情况。

Claims

权利要求书
1、 一种配置网际协议 IP地址方法, 该方法包括:
验证终端 IP地址是否有效;
验证终端 IP地址无效时,将激活分组数据协议 PDP上下文接受消息携 带的 IP地址,携带在静态配置消息中发送至终端, 以使终端配置所述 IP地 址。
2、根据权利要求 1所述的方法, 其中, 所述终端 IP地址为无状态自动 配置网际协议版本 6 IPv6地址时, 所述验证终端 IP地址是否有效之前, 该 方法还包括:
向终端发送 IPv6网络下发的路由器通告 RA消息, 以使终端配置结合 自身随机生成接口标识和所述 RA消息携带网络地址前缀形成的 IPv6地址。
3、根据权利要求 1所述的方法, 其中, 所述终端 IP地址为无状态自动 配置 IPv6地址时, 所述验证终端 IP地址是否有效包括:
向域名服务系统 DNS服务器发送互联网控制消息协议 ICMP回声请求 消息, 且所述 ICMP回声请求消息的源 IP地址为所述终端 IP地址, 若接收 到 ICMP回声应答消息, 则判定终端 IP地址有效; 否则, 判定终端 IP地址 无效。
4、根据权利要求 1所述的方法,所述终端 IP地址为动态主机设置协议 DHCP网际协议版本 4 IPv4地址时, 所述验证终端 IP地址是否有效包括: 判断终端 IP地址是否为自动专用 IP地址 APIPA, 如果是, 则判定终 端 IP地址有效; 否则, 判定终端 IP地址无效。
5、 根据权利要求 1、 2、 3或 4所述的方法, 所述验证终端 IP地址无效 之后, 且所述终端 IP地址为无状态自动配置 IPv6地址时, 该方法还包括: 检测并丟弃 IPv6网络下发的 RA消息。
6、一种网络终端, 该网络终端包括: 验证模块和静态配置模块; 其中, 所述验证模块, 配置为验证终端 IP地址是否有效;
所述静态配置模块, 配置为验证模块验证终端 IP地址无效时, 将激活 PDP上下文接受消息携带的 IP地址, 携带在静态配置消息中发送至终端, 以使终端配置所述 IP地址。
7、 根据权利要求 6所述的网络终端, 其中, 该网络终端还包括: 路由器消息处理模块, 配置为验证模块验证终端无状态自动配置 IPv6 地址是否有效之前, 向终端发送 IPv6网络下发的 RA消息, 以使终端配置 结合自身随机生成接口标识和所述 RA消息携带网络地址前缀形成的 IPv6 地址。
8、 根据权利要求 6所述的网络终端, 其中,
所述验证模块, 还配置为在验证终端 IP地址是否有效, 且所述终端 IP 地址为无状态自动配置 IPv6地址时,向 DNS服务器发送 ICMP回声请求消 息, 且所述 ICMP回声请求消息的源 IP地址为所述终端 IP地址, 若接收到 ICMP回声应答消息, 则判定终端 IP地址有效; 否则, 判定终端 IP地址无 效。
9、 根据权利要求 6所述的网络终端, 其中,
所述验证模块, 还配置为在验证终端 IP地址是否有效, 且所述终端 IP 地址为 DHCP IPv4地址时, 判断终端 IP地址是否为 APIPA, 如果是, 则判 定终端 IP地址有效; 否则, 判定终端 IP地址无效。
10、 根据权利要求 6、 7、 8或 9所述的网络终端, 其中,
所述路由器消息处理模块, 还配置为在验证模块验证终端无状态自动 配置 IPv6地址无效之后, 检测并丟弃 IPv6网络下发的 RA消息。
PCT/CN2013/079915 2012-12-11 2013-07-23 网络终端及其配置网际协议地址方法 WO2013167072A2 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210531815.3 2012-12-11
CN2012105318153A CN103051739A (zh) 2012-12-11 2012-12-11 一种网络终端及其配置ip地址方法

Publications (2)

Publication Number Publication Date
WO2013167072A2 true WO2013167072A2 (zh) 2013-11-14
WO2013167072A3 WO2013167072A3 (zh) 2013-12-27

Family

ID=48064232

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/079915 WO2013167072A2 (zh) 2012-12-11 2013-07-23 网络终端及其配置网际协议地址方法

Country Status (2)

Country Link
CN (1) CN103051739A (zh)
WO (1) WO2013167072A2 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051739A (zh) * 2012-12-11 2013-04-17 中兴通讯股份有限公司 一种网络终端及其配置ip地址方法
CN104410572B (zh) * 2014-11-25 2017-08-18 青岛海信宽带多媒体技术有限公司 一种数字接收设备的路由表生成方法及装置
CN106850869B (zh) * 2016-12-16 2020-04-10 浙江宇视科技有限公司 一种ip地址的配置方法以及网络设备
JP2019201286A (ja) * 2018-05-15 2019-11-21 キヤノン株式会社 通信装置、ネットワークカメラ、制御方法、及びプログラム
CN111131548B (zh) * 2019-12-30 2022-06-28 奇安信科技集团股份有限公司 信息处理方法、装置和计算机可读存储介质
CN113949731A (zh) * 2021-10-12 2022-01-18 深兰科技(上海)有限公司 一种网络自动连接方法、装置、介质及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1460349A (zh) * 2000-08-29 2003-12-03 摩托罗拉公司 为移动台分配地址
CN102790810A (zh) * 2012-07-18 2012-11-21 大唐移动通信设备有限公司 一种ip地址分配方法及装置
CN102801821A (zh) * 2012-08-10 2012-11-28 中国联合网络通信集团有限公司 地址生成和解析方法、用户设备和网络节点
CN103051739A (zh) * 2012-12-11 2013-04-17 中兴通讯股份有限公司 一种网络终端及其配置ip地址方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7370093B2 (en) * 2002-03-07 2008-05-06 Brother Kogyo Kabushiki Kaisha Electronic apparatus and system capable of assigning appropriate address
JP3703457B2 (ja) * 2003-01-21 2005-10-05 キヤノン株式会社 アドレス通知方法、プログラム、及び、装置
CN100474839C (zh) * 2004-10-12 2009-04-01 上海贝尔阿尔卡特股份有限公司 IPv6接入网中的网络服务选择和认证,及无状态自动配置
CN100583904C (zh) * 2006-03-03 2010-01-20 华为技术有限公司 一种ipv6网络中主机地址的自动配置方法
CN102984295B (zh) * 2012-12-07 2015-08-26 中兴通讯股份有限公司 一种移动终端及其地址分配方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1460349A (zh) * 2000-08-29 2003-12-03 摩托罗拉公司 为移动台分配地址
CN102790810A (zh) * 2012-07-18 2012-11-21 大唐移动通信设备有限公司 一种ip地址分配方法及装置
CN102801821A (zh) * 2012-08-10 2012-11-28 中国联合网络通信集团有限公司 地址生成和解析方法、用户设备和网络节点
CN103051739A (zh) * 2012-12-11 2013-04-17 中兴通讯股份有限公司 一种网络终端及其配置ip地址方法

Also Published As

Publication number Publication date
WO2013167072A3 (zh) 2013-12-27
CN103051739A (zh) 2013-04-17

Similar Documents

Publication Publication Date Title
US9729501B2 (en) System and data card for stateless automatic configuration of IPv6 address and method for implementing the same
US7962584B2 (en) Usage of host generating interface identifiers in DHCPv6
WO2013167072A2 (zh) 网络终端及其配置网际协议地址方法
US20100223655A1 (en) Method, System, and Apparatus for DHCP Authentication
WO2017114362A1 (zh) 一种报文转发方法、装置和系统
US20140325090A1 (en) Discovery and disconnection of client addresses in an access node for an ip network
US8054839B2 (en) Apparatus and method of processing stateful address auto-configuration protocol in IPv6 network
WO2013159641A1 (zh) 地址分配方法、设备和系统
WO2014086167A1 (zh) 一种移动终端及其地址分配方法和系统
EP2888863B1 (en) Method and apparatus for configuring dhcp client
JP5459809B2 (ja) 動的ホスト構成プロトコルバージョン6サーバのipアドレスを取得するための方法、動的ホスト構成プロトコルバージョン6サーバ、および動的ホスト構成プロトコルバージョン6通信システム
JP5816293B2 (ja) パブリックネットワークにおけるプライベート装置の識別
WO2009117963A1 (zh) 地址配置方法、装置和系统
WO2012075850A1 (zh) 一种防止mac地址欺骗的方法、系统及交换机
US20130046899A1 (en) Ipv6 lan-side address assignment policy
WO2013186969A1 (ja) 通信情報検出装置及び通信情報検出方法
WO2012014931A1 (ja) 通信制御装置、通信システム及びプログラム
JP4054719B2 (ja) 特定アドレス使用制限装置
TWI392307B (zh) 用於驗證動態主機組態協定(dhcp)釋放訊息的方法和裝置
Bi et al. Source address validation improvement (SAVI) solution for DHCP
JP6497010B2 (ja) ネットワーク機器
US20080201477A1 (en) Client side replacement of DNS addresses
WO2010022535A1 (zh) 一种在ipv6接入节点中数据包转发的方法和装置
WO2013178164A1 (zh) IPv6域名服务器DNS地址分配、获取方法及装置
CN106878291B (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: 13787520

Country of ref document: EP

Kind code of ref document: A2

122 Ep: pct application non-entry in european phase

Ref document number: 13787520

Country of ref document: EP

Kind code of ref document: A2