WO2022052496A1 - Address reservation method, network device, and system - Google Patents

Address reservation method, network device, and system Download PDF

Info

Publication number
WO2022052496A1
WO2022052496A1 PCT/CN2021/093130 CN2021093130W WO2022052496A1 WO 2022052496 A1 WO2022052496 A1 WO 2022052496A1 CN 2021093130 W CN2021093130 W CN 2021093130W WO 2022052496 A1 WO2022052496 A1 WO 2022052496A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
information
terminal device
state
network device
Prior art date
Application number
PCT/CN2021/093130
Other languages
French (fr)
Chinese (zh)
Inventor
高雪
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022052496A1 publication Critical patent/WO2022052496A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2854Wide area networks, e.g. public data networks
    • H04L12/2856Access arrangements, e.g. Internet access
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming

Definitions

  • the present application relates to the technical field of network communication, and more particularly, to a method, network device and system for address reservation.
  • IP Address reservation means that after the terminal device goes offline, the network device can reserve the Internet protocol (IP) address (for example, IP address or IP address prefix) used by the terminal device before going offline this time.
  • IP Internet protocol
  • Terminal Equipment That is to say, after the terminal device goes offline, the network device may set the state of the above IP address to a reserved state. Therefore, when the terminal device requests to go online again, the network device can assign the IP address in the reserved state to the terminal device, so that the terminal device can use the reserved IP address to access the network, thereby effectively improving the efficiency of the terminal device. Efficiency of access to the network.
  • IP Internet protocol
  • the existing address reservation methods cannot meet the requirements of reserving address resources for terminal devices. need.
  • the present application provides an address reservation method, network device and system, which can meet the requirement of reserving address resources for terminal equipment.
  • a method for address reservation includes:
  • the network device After the first terminal device accesses the network through the network device, the network device acquires the first information and the first Internet Protocol IP address of the first terminal device, where the first information includes the first media access control MAC address and the first connection.
  • Ingress port information where the first MAC address indicates the first terminal device, the first access port information indicates the first port information on which the network device receives an access request from the first terminal device, and the first IP address is the IP address assigned by the network device to the first terminal device and used for the first terminal device to access the network; the network device determines a first correspondence, and the first correspondence is the first information and the first Correspondence between IP addresses; when the network device determines that the first terminal device is switched from an online state to an offline state, the network device determines the first IP address corresponding to the first information according to the first correspondence The state is determined to be a reserved state.
  • the network device may reserve an IP address for the first terminal device according to the first MAC address and the first access port information.
  • the network device can further identify the terminal device corresponding to the first access port information according to the first access port information provided in this application, so that In some special scenarios (for example, a case where one MAC address corresponds to multiple different terminal devices), the network device may still reserve IP addresses for the multiple different terminal devices.
  • the address reservation method provided by the present application can better meet the requirement of reserving address resources for terminal equipment.
  • the first access port information includes a first virtual local area network VLAN identifier and a first port identifier, where the first port identifier is used to indicate the first port, the The first VLAN identifier is used to indicate the broadcast domain to which the first port belongs.
  • the first information may include the first MAC address, the first VLAN identifier and the first port identifier. Therefore, after the first terminal device is switched from the online state to the offline state, the network device can reserve an IP address for the first terminal device according to the first MAC address, the first VLAN identifier and the first port identifier.
  • the network device When the network device receives access requests from different terminal devices, the network device usually assigns different port identifiers to different terminal devices.
  • the first information provided by the present application has a one-to-one relationship with the terminal device. Therefore, the network device can successfully reserve the IP address for the first terminal device according to the first information.
  • the first information further includes first access link information of the first terminal device, where the first access link information indicates the first terminal device physical location.
  • the first information may include the first MAC address, the first VLAN identifier, the first port identifier and the first access link information. Therefore, after the first terminal device is switched from the online state to the offline state, the network device can reserve for the first terminal device according to the first MAC address, the first VLAN identifier, the first port identifier and the first access link information IP address.
  • the first information may further include the first MAC address and the first access link information. Therefore, after the first terminal device is switched from the online state to the offline state, the network device can reserve an IP address for the first terminal device according to the first MAC address and the first access link information.
  • the network device can successfully reserve an IP address for terminal device #1 according to access link information #1, and can successfully reserve an IP address for terminal device # according to access link information #2 2 Reserve an IP address.
  • the first access link information includes option82 option information, or the first access link information includes at least one of the following information: option18 option info and option37 option info.
  • the first access link information may include option82 option information.
  • the first access link information may include option18 option information.
  • the first access link information may include option37 option information.
  • the first access link information may further include option18 option information and option37 option.
  • the first information may include the first MAC address, the first access port information and the first access link information.
  • the first information when the first access link information is option82 option information, the first information may include a first MAC address, a first VLAN identifier, a first port identifier, and option82 option information.
  • the first access link information when the first access link information is option37 option information, the first information may include a first MAC address, a first VLAN identifier, a first port identifier, and option37 option information.
  • the first information further includes a dynamic host configuration protocol unique identifier DUID of the first terminal device.
  • the first information may include the first MAC address, the first access port information, the first access link information, and the DUID of the first terminal device.
  • the first information may include the first MAC address, the first VLAN identifier, the first port identifier, option82 option information, and the DUID of the first terminal device.
  • the first information may include a first MAC address, a first VLAN identifier, a first port identifier, option18 option information, and the DUID of the first terminal device.
  • the first information may include the first MAC address, the first VLAN identifier, the first port identifier, option37 option information, and the DUID of the first terminal device.
  • the first information may further include the first MAC address, the first access link information, and the DUID of the first terminal device.
  • the first information may include the first MAC address, option82 option information, and the DUID of the first terminal device.
  • the first information may include a first MAC address, a first VLAN identifier, a first port identifier, and option18 option information and option37 option information.
  • the first information may further include the first MAC address, the first access port information, and the DUID of the first terminal device.
  • the first information may include the first MAC address, the first VLAN identifier, the first port identifier, and the DUID of the first terminal device.
  • the first information may further include first MAC address and first access port information.
  • the first information may include a first MAC address, a first VLAN identifier, and a first port identifier.
  • the first information may further include the first MAC address and the first access link information.
  • the first information may include the first MAC address, option18 option information and option37 option information, and the DUID of the first terminal device.
  • the first information may also include the first MAC address, option37 option information, and the DUID of the first terminal device.
  • the first information further includes a reservation period, and the network device determines the state of the first IP address corresponding to the first information according to the first correspondence Being in a reserved state, including: within the reservation period, the network device determines the state of the first IP address corresponding to the first information as a reserved state according to the first correspondence; the method further includes: in the Outside the reservation period, the network device deletes the first correspondence, and updates the state of the first IP address corresponding to the first information from the reserved state to the unoccupied state.
  • the network device may reserve the first IP address for the first terminal device within a certain period of time according to the reservation period. If the reservation period is exceeded, the network device can update the state of the first IP address from the reserved state to the unoccupied state, which can avoid wasting resources of the network address.
  • the method further includes: the network device receiving the first terminal device The first access request information, the first access request information is used to request the network device to allocate the IP address of the first terminal device to access the network device according to the first access port information to the first terminal device; The network device allocates the first IP address to the first terminal device according to the first access request information and the first correspondence; the network device updates the state of the first IP address from a reserved state to an occupied state .
  • the network device reserves the first terminal device for the first terminal device according to the first information.
  • An IP address that is, the state of the first IP address is a reserved state.
  • the network device can assign the first IP address corresponding to the first information to the first terminal device according to the first information, so that the first IP address can be improved. Efficiency of terminal equipment accessing the network.
  • the network device allocates the first IP address to the first terminal device according to the first access request information and the first correspondence, including: when When the network device detects the first correspondence and the state of the first IP address is a reserved state, it allocates the first IP address to the first terminal device.
  • the method further includes: when the network device does not detect the first correspondence, and the state of the first IP address is an unoccupied state, for the The first terminal device allocates the first IP address; or when the network device does not detect the first correspondence and the state of the first IP address is the occupied state, allocates the second IP address to the first terminal device;
  • the second IP address is an IP address used by the first terminal device to access the network according to the first access port information, and the second IP address is different from the first IP address.
  • the network device when the network device does not detect the IP address reserved for the first terminal device, the network device may also assign an IP address in an unoccupied state (for example, the above-mentioned second IP address) to the first terminal device. terminal device, thereby ensuring that the first terminal device can successfully access the network through the network device.
  • an IP address in an unoccupied state for example, the above-mentioned second IP address
  • the method further includes: the network device receiving the second terminal device's second access request information, the second access request information is used to request the network device to allocate the IP address of the second terminal device to access the network device according to the second access port information to the second terminal device, the first The second terminal device is different from the first terminal device; the network device determines that the second information of the second terminal device is the same as the first information, and the second information includes the second MAC address and the second access port information, The second MAC address indicates the second terminal device, and the second access port information indicates the information of the second port on which the network device receives the access request of the second terminal device; the network device according to the second access request With the first correspondence, the first IP address is allocated to the second terminal device.
  • the first information is the same as the second information.
  • the network device reserves the first IP address for the first terminal device according to the first information, that is, the first IP address is reserved for the first terminal device.
  • the state of an IP address is a reserved state.
  • the second access port information includes a second virtual local area network VLAN identifier and a second port identifier
  • the second port identifier is used to indicate the second port
  • the The second VLAN identifier is used to indicate the broadcast domain to which the second port belongs.
  • the second information may include the second MAC address, the second VLAN identifier and the second port identifier. Therefore, after the second terminal device is switched from the online state to the offline state, the network device can reserve an IP address for the second terminal device according to the second MAC address, the second VLAN identifier and the second port identifier.
  • the second information further includes second access link information of the second terminal device, where the second access link information indicates the second terminal device physical location.
  • the second information may include the second MAC address, the second VLAN identifier, the second port identifier and the second access link information. Therefore, after the second terminal device is switched from the online state to the offline state, the network device can reserve for the second terminal device according to the second MAC address, the second VLAN identifier, the second port identifier and the second access link information IP address.
  • the second access link information includes option82 option information, or the second access link information includes at least one of the following information: option18 option info and option37 option info.
  • the second access link information may include option82 option information.
  • the second access link information may include option18 option information.
  • the second access link information may include option37 option information.
  • the second access link information may further include option18 option information and option37 option.
  • the second information may include the second MAC address, the second access port information and the second access link information.
  • the second information may include a second MAC address, a second VLAN identifier, a second port identifier, and option82 option information.
  • the second information may include a second MAC address, a second VLAN identifier, a second port identifier, and option18 option information.
  • the second information further includes the DUID of the second terminal device.
  • the second information may include the second MAC address, the second access port information, the second access link information, and the DUID of the second terminal device.
  • the second information may further include the second MAC address, the second access link information, and the DUID of the second terminal device.
  • the second information may include the second MAC address, option82 option information, and the DUID of the second terminal device.
  • the second information may include the second MAC address, option18 option information, and the DUID of the second terminal device.
  • the second information may further include the second MAC address, the second access port information, and the DUID of the second terminal device.
  • the second information may include the second MAC address, the second VLAN ID, the second port ID, and the DUID of the second terminal device.
  • the second information may further include second MAC address and second access port information.
  • the second information may include a second MAC address, a second VLAN identification, and a second port identification.
  • the second information may further include a second MAC address and second access link information.
  • the second information may include the second MAC address, option18 option information and option37 option information, and the DUID of the second terminal device.
  • the second information may include the second MAC address, option18 option information, and the DUID of the second terminal device.
  • the network device allocates the first IP address to the second terminal device according to the second access request information and the first correspondence, including: when When the network device detects the first correspondence and the state of the first IP address is a reserved state, assigning the first IP address to the second terminal device; the method further includes: when the network device detects the first IP address the first correspondence, and when the state of the first IP address is the occupied state, assign a third IP address to the second terminal device; or when the network device does not detect the first correspondence, and the first IP address When the state of the first IP address is the occupied state, the third IP address is allocated to the second terminal device; or when the network device does not detect the first correspondence, and the state of the first IP address is the unoccupied state, the third IP address is assigned to the second terminal device; The second terminal device allocates the first IP address; wherein the third IP address is the IP address used by the second terminal device to access the network according to the second access port information, and the first IP address, the The second terminal device allocates the first IP address; wherein the third IP address
  • the network device reserves the first IP address for the first terminal device according to the first information, that is, the state of the first IP address is the reserved state.
  • the network device may assign the first IP address corresponding to the first information to the first terminal device according to the first information, that is, the state of the first IP address is preset by The reserved state is updated to the occupied state.
  • the network device can successfully assign the first IP address or the third IP address to the second terminal device, thereby ensuring that the second terminal device can successfully access the network through the network device Access the network.
  • the method further includes: when the network device determines that the second terminal device is switched from the online state to the offline state at the first moment, and the first terminal device is switched from the online state to the offline state before the first moment state, update the first correspondence to a second correspondence, where the second correspondence is the correspondence between the first information and the third IP address, or the second information and the third IP address.
  • the network device updates the state of the third IP address from the occupied state to the reserved state, and updates the state of the first IP address from the occupied state to the unoccupied state.
  • the network device determines that the first information of the first terminal device and the second information of the second terminal device are the same, and the first IP address assigned by the network device to the first terminal device and the network device assigned to the second terminal The third IP address of the device is different.
  • the network device can determine the IP address corresponding to the first information or the second information according to the time of the first terminal device and the time of the offline of the second terminal device as The first IP address, or it may be determined that the IP address corresponding to the first information or the second information is the third IP address.
  • the network device when the network device detects the first correspondence and the state of the first IP address is the reserved state, it allocates the second terminal device to the second terminal device. After an IP address, the method further includes: when the network device determines that the second terminal device is switched from an online state to an offline state at a second time, and the first terminal device is switched from an online state to an offline state after the second time In the offline state, the first correspondence is not updated; the network device updates the state of the first IP address from the occupied state to the reserved state.
  • the network device is a broadband access server BRAS.
  • a network device in a second aspect, includes:
  • an obtaining unit configured to obtain first information and a first Internet Protocol IP address of a first terminal device, where the first information includes a first media access control MAC address and first access port information, wherein the first MAC address indicates For the first terminal device, the first access port information indicates the information of the first port on which the network device receives the access request of the first terminal device, and the first IP address is the first IP address assigned by the network device to the first terminal device and the IP address used for the first terminal device to access the network; a determining unit, configured to determine a first correspondence, where the first correspondence is the correspondence between the first information and the first IP address; the The determining unit is further configured to determine that the state of the first IP address corresponding to the first information is a reserved state according to the first correspondence when the first terminal device is switched from an online state to an offline state.
  • the first access port information includes a first virtual local area network VLAN identifier and a first port identifier, where the first port identifier is used to indicate the first port, the The first VLAN identifier is used to indicate the broadcast domain to which the first port belongs.
  • the first information further includes first access link information of the first terminal device, where the first access link information indicates the first terminal device physical location.
  • the first access link information includes option82 option information, or the first access link information includes at least one of the following information: option18 option info and option37 option info.
  • the first access link information may include option82 option information.
  • the first access link information may include option18 option information.
  • the first access link information may include option37 option information.
  • the first access link information may further include option18 option information and option37 option.
  • the first information further includes a dynamic host configuration protocol unique identifier DUID of the first terminal device.
  • the first information may further include the first MAC address, the first access link information, and the DUID of the first terminal device.
  • the first information may further include the first MAC address, the first access port information, and the DUID of the first terminal device.
  • the first information may further include first MAC address and first access port information.
  • the first information may further include the first MAC address and the first access link information.
  • the first information further includes a reservation period
  • the determining unit is further configured to: within the reservation period, according to the first correspondence The state of the first IP address corresponding to the information is determined to be a reserved state; the determining unit is further configured to: delete the first correspondence outside the reservation period, and assign the first IP address corresponding to the first information is updated from reserved to unoccupied.
  • the network device further includes a processing unit, and the obtaining unit is further configured to receive first access request information of the first terminal device, the first access The request information is used to request the network device to assign the first terminal device the IP address of the first terminal device accessing the network device according to the first access port information; the processing unit is used to: according to the first access request information and the first correspondence, assign the first IP address to the first terminal device; and update the state of the first IP address from a reserved state to an occupied state.
  • the processing unit is further configured to: when the first correspondence relationship is detected and the state of the first IP address is a reserved state, the first IP address is in the reserved state.
  • the terminal device assigns the first IP address.
  • the processing unit is further configured to: when the first correspondence is not detected and the state of the first IP address is the unoccupied state, the processing unit is the first IP address.
  • a terminal device assigns the first IP address; or when the first correspondence is not detected and the state of the first IP address is the occupied state, assigns a second IP address to the first terminal device; wherein the first IP address is The second IP address is the IP address used by the first terminal device to access the network according to the first access port information, and the second IP address is different from the first IP address.
  • the obtaining unit is further configured to receive second access request information of the second terminal device, where the second access request information is used to request the network device to be The second terminal device assigns the IP address of the second terminal device to access the network device according to the second access port information, and the second terminal device is different from the first terminal device;
  • the determining unit is further configured to: determine the The second information of the second terminal device is the same as the first information, the second information includes a second MAC address and the second access port information, the second MAC address indicates the second terminal device, the second access port
  • the port information indicates the information of the second port for the network device to receive the access request of the second terminal device;
  • the processing unit is further configured to: according to the second access request and the first correspondence, for the second terminal device The first IP address is allocated.
  • the second access port information includes a second virtual local area network VLAN identifier and a second port identifier
  • the second port identifier is used to indicate the second port
  • the The second VLAN identifier is used to indicate the broadcast domain to which the second port belongs.
  • the second information further includes second access link information of the second terminal device, where the second access link information indicates the second terminal device physical location.
  • the second access link information includes option82 option information, or the second access link information includes at least one of the following information: option18 option info and option37 option info.
  • the second access link information may include option82 option information.
  • the second access link information may include option18 option information.
  • the second access link information may include option37 option information.
  • the second access link information may further include option18 option information and option37 option.
  • the second information further includes the DUID of the second terminal device.
  • the processing unit is further configured to: when the first correspondence is detected and the state of the first IP address is a reserved state, the second The terminal device allocates the first IP address;
  • the processing unit is further configured to: when the first correspondence is detected and the state of the first IP address is the occupied state, assign a third IP address to the second terminal device; or when the first correspondence is not detected relationship, and the state of the first IP address is occupied, assign the third IP address to the second terminal device; or when the first correspondence is not detected, and the state of the first IP address is unoccupied In the state, the first IP address is allocated to the second terminal device; wherein, the third IP address is the IP address used by the second terminal device to access the network according to the second access port information, and the third IP address is used for accessing the network according to the second access port information.
  • An IP address, the second IP address and the third IP address are different.
  • the determining unit is further configured to: determine that the second terminal device is switched from an online state to an offline state at the first moment, and determine that the first terminal device is in The online state is switched to the offline state before the first moment; the processing unit is further configured to: update the first correspondence to a second correspondence, where the second correspondence is the first information and the third IP address The corresponding relationship between, or the corresponding relationship between the second information and the third IP address; the state of the third IP address is updated from the occupied state to the reserved state, and the state of the first IP address is changed by The occupied state is updated to the unoccupied state.
  • the determining unit is further configured to: determine that the second terminal device is switched from an online state to an offline state at a second moment, and determine that the first terminal device is in a The online state is switched to the offline state after the second moment; the processing unit is further configured to: update the state of the first IP address from the occupied state to the reserved state.
  • the network device is a broadband access server BRAS.
  • the present application provides a network device, where the network device has a function of implementing the method in the first aspect and any possible implementation manner of the first aspect.
  • the functions can be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more units corresponding to the above-mentioned functions.
  • the present application provides a network device or other combined device, component, etc. that can implement the functions of the above-mentioned network device, including at least one processor and a communication interface.
  • the at least one processor is configured to execute a computer program or instructions, so that the network device can implement the first aspect and the communication method in any possible implementation manner of the first aspect.
  • the network device further includes at least one memory coupled to the at least one processor, and the computer program or instructions are stored in the at least one memory.
  • the memory may be integrated with the processor, or the memory may be provided separately from the processor.
  • the network device is a network device.
  • the communication interface may be a transceiver, or an input/output interface.
  • the network device is a chip or a system on a chip.
  • the communication interface may be an input/output interface, an interface circuit, an output circuit, an input circuit, a pin or a related circuit, etc. on the chip or a chip system.
  • a processor may also be embodied as a processing circuit or a logic circuit.
  • the network device is a chip or a chip system configured in the network device.
  • the transceiver may be a transceiver circuit.
  • the input/output interface may be an input/output circuit.
  • a computer-readable storage medium for storing a computer program, the computer program including instructions for executing the method in the above-mentioned first aspect and any possible implementation manner of the above-mentioned first aspect.
  • a chip including at least one processor and an interface; the at least one processor is used to call and run a computer program, so that the chip executes the above-mentioned first aspect and the above-mentioned first aspect method in any possible implementation of .
  • the above-mentioned chip may be a system on chip (system on chip, SOC), or a baseband chip, etc., wherein the baseband chip may include a processor, a channel encoder, a digital signal processor, a modem, an interface module, and the like.
  • SOC system on chip
  • baseband chip may include a processor, a channel encoder, a digital signal processor, a modem, an interface module, and the like.
  • a system including the network device described in the second aspect, the third aspect or the fourth aspect.
  • FIG. 1 is a schematic diagram of a system architecture 100 suitable for the address reservation method provided by the present application.
  • FIG. 2 is a schematic flowchart of a method 100 for address reservation provided by the present application.
  • FIG. 3 is a schematic flowchart of a method 200 for a network device to assign an IP address to a first terminal device according to the first information provided by the present application.
  • FIG. 4 is a schematic flowchart of a method 300 for a network device to reserve an IP address for a first terminal device according to the first information provided by the present application.
  • FIG. 5 is a schematic flowchart of a method 400 for address reservation provided by the present application.
  • FIG. 6 is a schematic flowchart of a method 500 for address reservation provided by the present application.
  • FIG. 7 is a schematic flowchart of a method 600 for address reservation provided by the present application.
  • FIG. 8 is a schematic structural diagram of a network device 1000 provided by the present application.
  • FIG. 9 is a schematic structural diagram of a network device 1100 provided by the present application.
  • FIG. 10 is a schematic structural diagram of a network device 1200 provided by the present application.
  • FIG. 11 is a schematic structural diagram of a network system 1300 provided by the present application.
  • first terminal device and the second terminal device are not specifically limited in this application.
  • the first terminal device and/or the second terminal device may be a mobile phone (mobile phone), a tablet computer (pad), a computer with a wireless transceiver function, a virtual reality (virtual reality, VR) terminal device, an augmented reality (augmented reality) , AR) terminal equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid , wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) Telephones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, available Wearable devices, terminal devices in 5G networks, terminal devices in non-public networks, etc.
  • a virtual reality (virtual reality, VR) terminal device an augmented reality (augmented reality) , AR) terminal equipment
  • wireless terminals in industrial control wireless terminals in self
  • wearable devices can also be called wearable smart devices, which is a general term for the intelligent design of daily wear and the development of wearable devices using wearable technology, such as glasses, gloves, watches, clothing and shoes.
  • a wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories.
  • Wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction, and cloud interaction.
  • wearable smart devices include full-featured, large-scale, complete or partial functions without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, which needs to cooperate with other devices such as smart phones. Use, such as all kinds of smart bracelets, smart jewelry, etc. for physical sign monitoring.
  • first terminal device and/or the second terminal device may also be terminal devices in an internet of things (internet of things, IoT) system.
  • IoT internet of things
  • IoT is an important part of the development of information technology in the future. Its main technical feature is to connect items to the network through communication technology, so as to realize the intelligent network of human-machine interconnection and interconnection of things.
  • the network device in order to improve the efficiency of the terminal device accessing the network, usually in the process of switching the terminal device from the online state to the offline state (that is, the terminal device goes offline), configure the network device according to the MAC address of the terminal device and the The dynamic host configuration protocol unique identifier (dhcp unique identifier, DUID) of the terminal device reserves the IP address used by the terminal device before going offline this time for the terminal device. Therefore, when the terminal device requests to go online again, the network device can assign the previously reserved IP address to the terminal device, so that the terminal device can use the reserved IP address to access the network.
  • dhcp unique identifier DUID
  • the existing address reservation method cannot meet the requirement of reserving address resources for terminal equipment.
  • the MAC address of terminal device #1 and the MAC address of terminal device #2 are the same and are MAC address #1
  • the DUID of terminal device #1 and the DUID of terminal device #2 All are the same and are DUID#1.
  • the network device receives the network access request of terminal device #1 and terminal device #2 at the same time.
  • terminal device #2 reserves an IP address (for example, the IP address used by terminal device #1 to access the network this time, or the IP address used by terminal device #2 to access the network this time).
  • the present application provides an address reservation method and network device, which can meet the requirements of reserving address resources for terminal devices.
  • FIG. 1 For ease of understanding, a system architecture applicable to this embodiment of the present application is described in detail first with reference to FIG. 1 .
  • FIG. 1 is a schematic diagram of a system architecture 100 suitable for the address reservation method provided by the present application.
  • the system architecture 100 may include a terminal device 110 , a terminal device 111 and a network device 130 .
  • Terminal equipment 110 and/or terminal equipment 111 may be connected via a Layer 2 network, an asymmetric digital subscriber line (ADSL) (eg, using a digital subscriber line access multiplexer (DSLAM)) ) to access the network device 130.
  • ADSL asymmetric digital subscriber line
  • DSL digital subscriber line access multiplexer
  • the method for the terminal device 110 and/or the terminal device 111 to access the network device through the Layer 2 network is the same as the existing method, which will not be described in detail here.
  • the network device 130 may allocate an IP address or an IP address prefix to the terminal device 110 and/or the terminal device according to the access request of the terminal device 110 and/or the terminal device 111 .
  • the network device 130 may assign the locally stored IP address to the terminal device 110 and/or the terminal device 111 .
  • the IP address stored locally by the network device 130 may be understood as the IP address stored in the local address pool of the network device 130 .
  • the network device 130 may be a network device that accesses an internet protocol version 6 (IPv6) network.
  • IPv6 network may include a remote authentication dial in user service (RADIUS) server, a Next Generation Network (NGN) server, and the like.
  • RADIUS remote authentication dial in user service
  • NTN Next Generation Network
  • the specific type of the network device 130 is not limited.
  • the above-mentioned network device 130 may be a broadband remote access server (BRAS).
  • BRAS broadband remote access server
  • the above-mentioned network device 130 may also be other devices including BRAS.
  • FIG. 1 is only for illustration and does not constitute any limitation to the present application.
  • the system architecture 100 may further include a greater number of terminal devices or a greater number of network devices, and the like.
  • FIG. 2 is a schematic flowchart of a method 100 for address reservation provided by the present application. As shown in FIG. 2 , the method 100 may include steps 110 to 130 , and the steps 110 to 130 will be described in detail below.
  • Step 110 after the first terminal device accesses the network through the network device, the network device obtains the first information of the first terminal device and the first Internet Protocol IP address, the first information includes the first media access control MAC address and the first connection. ingress port information, wherein the first MAC address indicates the first terminal device, the first access port information indicates the information of the first port where the network device receives the access request of the first terminal device, and the first IP address is assigned by the network device to the first terminal device. An IP address of a terminal device and used for the first terminal device to access the network.
  • the first terminal device accesses the network through the network device
  • the network device allocates an IP address to the first terminal device
  • the first terminal device uses the IP address allocated by the network device to access the network through the network device.
  • the IP address allocated by the network device to the first terminal device may be an IP address (eg, an IPv6 address) in the local address pool of the network device.
  • the first terminal device may be the terminal device 110 in FIG. 1 .
  • the first terminal device may also be the terminal device 111 in FIG. 1 .
  • the network device may be network device 130 in FIG. 1 .
  • network device 130 may be a BRAS device.
  • the network device 130 may be other devices including BRAS devices.
  • the first information may include a first media access control MAC address and first access port information, where the first MAC address indicates the first terminal device, and the first access port information indicates that the network device receives the first Information about the first port of the access request of the terminal device, where the first IP address is the IP address allocated by the network device to the first terminal device and used for the first terminal device to access the network.
  • the first access port information may include a first virtual local area network (virtual local area network, VLAN) identifier and a first port identifier, where the first port identifier is used to indicate the first port, and the first VLAN identifier is used to indicate the first port.
  • VLAN virtual local area network
  • the first IP address may be an IPv6 address.
  • the first IP address may be an IPv6 address prefix.
  • the first information may include the first MAC address, the first VLAN identifier and the first port identifier.
  • the first information may further include first access link information of the first terminal device, where the first access link information indicates the physical location of the first terminal device.
  • the first access link information includes option82 option information, or the first access link information includes at least one of the following information: option18 option information and option37 option information. That is, the first access link information provided by this application may include option82 option information.
  • the first access link information may also include option18 option information.
  • the first access link information may also include option37 option information.
  • the first access link information may further include option18 option information and option37 option.
  • the first information may include the first MAC address, the first access port information and the first access link information.
  • the first information may include a first MAC address, a first VLAN identifier, first port information, and option82 option information.
  • the first information may include a first MAC address, a first VLAN identifier, first port information and option18 option information.
  • the first information may include the first MAC address, the first VLAN identifier, the first port information, and option18 option information and option37 option information.
  • the first information further includes the dynamic host configuration protocol unique identifier DUID of the first terminal device.
  • the first information may include the first MAC address, the first access port information, the first access link information, and the DUID of the first terminal device.
  • the first information may include the first MAC address, the first VLAN identifier, the first port identifier, option82 option information, and the DUID of the first terminal device.
  • the first information may also include only the first MAC address and the first access port information.
  • the first information may include the first MAC address, the first VLAN identifier, and the first port information.
  • the first information may also include only the first MAC address, the first access port information, and the DUID of the first terminal device.
  • the first information may also include only the first MAC address and the first access link information.
  • the first information when the first access link information includes option82 option information, the first information may include the first MAC address and option82 option information.
  • the first information when the first access link information includes option37 option information, the first information may include the first MAC address and option37 option information.
  • the first information may also include only the first MAC address, the first access link information, and the DUID of the first terminal device.
  • Step 120 the network device determines a first correspondence, where the first correspondence is a correspondence between the first information and the first IP address.
  • the network device may determine the first correspondence.
  • Step 130 when the network device determines that the first terminal device is switched from the online state to the offline state, the network device determines the state of the first IP address corresponding to the first information as the reserved state according to the first correspondence.
  • the first terminal device before the first terminal device is switched from the online state to the offline state, the first terminal device is in the online state, and the state of the first IP address is the occupied state. In other words, before the first terminal device switches from the online state to the offline state, the first terminal device occupies the first IP address.
  • the first information may further include a reservation period.
  • the reservation period is used to indicate the period for which the network device reserves the first IP address for the first terminal device.
  • the network device determines the state of the first IP address corresponding to the first information as the reserved state according to the first correspondence, including:
  • the network device determines the state of the first IP address corresponding to the first information as the reservation state according to the first correspondence;
  • the network device deletes the first correspondence, and updates the state of the first IP address corresponding to the first information from the reserved state to the unoccupied state.
  • the network device may determine whether to reserve the first terminal device corresponding to the first information for the first terminal device when the first terminal device switches from the online state to the offline state according to the reservation period included in the first information.
  • the IP address can avoid the waste of network resources caused when the first IP address is in the reserved state for a long time.
  • the manner of configuring the reservation period and the period length of the reservation period are not specifically limited.
  • the network device may determine a reservation period for reserving the first IP address for the first terminal device according to the current network state.
  • a reservation period for reserving the first IP address for the first terminal device by the network device may be manually configured.
  • the reservation period can be 5, 10, 15, 20 or 30 hours, etc.
  • the period length of the reservation period may also take other values. This application does not limit this.
  • the method further includes:
  • the network device receives the first access request information of the first terminal device, where the first access request information is used to request the network device to assign the IP address of the first terminal device to access the network device according to the first access port information to the first terminal device ;
  • the network device allocates the first IP address to the first terminal device according to the first access request information and the first correspondence;
  • the network device updates the state of the first IP address from the reserved state to the occupied state.
  • the network device assigns the first IP address to the first terminal device according to the first access request information and the first correspondence, including:
  • the network device When the network device detects the first correspondence and the state of the first IP address is the reserved state, the first IP address is allocated to the first terminal device.
  • the network device reserves the first IP address corresponding to the first information for the first terminal device after the first terminal device goes offline.
  • the network device can The first IP address is allocated to the first terminal device according to the detected first correspondence (ie, the correspondence between the first information and the first IP address), thereby improving the efficiency of the first terminal device accessing the network.
  • the network device may perform the following operations:
  • the second IP address is an IP address used by the first terminal device to access the network according to the first access port information, and the second IP address is different from the first IP address.
  • the network device does not detect the first correspondence, which can be understood as the network device does not detect the first correspondence outside the reservation period.
  • the time corresponding to the time when the network device determines the first correspondence to the time corresponding to when the network device receives the first access request is greater than the reservation period.
  • the network device deletes the first correspondence, so at Outside the reservation period, the network device will not be able to detect the first correspondence.
  • the method further includes:
  • the network device receives the second access request information of the second terminal device, where the second access request information is used to request the network device to assign to the second terminal device the IP address of the second terminal device accessing the network device according to the second access port information , the second terminal device is different from the first terminal device;
  • the network device determines that the second information of the second terminal device is the same as the first information, the second information includes the second MAC address and the second access port information, the second MAC address indicates the second terminal device, and the second access port information indicates The network device receives the information of the second port of the access request of the second terminal device;
  • the network device allocates the first IP address to the second terminal device according to the second access request and the first correspondence.
  • the network device may assign the first IP address to the second terminal device according to the second access request information and the first correspondence, including: when the network device detects the first correspondence and the state of the first IP address is pre-defined In the remaining state, assign the first IP address to the second terminal device.
  • the above-mentioned second access port information may include a second virtual local area network VLAN identifier and a second port identifier, where the second port identifier is used to indicate the second port, and the second VLAN identifier is used to indicate the broadcast domain to which the second port belongs.
  • the second information further includes second access link information of the second terminal device, where the second access link information indicates the physical location of the second terminal device.
  • the second access link information includes option82 option information, or, the second access link information includes at least one of the following information: option18 option information and option37 option information. That is, the second access link information may include option82 option information.
  • the second access link information may include option18 option information.
  • the second access link information may include option37 option information.
  • the second access link information may further include option18 option information and option37 option.
  • the second information may include the second MAC address, the second access port information and the second access link information.
  • the optional second information may further include the DUID of the second terminal device.
  • the second information may include the second MAC address, the second access port information, the second access link information, and the DUID of the second terminal device.
  • the second information may include the second MAC address, the second VLAN identifier, the second port identifier, option82 option information, and the DUID of the second terminal device.
  • the second information may include the second MAC address, the second VLAN identifier, the second port identifier, option37 option information, and the DUID of the second terminal device.
  • the second information may also include only the second MAC address and the second access port information.
  • the second information may include the second MAC address, the second VLAN identification, and the second port information.
  • the second information may also include only the second MAC address, the second access port information, and the DUID of the second terminal device.
  • the second information may also include only the second MAC address and the second access link information.
  • the second information when the second access link information includes option82 option information, the second information may include the second MAC address and option82 option information.
  • the second information when the second access link information includes option18 option information, the second information may include the second MAC address and option18 option information.
  • the second information may also include only the second MAC address, the second access link information, and the DUID of the second terminal device.
  • the second information of the second terminal device is the same as the first information. It can be understood that the type of information included in the first information is the same as the type of information included in the second information, and the above two are of the same type. The information corresponds to the same content.
  • the first information includes a first MAC address, a first VLAN identifier and a first port identifier
  • the second information includes a second MAC address, a second VLAN identifier and a second port identifier
  • the first MAC address and the second MAC address The same, the first VLAN identifier is the same as the second VLAN identifier, and the first port identifier is the same as the second port identifier. In this case, it can be determined that the second information is the same as the first information.
  • the network device when the network device determines that the first information of the first terminal device and the second information of the second terminal device are the same, and the network device detects that there is a first IP address reserved according to the first information and the first IP address is When the state of the address is the reserved state, the network device may allocate the first IP address to the second terminal device.
  • a third IP address is allocated to the second terminal device.
  • the network device when the network device detects the first correspondence and the state of the first IP address is the occupied state, it can be understood that the first IP address may be in the state of being occupied by the first terminal device. Specifically, after the network device receives the first access request from the first terminal device, the network device may assign the first IP address to the first terminal device according to the first access request and the first correspondence, and the first terminal device may Access the network through the network device using the first IP address. In this case, the first IP address is in a state of being occupied by the first terminal device.
  • the third IP address is an IP address used by the second terminal device to access the network according to the second access port information, and the first IP address is different from the third IP address.
  • the network device when the network device determines that the first information of the first terminal device and the second information of the second terminal device are the same, and the network device detects that there is a first IP address reserved according to the first information and the first IP address is When the state of the address is the occupied state, the network device may assign the third IP address in the unoccupied state to the second terminal device.
  • the network device may further perform the following operations:
  • the third IP address is an IP address used by the second terminal device to access the network according to the second access port information, and the first IP address, the second IP address and the third IP address are different.
  • the first IP address when the network device does not detect the first correspondence, and the state of the first IP address is the occupied state, it can be understood that the first IP address may be in any state other than the second terminal device.
  • the state in which an end device is occupied For example, in this case, the first IP address may be in a state of being occupied by a first terminal device, or the first IP address may be in a state of being occupied by a third terminal device, wherein the third terminal device and the second terminal device and the first terminal device are different terminal devices.
  • the network device when the first information of the first terminal device and the second information of the second terminal device are the same, when the network device detects that there is a first IP address reserved according to the first information and the first IP address When the state is the occupied state, the network device can assign the third IP address in the unoccupied state to the second terminal device, so the second terminal device can successfully access the network through the network device.
  • the method when the network device detects the first correspondence and the state of the first IP address is the occupied state, after allocating the third IP address to the second terminal device, the method further includes:
  • the network device determines that the second terminal device switches from the online state to the offline state at the first moment, and the first terminal device switches from the online state to the offline state before the first moment, it updates the first correspondence to the second Correspondence, the second correspondence is the correspondence between the first information and the third IP address, or the correspondence between the second information and the third IP address;
  • the network device updates the state of the third IP address from the occupied state to the reserved state, and updates the state of the first IP address from the occupied state to the unoccupied state.
  • the method further includes:
  • the network device determines that the second terminal device switches from the online state to the offline state at the second moment, and the first terminal device switches from the online state to the offline state after the second moment, the first correspondence is not updated;
  • the network device updates the state of the first IP address from the occupied state to the reserved state.
  • the network device can The first access port information in the information and the second access port information in the second information further identify the first terminal device and the second terminal device. In this case, the network device can successfully reserve the IP address corresponding to the first information for the first terminal device, and successfully reserve the IP address corresponding to the second information for the second terminal device.
  • the address reservation method provided by the present application can better meet the requirement of reserving address resources for terminal equipment.
  • FIG. 3 and FIG. 4 are for illustration only and do not constitute any limitation to the present application.
  • the process of allocating or reserving an IP address for the second terminal device by the network device according to the second information in the method 100 is also applicable to the processes shown in FIG. 3 and FIG. 4 .
  • the network device allocates an IP address to the first terminal device according to the first information.
  • FIG. 3 is a schematic flowchart of a method 200 for a network device to assign an IP address to a first terminal device according to the first information provided by the present application.
  • the method 200 may include steps 210 to 251 , and the steps 210 to 251 will be described in detail below. It should be understood that FIG. 3 is only for illustration and does not constitute any limitation to the method for allocating an IP address to the first terminal device by the network device according to the first information in the present application.
  • Step 210 the network device is configured with a function of reserving a first IP address for the first terminal device based on the first information, and the first terminal device requests to access the network through the network device.
  • Step 220 the network device queries whether there is an IP address reserved for the first terminal device according to the first information.
  • step 230 is performed after step 220; otherwise, step 240 is performed after step 220.
  • Step 230 the network device determines that the IP address reserved for the first terminal device based on the first information is the first IP address, and the state of the first IP address is in the reserved state.
  • step 250 is performed after step 230; otherwise, step 250 is performed.
  • step 240 is executed after step 230 .
  • Step 240 the network device notifies the first terminal device that the second IP address in the unoccupied state can be used to access the network.
  • step 230 and step 240 are not specifically limited.
  • step 230 may be performed first and then step 240 may be performed.
  • step 240 may be performed first and then step 230 may be performed.
  • step 241 may also be performed.
  • Step 241 the first terminal device uses the second IP address to access the network through the network device, and updates the state of the second IP address from the unoccupied state to the occupied state.
  • Step 250 the network device notifies the first terminal device that the first IP address can be used to access the network through the network device.
  • Step 251 the first terminal device uses the first IP address to access the network through the network device, and updates the state of the first IP address from the reserved state to the occupied state.
  • the first information in steps 210 to 251 may be any one of the first information in the method 100, for example, the first information may include the first MAC address, the first VLAN identifier and the first port information, which will not be described in detail here.
  • the network device reserves the IP address for the first terminal device according to the first information.
  • FIG. 4 is a schematic flowchart of a method 300 for a network device to reserve an IP address for a first terminal device according to the first information provided by the present application. As shown in FIG. 4 , the method 300 may include steps 310 to 370 , and the steps 310 to 370 will be described in detail below.
  • Step 310 the network device is configured with a function of reserving a first IP address for the first terminal device based on the first information, and the first terminal device requests to disconnect the network accessed through the network device.
  • step 310 is the same as the existing method of requesting a disconnected network by a terminal device, and details are not described herein again.
  • Step 320 the network device determines whether the reservation period is included in the first information.
  • step 330 is performed after step 320; otherwise, step 340 is performed.
  • Step 330 The network device reserves the first IP address corresponding to the first information to the first terminal device, and records the reservation period.
  • Step 331 the network device updates the state of the first IP address from the occupied state to the reserved state.
  • Step 340 The network device reserves the first IP address corresponding to the first information to the first terminal device.
  • step 340 and step 330 is not specifically limited. For example, after step 320, step 330 may be performed first and then step 340 may be performed. Alternatively, after step 340, step 330 may be performed first and then step 330 may be performed.
  • step 341 may also be performed.
  • Step 341 the network device updates the state of the first IP address from the occupied state to the reserved state.
  • step 350 the network device determines whether the reservation period has expired.
  • step 360 is performed; otherwise, step 370 is performed.
  • Step 360 the network device updates the state of the first IP address from the reserved state to the unoccupied state.
  • step 360 and step 370 is not specifically limited.
  • step 360 may be performed first and then step 370 may be performed.
  • step 370 may be performed first and then step 360 may be performed.
  • Step 370 the network device does not update the state of the first IP address, that is, the state of the first IP address is the reserved state.
  • the first information in steps 310 to 370 may be any of the first information in method 100, for example, the first information may include the first MAC address, the first VLAN identifier, the first port information and the preset The retention period will not be described in detail here.
  • FIG. 4 is only for illustration and does not constitute any limitation to the method for the network device to reserve an IP address for the first terminal device according to the first information in this application.
  • the first information may not include a reservation period, and in this case, the network device only needs to perform steps 310 , 320 , 340 and 341 . That is, in the case where the first information does not include the reservation period, the above steps 330, 331, 350, and 360 are optional steps.
  • FIG. 5 is a schematic flowchart of a method 400 for address reservation provided by the present application. As shown in FIG. 5 , the method 400 may include steps 410 to 450 , and the steps 410 to 450 will be described below.
  • the terminal device 110 accesses the IP network through the network device 130, and the network device 130 (ie, the above-mentioned method 100, method 200 or method An example of the network device in 300) obtains first information and IP address #1 (that is, an example of the first IP address in the above method 100, method 200 or method 300), the first information includes the first MAC, the first VLAN identification, first port identification and reservation period.
  • the terminal device 110 accesses the network through the network device 130 , it can be understood that after the network device 130 assigns an IP address to the terminal device 110 , the terminal device 110 uses the IP address assigned by the network device 130 to access the network through the network device 130 . It can be understood that the IP address allocated by the network device 130 to the terminal device 110 may be an IP address (eg, an IPv6 address) in the local address pool of the network device 130 .
  • the network device 130 may be a BRAS device.
  • the first information may include a first MAC, a first VLAN identifier, a first port identifier, and a reservation period.
  • a first MAC For a detailed description of the first MAC, the first VLAN identifier, the first port identifier, and the reservation period, reference may be made to the method 100, and details are not repeated here.
  • IP address #1 may be an IP address. IP address #1 may also be an IP address prefix.
  • Step 420 the network device 130 determines the first correspondence.
  • the first correspondence may be understood as the correspondence between the first information and the IP address #1.
  • the network device 130 may determine the first correspondence.
  • Step 430 within the reservation period, when the network device 130 determines that the terminal device 110 is switched from the online state to the offline state, it determines the state of the IP address #1 corresponding to the first information as the reserved state according to the first correspondence.
  • the network device 130 may delete the first correspondence, and update the state of the IP address #1 corresponding to the first information from the reserved state to the unoccupied state.
  • Step 440 the network device 130 receives the first access request information sent by the terminal device 110 .
  • the first access request information is used to request the network device 130 to assign the terminal device 110 an IP address for the terminal device 110 to access the network device 130 according to the first access port information.
  • Step 450 within the reservation period, the network device 130 allocates IP address #1 to the terminal device 110 according to the first access request information and the first correspondence, and updates the state of IP address #1 to the occupied state.
  • the time corresponding to the time when the network device determines the first correspondence to the time corresponding to when the network device receives the first access request sent by the terminal device 110 is less than the reservation period.
  • the network device 130 may allocate the IP address #1 to the terminal device 110 according to the first access request information and the first correspondence, which specifically includes: the network device 130 detects the first correspondence, and the IP address #1 When the state of 1 is the reserved state, the network device 130 assigns the IP address #1 to the terminal device 110 .
  • the network device 130 may also allocate an IP address to the terminal device 110 according to the first access request.
  • the network device 130 may allocate the IP address #1 to the terminal device 110 according to the first access request, and assign the IP address #1 to the terminal device 110.
  • the state of 1 is updated to the occupied state.
  • the network device 130 can allocate a second IP address to the terminal device 110 according to the first access request, and assign the second IP address to the second IP address.
  • the state is updated to the occupied state, wherein the IP address #1 and the second IP address are different IP addresses.
  • the time corresponding to the time when the network device determines the first correspondence to the time corresponding to when the network device receives the first access request sent by the terminal device 110 is greater than the reservation period.
  • the first information may include the first MAC, the first VLAN ID, the first port ID, the DUID of the terminal device 110 and the reservation period.
  • the first information may include the first MAC, the first access link information and the reservation period.
  • the first information may include the first MAC, the first access link information, and option82 option information.
  • the first information may include the first MAC, the first access link information, and option37 option information.
  • the terminal device 110 may also be the terminal device 111 in FIG. 1 .
  • the network device may reserve the IP address #1 used by the terminal device 110 before the current offline for the terminal device 110 according to the first information. After that and within the reservation period, when the network device 130 receives the online request of the terminal device 110, the network device 130 can more accurately identify the terminal device 110 according to the first information, and use the reserved IP address #1 is allocated to the terminal device 110, so that the efficiency of the terminal device 110 accessing the network can be improved.
  • FIG. 6 is a schematic flowchart of a method 500 for address reservation provided by the present application. As shown in FIG. 6 , the method 500 may include steps 510 to 570 , and the steps 510 to 570 will be described below.
  • Step 510 the terminal device 110 (ie, an example of the first terminal device in the above method 100, method 200 or method 300) passes through the network device 130 (ie, an example of the network device in the above method 100, method 200 or method 300) After accessing the IP network, the network device 130 obtains first information and IP address #1 (that is, an example of the first IP address in the above method 100, method 200, or method 300), where the first information includes the first MAC address, the first IP address, and the first IP address.
  • Step 520 the network device 130 determines the first correspondence.
  • Step 530 when the network device 130 determines that the terminal device 110 is switched from the online state to the offline state, it determines the state of the IP address #1 corresponding to the first information as the reserved state according to the first correspondence.
  • Step 540 The network device 130 receives the first access request information sent by the terminal device 110.
  • step 550 the network device 130 allocates the IP address #1 to the terminal device 110 according to the first access request information and the first correspondence, and updates the state of the IP address #1 to the occupied state.
  • Step 560 the network device 130 receives the second access request information sent by the terminal device 110 .
  • Step 570 The network device 130 allocates an IP address #2 to the terminal device 111 according to the second access request information and the first correspondence.
  • the first information may include the first MAC, the first VLAN ID, the first port ID, the DUID of the terminal device 110 and the reservation period.
  • a greater number of terminal devices 111 and/or a greater number of terminal devices 110 may also be included.
  • option82 option information in the above method 500 may also be replaced with option37 option information or option18 option information.
  • option82 option information in the above method 500 may also be replaced with option37 option information and option18 option information.
  • the network device can reserve the IP address #1 used by the terminal device 110 before the current offline for the terminal device 110 according to the first information.
  • the network device 130 receives the online request of the terminal device 111, and the network device 130 determines that the second information of the terminal device 111 is the same as the first information, and the state of the IP address #1 is the reserved state, the network device 130 can allocate the IP address #1 in the reserved state to the terminal device 111, so that the efficiency of the terminal device 111 accessing the network can be improved.
  • the MAC address of the terminal device 110 and the MAC address of the terminal device 111 in FIG. 1 are the same and are MAC address #1, and the DUID of the terminal device 110 and the DUID of the terminal device 111 are both the same and are in the scene of DUID#1.
  • the network device 130 When the function that the network device 130 can reserve an IP address according to the MAC address #1 and DUID #1 is configured, the state of the terminal device 110 is in the online state, the terminal device 111 requests the network device 130 to allocate an IP address, and the network device 130 according to When MAC address #1 and DUID #1 query and find that the IP address reserved based on MAC address #1 and DUID #1 is IP address #1, and the status of this IP address #1 is occupied, use the reserved IP address of the existing address. In the method, the network device 130 cannot successfully assign an IP address to the terminal device 111, so the terminal device 111 cannot go online successfully through the network device 130, so that the terminal device 111 cannot work normally online.
  • the first information may only include the first MAC address and the DUID of the terminal device 110.
  • the state of 110 is the online state, the IP address is successfully allocated to the terminal device 111 .
  • the network device is based on the MAC address and the DUID of the terminal device.
  • the terminal device 110 goes online through the network device 130 and the state of the terminal device 110 is the online state , how to successfully assign an IP address to the terminal device 111.
  • FIG. 7 is a schematic flowchart of a method 600 for address reservation provided by the present application. As shown in FIG. 7 , the method 600 may include steps 610 to 680 , and the steps 610 to 680 will be described below.
  • Step 610 the terminal device 110 (ie, an example of the first terminal device in the above method 100, method 200 or method 300) passes through the network device 130 (ie, an example of the network device in the above method 100, method 200 or method 300) After accessing the IP network, the network device 130 obtains first information and IP address #1 (ie, an example of the first IP address in the above method 100, method 200 or method 300), the first information includes the first MAC address and the terminal DUID of device 110.
  • IP address #1 ie, an example of the first IP address in the above method 100, method 200 or method 300
  • Step 620 the network device 130 determines the first correspondence.
  • Step 630 when the network device 130 determines that the terminal device 110 is switched from the online state to the offline state, it determines the state of the IP address #1 corresponding to the first information as the reserved state according to the first correspondence
  • Step 640 the network device 130 receives the first access request message from the terminal device 110 .
  • the first access request information is used to request the network device 130 to assign the terminal device 110 an IP address for the terminal device 110 to access the network device 130 according to the first information.
  • the first information of the terminal device 110 may include the first MAC address and the DUID of the terminal device 110 .
  • the first MAC address and the DUID of the terminal device 110 reference may be made to the method 100, and details are not repeated here.
  • Step 650 the network device 130 allocates IP address #1 to the terminal device 110 according to the first access request information and the first correspondence, and updates the state of the IP address #1 from the reserved state to the occupied state.
  • Step 660 the network device 130 receives the second access request message from the terminal device 111 (ie, an example of the second terminal device in the above method 100, method 200 or method 300).
  • the second access request information is used to request the network device 130 to assign the terminal device 111 an IP address for the terminal device 111 to access the network device 130 according to the second information.
  • the second information of the terminal device 111 may include the second MAC address and the DUID of the terminal device 111.
  • the second MAC address and the DUID of the terminal device 111 reference may be made to the method 100, and details are not repeated here.
  • Step 670 The network device 130 allocates IP address #2 (ie, an example of the third IP address in the above method 100, method 200 or method 300) to the terminal device 111 according to the second access request information and the first correspondence.
  • IP address #2 ie, an example of the third IP address in the above method 100, method 200 or method 300
  • the network device 130 allocates a third IP address to the terminal device 111 according to the second access request information and the first correspondence, which specifically includes:
  • the network device 130 determines that the first MAC address is the same as the second MAC address, and the DUID of the terminal device 110 is the same as the DUID of the terminal device 111;
  • the network device 130 When the network device 130 detects the first correspondence, and the state of the IP address #1 is the occupied state, the first terminal device is allocated an IP address #2.
  • the IP address #2 is an unoccupied address, and the IP address #2 is different from the IP address #1.
  • the first correspondence can be understood as the correspondence between IP#1 or IP#2 and the first information.
  • the first correspondence can also be understood as the correspondence between IP#1 or IP#2 and the second information.
  • step 680 the network device 130 compares the time corresponding to the time when the terminal device 110 is switched from the online state to the offline state with the time corresponding to the time when the terminal device 111 is switched from the online state to the offline state, and determines whether to update the first correspondence to the second. Correspondence.
  • the network device 130 determines that the terminal device 111 switches from the online state to the offline state at the first moment, and the terminal device 110 switches from the online state to the offline state before the first moment, the first corresponding The relationship is updated to a second corresponding relationship, and the second corresponding relationship is the corresponding relationship between the first information and the IP address #2, or the corresponding relationship between the second information and the IP address #2; and the network device 130 converts the IP address The state of #2 is updated from the occupied state to the reserved state, and the state of the first IP address is updated from the occupied state to the unoccupied state.
  • the network device 130 determines that the second terminal device switches from the online state to the offline state at the second moment, and the terminal device 110 switches from the online state to the offline state after the second moment, no update is made. a first correspondence; and the network device 130 updates the state of the first IP address from the occupied state to the reserved state.
  • the first moment and the second moment are not specifically limited.
  • the first moment may be a moment before the second moment.
  • the first time may be a time after the second time.
  • the first information may also include a lease term.
  • the first information may also be any kind of first information involved in the method 100 of the present application.
  • the network device 130 allocates the reserved IP address #1 to the terminal device 110 according to the first correspondence, and the terminal device 110 is in the offline state.
  • the network device 130 can still assign the unused IP address #2 to the terminal Device 111, wherein IP address #2 is not the same as IP address #1.
  • a method for address reservation provided by the present application and a system architecture suitable for the method are described in detail above with reference to FIG. 1 to FIG. 7 .
  • the network device provided by the present application and the hardware structure of the network device will be described in detail with reference to FIG. 8 to FIG. 11 . It should be understood that the descriptions of the method embodiments correspond to the descriptions of the apparatus embodiments. Therefore, for the parts not described in detail, reference may be made to the foregoing method embodiments.
  • the device 1000 has the network device in the above-mentioned method 100, method 200, and method 300, or has any function of the network device 130 in the above-mentioned method 400 and method 500. As shown in FIG.
  • the network device 1000 includes an obtaining unit 1010 for executing steps 440 , 540 , 640 or 660 related to obtaining the first information and the first IP address in the foregoing step 110 ; optionally, the The network device 1000 further includes: a determining unit 1020 for performing the above steps 120, 130, 220, 230, 420, 520 or 630, etc.; optionally, the network device 1000 further includes: a processing unit 1040 , which is used to perform the relevant steps of updating the state of the first IP address in the above steps or the relevant steps of connecting the terminal device to the network through the network device in the above steps, and the like.
  • the network device 1000 corresponds to the network device in the above method embodiments, such as: the network device 130, the modules in the network device 1000 and the other operations and/or functions described above are respectively implemented to implement various methods implemented by the network device in the method embodiments.
  • the steps and methods refer to the above-mentioned method 100 , method 200 , method 300 , method 400 or method 500 , which are not repeated here for brevity.
  • the embodiments of the present application further provide a network device, and the hardware structure of the network device is introduced below.
  • the network device 1100 or the network device 1200 described below corresponds to the network device in the foregoing method embodiments, and the hardware, modules, and the foregoing other operations and/or functions in the network device 1100 or the network device 1200 are respectively for implementing the method embodiments.
  • the detailed process of how the network device 1100 or the network device 1200 reserves an address for the terminal device based on the network device can refer to the above method embodiments for details. For brevity, It is not repeated here.
  • each step of the above method 100 , method 200 , method 300 , method 400 or method 500 is completed by an integrated logic circuit of hardware in the processor of the network device 1100 or the network device 1200 or instructions in the form of software.
  • the steps of the methods disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here
  • the network device 1100 or the network device 1200 corresponds to each functional module in the network device 1000 in the foregoing virtual appliance embodiment, and is implemented by using the software of the network device 1100 or the network device 1200 .
  • the functional modules included in the network device 1000 are generated after the processor of the network device 1100 or the network device 1200 reads the program codes stored in the memory.
  • FIG. 9 is a schematic structural diagram of a network device 1100 provided by the present application, and the network device 1100 may be configured as a network device.
  • the network device 1100 may be implemented by a general bus architecture.
  • the network device 1000 includes at least one processor 1101 , a communication bus 1102 , a memory 1103 , and at least one communication interface 1104 .
  • the processor 1101 may be a general-purpose CPU, NP, microprocessor, or may be one or more integrated circuits for implementing the solutions of the present application, such as application-specific integrated circuits (ASIC), programmable logic A device (programmable logic device, PLD) or a combination thereof.
  • ASIC application-specific integrated circuits
  • PLD programmable logic A device
  • the above-mentioned PLD can be a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), a general array logic (generic array logic, GAL) or any combination thereof.
  • a communication bus 1102 is used to transfer information between the aforementioned components.
  • the communication bus 1102 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the memory 1103 can be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or can be random access memory (RAM) or can store information and instructions Other types of dynamic storage devices, it can also be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage , optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or can be used to carry or store desired program code in the form of instructions or data structures and any other medium that can be accessed by a computer, but is not limited thereto.
  • the memory 1103 may exist independently and be connected to the processor 1101 through the communication bus 1102 .
  • the memory 1103 may also be integrated with the processor 1101 .
  • the Communication interface 1104 uses any transceiver-like device for communicating with other devices or a communication network.
  • the communication interface 1104 includes a wired communication interface and may also include a wireless communication interface.
  • the wired communication interface may be, for example, an Ethernet interface.
  • the Ethernet interface can be an optical interface, an electrical interface or a combination thereof.
  • the wireless communication interface may be a wireless local area network (wireless local area networks, WLAN) interface, a cellular network communication interface or a combination thereof, and the like.
  • the processor 1101 may include one or more CPUs, such as CPU0 and CPU1 as shown in FIG. 9 .
  • the network device 1000 may include multiple processors, such as the processor 1101 and the processor 1105 as shown in FIG. 9 .
  • processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • the network device 1000 may further include an output device 1106 and an input device 1107 .
  • the output device 1106 is in communication with the processor 1101 and can display information in a variety of ways.
  • the output device 1106 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, a projector, or the like .
  • Input device 1107 is in communication with processor 1101 and can receive user input in a variety of ways.
  • the input device 1107 may be a mouse, a keyboard, a touch screen device or a sensing device, or the like.
  • the memory 1103 is used to store the program code 1110 for executing the solutions of the present application, and the processor 1101 can execute the program code 1110 stored in the memory 1103 . That is, the network device 1000 can implement the method 100 , the method 200 , the method 300 , the method 400 or the method 500 provided by the method embodiment through the processor 1101 and the program code 1110 in the memory 1103 .
  • the network device 1100 in this embodiment of the present application may correspond to the network device in each of the foregoing method embodiments, and the processor 1101, the communication interface 1104, etc. in the network device 1100 may implement the functions of the devices in the foregoing method embodiments. functions and/or various steps and methods implemented. For brevity, details are not repeated here.
  • the obtaining unit 1010 in the network device 1000 may be equivalent to the communication interface 1104 in the network device 1100 ; the determining unit 1020 or the processing unit 1030 in the network device 800 may be equivalent to the processor 1101 in the network device 1100 .
  • FIG. 10 is a schematic structural diagram of a network device 1200 provided by the present application, and the network device 1200 may be configured as a network device.
  • the network device 1200 includes: a main control board 1210 and an interface board 1230 .
  • the main control board 1210 is also called the main processing unit (main processing unit, MPU) or the route processor card (route processor card).
  • the main control board 1210 is used to control and manage various components in the network device 1200 Management, equipment maintenance, protocol processing functions.
  • the main control board 1210 includes: a central processing unit 1211 and a memory 1210 .
  • the interface board 1230 is also referred to as a line processing unit (LPU), a line card or a service board.
  • the interface board 1230 is used to provide various service interfaces and realize data packet forwarding.
  • the service interface includes, but is not limited to, an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc.
  • the Ethernet interface is, for example, a flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients).
  • the interface board 1230 includes: a central processing unit 1231 , a network processor 1232 , a forwarding table entry memory 1234 and a physical interface card (ph8sical interface card, PIC) 1233 .
  • the central processing unit 1231 on the interface board 1230 is used to control and manage the interface board 1230 and communicate with the central processing unit 1211 on the main control board 1210 .
  • the network processor 1232 is used to implement packet forwarding processing.
  • the form of the network processor 1232 may be a forwarding chip.
  • the network processor 1232 is configured to forward the received message based on the forwarding table stored in the forwarding table entry memory 1234. If the destination address of the message is the address of the network device 1200, the message is sent to the CPU (such as processing by the central processing unit 1211); if the destination address of the packet is not the address of the network device 1200, the next hop and outgoing interface corresponding to the destination address are found from the forwarding table according to the destination address, and the packet is forwarded to The outbound interface corresponding to the destination address.
  • the processing of the uplink packet includes: processing the incoming interface of the packet, and searching the forwarding table; processing of the downlink packet: searching the forwarding table, and so on.
  • the physical interface card 1233 is used to realize the interconnection function of the physical layer, the original traffic enters the interface board 1230 through this, and the processed packets are sent from the physical interface card 1233 .
  • the physical interface card 1233 is also called a daughter card, which can be installed on the interface board 1230 and is responsible for converting the optoelectronic signal into a message and forwarding the message to the network processor 1232 for processing after checking the validity of the message.
  • the central processing unit may also perform the functions of the network processor 1232 , such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1232 is not required in the physical interface card 1233 .
  • the network device 1200 includes multiple interface boards.
  • the network device 1200 further includes an interface board 1240 .
  • the interface board 1240 includes a central processing unit 1241 , a network processor 1242 , a forwarding table entry storage 1244 and a physical interface card 1243 .
  • the network device 1200 further includes a switch fabric board 1220 .
  • the switch fabric unit 1220 may also be referred to as a switch fabric unit (switch fabric unit, SFU).
  • SFU switch fabric unit
  • the switching network board 1220 is used to complete data exchange between the interface boards.
  • the interface board 1230 and the interface board 1240 can communicate through the switch fabric board 1220 .
  • the main control board 1210 and the interface board 1230 are coupled.
  • the main control board 1210 , the interface board 1230 , the interface board 1240 , and the switch fabric board 1220 are connected to the system backplane through a system bus to achieve intercommunication.
  • an inter-process communication (inter-process communication, IPC) channel is established between the main control board 1210 and the interface board 1230, and the main control board 1210 and the interface board 1230 communicate through the IPC channel.
  • IPC inter-process communication
  • the network device 1200 includes a control plane and a forwarding plane.
  • the control plane includes a main control board 1210 and a central processing unit 1231.
  • the forwarding plane includes various components that perform forwarding, such as forwarding entry storage 1234, physical interface card 1233, and network processing. device 1232.
  • the control plane performs functions such as routers, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining the status of devices.
  • the control plane issues the generated forwarding tables to the forwarding plane.
  • the network processor 1232 is based on the control plane.
  • the delivered forwarding table is forwarded to the packet received by the physical interface card 1233 by looking up the table.
  • the forwarding table issued by the control plane may be stored in the forwarding table entry storage 1234 . In some embodiments, the control plane and forwarding plane may be completely separate and not on the same device.
  • the obtaining unit 1010 in the network device 1000 is equivalent to the physical interface card 1233 in the network device 1200 ; the determining unit 1020 or the processing unit 1030 in the network device 1000 may be equivalent to the network processor 1232 or the central processing unit 1211 in the network device 1200 .
  • the operations on the interface board 1240 in the embodiment of the present application are the same as the operations on the interface board 1230, and are not repeated for brevity.
  • the network device 1200 in this embodiment may correspond to the network device in the foregoing method embodiments, and the main control board 1210 , the interface board 1230 and/or 1240 in the network device 1200 may implement all of the network devices in the foregoing method embodiments. For the sake of brevity, the functions and/or various steps implemented are not repeated here.
  • main control boards there may be one or more main control boards, and when there are multiple main control boards, they may include the main main control board and the backup main control board.
  • a network device may have at least one switching network board, and the switching network board realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those in a centralized architecture.
  • the form of the network device can also be that there is only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on this board.
  • the central processing unit on the board can be combined into a central processing unit on this board to perform the functions of the two superimposed, the data exchange and processing capacity of this form of equipment is low (for example, low-end switches or routers and other networks. equipment).
  • the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
  • the aforementioned network devices may be implemented as virtualized devices.
  • the virtualization device may be a virtual machine (English: Virtual Machine, VM) running a program for sending a message, and the virtual machine is deployed on a hardware device (for example, a physical server).
  • a virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment.
  • Virtual machines can be configured as network devices.
  • a network device can be implemented based on a general physical server combined with a network function virtualization (Network Functions Virtualization, NFV) technology.
  • Network devices are virtual hosts, virtual routers, or virtual switches.
  • a virtualization device may be a container, which is an entity used to provide an isolated virtualization environment, for example, a container may be a docker container.
  • Containers can be configured as network devices.
  • a network device can be created through a corresponding image.
  • a proxy-container (a container that provides proxy services) can be used to create a container instance for the proxy-container, which can be represented as a container instance proxy-container1.
  • the instance proxy-container1 is provided as a network device.
  • network devices can use the kernel of a physical machine to run, and multiple network devices can share the operating system of the physical machine. Different network devices can be isolated through container technology.
  • Containerized network devices can run in a virtualized environment, such as virtual machines, and containerized network devices can also run directly on physical machines.
  • a virtualized device can be a Pod, and a Pod is Kubernetes (Kubernetes is a container orchestration engine open sourced by Google, abbreviated as K8s in English) as the basic unit for deploying, managing, and orchestrating containerized applications.
  • a Pod can contain one or more containers. Each container in the same Pod is usually deployed on the same host, so each container in the same Pod can communicate through the host and can share the host's storage resources and network resources. Pods can be configured as network devices.
  • a container as a service can be instructed to create a Pod and provide the Pod as a network device.
  • the network device may also be other virtualized devices, which will not be listed here.
  • the above-mentioned network device may also be implemented by a general-purpose processor.
  • the general purpose processor may be in the form of a chip.
  • a general-purpose processor that implements a network device includes a processing circuit, an input interface and an output interface that are internally connected and communicated with the processing circuit, and the processing circuit is configured to perform the steps of generating messages in each of the above method embodiments through the input interface, The processing circuit is configured to perform the receiving step in the above method embodiments through the input interface, and the processing circuit is configured to perform the sending step in the above method embodiments through the output interface.
  • the general-purpose processor may further include a storage medium, and the processing circuit is configured to use the storage medium to perform the storage steps in each of the foregoing method embodiments.
  • the storage medium may store instructions executed by the processing circuit, where the processing circuit is configured to execute the instructions stored in the storage medium to perform the above-mentioned various method embodiments.
  • FIG. 11 is a schematic structural diagram of a network system 1300 provided by the present application.
  • the system 1300 includes: a network device 1310 .
  • the system 1300 may further include a first terminal device 1320 and/or a first and second terminal device 1330 .
  • the network device 1310 is, for example, the network device 1000 .
  • Embodiments of the present application provide a computer program product, which, when the computer program product runs on a network device, enables the network device to execute method 100 , method 200 , method 300 , method 400 or method 500 in the foregoing method embodiments.
  • the above apparatuses in various product forms respectively have any functions of the network equipment in the above method embodiments, which will not be repeated here.
  • the disclosed systems, devices and methods may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the unit is only a logical function division.
  • there may be other division methods for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
  • the units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present application.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application are essentially or part of contributions to the prior art, or all or part of the technical solutions can be embodied in the form of software products, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer program instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer program instructions may be transmitted from a website site, computer, server or data center via Wired or wireless transmission to another website site, computer, server or data center.
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media integrated.
  • the available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, digital video discs (DVDs), or semiconductor media (eg, solid state drives), and the like.
  • the term "and/or” in this application is only an association relationship to describe associated objects, which means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, and A and B exist at the same time. , there are three cases of B alone.
  • the character "/" in this document generally indicates that the contextual object is an "or” relationship; the term “at least one” in this application can mean “one” and "two or more", for example, A At least one of , B, and C can mean: A alone exists, B exists alone, C exists alone, A and B exist simultaneously, A and C exist simultaneously, C and B exist simultaneously, and A and B and C exist simultaneously. seven situations.

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

The present application provides an address reservation method. The method comprises: after a first terminal device accesses a network by means of a network device, the network device acquires first information and a first IP address of the first terminal device, the first information comprising a first MAC address and first access port information, the first MAC address indicating the first terminal device, the first access port information indicating information about a first port by means of which the network device receives an access request of the first terminal device, and the first IP address being an IP address assigned by the network device to the first terminal device and used for the first terminal device to access the network; the network device determines a first correspondence, the first correspondence being a correspondence between the first information and the first IP address; when the network device determines that the first terminal device is switched from an online state to an offline state, the network device determines the state of the first IP address corresponding to the first information as a reservation state according to the first correspondence, thereby meeting the requirements for reserving addresses for terminal devices.

Description

地址预留的方法、网络设备和***Method, network device and system for address reservation
本申请要求于2020年09月10日提交的申请号为202010949604.6、申请名称为“地址预留的方法、网络设备和***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202010949604.6 filed on September 10, 2020 and the application name is "Method, Network Device and System for Address Reservation", the entire contents of which are incorporated into this application by reference .
技术领域technical field
本申请涉及网络通信技术领域,并且更具体地,涉及一种地址预留的方法、网络设备和***。The present application relates to the technical field of network communication, and more particularly, to a method, network device and system for address reservation.
背景技术Background technique
地址预留,是指在终端设备下线后,网络设备可以将该终端设备本次下线前使用的互联网协议(internet protocol,IP)地址(例如,IP地址或IP地址前缀)预留给该终端设备。也就是说,在该终端设备下线之后,网络设备可以设置上述IP地址的状态为预留状态。因此,当该终端设备再次请求上线时,该网络设备可以将上述处于预留状态的IP地址分配给该终端设备,使得终端设备可以使用预留的IP地址接入网络,从而可以有效提高终端设备接入网络的效率。Address reservation means that after the terminal device goes offline, the network device can reserve the Internet protocol (IP) address (for example, IP address or IP address prefix) used by the terminal device before going offline this time. Terminal Equipment. That is to say, after the terminal device goes offline, the network device may set the state of the above IP address to a reserved state. Therefore, when the terminal device requests to go online again, the network device can assign the IP address in the reserved state to the terminal device, so that the terminal device can use the reserved IP address to access the network, thereby effectively improving the efficiency of the terminal device. Efficiency of access to the network.
但现有的地址预留方法,在一些特殊的场景中(例如,一个媒体接入控制(media access control,MAC)地址对应多个会话的场景中),无法满足为终端设备预留地址资源的需求。However, in some special scenarios (for example, in a scenario where one media access control (MAC) address corresponds to multiple sessions), the existing address reservation methods cannot meet the requirements of reserving address resources for terminal devices. need.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种地址预留的方法、网络设备和***,能够满足为终端设备预留地址资源的需求。The present application provides an address reservation method, network device and system, which can meet the requirement of reserving address resources for terminal equipment.
第一方面,提供了一种地址预留的方法,该方法包括:In a first aspect, a method for address reservation is provided, and the method includes:
第一终端设备通过网络设备接入网络后,该网络设备获取该第一终端设备的第一信息和第一互联网协议IP地址,该第一信息包括第一媒体接入控制MAC地址和第一接入端口信息,其中该第一MAC地址指示该第一终端设备,该第一接入端口信息指示该网络设备接收该第一终端设备的接入请求的第一端口的信息,该第一IP地址是该网络设备分配给该第一终端设备且用于该第一终端设备接入该网络的IP地址;该网络设备确定第一对应关系,该第一对应关系是该第一信息与该第一IP地址之间的对应关系;当该网络设备确定该第一终端设备由在线状态切换为下线状态时,该网络设备根据该第一对应关系将该第一信息对应的该第一IP地址的状态确定为预留状态。After the first terminal device accesses the network through the network device, the network device acquires the first information and the first Internet Protocol IP address of the first terminal device, where the first information includes the first media access control MAC address and the first connection. Ingress port information, where the first MAC address indicates the first terminal device, the first access port information indicates the first port information on which the network device receives an access request from the first terminal device, and the first IP address is the IP address assigned by the network device to the first terminal device and used for the first terminal device to access the network; the network device determines a first correspondence, and the first correspondence is the first information and the first Correspondence between IP addresses; when the network device determines that the first terminal device is switched from an online state to an offline state, the network device determines the first IP address corresponding to the first information according to the first correspondence The state is determined to be a reserved state.
在上述技术方案中,在第一终端设备由在线状态切换为下线状态后,网络设备可以根据第一MAC地址和第一接入端口信息为第一终端设备预留IP地址。当请求通过该网络设备接入网络的不同终端设备的MAC地址相同时,该网络设备可以根据本申请提供的第一接入端口信息进一步识别与该第一接入端口信息对应的终端设备,使得在一些特殊的场景 中(例如,一个MAC地址对应多个不同的终端设备的情况下),网络设备依然可以为该多个不同的终端设备预留IP地址。本申请提供的地址预留的方法,能够更好地满足为终端设备预留地址资源的需求。In the above technical solution, after the first terminal device is switched from the online state to the offline state, the network device may reserve an IP address for the first terminal device according to the first MAC address and the first access port information. When the MAC addresses of different terminal devices requesting to access the network through the network device are the same, the network device can further identify the terminal device corresponding to the first access port information according to the first access port information provided in this application, so that In some special scenarios (for example, a case where one MAC address corresponds to multiple different terminal devices), the network device may still reserve IP addresses for the multiple different terminal devices. The address reservation method provided by the present application can better meet the requirement of reserving address resources for terminal equipment.
结合第一方面,在第一方面的某些实现方式中,该第一接入端口信息包括第一虚拟局域网VLAN标识和第一端口标识,该第一端口标识用于指示该第一端口,该第一VLAN标识用于指示该第一端口所属的广播域。With reference to the first aspect, in some implementations of the first aspect, the first access port information includes a first virtual local area network VLAN identifier and a first port identifier, where the first port identifier is used to indicate the first port, the The first VLAN identifier is used to indicate the broadcast domain to which the first port belongs.
在上述技术方案中,第一信息可以包括第一MAC地址、第一VLAN标识和第一端口标识。因此,在第一终端设备由在线状态切换为下线状态后,网络设备可以根据第一MAC地址、第一VLAN标识和第一端口标识为第一终端设备预留IP地址。In the above technical solution, the first information may include the first MAC address, the first VLAN identifier and the first port identifier. Therefore, after the first terminal device is switched from the online state to the offline state, the network device can reserve an IP address for the first terminal device according to the first MAC address, the first VLAN identifier and the first port identifier.
当网络设备接收到不同终端设备的接入请求时,网络设备通常会将不同的端口标识分配给不同的终端设备。在此情况下,本申请提供的第一信息与终端设备是一对一的关系。因此,网络设备可以根据第一信息成功地为第一终端设备预留IP地址。When the network device receives access requests from different terminal devices, the network device usually assigns different port identifiers to different terminal devices. In this case, the first information provided by the present application has a one-to-one relationship with the terminal device. Therefore, the network device can successfully reserve the IP address for the first terminal device according to the first information.
结合第一方面,在第一方面的某些实现方式中,该第一信息还包括该第一终端设备的第一接入链路信息,该第一接入链路信息指示该第一终端设备的物理位置。With reference to the first aspect, in some implementations of the first aspect, the first information further includes first access link information of the first terminal device, where the first access link information indicates the first terminal device physical location.
在上述技术方案中,第一信息可以包括第一MAC地址、第一VLAN标识、第一端口标识和第一接入链路信息。因此,在第一终端设备由在线状态切换为下线状态后,网络设备可以根据第一MAC地址、第一VLAN标识、第一端口标识和第一接入链路信息为第一终端设备预留IP地址。In the above technical solution, the first information may include the first MAC address, the first VLAN identifier, the first port identifier and the first access link information. Therefore, after the first terminal device is switched from the online state to the offline state, the network device can reserve for the first terminal device according to the first MAC address, the first VLAN identifier, the first port identifier and the first access link information IP address.
可选的,在一些实现方式中,第一信息还可以包括第一MAC地址和第一接入链路信息。因此,在第一终端设备由在线状态切换为下线状态后,网络设备可以根据第一MAC地址和第一接入链路信息为第一终端设备预留IP地址。Optionally, in some implementation manners, the first information may further include the first MAC address and the first access link information. Therefore, after the first terminal device is switched from the online state to the offline state, the network device can reserve an IP address for the first terminal device according to the first MAC address and the first access link information.
在上述技术方案中,可以理解的是,第一接入链路信息与第一终端设备是一对一的关系。换句话说,不同终端设备的接入链路信息是不相同的。In the above technical solution, it can be understood that there is a one-to-one relationship between the first access link information and the first terminal device. In other words, the access link information of different terminal devices is different.
当两个具有相同MAC地址的终端设备(终端设备#1和终端设备#2)请求通过网络设备接入网络时,由于接入链路信息#1与终端设备#1对应,接入链路信息#2与终端设备#2对应,因此,网络设备可以根据接入链路信息#1成功地为终端设备#1预留IP地址,以及可以根据接入链路信息#2成功地为终端设备#2预留IP地址。When two terminal devices (terminal device #1 and terminal device #2) with the same MAC address request to access the network through the network device, since the access link information #1 corresponds to the terminal device #1, the access link information #2 corresponds to terminal device #2, so the network device can successfully reserve an IP address for terminal device #1 according to access link information #1, and can successfully reserve an IP address for terminal device # according to access link information #2 2 Reserve an IP address.
结合第一方面,在第一方面的某些实现方式中,该第一接入链路信息包括option82选项信息,或者,该第一接入链路信息包括以下信息中的至少一种:option18选项信息和option37选项信息。With reference to the first aspect, in some implementations of the first aspect, the first access link information includes option82 option information, or the first access link information includes at least one of the following information: option18 option info and option37 option info.
也就是说,第一接入链路信息可以包括option82选项信息。第一接入链路信息可以包括option18选项信息。第一接入链路信息可以包括option37选项信息。第一接入链路信息还可以包括option18选项信息和option37选项。在上述技术方案中,第一信息可以包括第一MAC地址、第一接入端口信息和第一接入链路信息。That is, the first access link information may include option82 option information. The first access link information may include option18 option information. The first access link information may include option37 option information. The first access link information may further include option18 option information and option37 option. In the above technical solution, the first information may include the first MAC address, the first access port information and the first access link information.
例如,当第一接入链路信息为option82选项信息时,第一信息可以包括第一MAC地址、第一VLAN标识、第一端口标识和option82选项信息。例如,当第一接入链路信息为option37选项信息时,第一信息可以包括第一MAC地址、第一VLAN标识、第一端口标识和option37选项信息。For example, when the first access link information is option82 option information, the first information may include a first MAC address, a first VLAN identifier, a first port identifier, and option82 option information. For example, when the first access link information is option37 option information, the first information may include a first MAC address, a first VLAN identifier, a first port identifier, and option37 option information.
结合第一方面,在第一方面的某些实现方式中,该第一信息还包括该第一终端设备的 动态主机配置协议唯一标识符DUID。With reference to the first aspect, in some implementations of the first aspect, the first information further includes a dynamic host configuration protocol unique identifier DUID of the first terminal device.
在上述技术方案中,第一信息可以包括第一MAC地址、第一接入端口信息、第一接入链路信息和第一终端设备的DUID。In the above technical solution, the first information may include the first MAC address, the first access port information, the first access link information, and the DUID of the first terminal device.
例如,第一信息可以包括第一MAC地址、第一VLAN标识、第一端口标识、option82选项信息和第一终端设备的DUID。例如,第一信息可以包括第一MAC地址、第一VLAN标识、第一端口标识、option18选项信息和第一终端设备的DUID。例如,第一信息可以包括第一MAC地址、第一VLAN标识、第一端口标识、option37选项信息和第一终端设备的DUID。可选的,在一些实现方式中,第一信息还可以包括第一MAC地址、第一接入链路信息和第一终端设备的DUID。For example, the first information may include the first MAC address, the first VLAN identifier, the first port identifier, option82 option information, and the DUID of the first terminal device. For example, the first information may include a first MAC address, a first VLAN identifier, a first port identifier, option18 option information, and the DUID of the first terminal device. For example, the first information may include the first MAC address, the first VLAN identifier, the first port identifier, option37 option information, and the DUID of the first terminal device. Optionally, in some implementation manners, the first information may further include the first MAC address, the first access link information, and the DUID of the first terminal device.
例如,第一信息可以包括第一MAC地址、option82选项信息和第一终端设备的DUID。例如,第一信息可以包括第一MAC地址、第一VLAN标识、第一端口标识,以及option18选项信息和option37选项信息。For example, the first information may include the first MAC address, option82 option information, and the DUID of the first terminal device. For example, the first information may include a first MAC address, a first VLAN identifier, a first port identifier, and option18 option information and option37 option information.
可选的,在一些实现方式中,第一信息还可以包括第一MAC地址、第一接入端口信息和第一终端设备的DUID。Optionally, in some implementation manners, the first information may further include the first MAC address, the first access port information, and the DUID of the first terminal device.
例如,第一信息可以包括第一MAC地址、第一VLAN标识、第一端口标识和第一终端设备的DUID。For example, the first information may include the first MAC address, the first VLAN identifier, the first port identifier, and the DUID of the first terminal device.
可选的,在一些实现方式中,第一信息还可以包括第一MAC地址和第一接入端口信息。Optionally, in some implementation manners, the first information may further include first MAC address and first access port information.
例如,第一信息可以包括第一MAC地址、第一VLAN标识和第一端口标识。For example, the first information may include a first MAC address, a first VLAN identifier, and a first port identifier.
可选的,在一些实现方式中,第一信息还可以包括第一MAC地址和第一接入链路信息。Optionally, in some implementation manners, the first information may further include the first MAC address and the first access link information.
例如,第一信息可以包括第一MAC地址、option18选项信息和option37选项信息、以及第一终端设备的DUID。例如,第一信息也可以包括第一MAC地址、option37选项信息以及第一终端设备的DUID。For example, the first information may include the first MAC address, option18 option information and option37 option information, and the DUID of the first terminal device. For example, the first information may also include the first MAC address, option37 option information, and the DUID of the first terminal device.
结合第一方面,在第一方面的某些实现方式中,该第一信息还包括预留期限,该网络设备根据该第一对应关系将该第一信息对应的该第一IP地址的状态确定为预留状态,包括:在该预留期限内,该网络设备根据该第一对应关系将该第一信息对应的该第一IP地址的状态确定为预留状态;该方法还包括:在该预留期限外,该网络设备删除该第一对应关系,并将该第一信息对应的该第一IP地址的状态由预留状态更新为未占用状态。With reference to the first aspect, in some implementations of the first aspect, the first information further includes a reservation period, and the network device determines the state of the first IP address corresponding to the first information according to the first correspondence Being in a reserved state, including: within the reservation period, the network device determines the state of the first IP address corresponding to the first information as a reserved state according to the first correspondence; the method further includes: in the Outside the reservation period, the network device deletes the first correspondence, and updates the state of the first IP address corresponding to the first information from the reserved state to the unoccupied state.
在上述技术方案中,在第一终端设备下线后,网络设备可以根据预留期限在一定时间内为第一终端设备预留第一IP地址。如果超过该预留期限,网络设备可以将该第一IP地址的状态由预留状态更新为未占用状态,可以避免网络地址的资源浪费。In the above technical solution, after the first terminal device goes offline, the network device may reserve the first IP address for the first terminal device within a certain period of time according to the reservation period. If the reservation period is exceeded, the network device can update the state of the first IP address from the reserved state to the unoccupied state, which can avoid wasting resources of the network address.
结合第一方面,在第一方面的某些实现方式中,在该网络设备确定该第一终端设备由在线状态切换为下线状态之后,该方法还包括:该网络设备接收该第一终端设备的第一接入请求信息,该第一接入请求信息用于请求该网络设备为该第一终端设备分配该第一终端设备根据该第一接入端口信息接入该网络设备的IP地址;该网络设备根据该第一接入请求信息和该第一对应关系,为该第一终端设备分配该第一IP地址;该网络设备将该第一IP地址的状态由预留状态更新为占用状态。With reference to the first aspect, in some implementations of the first aspect, after the network device determines that the first terminal device is switched from an online state to an offline state, the method further includes: the network device receiving the first terminal device The first access request information, the first access request information is used to request the network device to allocate the IP address of the first terminal device to access the network device according to the first access port information to the first terminal device; The network device allocates the first IP address to the first terminal device according to the first access request information and the first correspondence; the network device updates the state of the first IP address from a reserved state to an occupied state .
在上述技术方案中,第一终端设备由在线状态切换为下线状态的过程中(即,在第一 终端下线的过程中),网络设备根据第一信息为第一终端设备预留了第一IP地址,即第一IP地址的状态为预留状态。在此之后,当第一终端设备再次请求通过网络设备接入网络时,网络设备可以根据第一信息将与该第一信息对应的第一IP地址分配给第一终端设备,从而能够提高第一终端设备接入网络的效率。In the above technical solution, during the process of switching the first terminal device from the online state to the offline state (that is, during the process of the first terminal going offline), the network device reserves the first terminal device for the first terminal device according to the first information. An IP address, that is, the state of the first IP address is a reserved state. After that, when the first terminal device requests to access the network through the network device again, the network device can assign the first IP address corresponding to the first information to the first terminal device according to the first information, so that the first IP address can be improved. Efficiency of terminal equipment accessing the network.
结合第一方面,在第一方面的某些实现方式中,该网络设备根据该第一接入请求信息和该第一对应关系,为该第一终端设备分配该第一IP地址,包括:当该网络设备检测到该第一对应关系,且该第一IP地址的状态为预留状态时,为该第一终端设备分配该第一IP地址。With reference to the first aspect, in some implementations of the first aspect, the network device allocates the first IP address to the first terminal device according to the first access request information and the first correspondence, including: when When the network device detects the first correspondence and the state of the first IP address is a reserved state, it allocates the first IP address to the first terminal device.
结合第一方面,在第一方面的某些实现方式中,该方法还包括:当该网络设备未检测到该第一对应关系,且该第一IP地址的状态为未占用状态时,为该第一终端设备分配该第一IP地址;或者当该网络设备未检测到该第一对应关系,且该第一IP地址的状态为占用状态时,为该第一终端设备分配第二IP地址;其中,该第二IP地址是用于该第一终端设备根据该第一接入端口信息接入该网络的IP地址,且该第二IP地址与该第一IP地址不相同。With reference to the first aspect, in some implementations of the first aspect, the method further includes: when the network device does not detect the first correspondence, and the state of the first IP address is an unoccupied state, for the The first terminal device allocates the first IP address; or when the network device does not detect the first correspondence and the state of the first IP address is the occupied state, allocates the second IP address to the first terminal device; The second IP address is an IP address used by the first terminal device to access the network according to the first access port information, and the second IP address is different from the first IP address.
在上述技术方案中,当网络设备未检测到为第一终端设备预留的IP地址时,网络设备还可以将处于未占用状态的IP地址(例如,上述的第二IP地址)分配给第一终端设备,从而保证第一终端设备可以通过网络设备成功接入网络。In the above technical solution, when the network device does not detect the IP address reserved for the first terminal device, the network device may also assign an IP address in an unoccupied state (for example, the above-mentioned second IP address) to the first terminal device. terminal device, thereby ensuring that the first terminal device can successfully access the network through the network device.
结合第一方面,在第一方面的某些实现方式中,在该网络设备确定该第一终端设备由在线状态切换为下线状态之后,该方法还包括:该网络设备接收第二终端设备的第二接入请求信息,该第二接入请求信息用于请求该网络设备为该第二终端设备分配该第二终端设备根据第二接入端口信息接入该网络设备的IP地址,该第二终端设备与该第一终端设备不相同;该网络设备确定该第二终端设备的第二信息与该第一信息相同,该第二信息包括第二MAC地址和该第二接入端口信息,该第二MAC地址指示该第二终端设备,该第二接入端口信息指示该网络设备接收该第二终端设备的接入请求的第二端口的信息;该网络设备根据该第二接入请求和该第一对应关系,为该第二终端设备分配该第一IP地址。With reference to the first aspect, in some implementations of the first aspect, after the network device determines that the first terminal device is switched from an online state to an offline state, the method further includes: the network device receiving the second terminal device's second access request information, the second access request information is used to request the network device to allocate the IP address of the second terminal device to access the network device according to the second access port information to the second terminal device, the first The second terminal device is different from the first terminal device; the network device determines that the second information of the second terminal device is the same as the first information, and the second information includes the second MAC address and the second access port information, The second MAC address indicates the second terminal device, and the second access port information indicates the information of the second port on which the network device receives the access request of the second terminal device; the network device according to the second access request With the first correspondence, the first IP address is allocated to the second terminal device.
在上述技术方案中,第一信息与第二信息相同。第一终端设备由在线状态切换为下线状态的过程中(即,在第一终端下线的过程中),网络设备根据第一信息为第一终端设备预留了第一IP地址,即第一IP地址的状态为预留状态。在此之后,当第二终端设备请求通过网络设备接入网络时,网络设备可以根据第一信息将与该第一信息对应的第一IP地址分配给第二终端设备,从而能够提高第二终端设备接入网络的效率。In the above technical solution, the first information is the same as the second information. During the process of switching from the online state to the offline state of the first terminal device (that is, during the process of the first terminal being offline), the network device reserves the first IP address for the first terminal device according to the first information, that is, the first IP address is reserved for the first terminal device. The state of an IP address is a reserved state. After that, when the second terminal device requests to access the network through the network device, the network device can assign the first IP address corresponding to the first information to the second terminal device according to the first information, so that the second terminal device can be improved. The efficiency of device access to the network.
结合第一方面,在第一方面的某些实现方式中,该第二接入端口信息包括第二虚拟局域网VLAN标识和第二端口标识,该第二端口标识用于指示该第二端口,该第二VLAN标识用于指示该第二端口所属的广播域。With reference to the first aspect, in some implementations of the first aspect, the second access port information includes a second virtual local area network VLAN identifier and a second port identifier, the second port identifier is used to indicate the second port, the The second VLAN identifier is used to indicate the broadcast domain to which the second port belongs.
在上述技术方案中,第二信息可以包括第二MAC地址、第二VLAN标识和第二端口标识。因此,在第二终端设备由在线状态切换为下线状态后,网络设备可以根据第二MAC地址、第二VLAN标识和第二端口标识为第二终端设备预留IP地址。In the above technical solution, the second information may include the second MAC address, the second VLAN identifier and the second port identifier. Therefore, after the second terminal device is switched from the online state to the offline state, the network device can reserve an IP address for the second terminal device according to the second MAC address, the second VLAN identifier and the second port identifier.
结合第一方面,在第一方面的某些实现方式中,该第二信息还包括该第二终端设备的第二接入链路信息,该第二接入链路信息指示该第二终端设备的物理位置。With reference to the first aspect, in some implementations of the first aspect, the second information further includes second access link information of the second terminal device, where the second access link information indicates the second terminal device physical location.
在上述技术方案中,第二信息可以包括第二MAC地址、第二VLAN标识、第二端口 标识和第二接入链路信息。因此,在第二终端设备由在线状态切换为下线状态后,网络设备可以根据第二MAC地址、第二VLAN标识、第二端口标识和第二接入链路信息为第二终端设备预留IP地址。In the above technical solution, the second information may include the second MAC address, the second VLAN identifier, the second port identifier and the second access link information. Therefore, after the second terminal device is switched from the online state to the offline state, the network device can reserve for the second terminal device according to the second MAC address, the second VLAN identifier, the second port identifier and the second access link information IP address.
结合第一方面,在第一方面的某些实现方式中,该第二接入链路信息包括option82选项信息,或者,该第二接入链路信息包括以下信息中的至少一种:option18选项信息和option37选项信息。With reference to the first aspect, in some implementations of the first aspect, the second access link information includes option82 option information, or the second access link information includes at least one of the following information: option18 option info and option37 option info.
也就是说,第二接入链路信息可以包括option82选项信息。第二接入链路信息可以包括option18选项信息。第二接入链路信息可以包括option37选项信息。第二接入链路信息还可以包括option18选项信息和option37选项。That is, the second access link information may include option82 option information. The second access link information may include option18 option information. The second access link information may include option37 option information. The second access link information may further include option18 option information and option37 option.
在上述技术方案中,第二信息可以包括第二MAC地址、第二接入端口信息和第二接入链路信息。In the above technical solution, the second information may include the second MAC address, the second access port information and the second access link information.
例如,当第二接入链路信息为option82选项信息时,第二信息可以包括第二MAC地址、第二VLAN标识、第二端口标识和option82选项信息。例如,当第二接入链路信息为option18选项信息时,第二信息可以包括第二MAC地址、第二VLAN标识、第二端口标识和option18选项信息。For example, when the second access link information is option82 option information, the second information may include a second MAC address, a second VLAN identifier, a second port identifier, and option82 option information. For example, when the second access link information is option18 option information, the second information may include a second MAC address, a second VLAN identifier, a second port identifier, and option18 option information.
结合第一方面,在第一方面的某些实现方式中,该第二信息还包括该第二终端设备的DUID。With reference to the first aspect, in some implementations of the first aspect, the second information further includes the DUID of the second terminal device.
在上述技术方案中,第二信息可以包括第二MAC地址、第二接入端口信息、第二接入链路信息和第二终端设备的DUID。In the above technical solution, the second information may include the second MAC address, the second access port information, the second access link information, and the DUID of the second terminal device.
可选的,在一些实现方式中,第二信息还可以包括第二MAC地址、第二接入链路信息和第二终端设备的DUID。Optionally, in some implementation manners, the second information may further include the second MAC address, the second access link information, and the DUID of the second terminal device.
例如,第二信息可以包括第二MAC地址、option82选项信息和第二终端设备的DUID。例如,第二信息可以包括第二MAC地址、option18选项信息和第二终端设备的DUID。可选的,在一些实现方式中,第二信息还可以包括第二MAC地址、第二接入端口信息和第二终端设备的DUID。For example, the second information may include the second MAC address, option82 option information, and the DUID of the second terminal device. For example, the second information may include the second MAC address, option18 option information, and the DUID of the second terminal device. Optionally, in some implementation manners, the second information may further include the second MAC address, the second access port information, and the DUID of the second terminal device.
例如,第二信息可以包括第二MAC地址、第二VLAN标识、第二端口标识和第二终端设备的DUID。For example, the second information may include the second MAC address, the second VLAN ID, the second port ID, and the DUID of the second terminal device.
可选的,在一些实现方式中,第二信息还可以包括第二MAC地址和第二接入端口信息。Optionally, in some implementation manners, the second information may further include second MAC address and second access port information.
例如,第二信息可以包括第二MAC地址、第二VLAN标识和第二端口标识。For example, the second information may include a second MAC address, a second VLAN identification, and a second port identification.
可选的,在一些实现方式中,第二信息还可以包括第二MAC地址和第二接入链路信息。Optionally, in some implementation manners, the second information may further include a second MAC address and second access link information.
例如,第二信息可以包括第二MAC地址、option18选项信息和option37选项信息、以及第二终端设备的DUID。例如,第二信息可以包括第二MAC地址、option18选项信息以及第二终端设备的DUID。For example, the second information may include the second MAC address, option18 option information and option37 option information, and the DUID of the second terminal device. For example, the second information may include the second MAC address, option18 option information, and the DUID of the second terminal device.
结合第一方面,在第一方面的某些实现方式中,该网络设备根据该第二接入请求信息和该第一对应关系,为该第二终端设备分配该第一IP地址,包括:当该网络设备检测到该第一对应关系,且该第一IP地址的状态为预留状态时,为该第二终端设备分配该第一IP地址;该方法还包括:当该网络设备检测到该第一对应关系,且该第一IP地址的状态 为占用状态时,为该第二终端设备分配第三IP地址;或者当该网络设备未检测到该第一对应关系,且该第一IP地址的状态为占用状态时,为该第二终端设备分配该第三IP地址;或者当该网络设备未检测到该第一对应关系,且该第一IP地址的状态为未占用状态时,为该第二终端设备分配该第一IP地址;其中,该第三IP地址是用于该第二终端设备根据该第二接入端口信息接入该网络的IP地址,且该第一IP地址、该第二IP地址以及该第三IP地址不相同。With reference to the first aspect, in some implementations of the first aspect, the network device allocates the first IP address to the second terminal device according to the second access request information and the first correspondence, including: when When the network device detects the first correspondence and the state of the first IP address is a reserved state, assigning the first IP address to the second terminal device; the method further includes: when the network device detects the first IP address the first correspondence, and when the state of the first IP address is the occupied state, assign a third IP address to the second terminal device; or when the network device does not detect the first correspondence, and the first IP address When the state of the first IP address is the occupied state, the third IP address is allocated to the second terminal device; or when the network device does not detect the first correspondence, and the state of the first IP address is the unoccupied state, the third IP address is assigned to the second terminal device; The second terminal device allocates the first IP address; wherein the third IP address is the IP address used by the second terminal device to access the network according to the second access port information, and the first IP address, the The second IP address and the third IP address are not the same.
在上述技术方案中,网络设备根据第一信息为第一终端设备预留了第一IP地址,即第一IP地址的状态为预留状态。当第一终端设备请求通过网络设备再次接入网络时,网络设备可以根据第一信息将与该第一信息对应的第一IP地址分配给第一终端设备,即第一IP地址的状态由预留状态更新为占用状态。在此之后,如果第二终端设备请求通过网络设备接入网络,网络设备可以成功地为第二终端设备分配第一IP地址或第三IP地址,从而可以保证第二终端设备可以通过网络设备成功接入网络。In the above technical solution, the network device reserves the first IP address for the first terminal device according to the first information, that is, the state of the first IP address is the reserved state. When the first terminal device requests to access the network again through the network device, the network device may assign the first IP address corresponding to the first information to the first terminal device according to the first information, that is, the state of the first IP address is preset by The reserved state is updated to the occupied state. After that, if the second terminal device requests to access the network through the network device, the network device can successfully assign the first IP address or the third IP address to the second terminal device, thereby ensuring that the second terminal device can successfully access the network through the network device Access the network.
结合第一方面,在第一方面的某些实现方式中,该网络设备检测到该第一对应关系,且该第一IP地址的状态为占用状态时,为该第二终端设备分配第三IP地址之后,该方法还包括:当该网络设备确定该第二终端设备在第一时刻由在线状态切换为下线状态,且该第一终端设备在该第一时刻之前由在线状态切换为下线状态时,将该第一对应关系更新为第二对应关系,该第二对应关系是该第一信息与该第三IP地址之间的对应关系,或者是该第二信息与该第三IP地址之间的对应关系;该网络设备将该第三IP地址的状态由占用状态更新为预留状态,将该第一IP地址的状态由占用状态更新为未占用状态。In combination with the first aspect, in some implementations of the first aspect, when the network device detects the first correspondence and the state of the first IP address is the occupied state, it allocates a third IP address to the second terminal device After the address, the method further includes: when the network device determines that the second terminal device is switched from the online state to the offline state at the first moment, and the first terminal device is switched from the online state to the offline state before the first moment state, update the first correspondence to a second correspondence, where the second correspondence is the correspondence between the first information and the third IP address, or the second information and the third IP address The network device updates the state of the third IP address from the occupied state to the reserved state, and updates the state of the first IP address from the occupied state to the unoccupied state.
在上述技术方案中,网络设备确定第一终端设备的第一信息和第二终端设备的第二信息相同,且网络设备分配给第一终端设备的第一IP地址和网络设备分配给第二终端设备的第三IP地址不同。当这两个终端设备由在线状态切换为下线状态时,网络设备根据第一终端设备的时刻和第二终端设备下线的时刻,可以确定与第一信息或第二信息对应的IP地址为第一IP地址,或者,可以确定与第一信息或第二信息对应的IP地址为第三IP地址。In the above technical solution, the network device determines that the first information of the first terminal device and the second information of the second terminal device are the same, and the first IP address assigned by the network device to the first terminal device and the network device assigned to the second terminal The third IP address of the device is different. When the two terminal devices are switched from the online state to the offline state, the network device can determine the IP address corresponding to the first information or the second information according to the time of the first terminal device and the time of the offline of the second terminal device as The first IP address, or it may be determined that the IP address corresponding to the first information or the second information is the third IP address.
结合第一方面,在第一方面的某些实现方式中,该网络设备检测到该第一对应关系,且该第一IP地址的状态为预留状态时,为该第二终端设备分配该第一IP地址之后,该方法还包括:当该网络设备确定该第二终端设备在第二时刻由在线状态切换为下线状态,且该第一终端设备在该第二时刻之后由在线状态切换为下线状态时,不更新该第一对应关系;该网络设备将该第一IP地址的状态由占用状态更新为预留状态。In combination with the first aspect, in some implementations of the first aspect, when the network device detects the first correspondence and the state of the first IP address is the reserved state, it allocates the second terminal device to the second terminal device. After an IP address, the method further includes: when the network device determines that the second terminal device is switched from an online state to an offline state at a second time, and the first terminal device is switched from an online state to an offline state after the second time In the offline state, the first correspondence is not updated; the network device updates the state of the first IP address from the occupied state to the reserved state.
结合第一方面,在第一方面的某些实现方式中,该网络设备为宽带接入服务器BRAS。With reference to the first aspect, in some implementations of the first aspect, the network device is a broadband access server BRAS.
第二方面,提供了一种网络设备,其特征在于,该网络设备包括:In a second aspect, a network device is provided, wherein the network device includes:
获取单元,用于获取第一终端设备的第一信息和第一互联网协议IP地址,该第一信息包括第一媒体接入控制MAC地址和第一接入端口信息,其中该第一MAC地址指示该第一终端设备,该第一接入端口信息指示该网络设备接收该第一终端设备的接入请求的第一端口的信息,该第一IP地址是该网络设备分配给该第一终端设备且用于该第一终端设备接入该网络的IP地址;确定单元,用于确定第一对应关系,该第一对应关系是该第一信息与该第一IP地址之间的对应关系;该确定单元,还用于确定该第一终端设备由在线状态切换为下线状态时,根据该第一对应关系将该第一信息对应的该第一IP地址的状态确定为预留状态。an obtaining unit, configured to obtain first information and a first Internet Protocol IP address of a first terminal device, where the first information includes a first media access control MAC address and first access port information, wherein the first MAC address indicates For the first terminal device, the first access port information indicates the information of the first port on which the network device receives the access request of the first terminal device, and the first IP address is the first IP address assigned by the network device to the first terminal device and the IP address used for the first terminal device to access the network; a determining unit, configured to determine a first correspondence, where the first correspondence is the correspondence between the first information and the first IP address; the The determining unit is further configured to determine that the state of the first IP address corresponding to the first information is a reserved state according to the first correspondence when the first terminal device is switched from an online state to an offline state.
结合第二方面,在第二方面的某些实现方式中,该第一接入端口信息包括第一虚拟局域网VLAN标识和第一端口标识,该第一端口标识用于指示该第一端口,该第一VLAN标识用于指示该第一端口所属的广播域。With reference to the second aspect, in some implementations of the second aspect, the first access port information includes a first virtual local area network VLAN identifier and a first port identifier, where the first port identifier is used to indicate the first port, the The first VLAN identifier is used to indicate the broadcast domain to which the first port belongs.
结合第二方面,在第二方面的某些实现方式中,该第一信息还包括该第一终端设备的第一接入链路信息,该第一接入链路信息指示该第一终端设备的物理位置。With reference to the second aspect, in some implementations of the second aspect, the first information further includes first access link information of the first terminal device, where the first access link information indicates the first terminal device physical location.
结合第二方面,在第二方面的某些实现方式中,该第一接入链路信息包括option82选项信息,或者,该第一接入链路信息包括以下信息中的至少一种:option18选项信息和option37选项信息。With reference to the second aspect, in some implementations of the second aspect, the first access link information includes option82 option information, or the first access link information includes at least one of the following information: option18 option info and option37 option info.
也就是说,该第一接入链路信息可以包括option82选项信息。该第一接入链路信息可以包括option18选项信息。该第一接入链路信息可以包括option37选项信息。该第一接入链路信息还可以包括option18选项信息和option37选项。That is, the first access link information may include option82 option information. The first access link information may include option18 option information. The first access link information may include option37 option information. The first access link information may further include option18 option information and option37 option.
结合第二方面,在第二方面的某些实现方式中,该第一信息还包括该第一终端设备的动态主机配置协议唯一标识符DUID。With reference to the second aspect, in some implementations of the second aspect, the first information further includes a dynamic host configuration protocol unique identifier DUID of the first terminal device.
可选的,在一些实现方式中,第一信息还可以包括第一MAC地址、第一接入链路信息和第一终端设备的DUID。Optionally, in some implementation manners, the first information may further include the first MAC address, the first access link information, and the DUID of the first terminal device.
可选的,在一些实现方式中,第一信息还可以包括第一MAC地址、第一接入端口信息和第一终端设备的DUID。Optionally, in some implementation manners, the first information may further include the first MAC address, the first access port information, and the DUID of the first terminal device.
可选的,在一些实现方式中,第一信息还可以包括第一MAC地址和第一接入端口信息。Optionally, in some implementation manners, the first information may further include first MAC address and first access port information.
可选的,在一些实现方式中,第一信息还可以包括第一MAC地址和第一接入链路信息。Optionally, in some implementation manners, the first information may further include the first MAC address and the first access link information.
结合第二方面,在第二方面的某些实现方式中,该第一信息还包括预留期限,该确定单元还用于:在该预留期限内,根据该第一对应关系将该第一信息对应的该第一IP地址的状态确定为预留状态;该确定单元还用于:在该预留期限外,删除该第一对应关系,并将该第一信息对应的该第一IP地址的状态由预留状态更新为未占用状态。With reference to the second aspect, in some implementations of the second aspect, the first information further includes a reservation period, and the determining unit is further configured to: within the reservation period, according to the first correspondence The state of the first IP address corresponding to the information is determined to be a reserved state; the determining unit is further configured to: delete the first correspondence outside the reservation period, and assign the first IP address corresponding to the first information is updated from reserved to unoccupied.
结合第二方面,在第二方面的某些实现方式中,该网络设备还包括处理单元,该获取单元还用于,接收该第一终端设备的第一接入请求信息,该第一接入请求信息用于请求该网络设备为该第一终端设备分配该第一终端设备根据该第一接入端口信息接入该网络设备的IP地址;该处理单元用于:根据该第一接入请求信息和该第一对应关系,为该第一终端设备分配该第一IP地址;以及将该第一IP地址的状态由预留状态更新为占用状态。With reference to the second aspect, in some implementations of the second aspect, the network device further includes a processing unit, and the obtaining unit is further configured to receive first access request information of the first terminal device, the first access The request information is used to request the network device to assign the first terminal device the IP address of the first terminal device accessing the network device according to the first access port information; the processing unit is used to: according to the first access request information and the first correspondence, assign the first IP address to the first terminal device; and update the state of the first IP address from a reserved state to an occupied state.
结合第二方面,在第二方面的某些实现方式中,该处理单元还用于:当检测到该第一对应关系,且该第一IP地址的状态为预留状态时,为该第一终端设备分配该第一IP地址。With reference to the second aspect, in some implementations of the second aspect, the processing unit is further configured to: when the first correspondence relationship is detected and the state of the first IP address is a reserved state, the first IP address is in the reserved state. The terminal device assigns the first IP address.
结合第二方面,在第二方面的某些实现方式中,该处理单元还用于:当未检测到该第一对应关系,且该第一IP地址的状态为未占用状态时,为该第一终端设备分配该第一IP地址;或者当未检测到该第一对应关系,且该第一IP地址的状态为占用状态时,为该第一终端设备分配第二IP地址;其中,该第二IP地址是用于该第一终端设备根据该第一接入端口信息接入该网络的IP地址,且该第二IP地址与该第一IP地址不相同。With reference to the second aspect, in some implementations of the second aspect, the processing unit is further configured to: when the first correspondence is not detected and the state of the first IP address is the unoccupied state, the processing unit is the first IP address. A terminal device assigns the first IP address; or when the first correspondence is not detected and the state of the first IP address is the occupied state, assigns a second IP address to the first terminal device; wherein the first IP address is The second IP address is the IP address used by the first terminal device to access the network according to the first access port information, and the second IP address is different from the first IP address.
结合第二方面,在第二方面的某些实现方式中,该获取单元还用于,接收第二终端设备的第二接入请求信息,该第二接入请求信息用于请求该网络设备为该第二终端设备分配 该第二终端设备根据第二接入端口信息接入该网络设备的IP地址,该第二终端设备与该第一终端设备不相同;该确定单元还用于:确定该第二终端设备的第二信息与该第一信息相同,该第二信息包括第二MAC地址和该第二接入端口信息,该第二MAC地址指示该第二终端设备,该第二接入端口信息指示该网络设备接收该第二终端设备的接入请求的第二端口的信息;该处理单元还用于:根据该第二接入请求和该第一对应关系,为该第二终端设备分配该第一IP地址。With reference to the second aspect, in some implementations of the second aspect, the obtaining unit is further configured to receive second access request information of the second terminal device, where the second access request information is used to request the network device to be The second terminal device assigns the IP address of the second terminal device to access the network device according to the second access port information, and the second terminal device is different from the first terminal device; the determining unit is further configured to: determine the The second information of the second terminal device is the same as the first information, the second information includes a second MAC address and the second access port information, the second MAC address indicates the second terminal device, the second access port The port information indicates the information of the second port for the network device to receive the access request of the second terminal device; the processing unit is further configured to: according to the second access request and the first correspondence, for the second terminal device The first IP address is allocated.
结合第二方面,在第二方面的某些实现方式中,该第二接入端口信息包括第二虚拟局域网VLAN标识和第二端口标识,该第二端口标识用于指示该第二端口,该第二VLAN标识用于指示该第二端口所属的广播域。With reference to the second aspect, in some implementations of the second aspect, the second access port information includes a second virtual local area network VLAN identifier and a second port identifier, the second port identifier is used to indicate the second port, the The second VLAN identifier is used to indicate the broadcast domain to which the second port belongs.
结合第二方面,在第二方面的某些实现方式中,该第二信息还包括该第二终端设备的第二接入链路信息,该第二接入链路信息指示该第二终端设备的物理位置。With reference to the second aspect, in some implementations of the second aspect, the second information further includes second access link information of the second terminal device, where the second access link information indicates the second terminal device physical location.
结合第二方面,在第二方面的某些实现方式中,该第二接入链路信息包括option82选项信息,或者,该第二接入链路信息包括以下信息中的至少一种:option18选项信息和option37选项信息。With reference to the second aspect, in some implementations of the second aspect, the second access link information includes option82 option information, or the second access link information includes at least one of the following information: option18 option info and option37 option info.
也就是说,该第二接入链路信息可以包括option82选项信息。该第二接入链路信息可以包括option18选项信息。该第二接入链路信息可以包括option37选项信息。该第二接入链路信息还可以包括option18选项信息和option37选项。That is, the second access link information may include option82 option information. The second access link information may include option18 option information. The second access link information may include option37 option information. The second access link information may further include option18 option information and option37 option.
结合第二方面,在第二方面的某些实现方式中,该第二信息还包括该第二终端设备的DUID。With reference to the second aspect, in some implementations of the second aspect, the second information further includes the DUID of the second terminal device.
结合第二方面,在第二方面的某些实现方式中,该处理单元还用于:当检测到该第一对应关系,且该第一IP地址的状态为预留状态时,为该第二终端设备分配该第一IP地址;With reference to the second aspect, in some implementations of the second aspect, the processing unit is further configured to: when the first correspondence is detected and the state of the first IP address is a reserved state, the second The terminal device allocates the first IP address;
该处理单元还用于:当检测到该第一对应关系,且该第一IP地址的状态为占用状态时,为该第二终端设备分配第三IP地址;或者当未检测到该第一对应关系,且该第一IP地址的状态为占用状态时,为该第二终端设备分配该第三IP地址;或者当未检测到该第一对应关系,且该第一IP地址的状态为未占用状态时,为该第二终端设备分配该第一IP地址;其中,该第三IP地址是用于该第二终端设备根据该第二接入端口信息接入该网络的IP地址,且该第一IP地址、该第二IP地址以及该第三IP地址不相同。The processing unit is further configured to: when the first correspondence is detected and the state of the first IP address is the occupied state, assign a third IP address to the second terminal device; or when the first correspondence is not detected relationship, and the state of the first IP address is occupied, assign the third IP address to the second terminal device; or when the first correspondence is not detected, and the state of the first IP address is unoccupied In the state, the first IP address is allocated to the second terminal device; wherein, the third IP address is the IP address used by the second terminal device to access the network according to the second access port information, and the third IP address is used for accessing the network according to the second access port information. An IP address, the second IP address and the third IP address are different.
结合第二方面,在第二方面的某些实现方式中,该确定单元还用于:确定该第二终端设备在第一时刻由在线状态切换为下线状态,以及确定该第一终端设备在该第一时刻之前由在线状态切换为下线状态;该处理单元还用于:将该第一对应关系更新为第二对应关系,该第二对应关系是该第一信息与该第三IP地址之间的对应关系,或者是该第二信息与该第三IP地址之间的对应关系;将该第三IP地址的状态由占用状态更新为预留状态,将该第一IP地址的状态由占用状态更新为未占用状态。With reference to the second aspect, in some implementations of the second aspect, the determining unit is further configured to: determine that the second terminal device is switched from an online state to an offline state at the first moment, and determine that the first terminal device is in The online state is switched to the offline state before the first moment; the processing unit is further configured to: update the first correspondence to a second correspondence, where the second correspondence is the first information and the third IP address The corresponding relationship between, or the corresponding relationship between the second information and the third IP address; the state of the third IP address is updated from the occupied state to the reserved state, and the state of the first IP address is changed by The occupied state is updated to the unoccupied state.
结合第二方面,在第二方面的某些实现方式中,该确定单元还用于:确定该第二终端设备在第二时刻由在线状态切换为下线状态,以及确定该第一终端设备在该第二时刻之后由在线状态切换为下线状态;该处理单元还用于:将该第一IP地址的状态由占用状态更新为预留状态。With reference to the second aspect, in some implementations of the second aspect, the determining unit is further configured to: determine that the second terminal device is switched from an online state to an offline state at a second moment, and determine that the first terminal device is in a The online state is switched to the offline state after the second moment; the processing unit is further configured to: update the state of the first IP address from the occupied state to the reserved state.
结合第二方面,在第二方面的某些实现方式中,该网络设备为宽带接入服务器BRAS。With reference to the second aspect, in some implementations of the second aspect, the network device is a broadband access server BRAS.
第三方面,本申请提供了一种网络设备,网络设备具有实现第一方面以及第一方面中 任一种可能的实现方式中的方法的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的单元。In a third aspect, the present application provides a network device, where the network device has a function of implementing the method in the first aspect and any possible implementation manner of the first aspect. The functions can be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more units corresponding to the above-mentioned functions.
第四方面,本申请提供一种网络设备或者其他可实现上述网络设备功能的组合器件、部件等,包括至少一个处理器和通信接口。该至少一个处理器,用于执行计算机程序或指令,以使得该网络设备可以实现上述第一方面以及第一方面中任一种可能实现方式中的通信方法。In a fourth aspect, the present application provides a network device or other combined device, component, etc. that can implement the functions of the above-mentioned network device, including at least one processor and a communication interface. The at least one processor is configured to execute a computer program or instructions, so that the network device can implement the first aspect and the communication method in any possible implementation manner of the first aspect.
可选地,该网络设备还包括至少一个存储器,该至少一个存储器与该至少一个处理器耦合,该计算机程序或指令存储在该至少一个存储器中。其中,该存储器可以与该处理器集成在一起,或者该存储器与处理器分离设置。Optionally, the network device further includes at least one memory coupled to the at least one processor, and the computer program or instructions are stored in the at least one memory. Wherein, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
在一种实现方式中,该网络设备为网络设备。当该网络设备为网络设备时,通信接口可以是收发器,或,输入/输出接口。In one implementation, the network device is a network device. When the network device is a network device, the communication interface may be a transceiver, or an input/output interface.
在另一种实现方式中,该网络设备为芯片或芯片***。当该网络设备为芯片或芯片***时,通信接口可以是该芯片或芯片***上的输入/输出接口、接口电路、输出电路、输入电路、管脚或相关电路等。处理器也可以体现为处理电路或逻辑电路。In another implementation, the network device is a chip or a system on a chip. When the network device is a chip or a chip system, the communication interface may be an input/output interface, an interface circuit, an output circuit, an input circuit, a pin or a related circuit, etc. on the chip or a chip system. A processor may also be embodied as a processing circuit or a logic circuit.
在另一种实现方式中,该网络设备为配置于网络设备中的芯片或芯片***。In another implementation manner, the network device is a chip or a chip system configured in the network device.
可选地,收发器可以为收发电路。可选地,输入/输出接口可以为输入/输出电路。Optionally, the transceiver may be a transceiver circuit. Alternatively, the input/output interface may be an input/output circuit.
第五方面,提供了一种计算机可读存储介质,用于存储计算机程序,该计算机程序包括用于执行上述第一方面及上述第一方面的任意可能的实现方式中的方法的指令。In a fifth aspect, a computer-readable storage medium is provided for storing a computer program, the computer program including instructions for executing the method in the above-mentioned first aspect and any possible implementation manner of the above-mentioned first aspect.
第六方面,提供了一种芯片,包括至少一个处理器和接口;所述至少一个所述处理器,用于调用并运行计算机程序,以使所述芯片执行上述第一方面及上述第一方面的任意可能的实现方式中的方法。In a sixth aspect, a chip is provided, including at least one processor and an interface; the at least one processor is used to call and run a computer program, so that the chip executes the above-mentioned first aspect and the above-mentioned first aspect method in any possible implementation of .
上述芯片可以是片上***(system on chip,SOC),也可以是基带芯片等,其中基带芯片可以包括处理器、信道编码器、数字信号处理器、调制解调器和接口模块等。The above-mentioned chip may be a system on chip (system on chip, SOC), or a baseband chip, etc., wherein the baseband chip may include a processor, a channel encoder, a digital signal processor, a modem, an interface module, and the like.
第七方面,提供了一种***,包括如上述第二方面、第三方面或第四方面所述的网络设备。In a seventh aspect, a system is provided, including the network device described in the second aspect, the third aspect or the fourth aspect.
附图说明Description of drawings
图1是适用于本申请提供的地址预留的方法的***架构100的示意图。FIG. 1 is a schematic diagram of a system architecture 100 suitable for the address reservation method provided by the present application.
图2是本申请提供的地址预留的方法100的示意性流程图。FIG. 2 is a schematic flowchart of a method 100 for address reservation provided by the present application.
图3是本申请提供的网络设备根据第一信息为第一终端设备分配IP地址的方法200的示意性流程图。FIG. 3 is a schematic flowchart of a method 200 for a network device to assign an IP address to a first terminal device according to the first information provided by the present application.
图4是本申请提供的网络设备根据第一信息为第一终端设备预留IP地址的方法300的示意性流程图。FIG. 4 is a schematic flowchart of a method 300 for a network device to reserve an IP address for a first terminal device according to the first information provided by the present application.
图5是本申请提供的地址预留的方法400的示意性流程图。FIG. 5 is a schematic flowchart of a method 400 for address reservation provided by the present application.
图6是本申请提供的地址预留的方法500的示意性流程图。FIG. 6 is a schematic flowchart of a method 500 for address reservation provided by the present application.
图7是本申请提供的地址预留的方法600的示意性流程图。FIG. 7 is a schematic flowchart of a method 600 for address reservation provided by the present application.
图8是本申请提供的一种网络设备1000的结构示意图。FIG. 8 is a schematic structural diagram of a network device 1000 provided by the present application.
图9是本申请提供的一种网络设备1100的结构示意图。FIG. 9 is a schematic structural diagram of a network device 1100 provided by the present application.
图10是本申请提供的一种网络设备1200的结构示意图。FIG. 10 is a schematic structural diagram of a network device 1200 provided by the present application.
图11是本申请提供的一种网络***1300的结构示意图。FIG. 11 is a schematic structural diagram of a network system 1300 provided by the present application.
具体实施方式detailed description
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in the present application will be described below with reference to the accompanying drawings.
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。The terms used in the embodiments of the present application are only used to explain specific embodiments of the present application, and are not intended to limit the present application.
本申请中术语“第一”“第二”“第三”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”和“第三”之间不具有逻辑或时序上的依赖关系,也不对数量和执行顺序进行限定。In this application, the terms "first", "second", "third" and other words are used to distinguish the same or similar items that have substantially the same function and function. It should be understood that "first", "second" and "third" There is no logical or temporal dependency between "three", nor does it limit the quantity and execution order.
本申请中对第一终端设备和第二终端设备的具体形式不作具体限定。The specific forms of the first terminal device and the second terminal device are not specifically limited in this application.
例如,第一终端设备和/或第二终端设备可以是手机(mobile phone)、平板电脑(pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备、5G网络中的终端设备、非公共网络中的终端设备等。For example, the first terminal device and/or the second terminal device may be a mobile phone (mobile phone), a tablet computer (pad), a computer with a wireless transceiver function, a virtual reality (virtual reality, VR) terminal device, an augmented reality (augmented reality) , AR) terminal equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid , wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) Telephones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, available Wearable devices, terminal devices in 5G networks, terminal devices in non-public networks, etc.
其中,可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。Among them, wearable devices can also be called wearable smart devices, which is a general term for the intelligent design of daily wear and the development of wearable devices using wearable technology, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. Wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction, and cloud interaction. In a broad sense, wearable smart devices include full-featured, large-scale, complete or partial functions without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, which needs to cooperate with other devices such as smart phones. Use, such as all kinds of smart bracelets, smart jewelry, etc. for physical sign monitoring.
此外,第一终端设备和/或第二终端设备还可以是物联网(internet of things,IoT)***中的终端设备。IoT是未来信息技术发展的重要组成部分,其主要技术特点是将物品通过通信技术与网络连接,从而实现人机互连,物物互连的智能化网络。In addition, the first terminal device and/or the second terminal device may also be terminal devices in an internet of things (internet of things, IoT) system. IoT is an important part of the development of information technology in the future. Its main technical feature is to connect items to the network through communication technology, so as to realize the intelligent network of human-machine interconnection and interconnection of things.
在实际应用中,为了提高终端设备接入网络的效率,通常在终端设备由在线状态切换为下线状态(即,终端设备下线)的过程中,配置网络设备根据终端设备的MAC地址以及该终端设备的动态主机配置协议唯一标识符(dhcp unique identifier,DUID)为该终端设备预留该终端设备本次下线前使用的IP地址。因此,当该终端设备再次请求上线时,该网络设备可以将之前预留的IP地址分配给该终端设备,使得终端设备可以使用预留的IP地址接入网络。In practical applications, in order to improve the efficiency of the terminal device accessing the network, usually in the process of switching the terminal device from the online state to the offline state (that is, the terminal device goes offline), configure the network device according to the MAC address of the terminal device and the The dynamic host configuration protocol unique identifier (dhcp unique identifier, DUID) of the terminal device reserves the IP address used by the terminal device before going offline this time for the terminal device. Therefore, when the terminal device requests to go online again, the network device can assign the previously reserved IP address to the terminal device, so that the terminal device can use the reserved IP address to access the network.
但在一些特殊的场景中(例如,一个MAC地址对应多个会话的场景中),可能存在不同终端设备的MAC地址相同,且上述不同终端设备的DIUD也相同的情况。在此情况下,现有的地址预留方法,就无法满足为终端设备预留地址资源的需求。例如,在一个 MAC地址对应多个会话的场景中,终端设备#1的MAC地址和终端设备#2的MAC地址相同且为MAC地址#1,终端设备#1的DUID和终端设备#2的DUID都相同且为DUID#1。网络设备同时接收到终端设备#1和终端设备#2接入网络请求,由于MAC地址#1和DUID#1与终端设备之间是一对二的关系,导致网络设备无法成功为终端设备#1或终端设备#2预留IP地址(例如,终端设备#1本次接入网络时使用的IP地址,或,终端设备#2本次接入网络时使用的IP地址)。However, in some special scenarios (for example, a scenario in which one MAC address corresponds to multiple sessions), there may be cases where the MAC addresses of different terminal devices are the same, and the DIUDs of the above-mentioned different terminal devices are also the same. In this case, the existing address reservation method cannot meet the requirement of reserving address resources for terminal equipment. For example, in a scenario where one MAC address corresponds to multiple sessions, the MAC address of terminal device #1 and the MAC address of terminal device #2 are the same and are MAC address #1, and the DUID of terminal device #1 and the DUID of terminal device #2 All are the same and are DUID#1. The network device receives the network access request of terminal device #1 and terminal device #2 at the same time. Since there is a one-to-two relationship between MAC address #1 and DUID #1 and the terminal device, the network device cannot successfully become terminal device #1. Or terminal device #2 reserves an IP address (for example, the IP address used by terminal device #1 to access the network this time, or the IP address used by terminal device #2 to access the network this time).
本申请提供了一种地址预留的方法和网络设备,能够满足为终端设备预留地址资源的需求。The present application provides an address reservation method and network device, which can meet the requirements of reserving address resources for terminal devices.
为了便于理解,首先结合图1,对适用于本申请实施例的***架构进行详细描述。For ease of understanding, a system architecture applicable to this embodiment of the present application is described in detail first with reference to FIG. 1 .
图1是适用于本申请提供的地址预留的方法的***架构100的示意图。如图1所示,该***架构100可以包括终端设备110、终端设备111和网络设备130。FIG. 1 is a schematic diagram of a system architecture 100 suitable for the address reservation method provided by the present application. As shown in FIG. 1 , the system architecture 100 may include a terminal device 110 , a terminal device 111 and a network device 130 .
终端设备110和/或终端设备111可以通过二层网络、非对称数字用户线路(asymmetric digital subscriber line,ADSL)(例如,利用呼数字用户线路接入复用器(digital subscriber line access multiplexer,DSLAM))等方式接入网络设备130。 Terminal equipment 110 and/or terminal equipment 111 may be connected via a Layer 2 network, an asymmetric digital subscriber line (ADSL) (eg, using a digital subscriber line access multiplexer (DSLAM)) ) to access the network device 130.
具体的,终端设备110和/或终端设备111通过二层网络接入网络设备的方法与现有的方法相同,此处不再详细赘述。Specifically, the method for the terminal device 110 and/or the terminal device 111 to access the network device through the Layer 2 network is the same as the existing method, which will not be described in detail here.
网络设备130,可以根据终端设备110和/或终端设备111的接入请求,为终端设备110和/或终端设备分配IP地址或IP地址前缀。The network device 130 may allocate an IP address or an IP address prefix to the terminal device 110 and/or the terminal device according to the access request of the terminal device 110 and/or the terminal device 111 .
具体的,在网络设备130接收到终端设备110和/或终端设备111的接入请求之后,网络设备130可以将本地保存的IP地址分配终端设备110和/或终端设备111。Specifically, after the network device 130 receives the access request from the terminal device 110 and/or the terminal device 111 , the network device 130 may assign the locally stored IP address to the terminal device 110 and/or the terminal device 111 .
其中,网络设备130本地保存的IP地址,可以理解为网络设备130的本地地址池中保存的IP地址。The IP address stored locally by the network device 130 may be understood as the IP address stored in the local address pool of the network device 130 .
此外,网络设备130可以是接入互联网协议第6版(internet protocol version 6,IPv6)网络中的网络设备。其中,该IPv6网络可以包括远程用户拨号认证(remote authentication dial in user service,RADIUS)服务器和下一代网络(Next Generation Network,NGN)服务器等。Additionally, the network device 130 may be a network device that accesses an internet protocol version 6 (IPv6) network. The IPv6 network may include a remote authentication dial in user service (RADIUS) server, a Next Generation Network (NGN) server, and the like.
在本申请实施例中,对网络设备130的具体类型不作限定。在一个示例中,上述网络设备130可以是宽带接入服务器(broadband remote access server,BRAS)。在另一个示例中,上述网络设备130还可以是包括BRAS的其它设备。In this embodiment of the present application, the specific type of the network device 130 is not limited. In one example, the above-mentioned network device 130 may be a broadband remote access server (BRAS). In another example, the above-mentioned network device 130 may also be other devices including BRAS.
应理解的是,图1仅为示意并不对本申请构成任何限定。例如,在一些场景中,该***架构100中还可以包括更多数目的终端设备或更多数目的网络设备等。It should be understood that FIG. 1 is only for illustration and does not constitute any limitation to the present application. For example, in some scenarios, the system architecture 100 may further include a greater number of terminal devices or a greater number of network devices, and the like.
下面结合图2至图7,对本申请提供的地址预留的方法进行详细描述。The address reservation method provided by the present application will be described in detail below with reference to FIG. 2 to FIG. 7 .
图2是本申请提供的地址预留的方法100的示意性流程图。如图2所示,该方法100可以包括步骤110至步骤130,下面对步骤110至步骤130进行详细介绍。FIG. 2 is a schematic flowchart of a method 100 for address reservation provided by the present application. As shown in FIG. 2 , the method 100 may include steps 110 to 130 , and the steps 110 to 130 will be described in detail below.
步骤110,第一终端设备通过网络设备接入网络后,网络设备获取第一终端设备的第一信息和第一互联网协议IP地址,第一信息包括第一媒体接入控制MAC地址和第一接入端口信息,其中第一MAC地址指示第一终端设备,第一接入端口信息指示网络设备接收第一终端设备的接入请求的第一端口的信息,第一IP地址是网络设备分配给第一终端设备且用于第一终端设备接入网络的IP地址。 Step 110, after the first terminal device accesses the network through the network device, the network device obtains the first information of the first terminal device and the first Internet Protocol IP address, the first information includes the first media access control MAC address and the first connection. ingress port information, wherein the first MAC address indicates the first terminal device, the first access port information indicates the information of the first port where the network device receives the access request of the first terminal device, and the first IP address is assigned by the network device to the first terminal device. An IP address of a terminal device and used for the first terminal device to access the network.
第一终端设备通过网络设备接入网络后,可以理解为,网络设备为第一终端设备分配IP地址后,第一终端设备使用网络设备分配的IP地址通过网络设备接入网络。可以理解的是,网络设备为第一终端设备分配的IP地址可以是网络设备本地地址池中的一个IP地址(例如,IPv6地址)。After the first terminal device accesses the network through the network device, it can be understood that after the network device allocates an IP address to the first terminal device, the first terminal device uses the IP address allocated by the network device to access the network through the network device. It can be understood that the IP address allocated by the network device to the first terminal device may be an IP address (eg, an IPv6 address) in the local address pool of the network device.
作为示例,第一终端设备可以是图1中的终端设备110。第一终端设备也可以是图1中的终端设备111。网络设备可以是图1中的网络设备130。在一些实现方式中,网络设备130可以是BRAS设备。在另一些实现方式中,网络设备130可以是包括BRAS设备的其它设备。As an example, the first terminal device may be the terminal device 110 in FIG. 1 . The first terminal device may also be the terminal device 111 in FIG. 1 . The network device may be network device 130 in FIG. 1 . In some implementations, network device 130 may be a BRAS device. In other implementations, the network device 130 may be other devices including BRAS devices.
在一些实施例中,第一信息可以包括第一媒体接入控制MAC地址和第一接入端口信息,其中第一MAC地址指示第一终端设备,第一接入端口信息指示网络设备接收第一终端设备的接入请求的第一端口的信息,第一IP地址是网络设备分配给第一终端设备且用于第一终端设备接入网络的IP地址。In some embodiments, the first information may include a first media access control MAC address and first access port information, where the first MAC address indicates the first terminal device, and the first access port information indicates that the network device receives the first Information about the first port of the access request of the terminal device, where the first IP address is the IP address allocated by the network device to the first terminal device and used for the first terminal device to access the network.
其中,第一接入端口信息可以包括第一虚拟局域网(virtual local area network,VLAN)标识和第一端口标识,第一端口标识用于指示第一端口,第一VLAN标识用于指示第一端口所属的广播域。可以理解的是,当第一接入端口信息包括第一VLAN标识和第一端口标识时,第一信息可以包括第一MAC地址,第一VLAN标识和第一端口标识。Wherein, the first access port information may include a first virtual local area network (virtual local area network, VLAN) identifier and a first port identifier, where the first port identifier is used to indicate the first port, and the first VLAN identifier is used to indicate the first port. The broadcast domain to which it belongs. It can be understood that when the first access port information includes the first VLAN identifier and the first port identifier, the first information may include the first MAC address, the first VLAN identifier and the first port identifier.
可选的,在一些实现方式中,第一IP地址可以是IPv6地址。Optionally, in some implementation manners, the first IP address may be an IPv6 address.
可选的,在另一些实现方式中,第一IP地址可以是Ipv6地址前缀。Optionally, in other implementation manners, the first IP address may be an IPv6 address prefix.
在上述技术方案中,第一信息可以包括第一MAC地址、第一VLAN标识和第一端口标识。In the above technical solution, the first information may include the first MAC address, the first VLAN identifier and the first port identifier.
可选的,第一信息还可以包括第一终端设备的第一接入链路信息,第一接入链路信息指示第一终端设备的物理位置。其中,第一接入链路信息包括option82选项信息,或者,第一接入链路信息包括以下信息中的至少一种:option18选项信息和option37选项信息。也就是说,本申请提供的第一接入链路信息可以包括option82选项信息。第一接入链路信息也可以包括option18选项信息。第一接入链路信息也可以包括option37选项信息。第一接入链路信息还可以包括option18选项信息和option37选项。Optionally, the first information may further include first access link information of the first terminal device, where the first access link information indicates the physical location of the first terminal device. Wherein, the first access link information includes option82 option information, or the first access link information includes at least one of the following information: option18 option information and option37 option information. That is, the first access link information provided by this application may include option82 option information. The first access link information may also include option18 option information. The first access link information may also include option37 option information. The first access link information may further include option18 option information and option37 option.
在上述技术方案中,第一信息可以包括第一MAC地址、第一接入端口信息和第一接入链路信息。In the above technical solution, the first information may include the first MAC address, the first access port information and the first access link information.
例如,当第一接入链路信息包括option82选项信息时,第一信息可以包括第一MAC地址、第一VLAN标识、第一端口信息和option82选项信息。例如,当第一接入链路信息包括option18选项信息时,第一信息可以包括第一MAC地址,第一VLAN标识,第一端口信息和option18选项信息。例如,当第一接入链路信息包括option18选项信息和option37选项信息时,第一信息可以包括第一MAC地址,第一VLAN标识,第一端口信息,以及option18选项信息和option37选项信息。For example, when the first access link information includes option82 option information, the first information may include a first MAC address, a first VLAN identifier, first port information, and option82 option information. For example, when the first access link information includes option18 option information, the first information may include a first MAC address, a first VLAN identifier, first port information and option18 option information. For example, when the first access link information includes option18 option information and option37 option information, the first information may include the first MAC address, the first VLAN identifier, the first port information, and option18 option information and option37 option information.
可选的,第一信息还包括第一终端设备的动态主机配置协议唯一标识符DUID。Optionally, the first information further includes the dynamic host configuration protocol unique identifier DUID of the first terminal device.
在上述技术方案中,第一信息可以包括第一MAC地址、第一接入端口信息、第一接入链路信息和第一终端设备的DUID。In the above technical solution, the first information may include the first MAC address, the first access port information, the first access link information, and the DUID of the first terminal device.
例如,当第一接入链路信息包括option82选项信息时,第一信息可以包括第一MAC地址、第一VLAN标识、第一端口标识、option82选项信息和第一终端设备的DUID。For example, when the first access link information includes option82 option information, the first information may include the first MAC address, the first VLAN identifier, the first port identifier, option82 option information, and the DUID of the first terminal device.
应理解的是,本申请提供的第一信息的形式不局限于上述内容。It should be understood that the form of the first information provided in this application is not limited to the above content.
在另一些实施例中,第一信息还可以仅包括第一MAC地址和第一接入端口信息。In other embodiments, the first information may also include only the first MAC address and the first access port information.
例如,第一信息可以包括第一MAC地址、第一VLAN标识和第一端口信息。For example, the first information may include the first MAC address, the first VLAN identifier, and the first port information.
可选的,第一信息还可以仅包括第一MAC地址、第一接入端口信息和第一终端设备的DUID。Optionally, the first information may also include only the first MAC address, the first access port information, and the DUID of the first terminal device.
在又一些实施例中,第一信息还可以仅包括第一MAC地址和第一接入链路信息。In still other embodiments, the first information may also include only the first MAC address and the first access link information.
例如,当第一接入链路信息包括option82选项信息时,第一信息可以包括第一MAC地址和option82选项信息。例如,当第一接入链路信息包括option37选项信息时,第一信息可以包括第一MAC地址和option37选项信息。For example, when the first access link information includes option82 option information, the first information may include the first MAC address and option82 option information. For example, when the first access link information includes option37 option information, the first information may include the first MAC address and option37 option information.
可选的,第一信息还可以仅包括第一MAC地址、第一接入链路信息和第一终端设备的DUID。Optionally, the first information may also include only the first MAC address, the first access link information, and the DUID of the first terminal device.
步骤120,网络设备确定第一对应关系,第一对应关系是第一信息与第一IP地址之间的对应关系。 Step 120, the network device determines a first correspondence, where the first correspondence is a correspondence between the first information and the first IP address.
具体的,网络设备在获取到第一信息和第一IP地址后,网络设备可以确定第一对应关系。Specifically, after the network device acquires the first information and the first IP address, the network device may determine the first correspondence.
步骤130,当网络设备确定第一终端设备由在线状态切换为下线状态时,网络设备根据第一对应关系将第一信息对应的第一IP地址的状态确定为预留状态。 Step 130, when the network device determines that the first terminal device is switched from the online state to the offline state, the network device determines the state of the first IP address corresponding to the first information as the reserved state according to the first correspondence.
可以理解的是,在第一终端设备由在线状态切换为下线状态前,第一终端设备处于在线状态,且第一IP地址的状态为占用状态。换句话说,在第一终端设备由在线状态切换为下线状态前,第一终端设备占用第一IP地址。It can be understood that, before the first terminal device is switched from the online state to the offline state, the first terminal device is in the online state, and the state of the first IP address is the occupied state. In other words, before the first terminal device switches from the online state to the offline state, the first terminal device occupies the first IP address.
可选的,第一信息还可以包括预留期限。其中,预留期限用于指示网络设备为第一终端设备预留第一IP地址的期限。Optionally, the first information may further include a reservation period. The reservation period is used to indicate the period for which the network device reserves the first IP address for the first terminal device.
在一些实施例中,网络设备根据第一对应关系将第一信息对应的第一IP地址的状态确定为预留状态,包括:In some embodiments, the network device determines the state of the first IP address corresponding to the first information as the reserved state according to the first correspondence, including:
在预留期限内,网络设备根据第一对应关系将第一信息对应的第一IP地址的状态确定为预留状态;Within the reservation period, the network device determines the state of the first IP address corresponding to the first information as the reservation state according to the first correspondence;
还包括:Also includes:
在预留期限外,网络设备删除第一对应关系,并将第一信息对应的第一IP地址的状态由预留状态更新为未占用状态。Outside the reservation period, the network device deletes the first correspondence, and updates the state of the first IP address corresponding to the first information from the reserved state to the unoccupied state.
在上述技术方案中,网络设备可以根据第一信息包括的预留期限,确定在第一终端设备由在线状态切换为下线状态时,是否为第一终端设备预留第一信息对应的第一IP地址,可以避免当第一IP地址长期处于预留状态时造成的网络资源浪费的情况。In the above technical solution, the network device may determine whether to reserve the first terminal device corresponding to the first information for the first terminal device when the first terminal device switches from the online state to the offline state according to the reservation period included in the first information. The IP address can avoid the waste of network resources caused when the first IP address is in the reserved state for a long time.
在本申请实施例中,对配置预留期限的方式以及预留期限的期限长度不作具体限定。In this embodiment of the present application, the manner of configuring the reservation period and the period length of the reservation period are not specifically limited.
在一些实现方式中,网络设备可以根据当前的网络状态确定为第一终端设备预留第一IP地址的预留期限。In some implementation manners, the network device may determine a reservation period for reserving the first IP address for the first terminal device according to the current network state.
在另一些实现方式中,可以人工配置网络设备为第一终端设备预留第一IP地址的预留期限。例如,预留期限可以为5,10,15,20或者30小时等。或者,预留期限的期限长度还可以为其它取值。本申请对此不作限定。In other implementation manners, a reservation period for reserving the first IP address for the first terminal device by the network device may be manually configured. For example, the reservation period can be 5, 10, 15, 20 or 30 hours, etc. Alternatively, the period length of the reservation period may also take other values. This application does not limit this.
可选的,在网络设备确定第一终端设备由在线状态切换为下线状态之后,还包括:Optionally, after the network device determines that the first terminal device is switched from the online state to the offline state, the method further includes:
网络设备接收第一终端设备的第一接入请求信息,第一接入请求信息用于请求网络设备为第一终端设备分配第一终端设备根据第一接入端口信息接入网络设备的IP地址;The network device receives the first access request information of the first terminal device, where the first access request information is used to request the network device to assign the IP address of the first terminal device to access the network device according to the first access port information to the first terminal device ;
网络设备根据第一接入请求信息和第一对应关系,为第一终端设备分配第一IP地址;The network device allocates the first IP address to the first terminal device according to the first access request information and the first correspondence;
网络设备将第一IP地址的状态由预留状态更新为占用状态。The network device updates the state of the first IP address from the reserved state to the occupied state.
其中,网络设备根据第一接入请求信息和第一对应关系,为第一终端设备分配第一IP地址,包括:The network device assigns the first IP address to the first terminal device according to the first access request information and the first correspondence, including:
当网络设备检测到第一对应关系,且第一IP地址的状态为预留状态时,为第一终端设备分配第一IP地址。When the network device detects the first correspondence and the state of the first IP address is the reserved state, the first IP address is allocated to the first terminal device.
在上述技术方案中,网络设备在第一终端设备下线后为第一终端设备预留了第一信息对应的第一IP地址,当第一终端设备再次请求通过网络设备上线时,网络设备可以根据检测到的第一对应关系(即第一信息与第一IP地址的对应关系),将第一IP地址分配给第一终端设备,从而可以提高第一终端设备接入网络的效率。In the above technical solution, the network device reserves the first IP address corresponding to the first information for the first terminal device after the first terminal device goes offline. When the first terminal device requests to go online again through the network device, the network device can The first IP address is allocated to the first terminal device according to the detected first correspondence (ie, the correspondence between the first information and the first IP address), thereby improving the efficiency of the first terminal device accessing the network.
可选的,在一些实施例中,网络设备接收第一终端设备的第一接入请求信息后,如果网络设备未检测到第一对应关系,网络设备可以执行如下操作:Optionally, in some embodiments, after the network device receives the first access request information of the first terminal device, if the network device does not detect the first correspondence, the network device may perform the following operations:
当网络设备未检测到第一对应关系,且第一IP地址的状态为未占用状态时,为第一终端设备分配第一IP地址;或者When the network device does not detect the first correspondence and the state of the first IP address is the unoccupied state, assign the first IP address to the first terminal device; or
当网络设备未检测到第一对应关系,且第一IP地址的状态为占用状态时,为第一终端设备分配第二IP地址;When the network device does not detect the first correspondence, and the state of the first IP address is the occupied state, assigning the second IP address to the first terminal device;
其中,第二IP地址是用于第一终端设备根据第一接入端口信息接入网络的IP地址,且第二IP地址与第一IP地址不相同。The second IP address is an IP address used by the first terminal device to access the network according to the first access port information, and the second IP address is different from the first IP address.
在本申请实施例中,网络设备未检测到第一对应关系,可以理解为,在预留期限外网络设备未检测到第一对应关系。换句话说,从网络设备确定第一对应关系时对应的时刻至网络设备接收到第一接入请求时对应的时刻大于预留期限,在此情况下,网络设备删除第一对应关系,故在预留期限外网络设备将检测不到第一对应关系。In this embodiment of the present application, the network device does not detect the first correspondence, which can be understood as the network device does not detect the first correspondence outside the reservation period. In other words, the time corresponding to the time when the network device determines the first correspondence to the time corresponding to when the network device receives the first access request is greater than the reservation period. In this case, the network device deletes the first correspondence, so at Outside the reservation period, the network device will not be able to detect the first correspondence.
可选的,在网络设备确定第一终端设备由在线状态切换为下线状态之后,还包括:Optionally, after the network device determines that the first terminal device is switched from the online state to the offline state, the method further includes:
网络设备接收第二终端设备的第二接入请求信息,第二接入请求信息用于请求网络设备为第二终端设备分配第二终端设备根据第二接入端口信息接入网络设备的IP地址,第二终端设备与第一终端设备不相同;The network device receives the second access request information of the second terminal device, where the second access request information is used to request the network device to assign to the second terminal device the IP address of the second terminal device accessing the network device according to the second access port information , the second terminal device is different from the first terminal device;
网络设备确定第二终端设备的第二信息与第一信息相同,第二信息包括第二MAC地址和第二接入端口信息,第二MAC地址指示第二终端设备,第二接入端口信息指示网络设备接收第二终端设备的接入请求的第二端口的信息;The network device determines that the second information of the second terminal device is the same as the first information, the second information includes the second MAC address and the second access port information, the second MAC address indicates the second terminal device, and the second access port information indicates The network device receives the information of the second port of the access request of the second terminal device;
网络设备根据第二接入请求和第一对应关系,为第二终端设备分配第一IP地址。The network device allocates the first IP address to the second terminal device according to the second access request and the first correspondence.
其中,网络设备根据第二接入请求信息和第一对应关系,可以为第二终端设备分配第一IP地址,包括:当网络设备检测到第一对应关系,且第一IP地址的状态为预留状态时,为第二终端设备分配第一IP地址。The network device may assign the first IP address to the second terminal device according to the second access request information and the first correspondence, including: when the network device detects the first correspondence and the state of the first IP address is pre-defined In the remaining state, assign the first IP address to the second terminal device.
上述第二接入端口信息可以包括第二虚拟局域网VLAN标识和第二端口标识,第二端口标识用于指示第二端口,第二VLAN标识用于指示第二端口所属的广播域。The above-mentioned second access port information may include a second virtual local area network VLAN identifier and a second port identifier, where the second port identifier is used to indicate the second port, and the second VLAN identifier is used to indicate the broadcast domain to which the second port belongs.
可选的,第二信息还包括第二终端设备的第二接入链路信息,第二接入链路信息指示第二终端设备的物理位置。其中,第二接入链路信息包括option82选项信息,或者,第二 接入链路信息包括以下信息中的至少一种:option18选项信息和option37选项信息。也就是说,第二接入链路信息可以包括option82选项信息。第二接入链路信息可以包括option18选项信息。第二接入链路信息可以包括option37选项信息。第二接入链路信息还可以包括option18选项信息和option37选项。Optionally, the second information further includes second access link information of the second terminal device, where the second access link information indicates the physical location of the second terminal device. Wherein, the second access link information includes option82 option information, or, the second access link information includes at least one of the following information: option18 option information and option37 option information. That is, the second access link information may include option82 option information. The second access link information may include option18 option information. The second access link information may include option37 option information. The second access link information may further include option18 option information and option37 option.
在上述技术方案中,第二信息可以包括第二MAC地址、第二接入端口信息和第二接入链路信息。In the above technical solution, the second information may include the second MAC address, the second access port information and the second access link information.
可选的第二信息还可以包括第二终端设备的DUID。The optional second information may further include the DUID of the second terminal device.
在上述技术方案中,第二信息可以包括第二MAC地址、第二接入端口信息、第二接入链路信息和第二终端设备的DUID。In the above technical solution, the second information may include the second MAC address, the second access port information, the second access link information, and the DUID of the second terminal device.
例如,当第二接入链路信息包括option82选项信息时,第二信息可以包括第二MAC地址、第二VLAN标识、第二端口标识、option82选项信息和第二终端设备的DUID。例如,当第二接入链路信息包括option37选项信息时,第二信息可以包括第二MAC地址、第二VLAN标识、第二端口标识、option37选项信息和第二终端设备的DUID。For example, when the second access link information includes option82 option information, the second information may include the second MAC address, the second VLAN identifier, the second port identifier, option82 option information, and the DUID of the second terminal device. For example, when the second access link information includes option37 option information, the second information may include the second MAC address, the second VLAN identifier, the second port identifier, option37 option information, and the DUID of the second terminal device.
应理解的是,本申请提供的第二信息的形式不局限于上述内容。It should be understood that the form of the second information provided in this application is not limited to the above content.
在另一些实施例中,第二信息还可以仅包括第二MAC地址和第二接入端口信息。In other embodiments, the second information may also include only the second MAC address and the second access port information.
例如,第二信息可以包括第二MAC地址、第二VLAN标识和第二端口信息。For example, the second information may include the second MAC address, the second VLAN identification, and the second port information.
可选的,第二信息还可以仅包括第二MAC地址、第二接入端口信息和第二终端设备的DUID。Optionally, the second information may also include only the second MAC address, the second access port information, and the DUID of the second terminal device.
在又一些实施例中,第二信息还可以仅包括第二MAC地址和第二接入链路信息。In still other embodiments, the second information may also include only the second MAC address and the second access link information.
例如,当第二接入链路信息包括option82选项信息时,第二信息可以包括第二MAC地址和option82选项信息。例如,当第二接入链路信息包括option18选项信息时,第二信息可以包括第二MAC地址和option18选项信息。For example, when the second access link information includes option82 option information, the second information may include the second MAC address and option82 option information. For example, when the second access link information includes option18 option information, the second information may include the second MAC address and option18 option information.
可选的,第二信息还可以仅包括第二MAC地址、第二接入链路信息和第二终端设备的DUID。Optionally, the second information may also include only the second MAC address, the second access link information, and the DUID of the second terminal device.
在本申请实施例中,第二终端设备的第二信息与第一信息相同,可以理解为,第一信息中包括的信息类型与第二信息中包括的信息类型相同,且上述两个相同类型的信息对应的内容相同。In this embodiment of the present application, the second information of the second terminal device is the same as the first information. It can be understood that the type of information included in the first information is the same as the type of information included in the second information, and the above two are of the same type. The information corresponds to the same content.
例如,第一信息包括第一MAC地址,第一VLAN标识和第一端口标识,第二信息包括第二MAC地址,第二VLAN标识和第二端口标识,且第一MAC地址与第二MAC地址相同,第一VLAN标识与第二VLAN标识相同,第一端口标识与第二端口标识相同。在此情况下,可以确定第二信息与第一信息相同。For example, the first information includes a first MAC address, a first VLAN identifier and a first port identifier, the second information includes a second MAC address, a second VLAN identifier and a second port identifier, and the first MAC address and the second MAC address The same, the first VLAN identifier is the same as the second VLAN identifier, and the first port identifier is the same as the second port identifier. In this case, it can be determined that the second information is the same as the first information.
上述技术方案中,当网络设备确定第一终端设备的第一信息和第二终端设备的第二信息相同,且网络设备检测到存在根据第一信息预留的第一IP地址且该第一IP地址的状态为预留状态时,网络设备可以将第一IP地址分配给第二终端设备。In the above technical solution, when the network device determines that the first information of the first terminal device and the second information of the second terminal device are the same, and the network device detects that there is a first IP address reserved according to the first information and the first IP address is When the state of the address is the reserved state, the network device may allocate the first IP address to the second terminal device.
可选的,当网络设备检测到第一对应关系,且第一IP地址的状态为占用状态时,为第二终端设备分配第三IP地址。Optionally, when the network device detects the first correspondence, and the state of the first IP address is in the occupied state, a third IP address is allocated to the second terminal device.
在本申请实施例中,当网络设备检测到第一对应关系,且第一IP地址的状态为占用状态时,可以理解为,第一IP地址可以处于被第一终端设备占用的状态。具体的,网络设备接收到第一终端设备的第一接入请求后,网络设备可以根据第一接入请求和第一对应 关系,为第一终端设备分配第一IP地址,第一终端设备可以使用第一IP地址通过网络设备接入网络。在此情况下,第一IP地址处于被第一终端设备占用的状态。In this embodiment of the present application, when the network device detects the first correspondence and the state of the first IP address is the occupied state, it can be understood that the first IP address may be in the state of being occupied by the first terminal device. Specifically, after the network device receives the first access request from the first terminal device, the network device may assign the first IP address to the first terminal device according to the first access request and the first correspondence, and the first terminal device may Access the network through the network device using the first IP address. In this case, the first IP address is in a state of being occupied by the first terminal device.
其中,第三IP地址是用于第二终端设备根据第二接入端口信息接入网络的IP地址,且第一IP地址与第三IP地址不相同。The third IP address is an IP address used by the second terminal device to access the network according to the second access port information, and the first IP address is different from the third IP address.
上述技术方案中,当网络设备确定第一终端设备的第一信息和第二终端设备的第二信息相同,且网络设备检测到存在根据第一信息预留的第一IP地址且该第一IP地址的状态为占用状态时,网络设备可以将处于未占用状态的第三IP地址分配给第二终端设备。In the above technical solution, when the network device determines that the first information of the first terminal device and the second information of the second terminal device are the same, and the network device detects that there is a first IP address reserved according to the first information and the first IP address is When the state of the address is the occupied state, the network device may assign the third IP address in the unoccupied state to the second terminal device.
可选的,网络设备获取第二接入请求信息后,如果网络设备未检测到第一对应关系,网络设备还可以执行如下操作:Optionally, after the network device obtains the second access request information, if the network device does not detect the first correspondence, the network device may further perform the following operations:
当网络设备未检测到第一对应关系,且第一IP地址的状态为占用状态时,为第二终端设备分配第三IP地址;或者When the network device does not detect the first correspondence and the state of the first IP address is the occupied state, assign a third IP address to the second terminal device; or
当网络设备未检测到第一对应关系,且第一IP地址的状态为未占用状态时,为第二终端设备分配第一IP地址;When the network device does not detect the first correspondence, and the state of the first IP address is an unoccupied state, assigning the first IP address to the second terminal device;
其中,第三IP地址是用于第二终端设备根据第二接入端口信息接入网络的IP地址,且第一IP地址、第二IP地址以及第三IP地址不相同。The third IP address is an IP address used by the second terminal device to access the network according to the second access port information, and the first IP address, the second IP address and the third IP address are different.
在本申请实施例中,当网络设备未检测到第一对应关系,且第一IP地址的状态为占用状态时,可以理解为,第一IP地址可以处于被除第二终端设备之外的任意一个终端设备占用的状态。例如,在此情况下,第一IP地址可以处于被第一终端设备占用的状态,或者,第一IP地址可以处于被第三终端设备占用的状态,其中,第三终端设备、第二终端设备和第一终端设备为不同的终端设备。In the embodiment of the present application, when the network device does not detect the first correspondence, and the state of the first IP address is the occupied state, it can be understood that the first IP address may be in any state other than the second terminal device. The state in which an end device is occupied. For example, in this case, the first IP address may be in a state of being occupied by a first terminal device, or the first IP address may be in a state of being occupied by a third terminal device, wherein the third terminal device and the second terminal device and the first terminal device are different terminal devices.
上述技术方案中,第一终端设备的第一信息和第二终端设备的第二信息相同的情况下,当网络设备检测到存在根据第一信息预留的第一IP地址且该第一IP地址的状态为占用状态时,网络设备可以将处于未占用状态的第三IP地址分配给第二终端设备,因此第二终端设备可以成功通过网络设备接入网络。In the above technical solution, when the first information of the first terminal device and the second information of the second terminal device are the same, when the network device detects that there is a first IP address reserved according to the first information and the first IP address When the state is the occupied state, the network device can assign the third IP address in the unoccupied state to the second terminal device, so the second terminal device can successfully access the network through the network device.
可选的,在一些实施例中,网络设备检测到第一对应关系,且第一IP地址的状态为占用状态时,为第二终端设备分配第三IP地址之后,还包括:Optionally, in some embodiments, when the network device detects the first correspondence and the state of the first IP address is the occupied state, after allocating the third IP address to the second terminal device, the method further includes:
当网络设备确定第二终端设备在第一时刻由在线状态切换为下线状态,且第一终端设备在第一时刻之前由在线状态切换为下线状态时,将第一对应关系更新为第二对应关系,第二对应关系是第一信息与第三IP地址之间的对应关系,或者是第二信息与第三IP地址之间的对应关系;When the network device determines that the second terminal device switches from the online state to the offline state at the first moment, and the first terminal device switches from the online state to the offline state before the first moment, it updates the first correspondence to the second Correspondence, the second correspondence is the correspondence between the first information and the third IP address, or the correspondence between the second information and the third IP address;
网络设备将第三IP地址的状态由占用状态更新为预留状态,将第一IP地址的状态由占用状态更新为未占用状态。The network device updates the state of the third IP address from the occupied state to the reserved state, and updates the state of the first IP address from the occupied state to the unoccupied state.
可选的,网络设备检测到第一对应关系,且第一IP地址的状态为预留状态时,为第二终端设备分配第一IP地址之后,还包括:Optionally, when the network device detects the first correspondence and the state of the first IP address is the reserved state, after allocating the first IP address to the second terminal device, the method further includes:
当网络设备确定第二终端设备在第二时刻由在线状态切换为下线状态,且第一终端设备在第二时刻之后由在线状态切换为下线状态时,不更新第一对应关系;When the network device determines that the second terminal device switches from the online state to the offline state at the second moment, and the first terminal device switches from the online state to the offline state after the second moment, the first correspondence is not updated;
网络设备将第一IP地址的状态由占用状态更新为预留状态。The network device updates the state of the first IP address from the occupied state to the reserved state.
本申请提供的地址预留的方法,当第一终端设备MAC地址和第二终端设备的MAC地址相同,且第一终端设备的DUID和第二终端设备的DUID相同时,网络设备可以根据 第一信息中的第一接入端口信息和第二信息中的第二接入端口信息进一步识别第一终端设备和第二终端设备。在此情况下,网络设备可以成功地为第一终端设备预留与第一信息对应的IP地址,以及成功地为第二终端设备预留与第二信息对应的IP地址。本申请提供的地址预留的方法,能够更好地满足为终端设备预留地址资源的需求。In the address reservation method provided by this application, when the MAC address of the first terminal device and the MAC address of the second terminal device are the same, and the DUID of the first terminal device and the DUID of the second terminal device are the same, the network device can The first access port information in the information and the second access port information in the second information further identify the first terminal device and the second terminal device. In this case, the network device can successfully reserve the IP address corresponding to the first information for the first terminal device, and successfully reserve the IP address corresponding to the second information for the second terminal device. The address reservation method provided by the present application can better meet the requirement of reserving address resources for terminal equipment.
下面分别结合图3和图4,对方法100中网络设备根据第一信息为第一终端设备分配或预留IP地址的流程进行介绍。应理解,图3和图4仅为示意并不对本申请构成任何限定。例如,对方法100中网络设备根据第二信息为第二终端设备分配或预留IP地址的流程也适用于图3和图4所示的流程。The following describes the process of allocating or reserving an IP address for the first terminal device by the network device according to the first information in the method 100 with reference to FIG. 3 and FIG. 4 respectively. It should be understood that FIG. 3 and FIG. 4 are for illustration only and do not constitute any limitation to the present application. For example, the process of allocating or reserving an IP address for the second terminal device by the network device according to the second information in the method 100 is also applicable to the processes shown in FIG. 3 and FIG. 4 .
现在结合图3,介绍第一终端设备通过网络设备上线时,网络设备根据第一信息为第一终端设备分配IP地址的过程。Referring now to FIG. 3 , when the first terminal device goes online through the network device, the network device allocates an IP address to the first terminal device according to the first information.
图3是本申请提供的网络设备根据第一信息为第一终端设备分配IP地址的方法200的示意性流程图。如图3所示,该方法200可以包括步骤210至步骤251,下面对步骤210至步骤251进行详细介绍。应理解的是,图3仅为示意并不对本申请中网络设备根据第一信息为第一终端设备分配IP地址的方法构成任何限定。FIG. 3 is a schematic flowchart of a method 200 for a network device to assign an IP address to a first terminal device according to the first information provided by the present application. As shown in FIG. 3 , the method 200 may include steps 210 to 251 , and the steps 210 to 251 will be described in detail below. It should be understood that FIG. 3 is only for illustration and does not constitute any limitation to the method for allocating an IP address to the first terminal device by the network device according to the first information in the present application.
步骤210,网络设备配置了基于第一信息为第一终端设备预留第一IP地址的功能,且第一终端设备请求通过网络设备接入网络。 Step 210, the network device is configured with a function of reserving a first IP address for the first terminal device based on the first information, and the first terminal device requests to access the network through the network device.
步骤220,网络设备根据第一信息查询是否存在为第一终端设备预留的IP地址。 Step 220, the network device queries whether there is an IP address reserved for the first terminal device according to the first information.
具体的,当网络设备根据第一信息查询到存在为第一终端设备预留的IP地址时,在步骤220之后执行步骤230;否则,在步骤220之后执行步骤240。Specifically, when the network device finds that there is an IP address reserved for the first terminal device according to the first information, step 230 is performed after step 220; otherwise, step 240 is performed after step 220.
步骤230,网络设备确定基于第一信息为第一终端设备预留的IP地址是第一IP地址,且该第一IP地址的状态处于预留状态。 Step 230, the network device determines that the IP address reserved for the first terminal device based on the first information is the first IP address, and the state of the first IP address is in the reserved state.
具体的,当网络设备确定基于第一信息为第一终端设备预留的IP地址是第一IP地址,且该第一IP地址的状态处于预留状态时,在步骤230之后执行步骤250;否则,在步骤230之后执行步骤240。Specifically, when the network device determines that the IP address reserved for the first terminal device based on the first information is the first IP address, and the state of the first IP address is in the reserved state, step 250 is performed after step 230; otherwise, step 250 is performed. , step 240 is executed after step 230 .
步骤240,网络设备通知第一终端设备可以使用处于未占用状态的第二IP地址接入网络。 Step 240, the network device notifies the first terminal device that the second IP address in the unoccupied state can be used to access the network.
本申请实施例中,对步骤230和步骤240的执行顺序不作具体限定。例如,在步骤220之后,可以先执行步骤230再执行步骤240。或者,在步骤220之后,也可以先执行步骤240再执行步骤230。In this embodiment of the present application, the execution order of step 230 and step 240 is not specifically limited. For example, after step 220, step 230 may be performed first and then step 240 may be performed. Alternatively, after step 220, step 240 may be performed first and then step 230 may be performed.
应理解的是,在步骤240之后,还可以执行步骤241。It should be understood that after step 240, step 241 may also be performed.
步骤241,第一终端设备使用第二IP地址通过网络设备接入网络,并将第二IP地址的状态由未占用状态更新为占用状态。 Step 241, the first terminal device uses the second IP address to access the network through the network device, and updates the state of the second IP address from the unoccupied state to the occupied state.
步骤250,网络设备通知第一终端设备可以使用第一IP地址通过网络设备接入网络。 Step 250, the network device notifies the first terminal device that the first IP address can be used to access the network through the network device.
步骤251,第一终端设备使用第一IP地址通过网络设备接入网络,并将第一IP地址的状态由预留状态更新为占用状态。 Step 251, the first terminal device uses the first IP address to access the network through the network device, and updates the state of the first IP address from the reserved state to the occupied state.
应理解的是,步骤210至步骤251中的第一信息可以是方法100中的第一信息中的任意一种,例如,第一信息可以包括第一MAC地址、第一VLAN标识和第一端口信息,此处不再详细赘述。It should be understood that the first information in steps 210 to 251 may be any one of the first information in the method 100, for example, the first information may include the first MAC address, the first VLAN identifier and the first port information, which will not be described in detail here.
下面结合图4,介绍第一终端设备通过网络设备下线时,网络设备根据第一信息为第 一终端设备预留IP地址的流程图。4, when the first terminal device goes offline through the network device, the network device reserves the IP address for the first terminal device according to the first information.
图4是本申请提供的网络设备根据第一信息为第一终端设备预留IP地址的方法300的示意性流程图。如图4所示,该方法300可以包括步骤310至步骤370,下面对步骤310至步骤370进行详细介绍。FIG. 4 is a schematic flowchart of a method 300 for a network device to reserve an IP address for a first terminal device according to the first information provided by the present application. As shown in FIG. 4 , the method 300 may include steps 310 to 370 , and the steps 310 to 370 will be described in detail below.
步骤310,网络设备配置了基于第一信息为第一终端设备预留第一IP地址的功能,且第一终端设备请求断开通过网络设备接入的网络。 Step 310, the network device is configured with a function of reserving a first IP address for the first terminal device based on the first information, and the first terminal device requests to disconnect the network accessed through the network device.
可以理解的是,步骤310的方法与现有的终端设备请求断开的网络的方法相同,此处不再详细赘述。It can be understood that the method of step 310 is the same as the existing method of requesting a disconnected network by a terminal device, and details are not described herein again.
步骤320,网络设备确定第一信息中是否包括预留期限。 Step 320, the network device determines whether the reservation period is included in the first information.
具体的,当网络设备确定第一信息中包括预留期限时,在步骤320之后执行步骤330;否则,执行步骤340。Specifically, when the network device determines that the first information includes the reservation period, step 330 is performed after step 320; otherwise, step 340 is performed.
步骤330,网络设备将与第一信息对应的第一IP地址预留给第一终端设备,并记录预留期限。Step 330: The network device reserves the first IP address corresponding to the first information to the first terminal device, and records the reservation period.
步骤331,网络设备将第一IP地址的状态由占用状态更新为预留状态。 Step 331, the network device updates the state of the first IP address from the occupied state to the reserved state.
步骤340,网络设备将与第一信息对应的第一IP地址预留给第一终端设备。Step 340: The network device reserves the first IP address corresponding to the first information to the first terminal device.
本申请实施例中,对步骤340和步骤330的执行顺序不作具体限定。例如,在步骤320之后,可以先执行步骤330再执行步骤340。或者,在步骤340之后,可以先执行步骤330再执行步骤330。In this embodiment of the present application, the execution order of step 340 and step 330 is not specifically limited. For example, after step 320, step 330 may be performed first and then step 340 may be performed. Alternatively, after step 340, step 330 may be performed first and then step 330 may be performed.
在步骤340之后,还可以执行步骤341。After step 340, step 341 may also be performed.
步骤341,网络设备将第一IP地址的状态由占用状态更新为预留状态。 Step 341, the network device updates the state of the first IP address from the occupied state to the reserved state.
步骤350,网络设备确定是否超过预留期限。In step 350, the network device determines whether the reservation period has expired.
具体的,当网络设备确定超过预留期限时,执行步骤360;否则,执行步骤370。Specifically, when the network device determines that the reservation period is exceeded, step 360 is performed; otherwise, step 370 is performed.
步骤360,网络设备将第一IP地址的状态由预留状态更新为未占用状态。 Step 360, the network device updates the state of the first IP address from the reserved state to the unoccupied state.
本申请实施例中,对步骤360和步骤370的执行顺序不作具体限定。例如,在步骤350之后,可以先执行步骤360再执行步骤370。或者,在步骤350之后,也可以先执行步骤370再执行步骤360。In this embodiment of the present application, the execution order of step 360 and step 370 is not specifically limited. For example, after step 350, step 360 may be performed first and then step 370 may be performed. Alternatively, after step 350, step 370 may be performed first and then step 360 may be performed.
步骤370,网络设备不对第一IP地址的状态进行更新,即第一IP地址的状态为预留状态。 Step 370, the network device does not update the state of the first IP address, that is, the state of the first IP address is the reserved state.
其中,步骤310至步骤370中的第一信息可以是方法100中的第一信息中的任意一种,例如,第一信息可以包括第一MAC地址、第一VLAN标识、第一端口信息和预留期限,此处不再详细赘述。The first information in steps 310 to 370 may be any of the first information in method 100, for example, the first information may include the first MAC address, the first VLAN identifier, the first port information and the preset The retention period will not be described in detail here.
应理解的是,图4仅为示意并不对本申请中网络设备根据第一信息为第一终端设备预留IP地址的方法构成任何限定。例如,在一些实施例中,第一信息还可以不包括预留期限,此时,网络设备仅需要执行步骤310、步骤320、步骤340和步骤341。也就是说,在第一信息不包括预留期限的情况下,上述步骤330、步骤331、步骤350、步骤360是可选步骤。It should be understood that FIG. 4 is only for illustration and does not constitute any limitation to the method for the network device to reserve an IP address for the first terminal device according to the first information in this application. For example, in some embodiments, the first information may not include a reservation period, and in this case, the network device only needs to perform steps 310 , 320 , 340 and 341 . That is, in the case where the first information does not include the reservation period, the above steps 330, 331, 350, and 360 are optional steps.
上文,结合图1至图4具体介绍了本申请提供的地址预留的方法以及适用于该方法的***架构。下面,结合图5至图7,介绍本申请提供的地址预留的方法的3个具体的实施例。The method for address reservation provided by the present application and the system architecture suitable for the method are described in detail above with reference to FIG. 1 to FIG. 4 . Below, with reference to FIGS. 5 to 7 , three specific embodiments of the address reservation method provided by the present application are introduced.
图5是本申请提供的地址预留的方法400的示意性流程图。如图5所示,方法400可以包括步骤410至步骤450,下面对步骤410至步骤450进行介绍。FIG. 5 is a schematic flowchart of a method 400 for address reservation provided by the present application. As shown in FIG. 5 , the method 400 may include steps 410 to 450 , and the steps 410 to 450 will be described below.
步骤410,终端设备110(即,上述方法100、方法200或方法300中的第一终端设备的一例)通过网络设备130接入IP网络,网络设备130(即,上述方法100、方法200或方法300中的网络设备的一例)获取第一信息和IP地址#1(即,上述方法100、方法200或方法300中的第一IP地址的一例),第一信息包括第一MAC、第一VLAN标识、第一端口标识和预留期限。In step 410, the terminal device 110 (ie, an example of the first terminal device in the above-mentioned method 100, method 200 or method 300) accesses the IP network through the network device 130, and the network device 130 (ie, the above-mentioned method 100, method 200 or method An example of the network device in 300) obtains first information and IP address #1 (that is, an example of the first IP address in the above method 100, method 200 or method 300), the first information includes the first MAC, the first VLAN identification, first port identification and reservation period.
终端设备110通过网络设备130接入网络后,可以理解为,网络设备130为终端设备110分配IP地址后,终端设备110使用网络设备130分配的IP地址通过网络设备130接入网络。可以理解的是,网络设备130为终端设备110分配的IP地址可以是网络设备130本地地址池中的一个IP地址(例如,IPv6地址)。其中,网络设备130可以是BRAS设备。After the terminal device 110 accesses the network through the network device 130 , it can be understood that after the network device 130 assigns an IP address to the terminal device 110 , the terminal device 110 uses the IP address assigned by the network device 130 to access the network through the network device 130 . It can be understood that the IP address allocated by the network device 130 to the terminal device 110 may be an IP address (eg, an IPv6 address) in the local address pool of the network device 130 . The network device 130 may be a BRAS device.
在本申请实施例中,第一信息可以包括第一MAC、第一VLAN标识、第一端口标识和预留期限。其中,关于第一MAC、第一VLAN标识、第一端口标识和预留期限的详细描述可以参见方法100,此处不再详细赘述。In this embodiment of the present application, the first information may include a first MAC, a first VLAN identifier, a first port identifier, and a reservation period. For a detailed description of the first MAC, the first VLAN identifier, the first port identifier, and the reservation period, reference may be made to the method 100, and details are not repeated here.
IP地址#1可以是IP地址。IP地址#1也可以是IP地址前缀。IP address #1 may be an IP address. IP address #1 may also be an IP address prefix.
步骤420,网络设备130确定第一对应关系。Step 420, the network device 130 determines the first correspondence.
其中,第一对应关系可以理解为,第一信息和IP地址#1之间的对应关系。The first correspondence may be understood as the correspondence between the first information and the IP address #1.
网络设备130获取到第一信息和IP地址#1后,网络设备130可以确定第一对应关系。After the network device 130 obtains the first information and the IP address #1, the network device 130 may determine the first correspondence.
步骤430,在预留期限内,网络设备130确定终端设备110由在线状态切换为下线状态时,根据第一对应关系将第一信息对应的IP地址#1的状态确定为预留状态。Step 430, within the reservation period, when the network device 130 determines that the terminal device 110 is switched from the online state to the offline state, it determines the state of the IP address #1 corresponding to the first information as the reserved state according to the first correspondence.
应理解的是,在预留期限外,网络设备130可以删除第一对应关系,并将第一信息对应的IP地址#1的状态由预留状态更新为未占用状态。It should be understood that, outside the reservation period, the network device 130 may delete the first correspondence, and update the state of the IP address #1 corresponding to the first information from the reserved state to the unoccupied state.
步骤440,网络设备130接收到终端设备110发送的第一接入请求信息。Step 440 , the network device 130 receives the first access request information sent by the terminal device 110 .
第一接入请求信息用于请求网络设备130为终端设备110分配终端设备110根据第一接入端口信息接入网络设备130的IP地址。The first access request information is used to request the network device 130 to assign the terminal device 110 an IP address for the terminal device 110 to access the network device 130 according to the first access port information.
步骤450,在预留期限内,网络设备130根据第一接入请求信息和第一对应关系,为终端设备110分配IP地址#1,并将IP地址#1的状态更新为占用状态。Step 450, within the reservation period, the network device 130 allocates IP address #1 to the terminal device 110 according to the first access request information and the first correspondence, and updates the state of IP address #1 to the occupied state.
在预留期限内,可以理解为,从网络设备确定第一对应关系时对应的时刻至网络设备接收到终端设备110发送的第一接入请求时对应的时刻小于预留期限。Within the reservation period, it can be understood that the time corresponding to the time when the network device determines the first correspondence to the time corresponding to when the network device receives the first access request sent by the terminal device 110 is less than the reservation period.
在预留期限内,网络设备130可以根据第一接入请求信息和第一对应关系,为终端设备110分配IP地址#1,具体包括:网络设备130检测到第一对应关系,且IP地址#1的状态为预留状态时,网络设备130为终端设备110分配IP地址#1。Within the reservation period, the network device 130 may allocate the IP address #1 to the terminal device 110 according to the first access request information and the first correspondence, which specifically includes: the network device 130 detects the first correspondence, and the IP address #1 When the state of 1 is the reserved state, the network device 130 assigns the IP address #1 to the terminal device 110 .
可选的,如果网络设备130确定接收到第一接入请求信息时对应的时刻在预留期限外,网络设备130还可以根据第一接入请求为终端设备110分配IP地址。Optionally, if the network device 130 determines that the time corresponding to receiving the first access request information is outside the reservation period, the network device 130 may also allocate an IP address to the terminal device 110 according to the first access request.
具体的,在预留期限外,如果网络设备130确定IP地址#1的状态为未占用状态,网络设备130根据第一接入请求可以为终端设备110分配IP地址#1,并将IP地址#1的状态更新为占用状态。Specifically, outside the reservation period, if the network device 130 determines that the state of the IP address #1 is the unoccupied state, the network device 130 may allocate the IP address #1 to the terminal device 110 according to the first access request, and assign the IP address #1 to the terminal device 110. The state of 1 is updated to the occupied state.
具体的,在预留期限外,如果网络设备130确定IP地址#1的状态为占用状态,网络 设备130根据第一接入请求可以为终端设备110分配第二IP地址,并将第二IP地址的状态更新为占用状态,其中IP地址#1和第二IP地址为不相同的IP地址。Specifically, outside the reservation period, if the network device 130 determines that the state of the IP address #1 is the occupied state, the network device 130 can allocate a second IP address to the terminal device 110 according to the first access request, and assign the second IP address to the second IP address. The state is updated to the occupied state, wherein the IP address #1 and the second IP address are different IP addresses.
在预留期限外,可以理解为,从网络设备确定第一对应关系时对应的时刻至网络设备接收到终端设备110发送的第一接入请求时对应的时刻大于预留期限。Outside the reservation period, it can be understood that the time corresponding to the time when the network device determines the first correspondence to the time corresponding to when the network device receives the first access request sent by the terminal device 110 is greater than the reservation period.
应理解,图5仅为示意并不对本申请构成任何限定。例如,第一信息可以包括第一MAC、第一VLAN标识、第一端口标识、终端设备110的DUID和预留期限。例如,第一信息可以包括第一MAC、第一接入链路信息和预留期限。例如,第一信息可以包括第一MAC、第一接入链路信息和option82选项信息。例如,第一信息可以包括第一MAC、第一接入链路信息和option37选项信息。例如,终端设备110还可以是图1中的终端设备111。It should be understood that FIG. 5 is only for illustration and does not constitute any limitation to the present application. For example, the first information may include the first MAC, the first VLAN ID, the first port ID, the DUID of the terminal device 110 and the reservation period. For example, the first information may include the first MAC, the first access link information and the reservation period. For example, the first information may include the first MAC, the first access link information, and option82 option information. For example, the first information may include the first MAC, the first access link information, and option37 option information. For example, the terminal device 110 may also be the terminal device 111 in FIG. 1 .
本申请实施例提供的地址预留的方法,在终端设备110下线后,网络设备可以根据第一信息为终端设备110预留终端设备110在本次下线之前使用的IP地址#1。在此之后且在预留期限内,当网络设备130接收到终端设备110的上线请求时,网络设备130可以根据第一信息更加准确地识别终端设备110,并将处于预留状态的的IP地址#1分配给终端设备110,从而可以提高终端设备110接入网络的效率。In the address reservation method provided by this embodiment of the present application, after the terminal device 110 goes offline, the network device may reserve the IP address #1 used by the terminal device 110 before the current offline for the terminal device 110 according to the first information. After that and within the reservation period, when the network device 130 receives the online request of the terminal device 110, the network device 130 can more accurately identify the terminal device 110 according to the first information, and use the reserved IP address #1 is allocated to the terminal device 110, so that the efficiency of the terminal device 110 accessing the network can be improved.
图6是本申请提供的地址预留的方法500的示意性流程图。如图6所示,方法500可以包括步骤510至步骤570,下面对步骤510至步骤570进行介绍。FIG. 6 is a schematic flowchart of a method 500 for address reservation provided by the present application. As shown in FIG. 6 , the method 500 may include steps 510 to 570 , and the steps 510 to 570 will be described below.
步骤510,终端设备110(即,上述方法100、方法200或方法300中的第一终端设备的一例)通过网络设备130(即,上述方法100、方法200或方法300中的网络设备的一例)接入IP网络后,网络设备130获取第一信息和IP地址#1(即,上述方法100、方法200或方法300中的第一IP地址的一例),第一信息包括第一MAC地址、第一VLAN标识、第一端口标识和预留期限。Step 510, the terminal device 110 (ie, an example of the first terminal device in the above method 100, method 200 or method 300) passes through the network device 130 (ie, an example of the network device in the above method 100, method 200 or method 300) After accessing the IP network, the network device 130 obtains first information and IP address #1 (that is, an example of the first IP address in the above method 100, method 200, or method 300), where the first information includes the first MAC address, the first IP address, and the first IP address. A VLAN ID, a first port ID, and a reservation period.
步骤520,网络设备130确定第一对应关系。Step 520, the network device 130 determines the first correspondence.
步骤530,网络设备130确定终端设备110由在线状态切换为下线状态时,根据第一对应关系将第一信息对应的IP地址#1的状态确定为预留状态。Step 530 , when the network device 130 determines that the terminal device 110 is switched from the online state to the offline state, it determines the state of the IP address #1 corresponding to the first information as the reserved state according to the first correspondence.
步骤540,网络设备130接收到终端设备110发送的第一接入请求信息。Step 540: The network device 130 receives the first access request information sent by the terminal device 110.
步骤550,网络设备130根据第一接入请求信息和第一对应关系,为终端设备110分配IP地址#1,并将IP地址#1的状态更新为占用状态。In step 550, the network device 130 allocates the IP address #1 to the terminal device 110 according to the first access request information and the first correspondence, and updates the state of the IP address #1 to the occupied state.
步骤560,网络设备130接收到终端设备110发送的第二接入请求信息。Step 560 , the network device 130 receives the second access request information sent by the terminal device 110 .
步骤570,网络设备130根据第二接入请求信息和第一对应关系,为终端设备111分配IP地址#2。Step 570: The network device 130 allocates an IP address #2 to the terminal device 111 according to the second access request information and the first correspondence.
上述步骤510至步骤570中每个步骤的具体实现方式,可以参见方法100和/或方法400对应的内容,此处不再详细赘述。For the specific implementation manner of each step in the above steps 510 to 570, reference may be made to the content corresponding to the method 100 and/or the method 400, and details are not described herein again.
应理解,图6仅为示意并不对本申请构成任何限定。例如,第一信息可以包括第一MAC、第一VLAN标识、第一端口标识、终端设备110的DUID和预留期限。例如,还可以包括更多数目的终端设备111和/或更多数目的终端设备110。例如,上述方法500中的option82选项信息还可以替换为option37选项信息或option18选项信息。例如,上述方法500中的option82选项信息还可以替换为option37选项信息和option18选项信息。It should be understood that FIG. 6 is only for illustration and does not constitute any limitation to the present application. For example, the first information may include the first MAC, the first VLAN ID, the first port ID, the DUID of the terminal device 110 and the reservation period. For example, a greater number of terminal devices 111 and/or a greater number of terminal devices 110 may also be included. For example, option82 option information in the above method 500 may also be replaced with option37 option information or option18 option information. For example, option82 option information in the above method 500 may also be replaced with option37 option information and option18 option information.
本申请实施例提供的地址预留的方法,在终端设备110下线后,网络设备可以根据第 一信息为终端设备110预留终端设备110在本次下线之前使用的IP地址#1。在此之后,当网络设备130接收到终端设备111的上线请求,且网络设备130确定终端设备111的第二信息与第一信息相同,且IP地址#1的状态为预留状态时,网络设备130可以将处于预留状态的的IP地址#1分配给终端设备111,从而可以提高终端设备111接入网络的效率。In the address reservation method provided by the embodiment of the present application, after the terminal device 110 goes offline, the network device can reserve the IP address #1 used by the terminal device 110 before the current offline for the terminal device 110 according to the first information. After that, when the network device 130 receives the online request of the terminal device 111, and the network device 130 determines that the second information of the terminal device 111 is the same as the first information, and the state of the IP address #1 is the reserved state, the network device 130 can allocate the IP address #1 in the reserved state to the terminal device 111, so that the efficiency of the terminal device 111 accessing the network can be improved.
在一些特殊的场景中,例如,图1中的终端设备110的MAC地址和终端设备111的MAC地址都相同且为MAC地址#1,终端设备110的DUID和终端设备111的DUID都相同且为DUID#1的场景中。配置了网络设备130可以根据MAC地址#1和DUID#1预留IP地址的功能的情况下,终端设备110的状态处于在线状态,终端设备111向网络设备130请求分配IP地址,网络设备130根据MAC地址#1和DUID#1查询到基于MAC地址#1和DUID#1预留的IP地址为IP地址#1,且该IP地址#1的状态为占用状态时,采用现有地址预留的方法,网络设备130无法成功为终端设备111分配IP地址,因此终端设备111不能通过网络设备130成功上线,从而导致终端设备111不能正常在线工作。In some special scenarios, for example, the MAC address of the terminal device 110 and the MAC address of the terminal device 111 in FIG. 1 are the same and are MAC address #1, and the DUID of the terminal device 110 and the DUID of the terminal device 111 are both the same and are in the scene of DUID#1. When the function that the network device 130 can reserve an IP address according to the MAC address #1 and DUID #1 is configured, the state of the terminal device 110 is in the online state, the terminal device 111 requests the network device 130 to allocate an IP address, and the network device 130 according to When MAC address #1 and DUID #1 query and find that the IP address reserved based on MAC address #1 and DUID #1 is IP address #1, and the status of this IP address #1 is occupied, use the reserved IP address of the existing address. In the method, the network device 130 cannot successfully assign an IP address to the terminal device 111, so the terminal device 111 cannot go online successfully through the network device 130, so that the terminal device 111 cannot work normally online.
本申请实施例提供的地址预留的方法,第一信息还可以仅包括第一MAC地址、终端设备110的DUID,网络设备130根据第一信息可以在终端设备110通过网络设备130上线且终端设备110的状态为在线状态的情况下,成功为终端设备111分配IP地址。In the address reservation method provided by this embodiment of the present application, the first information may only include the first MAC address and the DUID of the terminal device 110. When the state of 110 is the online state, the IP address is successfully allocated to the terminal device 111 .
下面结合图7,具体介绍根据本申请提供的地址预留的方法,网络设备基于MAC地址和终端设备的DUID,在终端设备110通过网络设备130上线且终端设备110的状态为在线状态的情况下,如何成功地为终端设备111分配IP地址的方案。The following describes the address reservation method provided by the present application in detail with reference to FIG. 7 . The network device is based on the MAC address and the DUID of the terminal device. When the terminal device 110 goes online through the network device 130 and the state of the terminal device 110 is the online state , how to successfully assign an IP address to the terminal device 111.
图7是本申请提供的地址预留的方法600的示意性流程图。如图7所示,方法600可以包括步骤610至步骤680,下面对步骤610至步骤680进行介绍。FIG. 7 is a schematic flowchart of a method 600 for address reservation provided by the present application. As shown in FIG. 7 , the method 600 may include steps 610 to 680 , and the steps 610 to 680 will be described below.
步骤610,终端设备110(即,上述方法100、方法200或方法300中的第一终端设备的一例)通过网络设备130(即,上述方法100、方法200或方法300中的网络设备的一例)接入IP网络后,网络设备130获取第一信息和IP地址#1(即,上述方法100、方法200或方法300中的第一IP地址的一例),第一信息包括第一MAC地址和终端设备110的DUID。Step 610, the terminal device 110 (ie, an example of the first terminal device in the above method 100, method 200 or method 300) passes through the network device 130 (ie, an example of the network device in the above method 100, method 200 or method 300) After accessing the IP network, the network device 130 obtains first information and IP address #1 (ie, an example of the first IP address in the above method 100, method 200 or method 300), the first information includes the first MAC address and the terminal DUID of device 110.
步骤620,网络设备130确定第一对应关系。Step 620, the network device 130 determines the first correspondence.
步骤630,网络设备130确定终端设备110由在线状态切换为下线状态时,根据第一对应关系将第一信息对应的IP地址#1的状态确定为预留状态Step 630, when the network device 130 determines that the terminal device 110 is switched from the online state to the offline state, it determines the state of the IP address #1 corresponding to the first information as the reserved state according to the first correspondence
步骤640,网络设备130接收终端设备110的第一接入请求消息。Step 640 , the network device 130 receives the first access request message from the terminal device 110 .
其中,第一接入请求信息用于请求网络设备130为终端设备110分配终端设备110根据第一信息接入网络设备130的IP地址。终端设备110的第一信息可以包括第一MAC地址和终端设备110的DUID。其中,关于第一MAC地址、终端设备110的DUID的详细描述可以参见方法100,此处不再详细赘述。The first access request information is used to request the network device 130 to assign the terminal device 110 an IP address for the terminal device 110 to access the network device 130 according to the first information. The first information of the terminal device 110 may include the first MAC address and the DUID of the terminal device 110 . For a detailed description of the first MAC address and the DUID of the terminal device 110, reference may be made to the method 100, and details are not repeated here.
步骤650,网络设备130根据第一接入请求信息和第一对应关系,为终端设备110分配IP地址#1,并将IP地址#1的状态由预留状态更新为占用状态。Step 650, the network device 130 allocates IP address #1 to the terminal device 110 according to the first access request information and the first correspondence, and updates the state of the IP address #1 from the reserved state to the occupied state.
步骤660,网络设备130接收终端设备111(即,上述方法100、方法200或方法300中的第二终端设备的一例)的第二接入请求消息。Step 660, the network device 130 receives the second access request message from the terminal device 111 (ie, an example of the second terminal device in the above method 100, method 200 or method 300).
其中,第二接入请求信息用于请求网络设备130为终端设备111分配终端设备111根据第二信息接入网络设备130的IP地址。终端设备111的第二信息可以包括第二MAC地 址和终端设备111的DUID。其中,关于第二MAC地址、终端设备111的DUID的详细描述可以参见方法100,此处不再详细赘述。The second access request information is used to request the network device 130 to assign the terminal device 111 an IP address for the terminal device 111 to access the network device 130 according to the second information. The second information of the terminal device 111 may include the second MAC address and the DUID of the terminal device 111. For a detailed description of the second MAC address and the DUID of the terminal device 111, reference may be made to the method 100, and details are not repeated here.
步骤670,网络设备130根据第二接入请求信息和第一对应关系,为终端设备111分配IP地址#2(即,上述方法100、方法200或方法300中的第三IP地址的一例)。Step 670: The network device 130 allocates IP address #2 (ie, an example of the third IP address in the above method 100, method 200 or method 300) to the terminal device 111 according to the second access request information and the first correspondence.
具体的,网络设备130根据第二接入请求信息和第一对应关系,为终端设备111分配第三IP地址,具体包括:Specifically, the network device 130 allocates a third IP address to the terminal device 111 according to the second access request information and the first correspondence, which specifically includes:
网络设备130确定第一MAC地址与第二MAC地址相同,且终端设备110的DUID与终端设备111的DUID相同;The network device 130 determines that the first MAC address is the same as the second MAC address, and the DUID of the terminal device 110 is the same as the DUID of the terminal device 111;
当网络设备130检测到第一对应关系,且IP地址#1的状态为占用状态时,为第一终端设备分配IP地址#2。When the network device 130 detects the first correspondence, and the state of the IP address #1 is the occupied state, the first terminal device is allocated an IP address #2.
其中,IP地址#2为未占用的地址,IP地址#2与IP地址#1不相同,第一对应关系可以理解,IP#1或IP#2和第一信息的对应关系。第一对应关系还可以理解为,IP#1或IP#2和第二信息的对应关系。The IP address #2 is an unoccupied address, and the IP address #2 is different from the IP address #1. The first correspondence can be understood as the correspondence between IP#1 or IP#2 and the first information. The first correspondence can also be understood as the correspondence between IP#1 or IP#2 and the second information.
步骤680,网络设备130比较终端设备110由在线状态切换为下线状态时对应的时刻与终端设备111由在线状态切换为下线状态时对应的时刻,确定是否将第一对应关系更新为第二对应关系。In step 680, the network device 130 compares the time corresponding to the time when the terminal device 110 is switched from the online state to the offline state with the time corresponding to the time when the terminal device 111 is switched from the online state to the offline state, and determines whether to update the first correspondence to the second. Correspondence.
在一些实现方式中,当网络设备130确定终端设备111在第一时刻由在线状态切换为下线状态,且终端设备110在第一时刻之前由在线状态切换为下线状态时,将第一对应关系更新为第二对应关系,第二对应关系是第一信息与IP地址#2之间的对应关系,或者是第二信息与IP地址#2之间的对应关系;以及网络设备130将IP地址#2的状态由占用状态更新为预留状态,将第一IP地址的状态由占用状态更新为未占用状态。In some implementations, when the network device 130 determines that the terminal device 111 switches from the online state to the offline state at the first moment, and the terminal device 110 switches from the online state to the offline state before the first moment, the first corresponding The relationship is updated to a second corresponding relationship, and the second corresponding relationship is the corresponding relationship between the first information and the IP address #2, or the corresponding relationship between the second information and the IP address #2; and the network device 130 converts the IP address The state of #2 is updated from the occupied state to the reserved state, and the state of the first IP address is updated from the occupied state to the unoccupied state.
在另一些实现方式中,当网络设备130确定第二终端设备在第二时刻由在线状态切换为下线状态,且终端设备110在第二时刻之后由在线状态切换为下线状态时,不更新第一对应关系;以及网络设备130将第一IP地址的状态由占用状态更新为预留状态。In other implementations, when the network device 130 determines that the second terminal device switches from the online state to the offline state at the second moment, and the terminal device 110 switches from the online state to the offline state after the second moment, no update is made. a first correspondence; and the network device 130 updates the state of the first IP address from the occupied state to the reserved state.
本申请实施例中,对第一时刻和第二时刻不作具体限定。例如,第一时刻可以为第二时刻之前的时刻。或者,第一时刻也可以为第二时刻之后的时刻。In this embodiment of the present application, the first moment and the second moment are not specifically limited. For example, the first moment may be a moment before the second moment. Alternatively, the first time may be a time after the second time.
应理解,图7仅为示意并不对本申请构成任何限定。例如,第一信息还可以包括租约期限。例如,第一信息还可以是本申请方法100中涉及到的任意一种第一信息。It should be understood that FIG. 7 is only for illustration and does not constitute any limitation to the present application. For example, the first information may also include a lease term. For example, the first information may also be any kind of first information involved in the method 100 of the present application.
与现有技术相比,本申请实施例提供的地址预留的方法,在网络设备130根据第一对应关系将预留的IP地址#1分配给终端设备110,且终端设备110由下线状态切换为上线状态的情况下,当网络设备130接收到与终端设备110具有相同MAC地址以及相同DUID的终端设备111接入请求时,网络设备130仍然可以将未使用的IP地址#2分配给终端设备111,其中,IP地址#2与IP地址#1不相同。Compared with the prior art, in the address reservation method provided by the embodiment of the present application, the network device 130 allocates the reserved IP address #1 to the terminal device 110 according to the first correspondence, and the terminal device 110 is in the offline state. In the case of switching to the online state, when the network device 130 receives an access request from the terminal device 111 that has the same MAC address and the same DUID as the terminal device 110, the network device 130 can still assign the unused IP address #2 to the terminal Device 111, wherein IP address #2 is not the same as IP address #1.
上文结合图1至图7,详细描述了本申请提供的一种地址预留的方法以及适用于该方法的***架构。下面,结合图8至图11详细介绍本申请提供的网络设备,以及网络设备的硬件结构。应理解,方法实施例的描述与装置实施例的描述相互对应,因此,未详细描述的部分可以参见前面方法实施例。A method for address reservation provided by the present application and a system architecture suitable for the method are described in detail above with reference to FIG. 1 to FIG. 7 . Hereinafter, the network device provided by the present application and the hardware structure of the network device will be described in detail with reference to FIG. 8 to FIG. 11 . It should be understood that the descriptions of the method embodiments correspond to the descriptions of the apparatus embodiments. Therefore, for the parts not described in detail, reference may be made to the foregoing method embodiments.
图8是本申请提供的一种网络设备1000的结构示意图,设备1000具有上述方法100、方法200、方法300中的网络设备或具有上述方法400、方法500中的网络设备130的任 意功能。如图8所示,网络设备1000包括获取单元1010,用于执行上述步骤110中获取第一信息和第一IP地址相关的步骤440、步骤540、步骤640或步骤660等;可选的,该网络设备1000还包括:确定单元1020,用于执行上述步骤120、步骤130、步骤220、步骤230、步骤420、步骤520或步骤630等;可选的,该网络设备1000还包括:处理单元1040,用于执行上述步骤中第IP地址的状态进行更新的相关步骤或上述步骤中将终端设备通过网络设备接入网络的相关步骤等。8 is a schematic structural diagram of a network device 1000 provided by the present application. The device 1000 has the network device in the above-mentioned method 100, method 200, and method 300, or has any function of the network device 130 in the above-mentioned method 400 and method 500. As shown in FIG. 8 , the network device 1000 includes an obtaining unit 1010 for executing steps 440 , 540 , 640 or 660 related to obtaining the first information and the first IP address in the foregoing step 110 ; optionally, the The network device 1000 further includes: a determining unit 1020 for performing the above steps 120, 130, 220, 230, 420, 520 or 630, etc.; optionally, the network device 1000 further includes: a processing unit 1040 , which is used to perform the relevant steps of updating the state of the first IP address in the above steps or the relevant steps of connecting the terminal device to the network through the network device in the above steps, and the like.
网络设备1000对应于上述方法实施例中的网络设备,如:网络设备130,网络设备1000中的各模块和上述其他操作和/或功能分别为了实现方法实施例中的网络设备所实施的各种步骤和方法,具体细节可参见上述方法100、方法200、方法300、方法400或方法500,为了简洁,在此不再赘述。The network device 1000 corresponds to the network device in the above method embodiments, such as: the network device 130, the modules in the network device 1000 and the other operations and/or functions described above are respectively implemented to implement various methods implemented by the network device in the method embodiments. For details of the steps and methods, refer to the above-mentioned method 100 , method 200 , method 300 , method 400 or method 500 , which are not repeated here for brevity.
网络设备1000在进行地址预留时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将网络设备1000的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。When the network device 1000 performs address reservation, only the division of the above-mentioned functional modules is used as an example. Different functional modules to complete all or part of the functions described above.
与本申请提供的方法实施例以及虚拟装置实施例相对应,本申请实施例还提供了一种网络设备,下面对网络设备的硬件结构进行介绍。Corresponding to the method embodiments and the virtual apparatus embodiments provided in the present application, the embodiments of the present application further provide a network device, and the hardware structure of the network device is introduced below.
下面描述的网络设备1100或网络设备1200对应于上述方法实施例中的网络设备,网络设备1100或网络设备1200中的各硬件、模块和上述其他操作和/或功能分别为了实现方法实施例中的网络设备1100或网络设备1200所实施的各种步骤和方法,关于网络设备1100或网络设备1200如何基于网络设备为终端设备预留地址的详细流程,具体细节可参见上述方法实施例,为了简洁,在此不再赘述。其中,上文方法100、方法200、方法300、方法400或方法500的各步骤通过网络设备1100或网络设备1200处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述The network device 1100 or the network device 1200 described below corresponds to the network device in the foregoing method embodiments, and the hardware, modules, and the foregoing other operations and/or functions in the network device 1100 or the network device 1200 are respectively for implementing the method embodiments. For the various steps and methods implemented by the network device 1100 or the network device 1200, the detailed process of how the network device 1100 or the network device 1200 reserves an address for the terminal device based on the network device can refer to the above method embodiments for details. For brevity, It is not repeated here. Wherein, each step of the above method 100 , method 200 , method 300 , method 400 or method 500 is completed by an integrated logic circuit of hardware in the processor of the network device 1100 or the network device 1200 or instructions in the form of software. The steps of the methods disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here
网络设备1100或网络设备1200对应于上述虚拟装置实施例中的网络设备1000中的每个功能模块采用网络设备1100或网络设备1200的软件实现。换句话说,网络设备1000包括的功能模块为网络设备1100或网络设备1200的处理器读取存储器中存储的程序代码后生成的。The network device 1100 or the network device 1200 corresponds to each functional module in the network device 1000 in the foregoing virtual appliance embodiment, and is implemented by using the software of the network device 1100 or the network device 1200 . In other words, the functional modules included in the network device 1000 are generated after the processor of the network device 1100 or the network device 1200 reads the program codes stored in the memory.
参见图9,图9是本申请提供的一种网络设备1100的结构示意图,该网络设备1100可以配置为网络设备。该网络设备1100可以由一般性的总线体系结构来实现。Referring to FIG. 9 , FIG. 9 is a schematic structural diagram of a network device 1100 provided by the present application, and the network device 1100 may be configured as a network device. The network device 1100 may be implemented by a general bus architecture.
网络设备1000包括至少一个处理器1101、通信总线1102、存储器1103以及至少一个通信接口1104。The network device 1000 includes at least one processor 1101 , a communication bus 1102 , a memory 1103 , and at least one communication interface 1104 .
处理器1101可以是一个通用CPU、NP、微处理器、或者可以是一个或多个用于实现本申请方案的集成电路,例如,专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或 其任意组合。The processor 1101 may be a general-purpose CPU, NP, microprocessor, or may be one or more integrated circuits for implementing the solutions of the present application, such as application-specific integrated circuits (ASIC), programmable logic A device (programmable logic device, PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), a general array logic (generic array logic, GAL) or any combination thereof.
通信总线1102用于在上述组件之间传送信息。通信总线1102可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。A communication bus 1102 is used to transfer information between the aforementioned components. The communication bus 1102 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
存储器1103可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,也可以是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器1103可以是独立存在,并通过通信总线1102与处理器1101相连接。存储器1103也可以和处理器1101集成在一起。The memory 1103 can be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or can be random access memory (RAM) or can store information and instructions Other types of dynamic storage devices, it can also be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage , optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or can be used to carry or store desired program code in the form of instructions or data structures and any other medium that can be accessed by a computer, but is not limited thereto. The memory 1103 may exist independently and be connected to the processor 1101 through the communication bus 1102 . The memory 1103 may also be integrated with the processor 1101 .
通信接口1104使用任何收发器一类的装置,用于与其它设备或通信网络通信。通信接口1104包括有线通信接口,还可以包括无线通信接口。其中,有线通信接口例如可以为以太网接口。以太网接口可以是光接口,电接口或其组合。无线通信接口可以为无线局域网(wireless local area networks,WLAN)接口,蜂窝网络通信接口或其组合等。 Communication interface 1104 uses any transceiver-like device for communicating with other devices or a communication network. The communication interface 1104 includes a wired communication interface and may also include a wireless communication interface. Wherein, the wired communication interface may be, for example, an Ethernet interface. The Ethernet interface can be an optical interface, an electrical interface or a combination thereof. The wireless communication interface may be a wireless local area network (wireless local area networks, WLAN) interface, a cellular network communication interface or a combination thereof, and the like.
在具体实现中,作为一种实施例,处理器1101可以包括一个或多个CPU,如图9中所示的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 1101 may include one or more CPUs, such as CPU0 and CPU1 as shown in FIG. 9 .
在具体实现中,作为一种实施例,网络设备1000可以包括多个处理器,如图9中所示的处理器1101和处理器1105。这些处理器中的每一个可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the network device 1000 may include multiple processors, such as the processor 1101 and the processor 1105 as shown in FIG. 9 . Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
在具体实现中,作为一种实施例,网络设备1000还可以包括输出设备1106和输入设备1107。输出设备1106和处理器1101通信,可以以多种方式来显示信息。例如,输出设备1106可以是液晶显示器(liquid crystal display,LCD)、发光二级管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备1107和处理器1101通信,可以以多种方式接收用户的输入。例如,输入设备1107可以是鼠标、键盘、触摸屏设备或传感设备等。In a specific implementation, as an embodiment, the network device 1000 may further include an output device 1106 and an input device 1107 . The output device 1106 is in communication with the processor 1101 and can display information in a variety of ways. For example, the output device 1106 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, a projector, or the like . Input device 1107 is in communication with processor 1101 and can receive user input in a variety of ways. For example, the input device 1107 may be a mouse, a keyboard, a touch screen device or a sensing device, or the like.
在一些实施例中,存储器1103用于存储执行本申请方案的程序代码1110,处理器1101可以执行存储器1103中存储的程序代码1110。也即是,网络设备1000可以通过处理器1101以及存储器1103中的程序代码1110,来实现方法实施例提供的方法100、方法200、方法300、方法400或方法500。In some embodiments, the memory 1103 is used to store the program code 1110 for executing the solutions of the present application, and the processor 1101 can execute the program code 1110 stored in the memory 1103 . That is, the network device 1000 can implement the method 100 , the method 200 , the method 300 , the method 400 or the method 500 provided by the method embodiment through the processor 1101 and the program code 1110 in the memory 1103 .
本申请实施例的网络设备1100可对应于上述各个方法实施例中的网络设备,并且,该网络设备1100中的处理器1101、通信接口1104等可以实现上述各个方法实施例中的设备所具有的功能和/或所实施的各种步骤和方法。为了简洁,在此不再赘述。The network device 1100 in this embodiment of the present application may correspond to the network device in each of the foregoing method embodiments, and the processor 1101, the communication interface 1104, etc. in the network device 1100 may implement the functions of the devices in the foregoing method embodiments. functions and/or various steps and methods implemented. For brevity, details are not repeated here.
网络设备1000中的获取单元1010可以相当于网络设备1100中的通信接口1104;网络设备800中的确定单元1020或处理单元1030可以相当于网络设备1100中的处理器1101。The obtaining unit 1010 in the network device 1000 may be equivalent to the communication interface 1104 in the network device 1100 ; the determining unit 1020 or the processing unit 1030 in the network device 800 may be equivalent to the processor 1101 in the network device 1100 .
参见图10,图10是本申请提供的一种网络设备1200的结构示意图,该网络设备1200可以配置为网络设备。网络设备1200包括:主控板1210和接口板1230。Referring to FIG. 10, FIG. 10 is a schematic structural diagram of a network device 1200 provided by the present application, and the network device 1200 may be configured as a network device. The network device 1200 includes: a main control board 1210 and an interface board 1230 .
主控板1210也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板1210用于对网络设备1200中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板1210包括:中央处理器1211和存储器1210。The main control board 1210 is also called the main processing unit (main processing unit, MPU) or the route processor card (route processor card). The main control board 1210 is used to control and manage various components in the network device 1200 Management, equipment maintenance, protocol processing functions. The main control board 1210 includes: a central processing unit 1211 and a memory 1210 .
接口板1230也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板。接口板1230用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板1230包括:中央处理器1231、网络处理器1232、转发表项存储器1234和物理接口卡(ph8sical interface card,PIC)1233。The interface board 1230 is also referred to as a line processing unit (LPU), a line card or a service board. The interface board 1230 is used to provide various service interfaces and realize data packet forwarding. The service interface includes, but is not limited to, an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc. The Ethernet interface is, for example, a flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients). The interface board 1230 includes: a central processing unit 1231 , a network processor 1232 , a forwarding table entry memory 1234 and a physical interface card (ph8sical interface card, PIC) 1233 .
接口板1230上的中央处理器1231用于对接口板1230进行控制管理并与主控板1210上的中央处理器1211进行通信。The central processing unit 1231 on the interface board 1230 is used to control and manage the interface board 1230 and communicate with the central processing unit 1211 on the main control board 1210 .
网络处理器1232用于实现报文的转发处理。网络处理器1232的形态可以是转发芯片。具体而言,网络处理器1232用于基于转发表项存储器1234保存的转发表转发接收到的报文,如果报文的目的地址为网络设备1200的地址,则将该报文上送至CPU(如中央处理器1211)处理;如果报文的目的地址不是网络设备1200的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。其中,上行报文的处理包括:报文入接口的处理,转发表查找;下行报文的处理:转发表查找等等。The network processor 1232 is used to implement packet forwarding processing. The form of the network processor 1232 may be a forwarding chip. Specifically, the network processor 1232 is configured to forward the received message based on the forwarding table stored in the forwarding table entry memory 1234. If the destination address of the message is the address of the network device 1200, the message is sent to the CPU ( Such as processing by the central processing unit 1211); if the destination address of the packet is not the address of the network device 1200, the next hop and outgoing interface corresponding to the destination address are found from the forwarding table according to the destination address, and the packet is forwarded to The outbound interface corresponding to the destination address. Wherein, the processing of the uplink packet includes: processing the incoming interface of the packet, and searching the forwarding table; processing of the downlink packet: searching the forwarding table, and so on.
物理接口卡1233用于实现物理层的对接功能,原始的流量由此进入接口板1230,以及处理后的报文从该物理接口卡1233发出。物理接口卡1233也称为子卡,可安装在接口板1230上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器1232处理。在一些实施例中,中央处理器也可执行网络处理器1232的功能,比如基于通用CPU实现软件转发,从而物理接口卡1233中不需要网络处理器1232。The physical interface card 1233 is used to realize the interconnection function of the physical layer, the original traffic enters the interface board 1230 through this, and the processed packets are sent from the physical interface card 1233 . The physical interface card 1233 is also called a daughter card, which can be installed on the interface board 1230 and is responsible for converting the optoelectronic signal into a message and forwarding the message to the network processor 1232 for processing after checking the validity of the message. In some embodiments, the central processing unit may also perform the functions of the network processor 1232 , such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1232 is not required in the physical interface card 1233 .
可选地,网络设备1200包括多个接口板,例如网络设备1200还包括接口板1240,接口板1240包括:中央处理器1241、网络处理器1242、转发表项存储器1244和物理接口卡1243。Optionally, the network device 1200 includes multiple interface boards. For example, the network device 1200 further includes an interface board 1240 . The interface board 1240 includes a central processing unit 1241 , a network processor 1242 , a forwarding table entry storage 1244 and a physical interface card 1243 .
可选地,网络设备1200还包括交换网板1220。交换网板1220也可以称为交换网板单元(switch fabric unit,SFU)。在网络设备有多个接口板1230的情况下,交换网板1220用于完成各接口板之间的数据交换。例如,接口板1230和接口板1240之间可以通过交换网板1220通信。Optionally, the network device 1200 further includes a switch fabric board 1220 . The switch fabric unit 1220 may also be referred to as a switch fabric unit (switch fabric unit, SFU). When the network device has multiple interface boards 1230, the switching network board 1220 is used to complete data exchange between the interface boards. For example, the interface board 1230 and the interface board 1240 can communicate through the switch fabric board 1220 .
主控板1210和接口板1230耦合。例如。主控板1210、接口板1230和接口板1240,以及交换网板1220之间通过***总线与***背板相连实现互通。在一种可能的实现方式中,主控板1210和接口板1230之间建立进程间通信协议(inter-process communication,IPC)通道,主控板1210和接口板1230之间通过IPC通道进行通信。The main control board 1210 and the interface board 1230 are coupled. E.g. The main control board 1210 , the interface board 1230 , the interface board 1240 , and the switch fabric board 1220 are connected to the system backplane through a system bus to achieve intercommunication. In a possible implementation manner, an inter-process communication (inter-process communication, IPC) channel is established between the main control board 1210 and the interface board 1230, and the main control board 1210 and the interface board 1230 communicate through the IPC channel.
在逻辑上,网络设备1200包括控制面和转发面,控制面包括主控板1210和中央处理器1231,转发面包括执行转发的各个组件,比如转发表项存储器1234、物理接口卡1233和网络处理器1232。控制面执行路由器、生成转发表、处理信令和协议报文、 配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器1232基于控制面下发的转发表对物理接口卡1233收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器1234中。在有些实施例中,控制面和转发面可以完全分离,不在同一设备上。Logically, the network device 1200 includes a control plane and a forwarding plane. The control plane includes a main control board 1210 and a central processing unit 1231. The forwarding plane includes various components that perform forwarding, such as forwarding entry storage 1234, physical interface card 1233, and network processing. device 1232. The control plane performs functions such as routers, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining the status of devices. The control plane issues the generated forwarding tables to the forwarding plane. On the forwarding plane, the network processor 1232 is based on the control plane. The delivered forwarding table is forwarded to the packet received by the physical interface card 1233 by looking up the table. The forwarding table issued by the control plane may be stored in the forwarding table entry storage 1234 . In some embodiments, the control plane and forwarding plane may be completely separate and not on the same device.
网络设备1000中的获取单元1010相当于网络设备1200中的物理接口卡1233;网络设备1000中的确定单元1020或处理单元1030可以相当于网络设备1200中的网络处理器1232或中央处理器1211。The obtaining unit 1010 in the network device 1000 is equivalent to the physical interface card 1233 in the network device 1200 ; the determining unit 1020 or the processing unit 1030 in the network device 1000 may be equivalent to the network processor 1232 or the central processing unit 1211 in the network device 1200 .
本申请实施例中接口板1240上的操作与接口板1230的操作一致,为了简洁,不再赘述。本实施例的网络设备1200可对应于上述各个方法实施例中的网络设备,该网络设备1200中的主控板1210、接口板1230和/或1240可以实现上述各个方法实施例中的网络设备所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。The operations on the interface board 1240 in the embodiment of the present application are the same as the operations on the interface board 1230, and are not repeated for brevity. The network device 1200 in this embodiment may correspond to the network device in the foregoing method embodiments, and the main control board 1210 , the interface board 1230 and/or 1240 in the network device 1200 may implement all of the network devices in the foregoing method embodiments. For the sake of brevity, the functions and/or various steps implemented are not repeated here.
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备可以不需要交换网板,接口板承担整个***的业务数据的处理功能。在分布式转发架构下,网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的设备。可选地,网络设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。It is worth noting that there may be one or more main control boards, and when there are multiple main control boards, they may include the main main control board and the backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There can also be one or more physical interface cards on the interface board. There may be no switch fabric boards, or there may be one or more boards. When there are multiple boards, load sharing and redundancy backup can be implemented together. Under the centralized forwarding architecture, the network device does not need to switch the network board, and the interface board is responsible for the processing function of the service data of the entire system. Under the distributed forwarding architecture, a network device may have at least one switching network board, and the switching network board realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those in a centralized architecture. Optionally, the form of the network device can also be that there is only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on this board. The central processing unit on the board can be combined into a central processing unit on this board to perform the functions of the two superimposed, the data exchange and processing capacity of this form of equipment is low (for example, low-end switches or routers and other networks. equipment). The specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
在一些可能的实施例中,上述网络设备可以实现为虚拟化设备。In some possible embodiments, the aforementioned network devices may be implemented as virtualized devices.
例如,虚拟化设备可以是运行有用于发送报文功能的程序的虚拟机(英文:Virtual Machine,VM),虚拟机部署在硬件设备上(例如,物理服务器)。虚拟机指通过软件模拟的具有完整硬件***功能的、运行在一个完全隔离环境中的完整计算机***。可以将虚拟机配置为网络设备。例如,可以基于通用的物理服务器结合网络功能虚拟化(Network Functions Virtualization,NFV)技术来实现网络设备网络设备。网络设备为虚拟主机、虚拟路由器或虚拟交换机。本领域技术人员通过阅读本申请即可结合NFV技术在通用物理服务器上虚拟出具有上述功能的网络设备。此处不再赘述。For example, the virtualization device may be a virtual machine (English: Virtual Machine, VM) running a program for sending a message, and the virtual machine is deployed on a hardware device (for example, a physical server). A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. Virtual machines can be configured as network devices. For example, a network device can be implemented based on a general physical server combined with a network function virtualization (Network Functions Virtualization, NFV) technology. Network devices are virtual hosts, virtual routers, or virtual switches. By reading this application, those skilled in the art can virtualize a network device having the above functions on a general physical server in combination with the NFV technology. It will not be repeated here.
例如,虚拟化设备可以是容器,容器是一种用于提供隔离的虚拟化环境的实体,例如,容器可以是docker容器。可以将容器配置为网络设备。例如,可以通过对应的镜像来创建出网络设备,例如可以通过proxy-container(提供代理服务的容器)的镜像,为proxy-container创建1个容器实例,可以表示为容器实例proxy-container1,将容器实例proxy-container1提供为网络设备。采用容器技术实现时,网络设备可以利用物理机的内核运行,多个网络设备可以共享物理机的操作***。通过容器技术可以将不同的网络设备隔离开来。容器化的网络设备可以在虚拟化的环境中运行,例如可以在虚拟机中运行,容器化的网络设备可也可以直接在物理机中运行。For example, a virtualization device may be a container, which is an entity used to provide an isolated virtualization environment, for example, a container may be a docker container. Containers can be configured as network devices. For example, a network device can be created through a corresponding image. For example, a proxy-container (a container that provides proxy services) can be used to create a container instance for the proxy-container, which can be represented as a container instance proxy-container1. The instance proxy-container1 is provided as a network device. When implemented with container technology, network devices can use the kernel of a physical machine to run, and multiple network devices can share the operating system of the physical machine. Different network devices can be isolated through container technology. Containerized network devices can run in a virtualized environment, such as virtual machines, and containerized network devices can also run directly on physical machines.
例如,虚拟化设备可以是Pod,Pod是Kubernetes(Kubernetes是谷歌开源的一种容器编排引擎,英文简称为K8s)为部署、管理、编排容器化应用的基本单位。Pod可以包括一个或多个容器。同一个Pod中的每个容器通常部署在同一主机上,因此同一个Pod中的每个容器可以通过该主机进行通信,并且可以共享该主机的存储资源和网络资源。可以将Pod配置为网络设备。例如,具体地,可以指令容器即服务(英文全称:container as a service,英文简称:CaaS,是一种基于容器的PaaS服务)来创建Pod,将Pod提供为网络设备。For example, a virtualized device can be a Pod, and a Pod is Kubernetes (Kubernetes is a container orchestration engine open sourced by Google, abbreviated as K8s in English) as the basic unit for deploying, managing, and orchestrating containerized applications. A Pod can contain one or more containers. Each container in the same Pod is usually deployed on the same host, so each container in the same Pod can communicate through the host and can share the host's storage resources and network resources. Pods can be configured as network devices. For example, specifically, a container as a service (full English name: container as a service, English abbreviation: CaaS, which is a container-based PaaS service) can be instructed to create a Pod and provide the Pod as a network device.
当然,网络设备还可以是其他虚拟化设备,在此不做一一列举。Of course, the network device may also be other virtualized devices, which will not be listed here.
在一些可能的实施例中,上述网络设备也可以由通用处理器来实现。例如,该通用处理器的形态可以是一种芯片。具体地,实现网络设备的通用处理器包括处理电路和与该处理电路内部连接通信的输入接口以及输出接口,该处理电路用于通过输入接口执行上述各个方法实施例中的报文的生成步骤,该处理电路用于通过输入接口执行上述各个方法实施例中的接收步骤,该处理电路用于通过输出接口执行上述各个方法实施例中的发送步骤。可选地,该通用处理器还可以包括存储介质,该处理电路用于通过存储介质执行上述各个方法实施例中的存储步骤。存储介质可以存储处理电路执行的指令,该处理电路用于执行存储介质存储的指令以执行上述各个方法实施例。In some possible embodiments, the above-mentioned network device may also be implemented by a general-purpose processor. For example, the general purpose processor may be in the form of a chip. Specifically, a general-purpose processor that implements a network device includes a processing circuit, an input interface and an output interface that are internally connected and communicated with the processing circuit, and the processing circuit is configured to perform the steps of generating messages in each of the above method embodiments through the input interface, The processing circuit is configured to perform the receiving step in the above method embodiments through the input interface, and the processing circuit is configured to perform the sending step in the above method embodiments through the output interface. Optionally, the general-purpose processor may further include a storage medium, and the processing circuit is configured to use the storage medium to perform the storage steps in each of the foregoing method embodiments. The storage medium may store instructions executed by the processing circuit, where the processing circuit is configured to execute the instructions stored in the storage medium to perform the above-mentioned various method embodiments.
图11是本申请提供的一种网络***1300的结构示意图,如图11所示,所述***1300包括:网络设备1310。可选的,所述***1300还可以包括第一终端设备1320和/或第一二终端设备1330。可选的,网络设备1310为如网络设备1000。FIG. 11 is a schematic structural diagram of a network system 1300 provided by the present application. As shown in FIG. 11 , the system 1300 includes: a network device 1310 . Optionally, the system 1300 may further include a first terminal device 1320 and/or a first and second terminal device 1330 . Optionally, the network device 1310 is, for example, the network device 1000 .
本申请实施例提供了一种计算机程序产品,当该计算机程序产品在网络设备上运行时,使得网络设备执行上述方法实施例中的方法100、方法200、方法300、方法400或方法500。Embodiments of the present application provide a computer program product, which, when the computer program product runs on a network device, enables the network device to execute method 100 , method 200 , method 300 , method 400 or method 500 in the foregoing method embodiments.
上述各种产品形态的装置,分别具有上述方法实施例中网络设备的任意功能,此处不再赘述。The above apparatuses in various product forms respectively have any functions of the network equipment in the above method embodiments, which will not be repeated here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和单元,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that, in combination with the method steps and units described in the embodiments disclosed herein, they can be implemented in electronic hardware, computer software, or a combination of the two. Interchangeability, the steps and components of the various embodiments have been generally described in terms of functions in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Persons of ordinary skill in the art may use different methods of implementing the described functionality for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的***、装置和单元的具体工作过程,可以参见前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the above-described systems, devices and units, reference may be made to the corresponding processes in the foregoing method embodiments, which are not repeated here.
在本申请所提供的几个实施例中,所揭露的***、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, the disclosed systems, devices and methods may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单 元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。The units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present application.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例中方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application are essentially or part of contributions to the prior art, or all or part of the technical solutions can be embodied in the form of software products, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .
以上描述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above descriptions are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications within the technical scope disclosed in the present application. or replacement, these modifications or replacements should be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机程序指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例中的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机程序指令可以从一个网站站点、计算机、服务器或数据中心通过有线或无线方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DVD)、或者半导体介质(例如固态硬盘)等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer program instructions may be transmitted from a website site, computer, server or data center via Wired or wireless transmission to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media integrated. The available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, digital video discs (DVDs), or semiconductor media (eg, solid state drives), and the like.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,该程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium can be read-only memory, magnetic disk or optical disk, etc.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
另外,本申请中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系;本申请中术语“至少一个”,可以表示“一个”和“两个或两个以上”,例如,A、B和C中至少一个,可以表示:单独存在A,单独存在B,单独存在C、同时存在A和B,同时存在A和C,同时存在C和B,同时存在A和B和C,这七种情况。In addition, the term "and/or" in this application is only an association relationship to describe associated objects, which means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, and A and B exist at the same time. , there are three cases of B alone. In addition, the character "/" in this document generally indicates that the contextual object is an "or" relationship; the term "at least one" in this application can mean "one" and "two or more", for example, A At least one of , B, and C can mean: A alone exists, B exists alone, C exists alone, A and B exist simultaneously, A and C exist simultaneously, C and B exist simultaneously, and A and B and C exist simultaneously. seven situations.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (40)

  1. 一种地址预留的方法,其特征在于,所述方法包括:A method for address reservation, characterized in that the method comprises:
    第一终端设备通过网络设备接入网络后,所述网络设备获取所述第一终端设备的第一信息和第一互联网协议IP地址,所述第一信息包括第一媒体接入控制MAC地址和第一接入端口信息,其中所述第一MAC地址指示所述第一终端设备,所述第一接入端口信息指示所述网络设备接收所述第一终端设备的接入请求的第一端口的信息,所述第一IP地址是所述网络设备分配给所述第一终端设备且用于所述第一终端设备接入所述网络的IP地址;After the first terminal device accesses the network through the network device, the network device acquires the first information and the first Internet Protocol IP address of the first terminal device, where the first information includes the first media access control MAC address and First access port information, wherein the first MAC address indicates the first terminal device, and the first access port information indicates the first port through which the network device receives an access request from the first terminal device information, the first IP address is the IP address assigned by the network device to the first terminal device and used by the first terminal device to access the network;
    所述网络设备确定第一对应关系,所述第一对应关系是所述第一信息与所述第一IP地址之间的对应关系;The network device determines a first correspondence, where the first correspondence is a correspondence between the first information and the first IP address;
    当所述网络设备确定所述第一终端设备由在线状态切换为下线状态时,所述网络设备根据所述第一对应关系将所述第一信息对应的所述第一IP地址的状态确定为预留状态。When the network device determines that the first terminal device is switched from an online state to an offline state, the network device determines the state of the first IP address corresponding to the first information according to the first correspondence is reserved.
  2. 根据权利要求1所述的方法,其特征在于,所述第一接入端口信息包括第一虚拟局域网VLAN标识和第一端口标识,所述第一端口标识用于指示所述第一端口,所述第一VLAN标识用于指示所述第一端口所属的广播域。The method according to claim 1, wherein the first access port information comprises a first virtual local area network (VLAN) identifier and a first port identifier, the first port identifier is used to indicate the first port, and the The first VLAN identifier is used to indicate the broadcast domain to which the first port belongs.
  3. 根据权利要求2所述的方法,其特征在于,所述第一信息还包括所述第一终端设备的第一接入链路信息,所述第一接入链路信息指示所述第一终端设备的物理位置。The method according to claim 2, wherein the first information further comprises first access link information of the first terminal device, the first access link information indicating the first terminal The physical location of the device.
  4. 根据权利要求3所述的方法,其特征在于,所述第一接入链路信息包括option82选项信息,或者,所述第一接入链路信息包括以下信息中的至少一种:option18选项信息和option37选项信息。The method according to claim 3, wherein the first access link information includes option82 option information, or the first access link information includes at least one of the following information: option18 option information and option37 option information.
  5. 根据权利要求2-4任一项所述的方法,其特征在于,所述第一信息还包括所述第一终端设备的动态主机配置协议唯一标识符DUID。The method according to any one of claims 2-4, wherein the first information further comprises a dynamic host configuration protocol unique identifier DUID of the first terminal device.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述第一信息还包括预留期限,所述网络设备根据所述第一对应关系将所述第一信息对应的所述第一IP地址的状态确定为预留状态,包括:The method according to any one of claims 1-5, wherein the first information further includes a reservation period, and the network device assigns the first information corresponding to the first information according to the first correspondence The state of the first IP address is determined to be a reserved state, including:
    在所述预留期限内,所述网络设备根据所述第一对应关系将所述第一信息对应的所述第一IP地址的状态确定为预留状态;Within the reservation period, the network device determines the state of the first IP address corresponding to the first information as a reservation state according to the first correspondence;
    所述方法还包括:The method also includes:
    在所述预留期限外,所述网络设备删除所述第一对应关系,并将所述第一信息对应的所述第一IP地址的状态由预留状态更新为未占用状态。Outside the reservation period, the network device deletes the first correspondence, and updates the state of the first IP address corresponding to the first information from a reserved state to an unoccupied state.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,在所述网络设备确定所述第一终端设备由在线状态切换为下线状态之后,所述方法还包括:The method according to any one of claims 1-6, wherein after the network device determines that the first terminal device is switched from an online state to an offline state, the method further comprises:
    所述网络设备接收所述第一终端设备的第一接入请求信息,所述第一接入请求信息用于请求所述网络设备为所述第一终端设备分配所述第一终端设备根据所述第一接入端口信息接入所述网络设备的IP地址;The network device receives the first access request information of the first terminal device, where the first access request information is used to request the network device to allocate the first terminal device according to the The first access port information accesses the IP address of the network device;
    所述网络设备根据所述第一接入请求信息和所述第一对应关系,为所述第一终端设备分配所述第一IP地址;assigning, by the network device, the first IP address to the first terminal device according to the first access request information and the first correspondence;
    所述网络设备将所述第一IP地址的状态由预留状态更新为占用状态。The network device updates the state of the first IP address from a reserved state to an occupied state.
  8. 根据权利要求7所述的方法,其特征在于,所述网络设备根据所述第一接入请求信息和所述第一对应关系,为所述第一终端设备分配所述第一IP地址,包括:The method according to claim 7, wherein the network device allocates the first IP address to the first terminal device according to the first access request information and the first correspondence, comprising: :
    当所述网络设备检测到所述第一对应关系,且所述第一IP地址的状态为预留状态时,为所述第一终端设备分配所述第一IP地址。When the network device detects the first correspondence and the state of the first IP address is a reserved state, the first IP address is allocated to the first terminal device.
  9. 根据权利要求7所述的方法,其特征在于,所述方法还包括:The method according to claim 7, wherein the method further comprises:
    当所述网络设备未检测到所述第一对应关系,且所述第一IP地址的状态为未占用状态时,为所述第一终端设备分配所述第一IP地址;或者When the network device does not detect the first correspondence and the state of the first IP address is an unoccupied state, assign the first IP address to the first terminal device; or
    当所述网络设备未检测到所述第一对应关系,且所述第一IP地址的状态为占用状态时,为所述第一终端设备分配第二IP地址;When the network device does not detect the first correspondence and the state of the first IP address is an occupied state, assigning a second IP address to the first terminal device;
    其中,所述第二IP地址是用于所述第一终端设备根据所述第一接入端口信息接入所述网络的IP地址,且所述第二IP地址与所述第一IP地址不相同。The second IP address is an IP address used by the first terminal device to access the network according to the first access port information, and the second IP address is different from the first IP address. same.
  10. 根据权利要求1-8任一项所述的方法,其特征在于,在所述网络设备确定所述第一终端设备由在线状态切换为下线状态之后,所述方法还包括:The method according to any one of claims 1-8, wherein after the network device determines that the first terminal device is switched from an online state to an offline state, the method further comprises:
    所述网络设备接收第二终端设备的第二接入请求信息,所述第二接入请求信息用于请求所述网络设备为所述第二终端设备分配所述第二终端设备根据第二接入端口信息接入所述网络设备的IP地址,所述第二终端设备与所述第一终端设备不相同;The network device receives the second access request information of the second terminal device, where the second access request information is used to request the network device to assign the second terminal device to the second terminal device according to the second access request. The ingress port information accesses the IP address of the network device, and the second terminal device is different from the first terminal device;
    所述网络设备确定所述第二终端设备的第二信息与所述第一信息相同,所述第二信息包括第二MAC地址和所述第二接入端口信息,所述第二MAC地址指示所述第二终端设备,所述第二接入端口信息指示所述网络设备接收所述第二终端设备的接入请求的第二端口的信息;The network device determines that the second information of the second terminal device is the same as the first information, the second information includes a second MAC address and the second access port information, and the second MAC address indicates For the second terminal device, the second access port information indicates the information of the second port on which the network device receives the access request of the second terminal device;
    所述网络设备根据所述第二接入请求和所述第一对应关系,为所述第二终端设备分配所述第一IP地址。The network device allocates the first IP address to the second terminal device according to the second access request and the first correspondence.
  11. 根据权利要求10所述的方法,其特征在于,所述第二接入端口信息包括第二虚拟局域网VLAN标识和第二端口标识,所述第二端口标识用于指示所述第二端口,所述第二VLAN标识用于指示所述第二端口所属的广播域。The method according to claim 10, wherein the second access port information includes a second virtual local area network VLAN identifier and a second port identifier, the second port identifier is used to indicate the second port, and the The second VLAN identifier is used to indicate the broadcast domain to which the second port belongs.
  12. 根据权利要求11所述的方法,其特征在于,所述第二信息还包括所述第二终端设备的第二接入链路信息,所述第二接入链路信息指示所述第二终端设备的物理位置。The method according to claim 11, wherein the second information further comprises second access link information of the second terminal device, the second access link information indicating the second terminal The physical location of the device.
  13. 根据权利要求12所述的方法,其特征在于,所述第二接入链路信息包括option82选项信息,或者,所述第二接入链路信息包括以下信息中的至少一种:option18选项信息和option37选项信息。The method according to claim 12, wherein the second access link information includes option82 option information, or the second access link information includes at least one of the following information: option18 option information and option37 option information.
  14. 根据权利要求11-13任一项所述的方法,其特征在于,所述第二信息还包括所述第二终端设备的DUID。The method according to any one of claims 11-13, wherein the second information further includes the DUID of the second terminal device.
  15. 根据权利要求10-14任一项所述的方法,其特征在于,所述网络设备根据所述第二接入请求信息和所述第一对应关系,为所述第二终端设备分配所述第一IP地址,包括:The method according to any one of claims 10-14, wherein the network device allocates the second terminal device to the second terminal device according to the second access request information and the first correspondence An IP address, including:
    当所述网络设备检测到所述第一对应关系,且所述第一IP地址的状态为预留状态时,为所述第二终端设备分配所述第一IP地址;When the network device detects the first correspondence and the state of the first IP address is a reserved state, assigning the first IP address to the second terminal device;
    所述方法还包括:The method also includes:
    当所述网络设备检测到所述第一对应关系,且所述第一IP地址的状态为占用状态时, 为所述第二终端设备分配第三IP地址;或者When the network device detects the first correspondence and the state of the first IP address is an occupied state, assigning a third IP address to the second terminal device; or
    当所述网络设备未检测到所述第一对应关系,且所述第一IP地址的状态为占用状态时,为所述第二终端设备分配所述第三IP地址;或者When the network device does not detect the first correspondence and the state of the first IP address is the occupied state, assign the third IP address to the second terminal device; or
    当所述网络设备未检测到所述第一对应关系,且所述第一IP地址的状态为未占用状态时,为所述第二终端设备分配所述第一IP地址;When the network device does not detect the first correspondence and the state of the first IP address is an unoccupied state, assigning the first IP address to the second terminal device;
    其中,所述第三IP地址是用于所述第二终端设备根据所述第二接入端口信息接入所述网络的IP地址,且所述第一IP地址、所述第二IP地址以及所述第三IP地址不相同。The third IP address is an IP address used by the second terminal device to access the network according to the second access port information, and the first IP address, the second IP address and The third IP addresses are not the same.
  16. 根据权利要求15所述的方法,其特征在于,所述网络设备检测到所述第一对应关系,且所述第一IP地址的状态为占用状态时,为所述第二终端设备分配第三IP地址之后,所述方法还包括:The method according to claim 15, wherein when the network device detects the first correspondence and the state of the first IP address is an occupied state, assigning a third terminal device to the second terminal device After the IP address, the method further includes:
    当所述网络设备确定所述第二终端设备在第一时刻由在线状态切换为下线状态,且所述第一终端设备在所述第一时刻之前由在线状态切换为下线状态时,将所述第一对应关系更新为第二对应关系,所述第二对应关系是所述第一信息与所述第三IP地址之间的对应关系,或者是所述第二信息与所述第三IP地址之间的对应关系;When the network device determines that the second terminal device is switched from the online state to the offline state at the first moment, and the first terminal device is switched from the online state to the offline state before the first moment, it will The first correspondence is updated to a second correspondence, and the second correspondence is the correspondence between the first information and the third IP address, or the second information and the third IP address. Correspondence between IP addresses;
    所述网络设备将所述第三IP地址的状态由占用状态更新为预留状态,将所述第一IP地址的状态由占用状态更新为未占用状态。The network device updates the state of the third IP address from the occupied state to the reserved state, and updates the state of the first IP address from the occupied state to the unoccupied state.
  17. 根据权利要求15所述的方法,其特征在于,所述网络设备检测到所述第一对应关系,且所述第一IP地址的状态为预留状态时,为所述第二终端设备分配所述第一IP地址之后,所述方法还包括:The method according to claim 15, wherein when the network device detects the first correspondence and the state of the first IP address is a reserved state, it allocates the second terminal device After the first IP address is described, the method further includes:
    当所述网络设备确定所述第二终端设备在第二时刻由在线状态切换为下线状态,且所述第一终端设备在所述第二时刻之后由在线状态切换为下线状态时,不更新所述第一对应关系;When the network device determines that the second terminal device switches from the online state to the offline state at the second moment, and the first terminal device switches from the online state to the offline state after the second moment, it does not updating the first correspondence;
    所述网络设备将所述第一IP地址的状态由占用状态更新为预留状态。The network device updates the state of the first IP address from an occupied state to a reserved state.
  18. 根据权利要求1-17任一项所述的方法,其特征在于,所述网络设备为宽带接入服务器BRAS。The method according to any one of claims 1-17, wherein the network device is a broadband access server BRAS.
  19. 一种网络设备,其特征在于,所述网络设备包括:A network device, characterized in that the network device includes:
    获取单元,用于获取第一终端设备的第一信息和第一互联网协议IP地址,所述第一信息包括第一媒体接入控制MAC地址和第一接入端口信息,其中所述第一MAC地址指示所述第一终端设备,所述第一接入端口信息指示所述网络设备接收所述第一终端设备的接入请求的第一端口的信息,所述第一IP地址是所述网络设备分配给所述第一终端设备且用于所述第一终端设备接入所述网络的IP地址;an acquiring unit, configured to acquire first information and a first Internet Protocol IP address of a first terminal device, where the first information includes a first media access control MAC address and first access port information, wherein the first MAC address The address indicates the first terminal device, the first access port information indicates the information of the first port where the network device receives the access request of the first terminal device, and the first IP address is the network device an IP address assigned by the device to the first terminal device and used by the first terminal device to access the network;
    确定单元,用于确定第一对应关系,所述第一对应关系是所述第一信息与所述第一IP地址之间的对应关系;a determining unit, configured to determine a first correspondence, where the first correspondence is a correspondence between the first information and the first IP address;
    所述确定单元,还用于确定所述第一终端设备由在线状态切换为下线状态时,根据所述第一对应关系将所述第一信息对应的所述第一IP地址的状态确定为预留状态。The determining unit is further configured to determine the state of the first IP address corresponding to the first information according to the first correspondence when the first terminal device is switched from an online state to an offline state as reserved status.
  20. 根据权利要求19所述的网络设备,其特征在于,所述第一接入端口信息包括第一虚拟局域网VLAN标识和第一端口标识,所述第一端口标识用于指示所述第一端口,所述第一VLAN标识用于指示所述第一端口所属的广播域。The network device according to claim 19, wherein the first access port information comprises a first virtual local area network (VLAN) identifier and a first port identifier, and the first port identifier is used to indicate the first port, The first VLAN identifier is used to indicate the broadcast domain to which the first port belongs.
  21. 根据权利要求20所述的网络设备,其特征在于,所述第一信息还包括所述第一 终端设备的第一接入链路信息,所述第一接入链路信息指示所述第一终端设备的物理位置。The network device according to claim 20, wherein the first information further comprises first access link information of the first terminal device, the first access link information indicating the first access link The physical location of the end device.
  22. 根据权利要求21所述的网络设备,其特征在于,所述第一接入链路信息包括option82选项信息,或者,所述第一接入链路信息包括以下信息中的至少一种:option18选项信息和option37选项信息。The network device according to claim 21, wherein the first access link information includes option82 option information, or the first access link information includes at least one of the following information: option18 option info and option37 option info.
  23. 根据权利要求20-22任一项所述的网络设备,其特征在于,所述第一信息还包括所述第一终端设备的动态主机配置协议唯一标识符DUID。The network device according to any one of claims 20-22, wherein the first information further comprises a Dynamic Host Configuration Protocol unique identifier DUID of the first terminal device.
  24. 根据权利要求19-23任一项所述的网络设备,其特征在于,所述第一信息还包括预留期限,所述确定单元还用于:The network device according to any one of claims 19-23, wherein the first information further includes a reservation period, and the determining unit is further configured to:
    在所述预留期限内,根据所述第一对应关系将所述第一信息对应的所述第一IP地址的状态确定为预留状态;Within the reservation period, the state of the first IP address corresponding to the first information is determined to be a reserved state according to the first correspondence;
    所述确定单元还用于:The determining unit is also used for:
    在所述预留期限外,删除所述第一对应关系,并将所述第一信息对应的所述第一IP地址的状态由预留状态更新为未占用状态。Outside the reservation period, the first correspondence is deleted, and the state of the first IP address corresponding to the first information is updated from a reserved state to an unoccupied state.
  25. 根据权利要求19-24任一项所述的网络设备,其特征在于,所述网络设备还包括处理单元,The network device according to any one of claims 19-24, wherein the network device further comprises a processing unit,
    所述获取单元还用于,接收所述第一终端设备的第一接入请求信息,所述第一接入请求信息用于请求所述网络设备为所述第一终端设备分配所述第一终端设备根据所述第一接入端口信息接入所述网络设备的IP地址;The acquiring unit is further configured to receive first access request information of the first terminal device, where the first access request information is used to request the network device to allocate the first access request to the first terminal device The terminal device accesses the IP address of the network device according to the first access port information;
    所述处理单元用于:The processing unit is used to:
    根据所述第一接入请求信息和所述第一对应关系,为所述第一终端设备分配所述第一IP地址;以及assigning the first IP address to the first terminal device according to the first access request information and the first correspondence; and
    将所述第一IP地址的状态由预留状态更新为占用状态。The state of the first IP address is updated from the reserved state to the occupied state.
  26. 根据权利要求25所述的网络设备,其特征在于,所述处理单元还用于:The network device according to claim 25, wherein the processing unit is further configured to:
    当检测到所述第一对应关系,且所述第一IP地址的状态为预留状态时,为所述第一终端设备分配所述第一IP地址。When the first correspondence is detected and the state of the first IP address is a reserved state, the first IP address is allocated to the first terminal device.
  27. 根据权利要求25所述的网络设备,其特征在于,所述处理单元还用于:The network device according to claim 25, wherein the processing unit is further configured to:
    当未检测到所述第一对应关系,且所述第一IP地址的状态为未占用状态时,为所述第一终端设备分配所述第一IP地址;或者When the first correspondence is not detected and the state of the first IP address is an unoccupied state, assign the first IP address to the first terminal device; or
    当未检测到所述第一对应关系,且所述第一IP地址的状态为占用状态时,为所述第一终端设备分配第二IP地址;When the first correspondence is not detected and the state of the first IP address is an occupied state, assigning a second IP address to the first terminal device;
    其中,所述第二IP地址是用于所述第一终端设备根据所述第一接入端口信息接入所述网络的IP地址,且所述第二IP地址与所述第一IP地址不相同。The second IP address is an IP address used by the first terminal device to access the network according to the first access port information, and the second IP address is different from the first IP address. same.
  28. 根据权利要求19-26任一项所述的网络设备,其特征在于,The network device according to any one of claims 19-26, wherein,
    所述获取单元还用于,接收第二终端设备的第二接入请求信息,所述第二接入请求信息用于请求所述网络设备为所述第二终端设备分配所述第二终端设备根据第二接入端口信息接入所述网络设备的IP地址,所述第二终端设备与所述第一终端设备不相同;The acquiring unit is further configured to receive second access request information of a second terminal device, where the second access request information is used to request the network device to allocate the second terminal device to the second terminal device Access the IP address of the network device according to the second access port information, the second terminal device is different from the first terminal device;
    所述确定单元还用于:The determining unit is also used for:
    确定所述第二终端设备的第二信息与所述第一信息相同,所述第二信息包括第二 MAC地址和所述第二接入端口信息,所述第二MAC地址指示所述第二终端设备,所述第二接入端口信息指示所述网络设备接收所述第二终端设备的接入请求的第二端口的信息;It is determined that the second information of the second terminal device is the same as the first information, the second information includes a second MAC address and the second access port information, and the second MAC address indicates the second a terminal device, where the second access port information indicates information of a second port where the network device receives an access request from the second terminal device;
    所述处理单元还用于:The processing unit is also used to:
    根据所述第二接入请求和所述第一对应关系,为所述第二终端设备分配所述第一IP地址。The first IP address is allocated to the second terminal device according to the second access request and the first correspondence.
  29. 根据权利要求28所述的网络设备,其特征在于,所述第二接入端口信息包括第二虚拟局域网VLAN标识和第二端口标识,所述第二端口标识用于指示所述第二端口,所述第二VLAN标识用于指示所述第二端口所属的广播域。The network device according to claim 28, wherein the second access port information comprises a second virtual local area network (VLAN) identifier and a second port identifier, and the second port identifier is used to indicate the second port, The second VLAN identifier is used to indicate the broadcast domain to which the second port belongs.
  30. 根据权利要求29所述的网络设备,其特征在于,所述第二信息还包括所述第二终端设备的第二接入链路信息,所述第二接入链路信息指示所述第二终端设备的物理位置。The network device according to claim 29, wherein the second information further comprises second access link information of the second terminal device, the second access link information indicating the second access link The physical location of the end device.
  31. 根据权利要求30所述的网络设备,其特征在于,所述第二接入链路信息包括option82选项信息,或者,所述第二接入链路信息包括以下信息中的至少一种:option18选项信息和option37选项信息。The network device according to claim 30, wherein the second access link information includes option82 option information, or the second access link information includes at least one of the following information: option18 option info and option37 option info.
  32. 根据权利要求29-31任一项所述的网络设备,其特征在于,所述第二信息还包括所述第二终端设备的DUID。The network device according to any one of claims 29-31, wherein the second information further includes a DUID of the second terminal device.
  33. 根据权利要求28-32任一项所述的网络设备,其特征在于,The network device according to any one of claims 28-32, wherein,
    所述处理单元还用于:The processing unit is also used to:
    当检测到所述第一对应关系,且所述第一IP地址的状态为预留状态时,为所述第二终端设备分配所述第一IP地址;When the first correspondence is detected and the state of the first IP address is a reserved state, the first IP address is allocated to the second terminal device;
    所述处理单元还用于:The processing unit is also used to:
    当检测到所述第一对应关系,且所述第一IP地址的状态为占用状态时,为所述第二终端设备分配第三IP地址;或者When the first correspondence is detected and the state of the first IP address is the occupied state, assign a third IP address to the second terminal device; or
    当未检测到所述第一对应关系,且所述第一IP地址的状态为占用状态时,为所述第二终端设备分配所述第三IP地址;或者When the first correspondence is not detected and the state of the first IP address is the occupied state, assign the third IP address to the second terminal device; or
    当未检测到所述第一对应关系,且所述第一IP地址的状态为未占用状态时,为所述第二终端设备分配所述第一IP地址;When the first correspondence is not detected and the state of the first IP address is an unoccupied state, assigning the first IP address to the second terminal device;
    其中,所述第三IP地址是用于所述第二终端设备根据所述第二接入端口信息接入所述网络的IP地址,且所述第一IP地址、所述第二IP地址以及所述第三IP地址不相同。The third IP address is an IP address used by the second terminal device to access the network according to the second access port information, and the first IP address, the second IP address and The third IP addresses are not the same.
  34. 根据权利要求33所述的网络设备,其特征在于,The network device of claim 33, wherein:
    所述确定单元还用于:确定所述第二终端设备在第一时刻由在线状态切换为下线状态,以及确定所述第一终端设备在所述第一时刻之前由在线状态切换为下线状态;The determining unit is further configured to: determine that the second terminal device is switched from an online state to an offline state at a first moment, and determine that the first terminal device is switched from an online state to an offline state before the first moment condition;
    所述处理单元还用于:The processing unit is also used to:
    将所述第一对应关系更新为第二对应关系,所述第二对应关系是所述第一信息与所述第三IP地址之间的对应关系,或者是所述第二信息与所述第三IP地址之间的对应关系;Update the first correspondence to a second correspondence, where the second correspondence is the correspondence between the first information and the third IP address, or the second information and the third IP address. The correspondence between the three IP addresses;
    将所述第三IP地址的状态由占用状态更新为预留状态,将所述第一IP地址的状态由占用状态更新为未占用状态。The state of the third IP address is updated from the occupied state to the reserved state, and the state of the first IP address is updated from the occupied state to the unoccupied state.
  35. 根据权利要求33所述的网络设备,其特征在于,The network device of claim 33, wherein:
    所述确定单元还用于:确定所述第二终端设备在第二时刻由在线状态切换为下线状态,以及确定所述第一终端设备在所述第二时刻之后由在线状态切换为下线状态;The determining unit is further configured to: determine that the second terminal device switches from an online state to an offline state at a second moment, and determine that the first terminal device switches from an online state to an offline state after the second moment condition;
    所述处理单元还用于:将所述第一IP地址的状态由占用状态更新为预留状态。The processing unit is further configured to: update the state of the first IP address from an occupied state to a reserved state.
  36. 根据权利要求19-35任一项所述的网络设备,其特征在于,所述网络设备为宽带接入服务器BRAS。The network device according to any one of claims 19-35, wherein the network device is a broadband access server BRAS.
  37. 一种网络设备,其特征在于,包括至少一个处理器和通信接口,所述至少一个处理器,用于执行计算机程序或指令,以使得所述网络设备执行如权利要求1至18任一项所述的方法。A network device, characterized in that it includes at least one processor and a communication interface, the at least one processor being configured to execute a computer program or an instruction, so that the network device performs as claimed in any one of claims 1 to 18 method described.
  38. 根据权利要求37所述的网络设备,其特征在于,所述网络设备还包括至少一个存储器,所述至少一个存储器与所述至少一个处理器耦合,所述计算机程序或指令存储在所述至少一个存储器中。The network device of claim 37, wherein the network device further comprises at least one memory coupled to the at least one processor, the computer program or instructions being stored in the at least one memory in memory.
  39. 一种计算机可读存储介质,其特征在于,包括计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行权利要求1至18中任一项所述的方法。A computer-readable storage medium, characterized by comprising a computer program, which, when the computer program is run on a computer, causes the computer to execute the method of any one of claims 1 to 18.
  40. 一种***,其特征在于,包括如权利要求37或38所述的网络设备。A system, characterized by comprising the network device as claimed in claim 37 or 38.
PCT/CN2021/093130 2020-09-10 2021-05-11 Address reservation method, network device, and system WO2022052496A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010949604.6 2020-09-10
CN202010949604.6A CN114172753B (en) 2020-09-10 2020-09-10 Address reservation method, network equipment and system

Publications (1)

Publication Number Publication Date
WO2022052496A1 true WO2022052496A1 (en) 2022-03-17

Family

ID=80475759

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/093130 WO2022052496A1 (en) 2020-09-10 2021-05-11 Address reservation method, network device, and system

Country Status (2)

Country Link
CN (1) CN114172753B (en)
WO (1) WO2022052496A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115225612A (en) * 2022-06-29 2022-10-21 济南浪潮数据技术有限公司 Management method, device, equipment and medium for K8S cluster reserved IP

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116032888A (en) * 2022-12-06 2023-04-28 中国联合网络通信集团有限公司 Broadband access method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447709A (en) * 2012-01-17 2012-05-09 神州数码网络(北京)有限公司 Access authority control method and system based on DHCP (Dynamic host configuration protocol) and 802.1x
CN102546428A (en) * 2012-02-03 2012-07-04 神州数码网络(北京)有限公司 System and method for internet protocol version 6 (IPv6) message switching based on dynamic host configuration protocol for IPv6 (DHCPv6) interception
CN104144092A (en) * 2013-12-03 2014-11-12 国家电网公司 Method for being automatically access to LAN terminal
CN107528931A (en) * 2016-06-22 2017-12-29 中兴通讯股份有限公司 A kind of adaptive keeping method of IP address based on user behavior, apparatus and system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635628B (en) * 2009-08-28 2012-01-04 杭州华三通信技术有限公司 Method and device for preventing ARP attacks
CN101640882B (en) * 2009-09-07 2012-07-11 杭州华三通信技术有限公司 Method and device for preventing flow from breaking
CN101888575B (en) * 2010-07-28 2015-04-01 中兴通讯股份有限公司 Configuration method and system for realizing port address binding
CN102387223A (en) * 2011-10-20 2012-03-21 北京科美特信息技术有限公司 Management and distribution method of public network IP (Internet Protocol) address resource of hotel public network
CN103312836B (en) * 2013-06-28 2016-08-10 国家电网公司 A kind of large-scale local network ip address management method
CN106301909B (en) * 2016-08-11 2019-09-17 新华三技术有限公司 A kind of port detection method and device
CN110324246B (en) * 2018-03-31 2021-12-24 华为技术有限公司 Communication method and device
CN109474481B (en) * 2018-12-27 2022-04-26 瑞斯康达科技发展股份有限公司 Equipment deployment method and system, network management server, mobile terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447709A (en) * 2012-01-17 2012-05-09 神州数码网络(北京)有限公司 Access authority control method and system based on DHCP (Dynamic host configuration protocol) and 802.1x
CN102546428A (en) * 2012-02-03 2012-07-04 神州数码网络(北京)有限公司 System and method for internet protocol version 6 (IPv6) message switching based on dynamic host configuration protocol for IPv6 (DHCPv6) interception
CN104144092A (en) * 2013-12-03 2014-11-12 国家电网公司 Method for being automatically access to LAN terminal
CN107528931A (en) * 2016-06-22 2017-12-29 中兴通讯股份有限公司 A kind of adaptive keeping method of IP address based on user behavior, apparatus and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115225612A (en) * 2022-06-29 2022-10-21 济南浪潮数据技术有限公司 Management method, device, equipment and medium for K8S cluster reserved IP
CN115225612B (en) * 2022-06-29 2023-11-14 济南浪潮数据技术有限公司 Management method, device, equipment and medium for K8S cluster reserved IP

Also Published As

Publication number Publication date
CN114172753B (en) 2023-04-07
CN114172753A (en) 2022-03-11

Similar Documents

Publication Publication Date Title
US10757072B2 (en) Packet transmission method, apparatus, and system
US11558346B2 (en) Address management method and system, and device
US11399405B2 (en) Session management method, device, and system
CN110113441B (en) Computer equipment, system and method for realizing load balance
EP3720050A1 (en) Method and apparatus for deploying network slice
WO2022052496A1 (en) Address reservation method, network device, and system
EP3806395B1 (en) Virtual network function (vnf) deployment method and apparatus
WO2018000202A1 (en) Load migration method, apparatus and system
WO2022012489A1 (en) Capability indication method and related device
US20230171223A1 (en) Communication Method, CP Device, and NAT Device
WO2021143183A1 (en) Method for deploying virtual machine, and related apparatus
CN116886496A (en) DPU-based data processing method, device, equipment and readable storage medium
WO2022057487A1 (en) Path identifier allocation method, system, apparatus and device, and storage medium
WO2021244500A1 (en) Backup state determination method, apparatus and system
WO2020249080A1 (en) Virtual network function (vnf) deployment method and apparatus
CN112887185B (en) Communication method and device of overlay network
CN114531320A (en) Communication method, device, equipment, system and computer readable storage medium
CN114513485A (en) Method, device, equipment and system for obtaining mapping rule and readable storage medium
CN112887201A (en) VRRP (virtual router redundancy protocol) -based interface updating method and device and storage medium
WO2022022313A1 (en) Method for transmitting routing information, apparatus, and communication system
US11996993B2 (en) Packet transmission method, apparatus, and system, and storage medium
EP4149062A1 (en) Deployment method and apparatus for virtualized network service
WO2023207235A1 (en) User plane management method, control plane device, and user plane device
WO2022161288A1 (en) Traffic sending method and apparatus, and system and storage medium
EP4262154A1 (en) Elastic scaling method and apparatus

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21865557

Country of ref document: EP

Kind code of ref document: A1