Method for automatically allocating IP address based on ARP (Address Resolution Protocol)

CN120881044APending Publication Date: 2025-10-31THE 34TH RES INST OF CHINA ELECTRONICS TECH CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511206686.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

In software-defined packet transport networks, existing technologies cannot efficiently and automatically allocate IP addresses within the same network segment, resulting in complex and error-prone manual configuration and preventing full network interconnection.

Method used

Define custom operators START, REQ, and RESP in the original ARP protocol message fields. These operators are used to achieve master device election and IP address allocation among devices. The master device allocates IP addresses from the IP resource pool and replies to non-master devices.

Benefits of technology

It enables automatic IP address allocation for software-defined packet transport network devices, simplifies network planning, improves the efficiency of network interconnection, and avoids manual configuration errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120881044A_ABST
    Figure CN120881044A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic IP address allocation method based on an ARP protocol, which comprises the following steps of: on the basis of an original ARP protocol message field, defining a new operator in an original operator field; the software defined packet transport network devices start an ARP protocol, and all the software defined packet transport network devices determine a master device between the interconnection devices through regularly diffusing a protocol frame with a new operator; other equipment which is not selected as the main equipment requests the main equipment to allocate an IP address; after receiving the IP address allocation request, the master device allocates a new IP address in an idle IP address resource pool, and replies the new IP address to the non-master device; and after the non-master device receives the IP address replied by the master device, the IP address is configured to the local system. According to the method, the IP address of the same network segment is automatically allocated to the interconnected software defined packet transport network equipment through the existing protocol message communication mode, the IP address is declared to the routing protocol after the software defined packet transport network equipment is allocated to the IP address, and finally interconnection of the software defined packet transport network equipment in the whole network is realized. The method is an intelligent network opening method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of network communication technology, and specifically relates to a method for automatically allocating IP addresses based on the ARP protocol. Background Technology

[0002] Software-defined packet transport network is a new network architecture that introduces the concepts and technologies of SDN (Software-Defined Networking) into the traditional PTN (Packet Transport Network). It is a new generation of packet transport network with software control capabilities, providing various applications and services in access networks, metropolitan area networks, and backbone transport networks for integrated services such as mobile backhaul and enterprise leased lines.

[0003] In Software-Defined Packet Transport Networks (SPTN), IP address allocation is typically handled by the controller, which manages and distributes IP addresses. In SPTN, the Address Resolution Protocol (ARP) is usually used to map IP addresses to MAC addresses, i.e., to query the MAC address corresponding to a target IP address. When assigning IP addresses within the same network segment to interconnected SPTN devices, the IP address allocation protocol is generally a proprietary, user-defined protocol, which cannot be used in certain scenarios. To address the issues of the inability to use proprietary protocols in specific environments (such as customer-specified scenarios) and the slow speed and susceptibility to misconfiguration in large-scale, complex network environments, it is necessary to propose a new IP address allocation method. Summary of the Invention

[0004] To overcome the problems existing in the prior art, the present invention provides a method for automatically allocating IP addresses based on the ARP protocol, which can efficiently and automatically allocate IP addresses in the same network segment to interconnected software-defined packet transport network devices.

[0005] The technical solution adopted in this invention is as follows:

[0006] A method for automatically assigning IP addresses based on the ARP protocol includes the following steps:

[0007] S1. Based on the existing ARP protocol message fields, define new operators with custom meanings in the existing operator fields;

[0008] S2. Software-defined packet transport network (SDN) devices enable the ARP protocol and periodically propagate protocol frames with new operators. All SDN devices determine the master device among interconnected devices based on the meaning of the new operators.

[0009] S3. Other devices that were not selected as the primary device, i.e., non-primary devices, request an IP address from the primary device.

[0010] S4. After receiving the IP address allocation request, the master device allocates a new IP address from the idle IP address resource pool and replies the new IP address to the non-master device.

[0011] S5. After receiving the IP address from the master device, the non-master device configures the IP address in the local system.

[0012] Preferably, in step S1, the message type of the new operator is START, REQ, or RESP message.

[0013] Preferably, in step S2, all software-defined packet transport network (SDN) devices periodically broadcast START messages carrying their local MAC addresses to neighboring devices. When a SDN device receives a START message, it elects the master device among the interconnected devices, i.e., the neighboring devices, by comparing the MAC address sizes.

[0014] Preferably, in step S3, the non-master device sends a REQ message to the master device to request the allocation of an IP address, and refreshes the aging time of the neighboring device through a START message.

[0015] Preferably, in step S4, after receiving the REQ message, the master device allocates an idle IP address from the IP resource pool to the non-device and replies to the non-master device via a RESP message.

[0016] Preferably, in step S5, when the non-master device receives the RESP message from the master device, it determines whether the IP address assigned by the master device is consistent with the existing IP address. If they are inconsistent, the existing IP address is changed to the IP address assigned by the master device.

[0017] Compared with the prior art, the present invention has the following advantages:

[0018] 1. This invention adds several custom meaning fields to the original ARP protocol frame. When the software-defined packet transport network device enables the ARP protocol, it automatically assigns IP addresses to the interconnection ports of the software-defined packet transport network device. In a network where the routing protocol is enabled, it can automatically open the entire network and realize the interconnection of the entire network. This solves the problem that software-defined packet transport network devices need to manually plan the network and perform complex IP configuration to achieve Layer 3 interconnection.

[0019] 2. The IP address allocation method of the present invention aims to automatically allocate IP addresses in the same network segment to interconnected software-defined packet transport network devices through existing protocol message communication methods. After all software-defined packet transport network devices using this method are allocated IP addresses, they will announce the IP addresses to the routing protocol, ultimately realizing the interconnection of software-defined packet transport network devices across the entire network. This is a method for intelligently opening a network. Attached Figure Description

[0020] Figure 1 This invention provides a method for automatically allocating IP addresses based on the ARP protocol.

[0021] The flowchart. Detailed Implementation

[0022] To make the objectives and advantages of the present invention clearer, the present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0023] This invention relates to a method for automatically allocating IP addresses based on the ARP protocol, such as... Figure 1 As shown, it includes the following steps:

[0024] (1) Configure a network-unique net ID on the software-defined packet transport network device. The net ID is a 32-bit binary number, similar to an IP address, and is divided into four 8-bit binary numbers (i.e., four bytes). Connect the physical communication ports of the software-defined packet transport network devices together using a network cable or hub.

[0025] (2) Based on the original ARP protocol message fields, three message types with custom meanings are defined in the original operator fields: START, REQ, and RESP messages. The original ARP protocol message format is shown in Table 1. Common opcodes 1 represent ARP requests, 2 represent ARP replies, 3 represent RARP requests, and 4 represent RARP replies. According to the application scenario of this method, this method defines opcodes 11, 12, and 13, where 11 represents the custom START message, as shown in Table 2; 12 represents the custom REQ message, as shown in Table 3; and 13 represents the custom RESP message, as shown in Table 4.

[0026] Table 1: Message content of the original ARP protocol

[0027]

[0028] Table 2: START Message Content

[0029]

[0030] Table 3: REQ Message Content

[0031]

[0032] Table 4: RESP Message Content

[0033]

[0034]

[0035] (3) Timed START message: After the net id is set in the software-defined packet transport network device, the software-defined packet transport network device port will broadcast a START message with operation code 11 at the set time interval. The START message carries its own MAC address.

[0036] (4) Record neighbor information: The software-defined packet transport network device that receives the START message searches for the sending device in the neighbor list. If it is not found, it creates a new neighbor in the neighbor list and updates the neighbor aging time to a value longer than the START message sending period. When the neighbor has not received the START message from the neighbor for a long time, the neighbor will be aged.

[0037] (5) Election of Master Device: Interconnected software-defined packet transport network devices need to elect a device with the largest MAC address as the master device. That is, the MAC address of the neighbor is compared with the MAC address of the device itself, and the device with the larger MAC address is selected as the master device. The specific process is as follows: The local master device of the interconnected software-defined packet transport network device initializes its MAC address with its own MAC address. When a START message is received from a neighbor, the MAC address of the neighbor is compared with the MAC address of the device itself (the local master device of the software-defined packet transport network device). The neighbor with the larger MAC address is elected as the master device. When the master device fails, and the master device neighbor information on the non-master device becomes outdated, the non-master device deletes the master device neighbor information and updates the MAC address of the local master device of the software-defined packet transport network device to its own MAC address. When the next START message is received from another device, the election process can be repeated.

[0038] (6) Sending an IP address allocation request: Under normal circumstances, a non-master device requests an IP address from a master device; that is, a software-defined packet transport network device with a smaller MAC address sends a REQ request to its neighbor, requesting a software-defined packet transport network device with a larger MAC address to allocate an IP address.

[0039] During device initialization, the master device address is set to the MAC address of this device and an IP address is assigned to the port. When the device port is interconnected with other devices, there may be a situation where the MAC address of the peer (non-master device) is larger than the MAC address of the master device. In this case, the MAC address of the master device needs to be updated to the MAC address of the peer and a REQ message requesting IP address allocation needs to be sent to the peer.

[0040] (7) IP allocation: The master device that receives the REQ message (when multiple ports are interconnected through a router, there is only one master device among the multiple ports. At this time, it is also necessary to check whether the MAC address of the master device stored locally is consistent with its own to confirm that it is the master device among the interconnected devices) finds an unused host number in the local IP resource pool, concatenates the host number, net id, and port number into a valid IP address in some way. This IP address is in the same network segment as the IP address of this port. Finally, it fills this IP address into the RESP message and replies to the software-defined packet transport network device that requested the IP address, i.e., the non-master device.

[0041] One possible method is to take bits 17-32 of the net id as bits 17-32 of the IP address, shift the port number one bit to the left as bits 9-16 of the IP address, and use the unused host number from the IP resource pool, starting from 3, to find an unused number (the master device uses host number 2 by default) as bits 1-8 of the IP address. For example, if an IP is ABCD, the net id is A1.B1.C1.C1, the AB part of the IP is A1.B1, and the port of C is 3 (11), then C is 6 (110). Shift the low bits to the left and fill in 0. D is the host number, which could be 2-254.

[0042] (8) Receive IP allocation: When a non-master device receives a RESP message from the master device, it determines whether the IP address allocated by the master device is consistent with or conflicted with the existing IP address. If there is no conflict and the IP address is inconsistent with the existing IP address, the existing IP address is changed to the IP address allocated by the master device and configured in the system; otherwise, it is discarded.

[0043] The above embodiments are merely specific examples to further illustrate the purpose, technical solution, and beneficial effects of the present invention, and the present invention is not limited thereto. Any modifications, equivalent substitutions, improvements, etc., made within the scope of the disclosure of the present invention are included within the protection scope of the present invention.

Claims

1. A method for automatically assigning IP addresses based on the ARP protocol, characterized in that, Includes the following steps: S1. Based on the existing ARP protocol message fields, define new operators with custom meanings in the existing operator fields; S2. Software-defined packet transport network (SDN) devices enable the ARP protocol and periodically propagate protocol frames with new operators. All SDN devices determine the master device among interconnected devices based on the meaning of the new operators. S3. Other devices that were not selected as the primary device, i.e., non-primary devices, request an IP address from the primary device. S4. After receiving the IP address allocation request, the master device allocates a new IP address from the idle IP address resource pool and replies the new IP address to the non-master device. S5. After receiving the IP address from the master device, the non-master device configures the IP address in the local system.

2. The method for automatically allocating IP addresses based on the ARP protocol according to claim 1, characterized in that: In step S1, The message types for the new operator are START, REQ, and RESP messages.

3. The method for automatically allocating IP addresses based on the ARP protocol according to claim 2, characterized in that: In step S2, All software-defined packet transport network (SDB) devices periodically broadcast START messages carrying their local MAC addresses to neighboring devices. When a SDB device receives a START message, it elects the master device among the interconnected devices, i.e., the neighboring devices, by comparing the MAC address sizes.

4. The method for automatically allocating IP addresses based on the ARP protocol according to claim 3, characterized in that: In step S3, Non-master devices send REQ messages to master devices to request IP address allocation and refresh the aging time of neighboring devices through START messages.

5. The method for automatically allocating IP addresses based on the ARP protocol according to claim 4, characterized in that: In step S4, After receiving the REQ message, the master device allocates an available IP address from the IP resource pool to the non-master device and replies to the non-master device via the RESP message.

6. The method for automatically allocating IP addresses based on the ARP protocol according to claim 5, characterized in that: In step S5, When a non-master device receives an RESP message from the master device, it determines whether the IP address assigned by the master device is consistent with the existing IP address. If they are inconsistent, it changes the existing IP address to the IP address assigned by the master device.