WO2016191906A1 - 互联网协议地址分配方法及路由器 - Google Patents

互联网协议地址分配方法及路由器 Download PDF

Info

Publication number
WO2016191906A1
WO2016191906A1 PCT/CN2015/080206 CN2015080206W WO2016191906A1 WO 2016191906 A1 WO2016191906 A1 WO 2016191906A1 CN 2015080206 W CN2015080206 W CN 2015080206W WO 2016191906 A1 WO2016191906 A1 WO 2016191906A1
Authority
WO
WIPO (PCT)
Prior art keywords
router
prefix
proxy
network device
level
Prior art date
Application number
PCT/CN2015/080206
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 华为技术有限公司
Priority to KR1020177026824A priority Critical patent/KR101974023B1/ko
Priority to US15/556,553 priority patent/US10432579B2/en
Priority to JP2017567514A priority patent/JP6517377B2/ja
Priority to CN201580044872.0A priority patent/CN106576120B/zh
Priority to PCT/CN2015/080206 priority patent/WO2016191906A1/zh
Priority to EP15893570.0A priority patent/EP3255866B1/en
Publication of WO2016191906A1 publication Critical patent/WO2016191906A1/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/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
    • H04L12/00Data switching networks
    • H04L12/54Store-and-forward switching systems 
    • H04L12/56Packet switching systems
    • H04L12/5691Access to open networks; Ingress point selection, e.g. ISP selection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/52Multiprotocol routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/30Types of network names
    • H04L2101/35Types of network names containing special prefixes
    • 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
    • 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/668Internet protocol [IP] address subnets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/60Router architectures

Definitions

  • the embodiments of the present invention relate to communication technologies, and in particular, to an Internet protocol address allocation method and a router.
  • IPV6 Internet Protocol Version 6,
  • BAS Broadband Access Server
  • the BAS can configure a server local prefix (Local Prefix) and a server proxy prefix (Delegate Prefix) for the interface service of a router connected to the BAS.
  • the BAS can configure an Internet Protocol (IP) address for the Wide Area Network (WAN) interface of the router connected to the BAS according to the local prefix of the server.
  • the BAS can carry the server local prefix carry and the server proxy prefix to the router.
  • the router generates a local prefix of the router according to the server proxy prefix, and obtains an IP address of the local area network (LAN) interface of the router according to the local prefix of the router, that is, an IP address of the terminal connected to the router.
  • the router also obtains the IP address of the router's WAN interface based on the server's local prefix.
  • ingress router In enterprise users or large laboratories, there is usually only one ingress router that connects to the Internet through BAS. By connecting the routers at the ingress router to form a cascaded network to meet the access of multiple terminals in different local area networks.
  • IPV6 networking prefix acquisition mode the ingress router can only obtain a server proxy prefix from the BAS, that is, the ingress router has only one route local prefix. Therefore, for a cascaded network, the device connected to the cascaded router cannot obtain an IP address.
  • the embodiment of the invention provides an internet protocol address allocation method and a router, so as to allocate an IP address for each device in the cascaded network.
  • an embodiment of the present invention provides an Internet Protocol address allocation method, including:
  • the router sends a local prefix of the router and a proxy prefix of the router to a lower-level router of the router;
  • the lower-level router is a router connected to a LAN LAN interface of the router;
  • a local prefix of the router is used And causing the lower-level router to determine an internet protocol IP address of the WAN interface of the lower-level router;
  • the proxy prefix of the router is used to enable the lower-level router to generate a local prefix of the lower-level router.
  • the upper-level network device is a broadband access server BAS or router connected to a WAN interface of the router.
  • the router in a second possible implementation manner, the router generates a local prefix of the router and the router according to a proxy prefix of the upper-level network device Proxy prefix, including:
  • the router If the router turns on the cascading mode, the router generates a local prefix of the router and a proxy prefix of the router according to a proxy prefix of the upper-level network device.
  • the router generates, according to a proxy prefix of the upper-level network device, a local prefix of the router and a proxy prefix of the router, including :
  • the router configures a next bit of the lowest bit of the proxy prefix of the upper-level network device as a first bit value, and supplements a random value after the next bit to obtain a local prefix of the router. Making the number of bits of the local prefix of the router equal to the number of prefix bits of the terminal unique identifier EUI;
  • the router configures the next bit as a second bit value, and adds one to the number of bits of the proxy prefix of the upper-level network device to obtain a proxy prefix of the router; wherein the first bit value Different from the second bit value.
  • the number of bits of the proxy prefix of the upper-level network device is smaller than the number of prefix bits of the EUI.
  • the embodiment of the present invention further provides a router, including:
  • a receiving module configured to receive a proxy prefix of the upper-level network device sent by the upper-level network device, where the upper-level network device is a network device connected to the wide-area network WAN interface of the router;
  • a generating module configured to generate, according to a proxy prefix of the upper-level network device, a local prefix of the router and a proxy prefix of the router;
  • a sending module configured to send a local prefix of the router and a proxy prefix of the router to a lower-level router of the router;
  • the lower-level router is a router connected to a LAN LAN interface of the router;
  • a local prefix of the router An internet protocol IP address for causing the lower level router to determine a WAN interface of the lower level router;
  • the proxy prefix of the router is used to cause the lower level router to generate a local prefix of the lower level router.
  • the upper-level network device is a broadband access server BAS or router connected to a WAN interface of the router.
  • the generating module is further configured to: if the router starts the cascading mode, according to the upper-level network device The proxy prefix generates the local prefix of the router and the proxy prefix of the router.
  • the generating module is further configured to configure a next bit of the lowest bit of the proxy prefix of the upper-level network device a first bit value, and a random value after the next bit to obtain a local prefix of the router, such that the number of bits of the local prefix of the router is equal to the prefix number of the terminal unique identifier EUI;
  • the next bit is configured as a second bit value, and the number of bits of the proxy prefix of the upper-level network device is incremented by one to obtain a proxy prefix of the router; wherein the first bit value is different from the first bit Two-bit value.
  • the number of the proxy prefix of the upper-level network device is smaller than the prefix digit of the terminal unique identifier EUI.
  • an embodiment of the present invention further provides a router, including: a receiver, a processor, and a transmitter;
  • the receiver is configured to receive a proxy prefix of the upper-level network device sent by a superior network device, where the upper-level network device is a network device connected to a wide area network WAN interface of the router;
  • the processor configured to generate, according to a proxy prefix of the upper-level network device, the router a local prefix and a proxy prefix of the router;
  • the transmitter is configured to send a local prefix of the router and a proxy prefix of the router to a lower-level router of the router;
  • the lower-level router is a router connected to a LAN LAN interface of the router;
  • the local prefix is used to cause the subordinate router to determine an internet protocol IP address of the WAN interface of the subordinate router;
  • the proxy prefix of the router is used to cause the subordinate router to generate a local prefix of the subordinate router.
  • the upper-level network device is a broadband access server BAS or router connected to a WAN interface of the router.
  • the processor is further configured to: if the router turns on the cascading mode, according to the upper-level network device The proxy prefix generates the local prefix of the router and the proxy prefix of the router.
  • the processor is further configured to configure a next bit of the lowest bit of the proxy prefix of the upper-level network device a first bit value, and a random value after the next bit to obtain a local prefix of the router, such that the number of bits of the local prefix of the router is equal to the prefix number of the terminal unique identifier EUI;
  • the next bit is configured as a second bit value, and the number of bits of the proxy prefix of the upper-level network device is incremented by one to obtain a proxy prefix of the router; wherein the first bit value is different from the Second bit value.
  • the number of the proxy prefix of the upper-level network device is smaller than the prefix digit of the EUI.
  • the embodiment of the present invention further provides a computer readable storage medium, including: at least one program; the at least one program includes computer readable instructions;
  • the computer readable instructions are configured to enable a processor of a router to receive a proxy prefix of the superior network device sent by a superior network device, and generate a local state of the router according to a proxy prefix of the superior network device a prefix and a proxy prefix of the router, the local prefix of the router and a proxy prefix of the router are sent to a lower-level router of the router; wherein the upper-level network device is a network connected by a wide area network WAN interface of the router a router; the lower-level router is a router connected to a LAN LAN interface of the router; the local prefix of the router is used to enable the lower-level router to determine an Internet Protocol IP address of a WAN interface of the lower-level router; a prefix is used to cause the lower-level router to generate the lower-level path The local prefix of the device.
  • the upper-level network device is a broadband access server BAS or router connected to a WAN interface of the router.
  • the computer readable instruction is further configured to: when the router turns on the cascading mode, The processor of the router retrieves and executes to generate a local prefix of the router and a proxy prefix of the router according to a proxy prefix of the superior network device.
  • the computer readable instructions are further configured to cause a processor of the router to retrieve and execute the upper level
  • the next bit of the lowest bit of the proxy prefix of the network device is configured as a first bit value, and a random value is added after the next bit to obtain a local prefix of the router, such that the local prefix of the router
  • the number of bits is equal to the prefix number of the terminal unique identifier EUI, the next bit is configured as a second bit value, and the number of bits of the proxy prefix of the superior network device is incremented by one to obtain the router a proxy prefix; wherein the first bit value is different from the second bit value.
  • the number of bits of the proxy prefix of the upper-level network device is smaller than the number of prefix bits of the EUI.
  • the Internet Protocol address allocation method, the router, and the computer readable storage medium can receive the upper-level network device through the router, that is, the WAN interface of the router is connected to the proxy prefix of the upper-level network device sent by the network device, according to the upper-level network device.
  • the proxy prefix generates the local prefix of the router and the proxy prefix of the router, and sends the local prefix of the router and the proxy prefix of the router to the lower router of the router, that is, the router connected to the router's LAN interface, because
  • the local prefix of the router may be used to enable the lower router to determine the IP address of the WAN interface of the lower router, and the proxy prefix of the router is used to enable the lower router to determine the IP address of the terminal connected to the LAN interface of the lower router, thereby obtaining the cascading IP address of each device in the network.
  • FIG. 1 is a schematic structural diagram of an IPV6 cascading networking according to an embodiment of the present invention
  • FIG. 2 is a flowchart of an Internet Protocol address allocation method according to Embodiment 1 of the present invention.
  • FIG. 3 is a flowchart of an Internet Protocol address allocation method according to Embodiment 2 of the present invention.
  • FIG. 4 is a schematic structural diagram of a cascade networking according to Embodiment 3 of the present invention.
  • FIG. 5 is a flowchart of a method for allocating an internet protocol address according to Embodiment 3 of the present invention.
  • FIG. 6 is a schematic structural diagram of a router according to Embodiment 4 of the present invention.
  • FIG. 7 is a schematic structural diagram of a router according to Embodiment 5 of the present invention.
  • FIG. 8 is a schematic structural diagram of a computer readable storage medium according to Embodiment 6 of the present invention.
  • Embodiments of the present invention are applicable to an IPV6 cascading networking.
  • the router in the cascaded network of IPV6 can be directly connected to the terminal, or connected to the terminal through the relay device, and can also be connected to the terminal through other routers. Among them, the other router may be referred to as a cascade router.
  • FIG. 1 is a schematic structural diagram of an IPV6 cascading networking according to an embodiment of the present invention. As shown in FIG. 1, in the IPV6 cascading network, the first router 102 connected to the BAS 101 may be referred to as an ingress router. The first router 102 is coupled to the BAS 101 via a WAN interface (not shown).
  • the first router 102 is connected to the first terminal 103 via a LAN interface, and the first router 102 is also connected to the second router 104 via a LAN interface (not shown).
  • the second router 104 is a cascade router.
  • the first router 102 can be connected to the WAN interface of the second router 104 through a LAN interface, thereby implementing the connection between the first router 102 and the second router 104.
  • the second router 104 is also connected to the second terminal 105. It should be noted that, similar to the first router 102, the second router 104 can also be connected to other routers to implement multi-level cascading.
  • the first router 102 If the first router 102 only obtains one from the BAS 101 a server proxy prefix, the first router 102 can only generate a route local prefix according to the one server proxy prefix, then the first router 102 does not have a proxy prefix sent to the second router 104, which causes the second router 104 to have no local prefix. Therefore, the device connected to the second router 104, that is, the second terminal, cannot obtain the IP address.
  • Embodiment 1 of the present invention provides an Internet Protocol address allocation method. This method can be performed by a router.
  • FIG. 2 is a flowchart of a method for allocating an internet protocol address according to Embodiment 1 of the present invention. As shown in FIG. 2, the method can include:
  • the router receives a proxy prefix of the upper-level network device sent by the upper-level network device, where the upper-level network device is a network device connected to the WAN interface of the router.
  • the router may be any router in the IPV6 cascade network that has a lower level router.
  • the subordinate router may be a router connected through a LAN interface of the router.
  • the router may be a proxy prefix sent by receiving an Identity Association for Prefix Delegation (IA_PD) message of the dynamic host configuration protocol (DHCP) message.
  • IA_PD Identity Association for Prefix Delegation
  • DHCP dynamic host configuration protocol
  • devices including terminals or routers, support the End-System Unique Identifier (EUI) with a prefix of 64 bits, that is, in the IPV6 cascading network.
  • EUI End-System Unique Identifier
  • the prefix used to generate the IP address can be 64 bits.
  • the length of the proxy prefix of the upper-level network device acquired by the router may be less than 64 bits.
  • the proxy prefix of the superior network device can be used to indicate the device connected to the router's LAN interface, such as the domain where the terminal or router is located.
  • the router generates a local prefix of the router and a proxy prefix of the router according to a proxy prefix of the upper-level network device.
  • the router may be a proxy prefix for obtaining the superior network device, and generate a local prefix of the router according to the proxy prefix of the superior network device, and a proxy prefix of the router.
  • the value of the bit of the local prefix of the router is different from the value of the bit of the proxy prefix of the router.
  • devices mostly support 64-bit EUI, so the local prefix of the router can be equal to the EUI prefix.
  • the number of bits of the proxy prefix of the router may be less than or equal to the number of prefixes of the EUI.
  • the number of bits of the local prefix of the router may be equal to the number of prefixes of the EUI.
  • the proxy network prefix of the upper-level network device has a bit number of 60 bits.
  • the EUI has a prefix of 64 bits.
  • the router may be configured to configure the low-order bits of the lowest bit of the proxy prefix of the upper-level network device, that is, the 61st bit to the 64th bit.
  • the router may configure the 60th bit of the proxy prefix of the superior network device to be different from the 60th bit configuration of the router's local prefix to obtain the proxy prefix of the router.
  • the router sends the local prefix of the router and the proxy prefix of the router to a lower-level router of the router;
  • the lower-level router is a router connected to a LAN interface of the router;
  • the local prefix of the router is used to enable the lower-level router to determine the router
  • the proxy prefix of the router is used to cause the lower router to generate the local prefix of the lower router.
  • the router may be configured to carry the local prefix of the router in a route advertisement (RA) message or a non-temporary address association (IA_NA) message of the DHCP message.
  • RA route advertisement
  • IA_NA non-temporary address association
  • the subordinate router can also be referred to as a cascade router of the router.
  • the router may send the proxy prefix of the router to the subordinate router in the IA_PD message of the DHCP message.
  • the lower-level router can obtain the local prefix of the router according to the RA message or the IA_NA message of the DHCP message, and according to the local prefix of the router and the status identifier of the WAN interface of the lower-level router or the media access control of the WAN interface of the lower-level router.
  • the (Media Access Control, MAC for short) address generates the IP address of the WAN interface of the lower router.
  • most of the devices support the 64-bit EUI.
  • the IP address of the device regardless of the prefix or suffix is 64 bits, the status identifier of the WAN interface of the lower-level router or The MAC address of the WAN interface of the lower-level router is converted into an EUI address, that is, a 64-bit suffix, so that the IP address of the WAN interface of the lower-level router is generated according to the 64-bit local prefix of the router and the 64-bit suffix.
  • the subordinate router may obtain the proxy prefix of the router according to the IA_PD message of the DHCP packet, and generate a local prefix of the subordinate router according to the proxy prefix of the router.
  • the local prefix of the lower-level router may be used to enable the lower-level router to identify the IP address of the terminal connected to the LAN interface of the lower-level router according to the local prefix of the lower-level router and the state of the terminal connected to the LAN interface of the lower-level router. It should be noted that the lower-level router needs to connect to the LAN interface of the lower-level router before generating the IP address of the terminal connected to the LAN interface of the lower-level router.
  • the status identifier of the connected terminal is converted to the EUI address, which is a 64-bit suffix.
  • the lower-level router may also send the local prefix of the lower-level router to the terminal connected to the LAN interface of the lower-level router, so that the terminal connected to the LAN interface of the lower-level router is based on the local prefix of the lower-level router and the LAN interface of the lower-level router.
  • the MAC address of the connected terminal generates the IP address of the terminal connected to the LAN interface of the lower router. It should be noted that the terminal connected to the LAN interface of the lower-level router needs to convert the MAC address of the terminal connected to the LAN interface of the lower-level router to the EUI address before generating the IP address of the terminal connected to the LAN interface of the lower-level router. 64-bit suffix.
  • Embodiment 1 of the present invention provides an Internet Protocol address allocation method, which can receive a superior network device through a router, that is, a WAN interface of the router connects a proxy prefix of the upper-level network device sent by the network device, and generates a proxy prefix according to the superior network device.
  • the local prefix of the router and the proxy prefix of the router, and the local prefix of the router and the proxy prefix of the router are sent to the lower router of the router, that is, the router connected to the router's LAN interface, due to the local prefix of the router
  • the router may be configured to determine an IP address of the WAN interface of the lower-level router, where the proxy prefix of the router is used to determine the IP address of the terminal connected to the LAN interface of the lower-level router, thereby The device assigns an IP address.
  • the IP address of the router or the terminal in the cascaded network can be automatically obtained without manual configuration by the administrator, so that the cascading network is configured. Network maintenance is more convenient and more accurate.
  • the second embodiment of the present invention further provides an internet protocol address allocation method.
  • the upper-level network device in the foregoing Embodiment 1 is a BAS or a router connected to the WAN interface of the router.
  • the proxy prefix of the upper-level network device may be a server proxy prefix configured by the BAS according to the interface service of the router. If the upper-level network device is a router connected to the WAN interface of the router, the proxy prefix of the upper-level network device may be generated by a proxy prefix of the other router sent by another router received by the router connected to the WAN interface of the router.
  • the router may be referred to as an ingress router, and the method in this embodiment may implement at least a cascade connection in the first-level cascade network.
  • the upper-level router is a router connected to the WAN interface of the router, and the router itself is a cascade router, the method of the embodiment may also implement the IP address of the device connected to the cascade router in the multi-level cascade network. Obtain.
  • the S202, the router generates the local prefix of the router and the proxy prefix of the router according to the proxy prefix of the upper-level network device, and may include:
  • the router If the router turns on the cascading mode, the router generates a local prefix of the router and a proxy prefix of the router according to the proxy prefix of the superior network device.
  • the cascading mode refers to a connection that the lower-level router can establish through the router and the BAS, and then transmits a connection mode between the router and the lower-level router corresponding to the network data.
  • the router generates the local prefix of the router and the proxy prefix of the router according to the proxy prefix of the upper-level network device, and the method may include:
  • the router configures the next bit of the lowest bit of the proxy prefix of the upper-level network device as the first bit value, and supplements the random value after the next bit to obtain the local prefix of the router, so that the router
  • the number of bits in the local prefix is equal to the number of prefixes in the EUI
  • the router configures the next bit to a second bit value and adds one to the number of bits of the proxy prefix of the upper network device to obtain the proxy prefix of the router. Wherein the first bit value is different from the second bit value.
  • the first bit value may be 0 or 1. If the first bit value is 0, the second bit value is 1; correspondingly, if the first bit value is 1, the second bit value may be 0.
  • the router may configure the next bit of the lowest bit of the proxy prefix of the upper-level network device to be a bit value of 0 to obtain a local prefix of the router, by using the upper-layer network device.
  • the next bit of the lowest bit of the proxy prefix is configured as a bit value of one to get the proxy prefix for the router.
  • the router may also configure the next bit of the lowest bit of the proxy prefix of the upper-level network device to be a bit value of 1 to obtain a local prefix of the router, and the lowest proxy prefix of the upper-level network device.
  • the next bit of the bit is configured with a bit value of 0 to get the proxy prefix for the router.
  • the router does not enable the cascading mode, which may be pre-configured. If the router is in the cascading mode, the router's LAN interface is connected to other routers, and the router can send IA_PD messages of DHCP messages to the other routers. That is, if the router turns on the cascading mode, other routers connected to the LAN interface of the router, such as the lower-level router, can pass the router.
  • the IA_PD message that sends a DHCP message sends the proxy prefix of the router to the other router.
  • the router adds a random value to the lowest bit of the proxy prefix of the upper-level network device to obtain the local prefix of the router, and determines the IP address of the terminal connected to the router according to the local prefix of the router.
  • the address, or the local prefix of the router is sent to the terminal connected to the router such that the terminal connected to the router generates an IP address of the terminal to which the router is connected according to the local prefix of the router.
  • the method further includes:
  • the router determines the IP address of the terminal connected to the LAN interface of the router according to the local prefix of the router.
  • the router may generate a stateful IP address of the terminal connected to the router according to the local prefix of the router and the status identifier assigned by the router to the terminal connected to the router.
  • the status identifier assigned by the router to the terminal connected to the router may be the number of the terminal connected to the router, and the different terminals connected to the router respectively have different numbers, that is, different status identifiers.
  • the method can include:
  • the router sends the local prefix of the router to the terminal connected to the LAN interface of the router; the local prefix of the router is used to enable the terminal connected to the LAN interface of the router to determine the terminal connected to the LAN interface of the router according to the local prefix of the router IP address.
  • the IP address of the terminal connected to the LAN interface of the router may be a MAC address of the terminal connected to the LAN interface of the router, converted into an EUI address, and the stateful router is generated according to the converted EUI address and the local prefix of the router.
  • the IP address of the terminal to which the LAN interface is connected may be a MAC address of the terminal connected to the LAN interface of the router, converted into an EUI address, and the stateful router is generated according to the converted EUI address and the local prefix of the router.
  • Embodiment 2 of the present invention further provides an internet protocol address allocation method.
  • FIG. 3 is a flowchart of a method for allocating an internet protocol address according to Embodiment 2 of the present invention. As shown in FIG. 3, the method further includes:
  • the router receives a local prefix of the upper-level network device sent by the upper-level network device.
  • the router may be a local prefix of the upper-level network device that is sent by receiving the IA_NA message of the RA message or the DHCP message by the upper-level network device.
  • the router determines an IP address of the WAN interface of the router according to the local prefix of the upper-level network device.
  • the router determines the WAN interface of the router according to the local prefix of the upper-level network device.
  • the IP address is similar to the specific implementation process in which the lower-level router determines the IP address of the WAN interface of the lower-layer router according to the local prefix of the router, and details are not described herein again.
  • the method for allocating the Internet Protocol address provided by the second embodiment of the present invention can make the IP address of the device connected to the cascaded router more accurate in the cascading networking, and ensure the normal transmission of the cascading networking data.
  • FIG. 4 is a schematic structural diagram of a cascaded networking of Embodiment 3 of the present invention.
  • the BAS 401 is connected to the WAN interface of the first router 402.
  • a LAN interface of the first router 402 is connected to the first terminal 403, and another LAN interface of the first router 402 is connected to the WAN interface of the second router 404.
  • One LAN interface of the second router 404 is connected to the second terminal 405, and the other LAN interface of the second router 404 is connected to the WAN interface of the third router 406.
  • the LAN interface of the third router 406 can be connected to other terminals or routers to implement multi-level cascading.
  • FIG. 5 is a flowchart of a method for allocating an internet protocol address according to Embodiment 3 of the present invention. As shown in FIG. 5, the method can include:
  • the BAS determines, according to the RS message sent by the first router, a local prefix of the BAS and a proxy prefix of the BAS.
  • the local prefix of the BAS can be represented by the local prefix of the BAS and the length of the local prefix of the BAS.
  • the local prefix of the BAS can be expressed, for example, as 2014::/64, that is, the local prefix of the BAS is 64 bits in length.
  • the bit of the proxy prefix of the BAS may be less than the number of prefixes of the EUI, such as 64 bits, and the bit of the proxy prefix of the BS may be, for example, 60 bits.
  • the proxy prefix for this BAS can be expressed as 2014:1010::/60.
  • the BAS sends the local prefix of the BAS to the first router in the RA message or the IA_NA message of the DHCP.
  • the proxy prefix of the BAS is carried in the IA_PD message of the DHCP and sent to the first router.
  • the first router generates an IP address of the WAN interface of the first router according to the local prefix of the BAS.
  • the first router may generate an IP address of the WAN interface of the first router according to the local prefix of the BAS and the status identifier of the first router. If the status identifier of the first router is 1, Then, the IP address of the WAN interface of the first router can be expressed as 2014::1.
  • the first router configures the next bit of the lowest bit of the proxy prefix of the BAS to a bit value of 0, and is below the lowest bit of the proxy prefix of the BAS.
  • the one bit is followed by a random value to obtain the local prefix of the first router, such that the number of bits of the local prefix of the first router is equal to the number of prefixes of the EUI.
  • the first router configures a next bit of the lowest bit of the proxy prefix of the BAS as a bit value of 1, and adds one to the number of bits of the proxy prefix of the BAS to obtain a proxy prefix of the first router.
  • the BSS has a proxy prefix of 60 bits and the EUI has a prefix of 64 bits. Then the first router can configure the next bit of the lowest bit of the proxy prefix of the BAS, that is, the 61st bit. 0, the 62nd to 64th bits are configured according to a random number to obtain the local prefix of the first router.
  • the local prefix of the first router can be expressed, for example, as 2014: 1010::0003/64.
  • the value of the 62nd to 64th bits of the local prefix of the first router, that is, 011 is a random number.
  • the number of bits of the local prefix of the first router may be equal to the number of prefixes of the EUI, such as 64 bits.
  • the first router may be configured with a bit value of 1 in the 61st bit of the proxy prefix of the BAS, and add one to the number of bits of the proxy prefix of the BAS to obtain a proxy prefix of the first router.
  • the proxy prefix of the first router can be expressed, for example, as 2014: 1010::0008/61.
  • the first router generates an IP address of the first terminal according to the local prefix of the first router.
  • the first router generates an IP address of the first terminal according to the local prefix of the first router and the status identifier assigned by the first router to the first terminal. If the status identifier of the first terminal is 2, the IP address of the first terminal may be represented as 2014: 1010:0003::2.
  • the first router sends the local prefix of the first router to the second router in an RA message or a DHCP IA_NA message, and the proxy prefix of the first router is carried in the DHCP IA_PD message and sent to the first router.
  • Two routers Two routers.
  • the second router generates an IP address of the WAN interface of the second router according to the local prefix of the first router.
  • the second router may generate an IP address of the WAN interface of the second router according to the local prefix of the first router and the status identifier of the second router. If the status identifier of the second router If 1, the IP address of the WAN interface of the second router can be expressed as 2014: 1010:0003::1.
  • the second router configures a bit value of 0 by using a lower bit of the lowest bit of the proxy prefix of the first router, and a proxy prefix of the first router.
  • the next bit of the lowest bit is followed by a random value to obtain the local prefix of the second router, such that the number of bits of the local prefix of the second router is equal to the number of bits of the EUI.
  • the second router configures a next bit of the lowest bit of the proxy prefix of the first router to a bit value of 1, and adds one bit to the first prefix of the first router to obtain the second router.
  • the proxy prefix
  • the number of bits of the proxy prefix of the first router is 61 bits
  • the second router can be configured as the bit value 0 in the next bit of the lowest bit of the proxy prefix of the first router, that is, the 62th bit.
  • the local prefix of the second router can be expressed, for example, as 2014:1010::0009/64, and the value 01 of the 63rd to 64th bits of the local prefix of the second router is a random number.
  • the second router may be configured with a bit value of 1 in the 62nd bit of the proxy prefix of the first router, and add one to the proxy prefix of the first router to obtain a proxy prefix of the second router.
  • the proxy prefix of the second router can be expressed, for example, as 2014: 1010::000C/62.
  • the second router generates an IP address of the second terminal according to the local prefix of the second router.
  • the second router generates an IP address of the second terminal according to the local prefix of the second router and the status identifier assigned by the second router to the second terminal. If the status identifier of the second terminal is 2, the IP address of the second terminal may be represented as 2014:1010:0009::2.
  • the second router sends the local prefix of the second router to the third router in the RA message or the IA_NA message of the DHCP.
  • the third router generates an IP address of the WAN interface of the third router according to the local prefix of the second router.
  • the third router may generate an IP address of the WAN interface of the third router according to the local prefix of the second router and the status identifier of the third router. If the status identifier of the third router is 1, the IP address of the WAN interface of the third router may be represented as 2014:1010:0009::1.
  • Embodiment 3 of the present invention is performed by a specific example.
  • the method of any of the embodiments is specifically described, and the beneficial effects thereof are similar to the above embodiments, and details are not described herein again.
  • Embodiment 4 of the present invention further provides a router.
  • the router can perform the Internet Protocol address allocation method in any of the foregoing Embodiments 1 to 3.
  • FIG. 6 is a schematic structural diagram of a router according to Embodiment 4 of the present invention. As shown in FIG. 6, the router 600 can include: a receiving module 601, a generating module 602, and a sending module 603.
  • the receiving module 601 is configured to receive a proxy prefix of the upper-level network device sent by the upper-level network device, where the upper-level network device is a network device connected to the WAN interface of the router.
  • the generating module 602 is configured to generate a local prefix of the router and a proxy prefix of the router according to the proxy prefix of the upper-level network device.
  • the sending module 603 is configured to send the local prefix of the router and the proxy prefix of the router to a lower-level router of the router; the lower-level router is a router connected to the LAN interface of the router; the local prefix of the router is used to enable the lower-level router Determining the IP address of the WAN interface of the subordinate router; the proxy prefix of the router is used to cause the subordinate router to generate a local prefix of the subordinate router.
  • the upper-level network device is a BAS or a router connected to the WAN interface of the router.
  • the generating module 602 is further configured to: if the router starts the cascading mode, generate a local prefix of the router and a proxy prefix of the router according to the proxy prefix of the upper-level network device.
  • the generating module 602 is further configured to configure a next bit of the lowest bit of the proxy prefix of the upper-level network device as a first bit value, and supplement a random value after the next bit to obtain a Describe the local prefix of the router, such that the number of bits of the local prefix of the router is equal to the number of bits of the prefix of the EUI; configuring the next bit to a second bit value, and adding the number of bits of the proxy prefix of the upper-level network device First, to obtain a proxy prefix of the router; wherein the first bit value is different from the second bit value.
  • the number of the proxy prefix of the upper-level network device is less than the prefix digit of the terminal unique identifier EUI.
  • the router provided in the fourth embodiment of the present invention can perform the Internet Protocol address allocation method in any of the foregoing Embodiments 1 to 3, and the beneficial effects are similar to those in the foregoing embodiment, and details are not described herein again.
  • Embodiment 5 of the present invention further provides a router.
  • FIG. 7 is a schematic structural diagram of a router according to Embodiment 5 of the present invention. As shown in FIG. 7, the router 700 can include a receiver 701, a processor 702, and a transmitter 703.
  • the receiver 701 is configured to receive a proxy prefix of the upper-level network device sent by the upper-level network device, where the upper-level network device is a network device connected to the WAN interface of the router.
  • the processor 702 is configured to generate a local prefix of the router and a proxy prefix of the router according to the proxy prefix of the upper-level network device.
  • a transmitter 703 configured to send a local prefix of the router and a proxy prefix of the router to a lower-level router of the router;
  • the lower-level router is a router connected to a LAN interface of the router;
  • a local prefix of the router is used to enable the lower-level router Determining the IP address of the WAN interface of the subordinate router;
  • the proxy prefix of the router is used to cause the subordinate router to generate a local prefix of the subordinate router.
  • the upper-level network device is a BAS or a router connected to the WAN interface of the router.
  • the processor 702 is further configured to: if the router starts the cascading mode, generate a local prefix of the router and a proxy prefix of the router according to the proxy prefix of the upper-level network device.
  • the processor 702 is further configured to configure a next bit of the lowest bit of the proxy prefix of the upper-level network device as a first bit value, and supplement a random value after the next bit to obtain a Describe the local prefix of the router, such that the number of bits of the local prefix of the router is equal to the number of bits of the prefix of the EUI; configuring the next bit to a second bit value, and adding the number of bits of the proxy prefix of the upper-level network device First, to get the proxy prefix of the router.
  • the first bit value is different from the second bit value.
  • the number of bits of the proxy prefix of the upper-level network device is less than the number of prefix bits of the EUI.
  • the router provided in the fifth embodiment of the present invention can perform the Internet Protocol address allocation method in any one of the foregoing Embodiments 1 to 3, and the beneficial effects are similar to those in the foregoing embodiment, and details are not described herein again.
  • Embodiment 6 of the present invention also provides a computer readable storage medium.
  • FIG. 8 is a schematic structural diagram of a computer readable storage medium according to Embodiment 6 of the present invention. As shown in FIG. 8, the computer readable medium 800 includes at least one program 801; the at least one program includes computer readable instructions 802.
  • the computer readable instructions 802 are configured to: the processor of the router is invoked and executed to receive a proxy prefix of the superior network device sent by the upper-level network device, and generate a local prefix of the router and the router according to the proxy prefix of the superior network device
  • the proxy prefix, the local prefix of the router and the proxy prefix of the router are sent to the lower router of the router; wherein the upper network device is a network device connected to the WAN interface of the router; the lower router is a LAN interface of the router
  • the connected router; the local prefix of the router is used to cause the subordinate router to determine the IP address of the WAN interface of the subordinate router; the proxy prefix of the router is used to cause the subordinate router to generate a local prefix of the subordinate router.
  • the upper-level network device is a BAS or a router connected to the WAN interface of the router.
  • the computer readable instructions 802 are further configured to: when the router turns on the cascading mode, cause the processor of the router to retrieve and execute, to generate a local prefix of the router according to the proxy prefix of the upper-level network device, and the The proxy prefix of the router.
  • the computer readable instructions 802 are further configured to: the processor of the router retrieves and executes to configure the next bit of the lowest bit of the proxy prefix of the superior network device as the first bit value, and Adding a random value after the next bit to obtain the local prefix of the router, such that the number of bits of the local prefix of the router is equal to the number of bits of the prefix of the EUI, and configuring the next bit to the second bit value, and The number of bits of the proxy prefix of the superior network device is incremented by one to obtain a proxy prefix of the router; wherein the first bit value is different from the second bit value.
  • the number of the proxy prefix of the upper-level network device is less than the prefix digit of the EUI.
  • the computer readable storage medium provided in Embodiment 6 of the present invention may include at least one program of computer readable instructions for causing a processor of a router to invoke and execute, thereby implementing any one of Embodiments 1 to 3 above.
  • the Internet Protocol address allocation method has the same advantages as the foregoing embodiment, and details are not described herein again.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

本发明实施例提供一种互联网协议地址分配方法及路由器。本发明的互联网协议地址分配方法包括:接收上级网络设备的代理前缀;上级网络设备为路由器的WAN接口连接的网络设备;根据上级网络设备的代理前缀生成路由器的本地前缀和路由器的代理前缀;将路由器的本地前缀和路由器的代理前缀发送至路由器的下级路由器。本发明实施例可获取级联组网中各设备的IP地址。

Description

互联网协议地址分配方法及路由器 技术领域
本发明实施例涉及通信技术,尤其涉及一种互联网协议地址分配方法及路由器。
背景技术
随着互联网技术的不断发展,互联网协议也在不断的更新。随着互联网协议的更新,组网方式也在不断更新。在互联网协议第6版(Internet Protocol Version 6,简称IPV6)的组网中,多采用宽带接入服务器(Broadband Access Server,简称BAS)连接路由器,路由器连接终端的组网方式。
在现有的IPV6组网中,该BAS对与该BAS连接的一个路由器的接口服务可配置一个服务器本地前缀(Local Prefix)和一个服务器代理前缀(Delegate Prefix)。该BAS可根据该服务器本地前缀为该路由器上与该BAS连接的广域网(Wide Area Network,简称WAN)接口配置互联网协议(Internet Protocol,简称IP)地址。该BAS可将该服务器本地前缀携带及该服务器代理前缀发送至该路由器。该路由器可根据该服务器代理前缀生成该路由器的本地前缀,并根据该路由器的本地前缀获取该路由器的局域网(Local Area Network,简称LAN)接口的IP地址,即该路由器连接的终端的IP地址。该路由器还根据该服务器的本地前缀获取该路由器的WAN接口的IP地址。
在企业用户或大型实验室内,通过BAS连接互联网的入口路由器通常只有一个,通过在该入口路由器连接路由器形成级联组网来满足不同局域网的多台终端的接入。在IPV6组网中前缀获取方式,该入口路由器仅可从该BAS获取一个服务器代理前缀,也就是说,该入口路由器仅具有一个路由本地前缀。因此,对于级联组网,级联路由器连接的设备便无法获取到IP地址。
发明内容
本发明实施例提供一种互联网协议地址分配方法及路由器,以为级联组网中各设备分配IP地址。
第一方面,本发明实施例提供一种互联网协议地址分配方法,包括:
路由器接收上级网络设备发送的所述上级网络设备的代理前缀;所述上级网络设备为所述路由器的广域网WAN接口连接的网络设备;
所述路由器根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀;
所述路由器将所述路由器的本地前缀和所述路由器的代理前缀发送至所述路由器的下级路由器;所述下级路由器为所述路由器的局域网LAN接口连接的路由器;所述路由器的本地前缀用于使所述下级路由器确定所述下级路由器的WAN接口的互联网协议IP地址;所述路由器的代理前缀用于使得所述下级路由器生成所述下级路由器的本地前缀。
根据第一方面,在第一方面的第一种可能实现的方式中,所述上级网络设备为所述路由器的WAN接口连接的宽带接入服务器BAS或路由器。
根据第一方面或第一方面的第一种可能实现的方式,在第二种可能实现的方式中,所述路由器根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀,包括:
若所述路由器开启级联模式,所述路由器根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀。
根据第一方面的第二种可能实现的方式,在第三种可能实现的方式中,所述路由器根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀包括:
所述路由器将所述上级网络设备的代理前缀的最低比特位的下一比特位配置为第一比特值,并在所述下一比特位后补随机值,以得到所述路由器的本地前缀,使得所述路由器的本地前缀的位数等于终端唯一标识符EUI的前缀位数;
所述路由器将所述下一比特位配置为第二比特值,并对所述上级网络设备的代理前缀的位数加一,以得到所述路由器的代理前缀;其中,所述第一比特值不同于所述第二比特值。
根据第一方面的第三种可能实现的方式,在第四种可能实现的方式中,所述上级网络设备的代理前缀的位数小于所述EUI的前缀位数。
第二方面,本发明实施例还提供一种路由器,包括:
接收模块,用于接收上级网络设备发送的所述上级网络设备的代理前缀;所述上级网络设备为所述路由器的广域网WAN接口连接的网络设备;
生成模块,用于根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀;
发送模块,用于将所述路由器的本地前缀和所述路由器的代理前缀发送至所述路由器的下级路由器;所述下级路由器为所述路由器的局域网LAN接口连接的路由器;所述路由器的本地前缀用于使所述下级路由器确定所述下级路由器的WAN接口的互联网协议IP地址;所述路由器的代理前缀用于使得所述下级路由器生成所述下级路由器的本地前缀。
根据第二方面,在第二方面的第一种可能实现的方式中,所述上级网络设备为所述路由器的WAN接口连接的宽带接入服务器BAS或路由器。
根据第二方面或第二方面的第一种可能实现的方式,在第二种可能实现的方式中,所述生成模块,还用于若所述路由器开启级联模式,根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀。
根据第二方面的第二种可能实现的方式,在第三种可能实现的方式中,所述生成模块,还用于将所述上级网络设备的代理前缀的最低比特位的下一比特位配置为第一比特值,并在所述下一比特位后补随机值以得到所述路由器的本地前缀,使得所述路由器的本地前缀的位数等于终端唯一标识符EUI的前缀位数;将所述下一比特位配置为第二比特值,并对所述上级网络设备的代理前缀的位数加一,以得到所述路由器的代理前缀;其中,所述第一比特值不同于所述第二比特值。
根据第二方面的第三种可能实现的方式,在第四种可能实现的方式中,所述上级网络设备的代理前缀的位数小于所述终端唯一标识符EUI的前缀位数。
第三方面,本发明实施例还提供一种路由器,包括:接收机、处理器及发射机;
所述接收机,用于接收上级网络设备发送的所述上级网络设备的代理前缀;所述上级网络设备为所述路由器的广域网WAN接口连接的网络设备;
所述处理器,用于根据所述上级网络设备的代理前缀生成所述路由器的 本地前缀和所述路由器的代理前缀;
所述发射机,用于将所述路由器的本地前缀和所述路由器的代理前缀发送至所述路由器的下级路由器;所述下级路由器为所述路由器的局域网LAN接口连接的路由器;所述路由器的本地前缀用于使所述下级路由器确定所述下级路由器的WAN接口的互联网协议IP地址;所述路由器的代理前缀用于使得所述下级路由器生成所述下级路由器的本地前缀。
根据第三方面,在第三方面的第一种可能实现的方式中,所述上级网络设备为所述路由器的WAN接口连接的宽带接入服务器BAS或路由器。
根据第三方面或第三方面的第一种可能实现的方式,在第二种可能实现的方式中,所述处理器,还用于若所述路由器开启级联模式,根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀。
根据第三方面的第二种可能实现的方式,在第三种可能实现的方式中,所述处理器,还用于将所述上级网络设备的代理前缀的最低比特位的下一比特位配置为第一比特值,并在所述下一比特位后补随机值,以得到所述路由器的本地前缀,使得所述路由器的本地前缀的位数等于终端唯一标识符EUI的前缀位数;将所述下一比特位配置为第二比特值,并对所述上级网络设备的代理前缀的位数加一,以得到所述路由器的代理前缀;其中,所述第一比特值不同于所述第二比特值。
根据第三方面的第三种可能实现的方式,在第四种可能实现的方式中,所述上级网络设备的代理前缀的位数小于所述EUI的前缀位数。
第四方面,本发明实施例还提供一种计算机可读存储介质,包括:至少一个程序;所述至少一个程序包括计算机可读指令;
所述计算机可读指令,用于使路由器的处理器调取并执行,以接收上级网络设备发送的所述上级网络设备的代理前缀,根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀,将所述路由器的本地前缀和所述路由器的代理前缀发送至所述路由器的下级路由器;其中,所述上级网络设备为所述路由器的广域网WAN接口连接的网络设备;所述下级路由器为所述路由器的局域网LAN接口连接的路由器;所述路由器的本地前缀用于使所述下级路由器确定所述下级路由器的WAN接口的互联网协议IP地址;所述路由器的代理前缀用于使得所述下级路由器生成所述下级路 由器的本地前缀。
根据第四方面,在第四方面的第一种可能实现的方式中,所述上级网络设备为所述路由器的WAN接口连接的宽带接入服务器BAS或路由器。
根据第四方面或第四方面的第一种可能实现的方式,在第二种可能实现的方式中,所述计算机可读指令,还用于在所述路由器开启级联模式时,使得所述路由器的处理器调取并执行,以根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀。
根据第四方面的第二种可能实现的方式,在第三种可能实现的方式中,所述计算机可读指令,还用于使得所述路由器的处理器调取并执行,以将所述上级网络设备的代理前缀的最低比特位的下一比特位配置为第一比特值,并在所述下一比特位后补随机值,以得到所述路由器的本地前缀,使得所述路由器的本地前缀的位数等于终端唯一标识符EUI的前缀位数,将所述下一比特位配置为第二比特值,并对所述上级网络设备的代理前缀的位数加一,以得到所述路由器的代理前缀;其中,所述第一比特值不同于所述第二比特值。
根据第四方面的第三种可能实现的方式,在第四种可能实现的方式中,所述上级网络设备的代理前缀的位数小于所述EUI的前缀位数。
本发明实施例互联网协议地址分配方法、路由器及计算机可读存储介质,可通过路由器接收上级网络设备,即该路由器的WAN接口连接网络设备发送的该上级网络设备的代理前缀,根据该上级网络设备的代理前缀生成该路由器的本地前缀和该路由器的代理前缀,并将该路由器的本地前缀和该路由器的代理前缀发送至该路由器的下级路由器,也就是该路由器的LAN接口连接的路由器,由于该路由器的本地前缀可用于使该下级路由器确定该下级路由器的WAN接口的IP地址,该路由器的代理前缀用于使得该下级路由器确定该下级路由器的LAN接口连接的终端的IP地址,从而获取级联组网中各设备的IP地址。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下 面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例所适用的IPV6级联组网的结构示意图;
图2为本发明实施例一提供的互联网协议地址分配方法的流程图;
图3为本发明实施例二提供的互联网协议地址分配方法的流程图;
图4为本发明实施例三的级联组网的结构示意图;
图5为本发明实施例三提供的互联网协议地址分配方法的流程图;
图6为本发明实施例四的路由器的结构示意图;
图7为本发明实施例五提供的路由器的结构示意图;
图8为本发明实施例六提供的计算机可读存储介质的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明各实施例适用于IPV6级联组网。在IPV6的级联组网中的路由器可直接连接终端,也可通过中继设备与终端连接,还可通过其他路由器与终端连接。其中,该其他路由器可称为级联路由器。图1为本发明实施例所适用的IPV6级联组网的结构示意图。如图1所示,在IPV6级联组网中,与BAS101连接的第一路由器102可称为入口路由器。该第一路由器102通过WAN接口(未示出)与BAS 101连接。该第一路由器102通过LAN接口与第一终端103连接,该第一路由器102还通过LAN接口(未示出)与第二路由器104连接。该第二路由器104即为级联路由器。该第一路由器102可以是通过LAN接口与该第二路由器104的WAN接口连接,从而实现该第一路由器102与该第二路由器104的连接。其中,该第二路由器104还与第二终端105连接。需要说明的是,与第一路由器102相类似的,该第二路由器104还可下接其他的路由器以实现多级级联。若第一路由器102仅从BAS101获取一 个服务器代理前缀,第一路由器102仅可根据该一个服务器代理前缀生成一个路由本地前缀,则第一路由器102不具有代理前缀以下发至第二路由器104,这使得第二路由器104不具有本地前缀,因此与第二路由器104连接的设备,即第二终端则便无法获取到IP地址。
实施例一
本发明实施例一提供一种互联网协议地址分配方法。该方法可由路由器执行。图2为本发明实施例一提供的互联网协议地址分配方法的流程图。如图2所示,该方法可包括:
S201、路由器接收上级网络设备发送的该上级网络设备的代理前缀;该上级网络设备为该路由器的WAN接口连接的网络设备。
具体地,该路由器可以为IPV6级联网络中具有下级路由器的任一路由器。其中,该下级路由器可以是通过路由器的LAN接口连接的路由器。
该路由器可以是通过接收该上级网络设备通过动态主机设置协议(Dynamic Host Configuration Protocol,简称DHCP)报文的代理前缀身份关联(Identity Association for Prefix Delegation,简称IA_PD)消息所发送的代理前缀。由于在IPV6级联组网中,设备,包括终端或路由器大多支持前缀为64比特位的终端唯一标识符(End-System Unique Identifier,简称EUI),也就是说,在该IPV6级联组网中,用于生成IP地址的前缀可以是64位。那么在本实施例中,对于该路由器获取的该上级网络设备的代理前缀的长度可小于64位。该上级网络设备的代理前缀可用于表示该路由器的LAN接口连接的各设备,如终端或路由器所在的域。
S202、该路由器根据该上级网络设备的代理前缀生成该路由器的本地前缀和该路由器的代理前缀。
该路由器可以是获取该上级网络设备的代理前缀,并根据该上级网络设备的代理前缀生成该路由器的本地前缀,和该路由器的代理前缀。其中,该路由器的本地前缀的比特位的值,不同于,该路由器的代理前缀的比特位的值。在IPV6级联组网中,设备大多支持64比特位的EUI,因此该路由器的本地前缀的比特位数可等于EUI的前缀位数。该路由器的代理前缀的比特位数可小于或等于该EUI的前缀位数。其中,该路由器的本地前缀的比特位数可等于该EUI的前缀位数。
举例来说,若该上级网络设备的代理前缀的比特位数为60位。该EUI的前缀位数为64位。该路由器可以是将该上级网络设备的代理前缀的最低比特位的低比特位即第61比特位至第64比特位进行配置。该路由器可以将该上级网络设备的代理前缀的第60比特位配置为与该路由器的本地前缀中第60比特位配置不同的值,以得到该路由器的代理前缀。
S203、该路由器将该路由器的本地前缀和该路由器的代理前缀发送至该路由器的下级路由器;该下级路由器为该路由器的LAN接口连接的路由器;该路由器的本地前缀用于使该下级路由器确定该下级路由器的WAN接口的IP地址;该路由器的代理前缀用于使得该下级路由器生成所述下级路由器的本地前缀。
可选的,该路由器可以是将该路由器的本地前缀携带在路由广播(Router Advertisement,简称RA)消息或DHCP报文的非临时地址身份关联(Identity Association for non-temporary addresses,简称IA_NA)消息中发送至该下级路由器。该下级路由器也可称为该路由器的级联路由器。该路由器可以是将该路由器的代理前缀携带在DHCP报文的IA_PD消息中发送至该下级路由器。
该下级路由器可根据RA消息或DHCP报文的IA_NA消息获取到该路由器的本地前缀,并根据该路由器的本地前缀及该下级路由器的WAN接口的状态标识或该下级路由器的WAN接口的媒体访问控制(Media Access Control,简称MAC)地址生成该下级路由器的WAN接口的IP地址。由于在IPV6级联组网中,设备大多支持64比特位的EUI,也就是说,设备的IP地址中,无论前缀还是后缀均为64比特位,因此该下级路由器的WAN接口的状态标识或该下级路由器的WAN接口的MAC地址转换为EUI地址,也就是64位的后缀,从而根据该64位的该路由器的本地前缀和该64位的后缀生成该下级路由器的WAN接口的IP地址。
该下级路由器可以是根据DHCP报文的IA_PD消息获取该路由器的代理前缀,并根据该路由器的代理前缀生成该下级路由器的本地前缀。该下级路由器的本地前缀,可用于使得该下级路由器根据该下级路由器的本地前缀及该下级路由器的LAN接口连接的终端的状态标识生该下级路由器的LAN接口连接的终端的IP地址。需要说明的是,该下级路由器在生成该下级路由器的LAN接口连接的终端的IP地址之前,还需对该下级路由器的LAN接口连 接的终端的状态标识转换为EUI地址,也就是64位的后缀。
或者,该下级路由器还可将该下级路由器的本地前缀发送至该下级路由器的LAN接口连接的终端,使得该下级路由器的LAN接口连接的终端根据该下级路由器的本地前缀及该下级路由器的LAN接口连接的终端的MAC地址生成该下级路由器的LAN接口连接的终端的IP地址。需要说明的是,该下级路由器的LAN接口连接的终端在生成该下级路由器的LAN接口连接的终端的IP地址之前,还需对该下级路由器的LAN接口连接的终端的MAC地址转换为EUI地址的64位后缀。
本发明实施例一提供一种互联网协议地址分配方法,可通过路由器接收上级网络设备,即该路由器的WAN接口连接网络设备发送的该上级网络设备的代理前缀,根据该上级网络设备的代理前缀生成该路由器的本地前缀和该路由器的代理前缀,并将该路由器的本地前缀和该路由器的代理前缀发送至该路由器的下级路由器,也就是该路由器的LAN接口连接的路由器,由于该路由器的本地前缀可用于使该下级路由器确定该下级路由器的WAN接口的IP地址,该路由器的代理前缀用于使得该下级路由器确定该下级路由器的LAN接口连接的终端的IP地址,从而为级联组网中各设备进行分配IP地址。
需要说明的是,由于本发明实施例一提供的互联网协议地址分配方法,可实现级联组网中路由器或终端的IP地址的自动获取,而无需通过管理员进行人工配置,使得级联组网的网络维护更方便,且准确度更高。
实施例二
在上述实施例一的方法的基础上,本发明实施例二还提供一种互联网协议地址分配方法。可选的,上述实施例一中的该上级网络设备为该路由器的WAN接口连接的BAS或路由器。
具体地,若该上级网络设备为该路由器的WAN接口连接的BAS,那么该上级网络设备的代理前缀可以是该BAS根据该路由器的接口服务所配置的服务器代理前缀。若该上级网络设备为该路由器的WAN接口连接的路由器,那么该上级网络设备的代理前缀可以是该路由器的WAN接口连接的路由器接收的其他路由器发送的该其他路由器的代理前缀所生成的。
若该上级网络设备为该路由器的WAN接口连接的BAS,则该路由器可以称为入口路由器,那么该实施例的方法至少可实现一级级联组网中级联路 由器连接的设备的IP地址的获取。若该上级路由器为该路由器的WAN接口连接的路由器,则该路由器本身为级联路由器,那么该实施例的方法还可实现多级级联组网中的级联路由器连接的设备的IP地址的获取。
可选的,上述S202该路由器根据该上级网络设备的代理前缀生成该路由器的本地前缀和该路由器的代理前缀,可包括:
若该路由器开启级联模式,该路由器根据该上级网络设备的代理前缀生成该路由器的本地前缀和该路由器的代理前缀。
其中,该级联模式,指的是该下级路由器可通过该路由器、BAS与网络建立的连接,继而传输网络数据对应的该路由器与该下级路由器的连接模式。
可选的,该路由器根据该上级网络设备的代理前缀生成该路由器的本地前缀和该路由器的代理前缀,可以包括:
该路由器将该上级网络设备的代理前缀的最低比特位的下一比特位配置为第一比特值,并在该下一比特位后补随机值,以得到该路由器的本地前缀,使得该路由器的本地前缀的位数等于EUI的前缀位数;
该路由器将该下一比特位配置为第二比特值,并对该上级网络设备的代理前缀的位数加一,以得到该路由器的代理前缀。其中,该第一比特值不同于该第二比特值。
具体地,该第一比特值可以为0或1。若该第一比特值为0,则该第二比特值为1;对应的,若该第一比特值为1,则该第二比特值可以为0。举例来说,该路由器可以,是通过对该上级网路设备的代理前缀的最低比特位的下一比特位配置为比特值0,以得到该路由器的本地前缀,通过对该上级网路设备的代理前缀的最低比特位的下一比特位配置为比特值1,以得到该路由器的代理前缀。该路由器还可以是通过对该上级网路设备的代理前缀的最低比特位的下一比特位配置为比特值1,以得到该路由器的本地前缀,通过对该上级网路设备的代理前缀的最低比特位的下一比特位配置为比特值0,以得到该路由器的代理前缀。
可选的,该路由器否开启级联模式,可以是预先配置的。若该路由器开启级联模式,该路由器的LAN接口连接其他路由器,且该路由器可向该其他路由器发送DHCP报文的IA_PD消息。也就是说,若该路由器开启级联模式,与该路由器的LAN接口连接的其他路由器,如该下级路由器,该路由器可通 过发送DHCP报文的IA_PD消息向该其他路由器下发该路由器的代理前缀。
若该路由器未开启级联模式,则该路由器对该上级网络设备的代理前缀的最低比特位后补随机值从而获取该路由器的本地前缀,根据该路由器的本地前缀确定该路由器连接的终端的IP地址,或者,将该路由器的本地前缀发送至该路由器连接的终端使得该路由器连接的终端根据该路由器的本地前缀生成该路由器连接的终端的IP地址。
可选的,该方法还包括:
该路由器根据该路由器的本地前缀确定该路由器的LAN接口连接的终端的IP地址。
具体地,该路由器可以是根据该路由器的本地前缀,及该路由器为该路由器连接的终端分配的状态标识,生成有状态的该路由器连接的终端的IP地址。该路由器为该路由器连接的终端分配的状态标识可以是对该路由器连接的终端的编号,该路由器连接的不同终端分别具有不同的编号,即不同的状态标识。
可选的,该方法可包括:
该路由器将该路由器的本地前缀发送至该路由器的LAN接口连接的终端;该路由器的本地前缀用于使该路由器的LAN接口连接的终端根据该路由器的本地前缀确定该路由器的LAN接口连接的终端的IP地址。
该路由器的LAN接口连接的终端的IP地址可以是将该路由器的LAN接口连接的终端的MAC地址转换为EUI地址,并根据转换后的EUI地址及该路由器的本地前缀,生成有状态的该路由器LAN接口连接的终端的IP地址。
本发明实施例二还提供一种互联网协议地址分配方法。图3为本发明实施例二提供的互联网协议地址分配方法的流程图。如图3所示,该方法还包括:
S301、该路由器接收该上级网络设备发送的该上级网络设备的本地前缀。
该路由器可以是通过接收该上级网络设备通过RA消息或DHCP报文的IA_NA消息发送的该上级网络设备的本地前缀。
S302、该路由器根据该上级网络设备的本地前缀确定该路由器的WAN接口的IP地址。
该路由器根据该上级网络设备的本地前缀确定该路由器的WAN接口的 IP地址,与上述该下级路由器根据该路由器的本地前缀确定该下级路由器的WAN接口的IP地址的具体实现过程类似,在此不再赘述。
本发明实施例二提供的互联网协议地址的分配方法,可使得级联组网中,级联路由器连接的设备的IP地址更准确,保证级联组网数据的正常传输。
实施例三
本发明实施例三还提供一种互联网协议地址分配方法。图4位本发明实施例三的级联组网的结构示意图。如图4所示,该级联组网中,BAS 401与第一路由器402的WAN接口连接。该第一路由器402的一个LAN接口与第一终端403连接,该第一路由器402的另一个LAN接口与第二路由器404的WAN接口连接。第二路由器404的一个LAN接口与第二终端405连接,第二路由器404的另一个LAN接口与第三路由器406的WAN接口连接。需要说明的是,该第三路由器406的LAN接口可连接其他终端或路由器,以实现多级级联。
图5为本发明实施例三提供的互联网协议地址分配方法的流程图。如图5所示,该方法可包括:
S501、BAS根据第一路由器发送的RS消息确定该BAS的本地前缀和该BAS的代理前缀。
该BAS的本地前缀可以通过该BAS的本地前缀和该BAS的本地前缀的长度表示。该BAS的本地前缀例如可以表示为2014::/64,即该BAS的本地前缀的长度为64位。
该BAS的代理前缀的比特位可小于EUI的前缀位数,如64位,该BS的代理前缀的比特位例如可以为60位。该BAS的代理前缀可表示为2014:1010::/60。
S502、该BAS将该BAS的本地前缀携带在RA消息或DHCP的IA_NA消息中发送至第一路由器,将该BAS的代理前缀携带在该DHCP的IA_PD消息中发送至该第一路由器。
S503、该第一路由器根据该BAS的本地前缀生成该第一路由器的WAN接口的IP地址。
该第一路由器可以根据该BAS的本地前缀及该第一路由器的状态标识生成该第一路由器的WAN接口的IP地址。若该第一路由器的状态标识为1, 则该第一路由器的WAN接口的IP地址可以表示为2014::1。
S504、若该第一路由器开启级联模式,该第一路由器将该BAS的代理前缀的最低比特位的下一比特位配置为比特值0,并在该BAS的代理前缀的最低比特位的下一比特位后补随机值,以得到该第一路由器的本地前缀,使得该第一路由器的本地前缀的位数等于EUI的前缀位数。
S505、该第一路由器将该BAS的代理前缀的最低比特位的下一比特位配置为比特值1,并对该BAS的代理前缀的位数加一,以得到该第一路由器的代理前缀。
该BAS的代理前缀的比特位为60位,EUI的前缀位数为64位,那么该第一路由器可以在该BAS的代理前缀的最低比特位的下一比特位,也就是第61比特位配置为0,第62至第64比特位根据随机数进行配置,以得到该第一路由器的本地前缀。该第一路由器的本地前缀例如可以表示为2014:1010::0003/64。在该第一路由器的本地前缀的第62至第64比特位的值即011为随机数。该第一路由器的本地前缀的比特位数可等于该EUI的前缀位数,如64位。
该第一路由器可以是在该BAS的代理前缀的第61比特位配置为比特值1,并对该BAS的代理前缀的位数加一,以得到该第一路由器的代理前缀。该第一路由器的代理前缀例如可以表示为2014:1010::0008/61。
S506、该第一路由器根据该第一路由器的本地前缀生成该第一终端的IP地址。
该第一路由器根据该第一路由器的本地前缀和该第一路由器为该第一终端分配的状态标识生成该第一终端的IP地址。若该第一终端的状态标识为2,则该第一终端的IP地址可以表示为2014:1010:0003::2。
S507、该第一路由器将该第一路由器的本地前缀携带在RA消息或DHCP的IA_NA消息中发送至第二路由器,将该第一路由器的代理前缀携带在该DHCP的IA_PD消息中发送至该第二路由器。
S508、该第二路由器根据该第一路由器的本地前缀生成该第二路由器的WAN接口的IP地址。
该第二路由器可以根据该第一路由器的本地前缀及该第二路由器的状态标识生成该第二路由器的WAN接口的IP地址。若该第二路由器的状态标识 为1,则该第二路由器的WAN接口的IP地址可以表示为2014:1010:0003::1。
S509、若该第二路由器开启级联模式,该第二路由器通过在该第一路由器的代理前缀的最低比特位的下一比特位配置为比特值0,并在该第一路由器的代理前缀的最低比特位的下一比特位后补随机值,以得到该第二路由器的本地前缀,使得该第二路由器的本地前缀的位数等于EUI的前缀位数。
S510、该第二路由器将该第一路由器的代理前缀的最低比特位的下一比特位配置为比特值1,并对该第一路由器的代理前缀的位数加一,以得到该第二路由器的代理前缀。
该第一路由器的代理前缀的比特位数为61位,那么该第二路由器可以在该第一路由器的代理前缀的最低比特位的下一比特位,也就是第62比特位配置为比特值0,并将第63至第64比特位配置为随机数,以得到该第二路由器的本地前缀。该第二路由器的本地前缀例如可以表示为2014:1010::0009/64,在该第二路由器的本地前缀的第63至第64比特位的值01为随机数。
该第二路由器可以是在该第一路由器的代理前缀的第62比特位配置为比特值1,并对该第一路由器的代理前缀加一,以得到该第二路由器的代理前缀。该第二路由器的代理前缀例如可以表示为2014:1010::000C/62。
S511、该第二路由器根据该第二路由器的本地前缀生成该第二终端的IP地址。
该第二路由器根据该第二路由器的本地前缀和该第二路由器为该第二终端分配的状态标识生成该第二终端的IP地址。若该第二终端的状态标识为2,则该第二终端的IP地址可以表示为2014:1010:0009::2。
S512、该第二路由器将该第二路由器的本地前缀携带在RA消息或DHCP的IA_NA消息中发送至第三路由器。
S513、该第三路由器根据该第二路由器的本地前缀生成该第三路由器的WAN接口的IP地址。
该第三路由器可以根据该第二路由器的本地前缀及该第三路由器的状态标识生成该第三路由器的WAN接口的IP地址。若该第三路由器的状态标识为1,则该第三路由器的WAN接口的IP地址可以表示为2014:1010:0009::1。
本发明实施例三提供的互联网协议地址分配方法,通过具体的实例对上 述任一实施例的方法进行具体说明,其有益效果与上述实施例类似,在此不再赘述。
实施例四
本发明实施例四还提供一种路由器。该路由器可执行上述实施例一至实施例三中任一实施例的互联网协议地址分配方法。图6为本发明实施例四的路由器的结构示意图。如图6所示,该路由器600可包括:接收模块601、生成模块602及发送模块603。
接收模块601,用于接收上级网络设备发送的该上级网络设备的代理前缀;该上级网络设备为该路由器的WAN接口连接的网络设备。
生成模块602,用于根据该上级网络设备的代理前缀生成该路由器的本地前缀和该路由器的代理前缀。
发送模块603,用于将该路由器的本地前缀和该路由器的代理前缀发送至该路由器的下级路由器;该下级路由器为该路由器的LAN接口连接的路由器;该路由器的本地前缀用于使该下级路由器确定该下级路由器的WAN接口的IP地址;该路由器的代理前缀用于使得该下级路由器生成该下级路由器的本地前缀。
可选的,该上级网络设备为该路由器的WAN接口连接的BAS或路由器。
可选的,生成模块602,还用于若该路由器开启级联模式,根据该上级网络设备的代理前缀生成该路由器的本地前缀和该路由器的代理前缀。
可选的,生成模块602,还用于将该上级网络设备的代理前缀的最低比特位的下一比特位配置为第一比特值,并在所述下一比特位后补随机值以得到所述路由器的本地前缀,使得该路由器的本地前缀的位数等于EUI的前缀位数;将所述下一比特位配置为第二比特值,并对所述上级网络设备的代理前缀的位数加一,以得到该路由器的代理前缀;其中,所述第一比特值不同于所述第二比特值。
可选的,该上级网络设备的代理前缀的位数小于该终端唯一标识符EUI的前缀位数。
本发明实施例四提供的路由器可执行上述实施例一至实施例三中任一实施例的互联网协议地址分配方法,其有益效果与上述实施例类似,在此不再赘述。
实施例五
本发明实施例五还提供一种路由器。图7为本发明实施例五提供的路由器的结构示意图。如图7所示,该路由器700可包括:接收机701、处理器702及发射机703。
接收机701,用于接收上级网络设备发送的该上级网络设备的代理前缀;该上级网络设备为该路由器的WAN接口连接的网络设备。
处理器702,用于根据该上级网络设备的代理前缀生成该路由器的本地前缀和该路由器的代理前缀。
发射机703,用于将该路由器的本地前缀和该路由器的代理前缀发送至该路由器的下级路由器;该下级路由器为该路由器的LAN接口连接的路由器;该路由器的本地前缀用于使该下级路由器确定该下级路由器的WAN接口的IP地址;该路由器的代理前缀用于使得该下级路由器生成该下级路由器的本地前缀。
可选的,该上级网络设备为该路由器的WAN接口连接的BAS或路由器。
可选的,处理器702,还用于若该路由器开启级联模式,根据该上级网络设备的代理前缀生成该路由器的本地前缀和该路由器的代理前缀。
可选的,处理器702,还用于将该上级网络设备的代理前缀的最低比特位的下一比特位配置为第一比特值,并在该下一比特位后补随机值,以得到所述路由器的本地前缀,使得该路由器的本地前缀的位数等于EUI的前缀位数;将所述下一比特位配置为第二比特值,并对所述上级网络设备的代理前缀的位数加一,以得到该路由器的代理前缀。其中,所述第一比特值不同于所述第二比特值。
可选的,所述上级网络设备的代理前缀的位数小于所述EUI的前缀位数。
本发明实施例五提供的路由器可执行上述实施例一至实施例三中任一实施例的互联网协议地址分配方法,其有益效果与上述实施例类似,在此不再赘述。
实施例六
本发明实施例六还提供一种计算机可读存储介质。图8为本发明实施例六提供的计算机可读存储介质的结构示意图。如图8所示,该计算机可读介质800包括:至少一个程序801;该至少一个程序包括计算机可读指令802。
计算机可读指令802,用于使路由器的处理器调取并执行,以接收上级网络设备发送的该上级网络设备的代理前缀,根据该上级网络设备的代理前缀生成该路由器的本地前缀和该路由器的代理前缀,将该路由器的本地前缀和该路由器的代理前缀发送至该路由器的下级路由器;其中,该上级网络设备为该路由器的WAN接口连接的网络设备;该下级路由器为该路由器的LAN接口连接的路由器;该路由器的本地前缀用于使该下级路由器确定该下级路由器的WAN接口的IP地址;该路由器的代理前缀用于使得该下级路由器生成该下级路由器的本地前缀。
可选的,该上级网络设备为该路由器的WAN接口连接的BAS或路由器。
可选的,计算机可读指令802,还用于在该路由器开启级联模式时,使得该路由器的处理器调取并执行,以根据该上级网络设备的代理前缀生成该路由器的本地前缀和该路由器的代理前缀。
可选的,计算机可读指令802,还用于使得该路由器的处理器调取并执行,以将该上级网络设备的代理前缀的最低比特位的下一比特位配置为第一比特值,并在该下一比特位后补随机值,以得到该路由器的本地前缀,使得该路由器的本地前缀的位数等于EUI的前缀位数,将该下一比特位配置为第二比特值,并对该上级网络设备的代理前缀的位数加一,以得到该路由器的代理前缀;其中,该第一比特值不同于该第二比特值。
可选的,该上级网络设备的代理前缀的位数小于该EUI的前缀位数。
本发明实施例六提供的计算机可读存储介质,可包括计算机可读指令的至少一个程序,用于使得路由器的处理器调用并执行,从而实现上述实施例一至实施例三中任一所述的互联网协议地址分配方法,其有益效果与上述实施例类似,在此不再赘述。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (16)

  1. 一种互联网协议地址分配方法,其特征在于,包括:
    路由器接收上级网络设备发送的所述上级网络设备的代理前缀;所述上级网络设备为所述路由器的广域网WAN接口连接的网络设备;
    所述路由器根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀;
    所述路由器将所述路由器的本地前缀和所述路由器的代理前缀发送至所述路由器的下级路由器;所述下级路由器为所述路由器的局域网LAN接口连接的路由器;所述路由器的本地前缀用于使所述下级路由器确定所述下级路由器的WAN接口的互联网协议IP地址;所述路由器的代理前缀用于使得所述下级路由器生成所述下级路由器的本地前缀。
  2. 根据权利要求1所述的方法,其特征在于,所述上级网络设备为所述路由器的WAN接口连接的宽带接入服务器BAS或路由器。
  3. 根据权利要求1或2所述的方法,其特征在于,所述路由器根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀,包括:
    若所述路由器开启级联模式,所述路由器根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀。
  4. 根据权利要求3所述的方法,其特征在于,所述路由器根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀包括:
    所述路由器将所述上级网络设备的代理前缀的最低比特位的下一比特位配置为第一比特值,并在所述下一比特位后补随机值,以得到所述路由器的本地前缀,使得所述路由器的本地前缀的位数等于终端唯一标识符EUI的前缀位数;
    所述路由器将所述下一比特位配置为第二比特值,并对所述上级网络设备的代理前缀的位数加一,以得到所述路由器的代理前缀;其中,所述第一比特值不同于所述第二比特值。
  5. 根据权利要求4所述的方法,其特征在于,所述上级网络设备的代理前缀的位数小于所述EUI的前缀位数。
  6. 一种路由器,其特征在于,包括:
    接收模块,用于接收上级网络设备发送的所述上级网络设备的代理前缀;所述上级网络设备为所述路由器的广域网WAN接口连接的网络设备;
    生成模块,用于根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀;
    发送模块,用于将所述路由器的本地前缀和所述路由器的代理前缀发送至所述路由器的下级路由器;所述下级路由器为所述路由器的局域网LAN接口连接的路由器;所述路由器的本地前缀用于使所述下级路由器确定所述下级路由器的WAN接口的互联网协议IP地址;所述路由器的代理前缀用于使得所述下级路由器生成所述下级路由器的本地前缀。
  7. 根据权利要求6所述的路由器,其特征在于,所述上级网络设备为所述路由器的WAN接口连接的宽带接入服务器BAS或路由器。
  8. 根据权利要求6或7所述的路由器,其特征在于,
    所述生成模块,还用于若所述路由器开启级联模式,根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀。
  9. 根据权利要求8所述的路由器,其特征在于,
    所述生成模块,还用于将所述上级网络设备的代理前缀的最低比特位的下一比特位配置为第一比特值,并在所述下一比特位后补随机值以得到所述路由器的本地前缀,使得所述路由器的本地前缀的位数等于终端唯一标识符EUI的前缀位数;将所述下一比特位配置为第二比特值,并对所述上级网络设备的代理前缀的位数加一,以得到所述路由器的代理前缀;其中,所述第一比特值不同于所述第二比特值。
  10. 根据权利要求9所述的路由器,其特征在于,所述上级网络设备的代理前缀的位数小于所述终端唯一标识符EUI的前缀位数。
  11. 一种路由器,其特征在于,包括:接收机、处理器及发射机;
    所述接收机,用于接收上级网络设备发送的所述上级网络设备的代理前缀;所述上级网络设备为所述路由器的广域网WAN接口连接的网络设备;
    所述处理器,用于根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀;
    所述发射机,用于将所述路由器的本地前缀和所述路由器的代理前缀发 送至所述路由器的下级路由器;所述下级路由器为所述路由器的局域网LAN接口连接的路由器;所述路由器的本地前缀用于使所述下级路由器确定所述下级路由器的WAN接口的互联网协议IP地址;所述路由器的代理前缀用于使得所述下级路由器生成所述下级路由器的本地前缀。
  12. 根据权利要求11所述的路由器,其特征在于,所述上级网络设备为所述路由器的WAN接口连接的宽带接入服务器BAS或路由器。
  13. 根据权利要求11或12所述的路由器,其特征在于,
    所述处理器,还用于若所述路由器开启级联模式,根据所述上级网络设备的代理前缀生成所述路由器的本地前缀和所述路由器的代理前缀。
  14. 根据权利要求13所述的路由器,其特征在于,
    所述处理器,还用于将所述上级网络设备的代理前缀的最低比特位的下一比特位配置为第一比特值,并在所述下一比特位后补随机值,以得到所述路由器的本地前缀,使得所述路由器的本地前缀的位数等于终端唯一标识符EUI的前缀位数;将所述下一比特位配置为第二比特值,并对所述上级网络设备的代理前缀的位数加一,以得到所述路由器的代理前缀;其中,所述第一比特值不同于所述第二比特值。
  15. 根据权利要求14所述的路由器,其特征在于,所述上级网络设备的代理前缀的位数小于所述EUI的前缀位数。
  16. 一种计算机可读存储介质,其特征在于,包括:至少一个程序;所述至少一个程序包括计算机可读指令;
    所述计算机可读指令,用于使路由器的处理器调取并执行,以实现权利要求1-5中任一项所述的互联网协议地址分配方法。
PCT/CN2015/080206 2015-05-29 2015-05-29 互联网协议地址分配方法及路由器 WO2016191906A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
KR1020177026824A KR101974023B1 (ko) 2015-05-29 2015-05-29 인터넷 프로토콜 어드레스 할당 방법 및 라우터
US15/556,553 US10432579B2 (en) 2015-05-29 2015-05-29 Internet protocol address allocation method and router
JP2017567514A JP6517377B2 (ja) 2015-05-29 2015-05-29 インターネットプロトコルアドレス割り当て方法及びルータ
CN201580044872.0A CN106576120B (zh) 2015-05-29 2015-05-29 互联网协议地址分配方法、路由器及计算机可读存储介质
PCT/CN2015/080206 WO2016191906A1 (zh) 2015-05-29 2015-05-29 互联网协议地址分配方法及路由器
EP15893570.0A EP3255866B1 (en) 2015-05-29 2015-05-29 Internet protocol address allocation method and router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/080206 WO2016191906A1 (zh) 2015-05-29 2015-05-29 互联网协议地址分配方法及路由器

Publications (1)

Publication Number Publication Date
WO2016191906A1 true WO2016191906A1 (zh) 2016-12-08

Family

ID=57439857

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/080206 WO2016191906A1 (zh) 2015-05-29 2015-05-29 互联网协议地址分配方法及路由器

Country Status (6)

Country Link
US (1) US10432579B2 (zh)
EP (1) EP3255866B1 (zh)
JP (1) JP6517377B2 (zh)
KR (1) KR101974023B1 (zh)
CN (1) CN106576120B (zh)
WO (1) WO2016191906A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314567B (zh) * 2020-01-20 2021-10-26 广州芯德通信科技股份有限公司 一种基于多个iad设备级联的通信方法
JP6990745B2 (ja) * 2020-06-10 2022-01-12 エレコム株式会社 IPv6 CEルータのインターフェース設定プログラム、インターフェース設定方法、およびインターフェース設定プログラムを内蔵するIPv6 CEルータ
US20220407837A1 (en) * 2021-06-16 2022-12-22 Verizon Patent And Licensing Inc. Systems and methods for supporting host devices with a single network address when multiple prefixes are delegated
US11870694B2 (en) * 2021-11-19 2024-01-09 Qualcomm Incorporated Network prefix-generating customer premises equipment
CN114339835B (zh) * 2021-12-30 2023-06-06 瑞斯康达科技发展股份有限公司 一种小基站的开通方法、小基站和小基站系统
CN117640368A (zh) * 2022-08-19 2024-03-01 华为技术有限公司 一种家庭网络的路由方法、接入设备及介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1879425A (zh) * 2003-11-10 2006-12-13 思科技术公司 用于基于委托网络前缀优化移动路由器连接的接入路由器中的布置
CN101572692A (zh) * 2008-04-28 2009-11-04 华为技术有限公司 一种ip地址分配方法、系统及设备
WO2014058488A1 (en) * 2012-10-11 2014-04-17 Cable Television Laboratories, Inc. Adaptive prefix delegation

Family Cites Families (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6240513B1 (en) * 1997-01-03 2001-05-29 Fortress Technologies, Inc. Network security device
JP3725070B2 (ja) * 2001-12-21 2005-12-07 株式会社東芝 ネットワークシステム、ルータ、ホスト、プレフィクス管理方法及びipアドレス管理方法
US20040019664A1 (en) * 2002-02-15 2004-01-29 Franck Le Method and system for discovering a network element in a network such as an agent in an IP network
US7454519B2 (en) * 2002-03-22 2008-11-18 Motorola, Inc. Method for automatically allocating address prefixes
JP4028331B2 (ja) 2002-08-30 2007-12-26 富士通株式会社 Ipアドレスを自動生成するルータ
US7246231B2 (en) * 2002-10-31 2007-07-17 Ntt Docomo, Inc. Location privacy through IP address space scrambling
US7333461B2 (en) * 2003-06-05 2008-02-19 Cisco Technology, Inc. Arrangement in a router of a mobile network for generating a local router prefix for anonymous route connections
JP2005072685A (ja) * 2003-08-27 2005-03-17 Ntt Docomo Inc ルータ装置及びその装置における経路情報の配布方法並びに通信システム
US7039035B2 (en) 2003-11-10 2006-05-02 Cisco Technology, Inc. Arrangement in an access router for optimizing mobile router connections based on delegated network prefixes
JP3950874B2 (ja) * 2004-07-01 2007-08-01 株式会社東芝 ネットワーク接続装置、経路情報配布プログラム及び経路情報配布方法
KR20060002564A (ko) * 2004-07-02 2006-01-09 삼성전자주식회사 세탁기
FR2879871B1 (fr) 2004-12-20 2007-03-09 Cit Alcatel Dispositif d'attribution dynamique de prefixes de longueurs variables pour des equipements de reseau d'un reseau ip
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
CN100499674C (zh) * 2006-01-06 2009-06-10 华为技术有限公司 一种路由器下终端设备ip地址的分配方法
EP3042668B1 (en) * 2006-06-07 2018-09-19 The Board of Trustees of the Leland Stanford Junior University Anti-leukocyte recruitment therapy for the treatment of seizures and epilepsy
US8102775B2 (en) * 2007-03-12 2012-01-24 Cisco Technology, Inc. Joining tree-based networks into an autonomous system using peer connections between the tree-based networks
US8045558B2 (en) 2007-04-23 2011-10-25 Cisco Technology, Inc. Extensions to IPv6 neighbor discovery protocol for automated prefix delegation
US8219800B2 (en) * 2007-06-06 2012-07-10 Cisco Technology, Inc. Secure neighbor discovery router for defending host nodes from rogue routers
CN102413033B (zh) * 2010-09-26 2015-07-08 华为技术有限公司 实现路由聚合的方法、装置和系统
US8995360B2 (en) * 2011-06-09 2015-03-31 Time Warner Cable Enterprises Llc Techniques for prefix subnetting
JP6029449B2 (ja) 2012-12-17 2016-11-24 三菱電機株式会社 スマートメータシステム、管理ルータおよびメータ
US9467482B2 (en) * 2013-01-31 2016-10-11 Cable Television Laboratories, Inc. Reverse prefix delegation
US9438507B2 (en) * 2013-05-31 2016-09-06 Cisco Technology, Inc. Routing aggregation and prefix delegation
EP2955904B1 (de) * 2014-06-10 2016-10-19 Siemens Aktiengesellschaft Vergabe von netzwerkadressen für netzteilnehmer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1879425A (zh) * 2003-11-10 2006-12-13 思科技术公司 用于基于委托网络前缀优化移动路由器连接的接入路由器中的布置
CN101572692A (zh) * 2008-04-28 2009-11-04 华为技术有限公司 一种ip地址分配方法、系统及设备
WO2014058488A1 (en) * 2012-10-11 2014-04-17 Cable Television Laboratories, Inc. Adaptive prefix delegation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3255866A4 *

Also Published As

Publication number Publication date
KR101974023B1 (ko) 2019-04-30
EP3255866A4 (en) 2018-03-28
EP3255866B1 (en) 2019-08-21
CN106576120A (zh) 2017-04-19
CN106576120B (zh) 2019-09-13
JP6517377B2 (ja) 2019-05-22
US20180054415A1 (en) 2018-02-22
EP3255866A1 (en) 2017-12-13
JP2018509120A (ja) 2018-03-29
KR20170118905A (ko) 2017-10-25
US10432579B2 (en) 2019-10-01

Similar Documents

Publication Publication Date Title
US11528226B2 (en) Network validation with dynamic tunneling
WO2016191906A1 (zh) 互联网协议地址分配方法及路由器
EP2355408B1 (en) Automatically identify an edge-facing router
US20120324063A1 (en) Method, network device, and system for automatically configuring network device in ipv6 network
US8976807B2 (en) Dynamically determining hostnames of network devices
US10965640B2 (en) Configuration of an M2M device
JP5424007B2 (ja) 情報を提供するための方法、ホームゲートウェイおよびホームネットワークシステム
US20150113168A1 (en) Network Bridging
WO2015066840A1 (zh) 一种网络地址转换设备及方法
CN112654049B (zh) 用于配置无线通信覆盖扩展系统的方法、系统、节点和介质
US20140313933A1 (en) Method, apparatus, and system for layer 2 interworking based on ipv6
WO2016131402A1 (en) Media access control address resolution using internet protocol addresses
US9503418B2 (en) Method and apparatus for obtaining remote IP address
EP2690832B1 (en) Communication device, communication system, and communication method
WO2016177185A1 (zh) 媒体访问控制mac地址的处理方法及装置
WO2015085558A1 (zh) 一种动态分配ip地址的方法、装置和系统
US10673809B2 (en) Technique for managing an address in a local area network
EP3264724B1 (en) Method and apparatus for sending, transferring and acquiring capability
JP2016515371A (ja) パケット送信方法および装置、ならびにサーバ
US20230171226A1 (en) Method for configuring a communication network and node implementing said configuration method
KR101303030B1 (ko) ⅠPv6를 지원하는 프로토콜을 이용한 호스트 동작상태 및 탐색 방법
WO2014179925A1 (zh) 控制规则的处理方法及装置
CN112236981B (zh) 在sdn中配置网络路径
Hughes IPv6 Core Protocols
Huq et al. Ensemble Approach for IP Autoconfiguration in Ad Hoc MANETs

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

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2015893570

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 15556553

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2017567514

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20177026824

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE