A MAC address dynamic management method and device

Through the dynamic management method between the master device and the MAC address management platform, MAC addresses are allocated and recycled on demand, solving the waste caused by too many addresses before the equipment leaves the factory and improving the utilization rate of MAC address resources.

CN117155897BActive Publication Date: 2025-08-19FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311009007.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-10
Publication Date
2025-08-19
Estimated Expiration
2043-08-10

AI Technical Summary

Technical Problem

In the prior art, allocating a large number of MAC addresses to the equipment before leaving the factory leads to waste of resources, which cannot meet the needs of the current network business and may lead to the exhaustion of MAC address resources.

Method used

Through the dynamic management method between the main device and the MAC address management platform, MAC addresses are allocated and recycled on demand, including applying for addresses based on sub-device and new business needs, and detecting the recycling of addresses when the network is withdrawn or shutting down the equipment.

Benefits of technology

It realizes the allocation of MAC addresses on demand, reduces waste, improves resource utilization, and avoids resource tightness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117155897B_ABST
    Figure CN117155897B_ABST
Patent Text Reader

Abstract

The present application discloses a MAC address dynamic management method and apparatus, which is used in a main device, comprising: sending a MAC address application message to a MAC address management platform according to the MAC address requirements of the attached sub-device, so that the MAC address management platform allocates a MAC address to the sub-device; sending a MAC address application message to the MAC address management platform according to the MAC address requirements of the newly added service, so that the MAC address management platform allocates MAC addresses to the sub-device and the main device; reporting the decommissioned sub-device to the MAC address management platform when it is determined that there is a decommissioned sub-device, so that the MAC address management platform reclaims the MAC address of the decommissioned sub-device; reporting the MAC address corresponding to the decommissioned service to the MAC address management platform when it is determined that there is a decommissioned service, so that the MAC address management platform reclaims the MAC address corresponding to the decommissioned service, thereby realizing on-demand allocation of MAC addresses to devices, regular recovery of MAC addresses of decommissioned devices, and reuse of MAC address resources, effectively solving the problems of MAC address resource waste and resource shortage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of network system management, and in particular to a method and apparatus for dynamic management of MAC addresses. Background Art

[0002] Devices and terminal equipment such as routers support various broadband, voice, and multicast services. Each service-carrying device requires a unique MAC address when connected to a wide area network (WAN). During the device manufacturing phase, it's not known how many services the device will support in the live network, so the final number of MAC addresses required is uncertain.

[0003] To ensure that the number of MAC addresses available for devices in existing networks is sufficient, the current practice is to allocate a certain number of MAC addresses to devices before they leave the factory. This number is often much larger than the number of MAC addresses actually required by the device, to avoid service forwarding failures due to insufficient MAC addresses. However, this MAC address allocation method undoubtedly wastes MAC address resources. MAC addresses are globally unique, and if this practice persists, MAC address resources will quickly become depleted.

[0004] Therefore, how to solve the problem of MAC address waste is an urgent issue that we need to solve. Summary of the Invention

[0005] The main purpose of this application is to provide a MAC address dynamic management method and device, which aims to solve the technical problem in the prior art of allocating a large number of MAC addresses to devices before they leave the factory in order to ensure that the number of MAC addresses of the devices meets the business needs of the existing network, resulting in waste of MAC addresses.

[0006] In a first aspect, the present application provides a method for dynamic management of MAC addresses, which is used in a master device and includes:

[0007] Send a MAC address request message to the MAC address management platform according to the MAC address requirements of the connected sub-device, so that the MAC address management platform allocates a MAC address to the sub-device;

[0008] Sending a MAC address request message to the MAC address management platform according to the MAC address requirements of the newly added service, so that the MAC address management platform allocates MAC addresses to the sub-device and the main device;

[0009] Detect whether there is a sub-device that has been withdrawn from the network, and report the withdrawn sub-device to the MAC address management platform when it is determined that the sub-device has been withdrawn from the network, so that the MAC address management platform can reclaim the MAC address of the sub-device that has been withdrawn from the network;

[0010] Detect whether there is a shut-down service, and when it is determined that there is a shut-down service, report the MAC address corresponding to the shut-down service to the MAC address management platform, so that the MAC address management platform reclaims the MAC address corresponding to the shut-down service.

[0011] In a second aspect, the present application further provides a MAC address dynamic management method, which is used in a MAC address management platform, comprising:

[0012] Allocate a MAC address for the slave device according to a MAC address request message sent by the master device, wherein the MAC address request message is generated by the master device according to the MAC address requirement of the slave device;

[0013] Allocate MAC addresses to the sub-device and the main device according to a MAC address request message sent by the main device, wherein the MAC address request message is generated by the main device according to the MAC address requirement of the newly added service;

[0014] Receive a sub-device that has been reported by the master device to have left the network, and recover the MAC address of the sub-device that has been detected and determined by the master device;

[0015] Receive a MAC address corresponding to the shut down service reported by the master device, and recover the MAC address corresponding to the shut down service, wherein the shut down service is detected and determined by the master device.

[0016] In a third aspect, the present application further provides a MAC address dynamic management device, which is used in a master device and includes:

[0017] A first application module, configured to send a MAC address application message to a MAC address management platform according to a MAC address requirement of a connected sub-device, so that the MAC address management platform allocates a MAC address to the sub-device;

[0018] A second application module, which is used to send a MAC address application message to the MAC address management platform according to the MAC address requirements of the newly added service, so that the MAC address management platform allocates MAC addresses to the sub-device and the main device;

[0019] A first reporting module, which is used to detect whether there is a sub-device that has been withdrawn from the network, and report the withdrawn sub-device to the MAC address management platform when it is determined that the sub-device has been withdrawn from the network, so that the MAC address management platform can reclaim the MAC address of the sub-device that has been withdrawn from the network;

[0020] The second reporting module is used to detect whether there is a shut down service, and when it is determined that there is a shut down service, report the MAC address corresponding to the shut down service to the MAC address management platform, so that the MAC address management platform can reclaim the MAC address corresponding to the shut down service.

[0021] In a fourth aspect, the present application further provides a MAC address dynamic management device, which is used in a MAC address management platform, including:

[0022] A first allocation module, configured to allocate a MAC address to a slave device according to a MAC address request message sent by a master device, wherein the MAC address request message is generated by the master device according to a MAC address requirement of the slave device;

[0023] a second allocation module, configured to allocate MAC addresses to the sub-device and the main device according to a MAC address application message sent by the main device, wherein the MAC address application message is generated by the main device according to the MAC address demand of the newly added service;

[0024] A first recovery module, configured to receive a sub-device that has been reported by the master device and recover a MAC address of the sub-device that has been detected and determined by the master device;

[0025] The second recovery module is configured to receive a MAC address corresponding to the shut down service reported by the master device, and recover the MAC address corresponding to the shut down service, wherein the shut down service is detected and determined by the master device.

[0026] The present application provides a MAC address dynamic management method and apparatus. The method is used in a master device and includes the following steps: based on the MAC address requirements of a connected sub-device, sending a MAC address request message to a MAC address management platform so that the MAC address management platform allocates a MAC address to the sub-device; based on the MAC address requirements of a newly added service, sending a MAC address request message to the MAC address management platform so that the MAC address management platform allocates MAC addresses to the sub-device and the master device; detecting whether a sub-device has been delisted and, if so, reporting the delisted sub-device to the MAC address management platform so that the MAC address management platform reclaims the MAC address of the delisted sub-device; and detecting whether a service has been shut down and, if so, reporting the MAC address corresponding to the shut down service to the MAC address management platform so that the MAC address management platform reclaims the MAC address corresponding to the shut down service. This method achieves on-demand allocation of MAC addresses to devices and regular recycling of MAC addresses of delisted devices, thereby reusing MAC address resources and effectively solving the problems of MAC address resource waste and resource shortage. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0028] Figure 1 A flowchart of a MAC address dynamic management method provided in an embodiment of the present application;

[0029] Figure 2 A schematic block diagram of a MAC address dynamic management system provided in an embodiment of the present application;

[0030] Figure 3 A schematic diagram of the data storage format of the MAC address management database;

[0031] Figure 4 A schematic diagram of the data storage format of the MAC address management table;

[0032] Figure 5 This is a flowchart of how to apply for a MAC address when the sub-gateway is powered on for the first time;

[0033] Figure 6 Schematic diagram of the MAC address application process when adding a new service;

[0034] Figure 7 Schematic diagram of the MAC address adjustment process after the sub-device is moved;

[0035] Figure 8 This is a diagram of the MAC address recovery process after the sub-gateway goes offline;

[0036] Figure 9 This is a block diagram of the MAC address dynamic management system in the Mesh networking scenario;

[0037] Figure 10 This is a diagram of the MAC address application process for sub-AP3 when sub-AP1 works in bridge mode;

[0038] Figure 11 This is a diagram of the MAC address application process for sub-AP3 when sub-AP1 works in routing mode;

[0039] Figure 12 A flowchart of a MAC address dynamic management method provided in another embodiment of the present application;

[0040] Figure 13 A schematic block diagram of a MAC address dynamic management device provided in an embodiment of the present application;

[0041] Figure 14 Another embodiment of the present application provides a schematic block diagram of a MAC address dynamic management device.

[0042] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0044] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0045] The embodiments of the present application provide a method and apparatus for dynamic management of MAC addresses.

[0046] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0047] Please refer to Figure 1 , Figure 1 A flowchart of a MAC address dynamic management method provided in an embodiment of the present application.

[0048] like Figure 1 As shown, the method is used in a master device, and the overall idea includes steps S101 to S104.

[0049] Step S101: Send a MAC address request message to a MAC address management platform according to the MAC address requirement of a connected sub-device, so that the MAC address management platform allocates a MAC address to the sub-device.

[0050] Step S102: Send a MAC address request message to a MAC address management platform according to the MAC address requirement of the newly added service, so that the MAC address management platform allocates MAC addresses to the sub-device and the main device.

[0051] Step S103: Detect whether there is a sub-device that has been withdrawn from the network, and report the sub-device that has been withdrawn from the network to the MAC address management platform when it is determined that the sub-device has been withdrawn from the network, so that the MAC address management platform can reclaim the MAC address of the sub-device that has been withdrawn from the network.

[0052] Step S104: Detect whether there is a shut-down service, and when it is determined that there is a shut-down service, report the MAC address corresponding to the shut-down service to the MAC address management platform, so that the MAC address management platform reclaims the MAC address corresponding to the shut-down service.

[0053] It is worth noting that the MAC address dynamic management method of the present application can be used in Figure 2 The MAC address dynamic management system shown in FIG2 is implemented in the embodiment of the present invention, so the MAC address dynamic management method will be described in conjunction with the MAC address dynamic management system. In this embodiment, the MAC address dynamic management system includes a sub-device, a main device, and a MAC address management platform. The sub-device includes a sub-device MAC address management module; the main device includes a main device MAC address management module, a service configuration module, and a MAC address management table; and the MAC address management platform includes a platform MAC address management module and a MAC address management database.

[0054] In some embodiments, the application process of a device when applying for a MAC address can be divided into two cases: the first is the MAC address application process when a sub-device is powered on and connected to the network for the first time, and the second is the MAC address application process when the main device receives a new service.

[0055] Specifically, when the slave device is powered on and accesses the network for the first time to apply for a MAC address, it sends a first application message for applying for a MAC address to the master device to apply for a device MAC for itself, wherein the first application message carries the device serial number of the slave device.

[0056] The main device receives a first application message for the MAC address sent by the sub-device; based on the first application message, the main device sends a second application message for the MAC address to the MAC address management platform, so that the MAC address management platform generates MAC address allocation information based on the second application message, and updates the preset MAC address management database based on the MAC address allocation information, wherein the second application message includes: the device serial number of the sub-device, the number of MAC address applications and the device serial number of the main device and the type of the device applying for the MAC address (the type of the device applying for the MAC address in this process is the sub-device).

[0057] Among them, after receiving the second application message sent by the main device, the MAC address management platform allocates a MAC address to the sub-device according to the second application message, generates MAC address allocation information and sends it to the main device, and updates its own MAC address management database according to the MAC address allocation information.

[0058] The main device receives the MAC address allocation information generated by the MAC address management platform; updates the preset MAC address management table according to the MAC address allocation information, and sends the MAC address allocation information to the sub-device, so that the sub-device configures the MAC address according to the MAC address allocation information.

[0059] like Figure 2 As shown, the MAC address management database is set in the MAC address management platform to record and manage the relevant information of each MAC address. Figure 3 As shown, Figure 3 This is the data storage format of the MAC address management database. The MAC address management database includes 5 fields, namely: MAC address, MAC address allocation status, device serial number to which the MAC address has been allocated, device type to which the MAC address has been allocated, and the main device serial number corresponding to the device to which the MAC address has been allocated. The MAC addresses stored in the MAC address management database can be divided into unallocated MAC addresses and allocated MAC addresses according to the MAC address allocation status. If the MAC address is in the unallocated state, it means that the MAC address can be subsequently allocated to other newly launched devices or services, and the other three subsequent fields are empty; if the MAC address is in the allocated state, it is necessary to record the device serial number to which the MAC address has been allocated. If the device to which the MAC address is allocated is the main device, the main device serial number field does not need to be filled in. If the device to which the MAC address is allocated is a sub-device, it is necessary to record the serial number of the main device corresponding to the sub-device.

[0060] like Figure 2 As shown, the MAC address management table is set in the main device, such as Figure 4 As shown, Figure 4The MAC address management table in the main device is used to store information about the MAC addresses assigned to the main device and its subordinate sub-devices. The MAC address management table includes five fields: the device serial number of each sub-device under the main device, the registration status of each sub-device, the offline time of each sub-device, the number of MAC addresses in each sub-device, and the MAC address information in each sub-device. Among them, the device serial number of the sub-device is the unique identifier of the device; the main device can know whether the sub-device has been offline based on the registration status of the sub-device; the offline time of the sub-device records the time when the sub-device was last offline; the number of MAC addresses of the sub-device is the number of services supported by the sub-device + 1, where the MAC address + 1 is the device MAC of the sub-gateway; the MAC address information of the sub-gateway is the MAC address assigned to each sub-gateway by the MAC address management platform. Therefore, the number of MAC addresses of the sub-device is the number of services + 1.

[0061] In this embodiment, before the sub-device accesses the network, that is, the sub-device is not configured with a MAC address when it leaves the factory; before the main device accesses the network, that is, the main device is preset with two MAC addresses when it leaves the factory, and the two preset MAC addresses will be entered into the MAC address management platform in advance when the network is set up. One of the preset MACs is the device MAC address, and the other is the MAC address of the internet connection, which is used to obtain the network IP address and communicate with the MAC address management platform.

[0062] Specifically, a temporary MAC address is generated when the sub-device is powered on for the first time. The MAC address management module of the sub-device communicates with the MAC address management module of the main device through a private connection to enable the sub-device to send a first application message to the main device to apply for a MAC address. When the main device receives the first application information, the MAC address management module of the main device will send a second application message to the platform MAC address management module of the MAC address management platform to apply for a MAC address. After receiving the second application message, the platform MAC address management module will assign the unassigned MAC address in the MAC address database to the sub-gateway that applied for the MAC address, and return the assigned MAC address to the main device as MAC address allocation information. In addition, the MAC address allocation status is changed from unassigned to assigned in the MAC address management database, and information such as the device serial number of the MAC address, the device type of the MAC address, and the main device serial number corresponding to the device where the MAC address is located are added. Then, after receiving the MAC address allocation information, the main device updates the relevant information in the MAC address management table and sends the MAC address allocation information to the sub-device that applied for the MAC address. After the sub-device receives the MAC address allocation information, it uses the newly applied MAC address to configure the device's MAC address and the service's WAN connection MAC, and the sub-device restarts the MAC address to take effect in the sub-device.

[0063] It is worth noting that the MAC address dynamic management method of this application can be applied to FTTR gateways, as well as gateways with other access methods, such as Ethernet uplink and ADSL uplink. To more clearly describe the technical solution, the following uses the implementation of the MAC address dynamic management method of this application on an FTTR gateway as an example. Therefore, it can be understood that the main device in this embodiment can be an FTTR main gateway, and the sub-device can be an FTTR sub-gateway.

[0064] Exemplary, such as Figure 5 As shown in the figure, the process of applying for a MAC address when a sub-gateway is powered on and connected to the network for the first time includes:

[0065] Step S201: When a sub-gateway is powered on for the first time, it generates a random MAC address and sends a first request message to the main gateway via a proprietary protocol to request a MAC address. The first request message carries the sub-gateway's device serial number. At this stage, the sub-gateway's randomly generated MAC address is only used for communication within the local area network between the sub-gateway and the main gateway. The message sent by the sub-gateway to the main gateway is the first request message.

[0066] Step S202: After receiving the first request message, the master gateway sends a second request message to the MAC address management platform. The second request message contains: the device serial number of the device requesting the MAC address, i.e., the device serial number of the sub-device, the number of MAC addresses requested, the type of device requesting the MAC address (in this process, the type of device requesting the MAC address is a sub-gateway), and the device serial number of the master gateway.

[0067] Step S203: After receiving the second application message from the main gateway, the MAC address management platform allocates a MAC address to the sub-gateway according to the second application message, returns the MAC address allocation information to the main gateway, and updates the information corresponding to the allocated MAC address in the MAC address management database. The updated information is Figure 2 The MAC address allocation status, device serial number of the allocated MAC address, device type of the allocated MAC address, and the main device serial number of the device to which the allocated MAC address belongs.

[0068] In step S204, after receiving the MAC address allocation information from the MAC address management platform, the main gateway updates the newly allocated MAC address information into the MAC address management table. The updated information includes the sub-gateway device serial number, the number of sub-gateway MAC addresses, and the sub-gateway MAC address information.

[0069] In step S205, after the main gateway updates the MAC address management table, it sends the MAC address allocation information to the sub-gateway.

[0070] In step S206, after receiving the allocated MAC address allocation information, the sub-gateway configures the allocated MAC address into the device and restarts the device for the MAC address to take effect.

[0071] Furthermore, when the master device receives a new service, applying for a MAC address includes the following process:

[0072] When the main device receives a new business demand, it sends a third application message of the MAC address to the MAC address management platform, so that the MAC address management platform generates MAC address allocation information according to the third application message, and updates the MAC address management database according to the MAC address allocation information, wherein the third application message includes: the device serial number of the device applying for the MAC address, the number of MAC addresses applied for, the device serial number of the main device, and the type of the device applying for the MAC address (the type of the device applying for the MAC address in this process includes the main device and the sub-device); receives the MAC address allocation information generated by the MAC address management platform; updates the MAC address management table according to the MAC address allocation information, and configures the MAC address of the main device itself according to the main device MAC address allocation information in the MAC address allocation information; sends the sub-device MAC address allocation information in the MAC address allocation information to the sub-device, so that the sub-device configures the MAC address according to the sub-device MAC address allocation information.

[0073] It is worth noting that when the main device receives a new service demand, it will first determine which sub-device or sub-devices will run the new service. After determining the sub-device that runs the new service, the main gateway will apply for a MAC address for the sub-device that runs the new service and the main device itself through the third application message. Therefore, the device serial number of the device applying for the MAC address includes the serial number of the sub-device that runs the new service and the serial number of the main device.

[0074] Specifically, when the service configuration module of the main device receives the configuration of the newly added service, it notifies the MAC address management module of the main device to start the MAC address application process when the new service is added, and apply for a MAC address for the new service. The MAC address management module of the main device sends a third application message for applying for a MAC address to the platform MAC address management module in the MAC address management platform based on the newly added service. In this message, in addition to applying for a MAC for running the newly added service for itself, the main device also needs to apply for a MAC address for the sub-devices under it to run the newly added service. The specific main device sends MAC application information to the MAC address management platform based on the sub-devices required to run the newly added service and the MAC address required for the sub-devices to run the newly added service, as well as the MAC address of the main device itself to run the newly added service. Therefore, the third application message needs to apply for MAC addresses for multiple devices, and the message sent by the main device to the MAC address management platform contains application information for multiple devices, including: the device serial number of the device applying for the MAC address, the number of MAC addresses applied for, the device type, and the device serial number of the main device (the field corresponding to the main device does not need to be filled in). The platform MAC address management module allocates the unallocated MAC addresses in the MAC address database to the device that applies for the MAC address based on the third application message sent by the main device. The allocated MAC address is returned to the main device in the form of MAC address allocation information, and the relevant data in the MAC address management database is updated. The MAC address allocation information here includes the main device MAC address allocation information and the sub-device MAC address allocation information. Then, after receiving the MAC address allocation message, the main device updates the MAC address management table according to the MAC address allocation information, and configures the main device's own MAC address according to the main device MAC address allocation information so that the newly added service can run on the main device. Then the main device sends the sub-device MAC address allocation information to the sub-device, and the sub-device configures its own MAC address according to the MAC address allocation information so that the newly added service can run on the sub-device. It should be understood that the update method of the MAC address management database and the MAC address management table is the same as the update method when the sub-device is powered on and applies for a MAC address for the first time, and will not be repeated here.

[0075] Exemplary, such as Figure 6 As shown, when the MAC address management module of the main gateway receives a message from the service configuration module and a new service is added, the main gateway executes step S301 and sends a third application message to the MAC address management platform. The third message sent by the main gateway to the MAC address management platform contains MAC address application information of multiple devices, including: the device serial number of the device applying for the MAC address, the number of MAC addresses applied for, the type of device applying for the MAC address (the type of device applying for the MAC address in this process includes the main gateway and the sub-gateway) and the device serial number of the main device. When the device applying for the MAC address is the main gateway, the field of the device serial number of the main device does not need to be filled in.

[0076] In step S302, after receiving the message, the MAC address management platform allocates new MAC addresses to the main gateway and sub-gateway devices running the new service, updates the MAC address management database, and responds with MAC address allocation information. The MAC address allocation information includes the main gateway MAC address allocation information and the sub-gateway MAC address allocation information, which contain the main gateway MAC address and the sub-gateway MAC address, respectively.

[0077] In step S303, after receiving the MAC address allocation information, the primary gateway updates the MAC address management table and configures the MAC address allocated to itself in the primary gateway MAC address allocation information into the device.

[0078] In step S304, the main gateway sends the sub-gateway MAC address allocation information to the sub-gateway and informs the sub-gateway of the newly added service.

[0079] In step S305, after receiving the sub-gateway MAC address allocation information, the sub-gateway configures the allocated MAC address into the device.

[0080] Furthermore, after the sub-device configures the MAC address according to the MAC address allocation information, the method further includes:

[0081] Receive a MAC address confirmation message sent by the sub-device after it is restarted and powered on, wherein the MAC address confirmation message includes: the device serial number of the sub-device, the number of MAC addresses of the sub-gateway, information of each MAC address of the sub-gateway, and the device serial number of the main device; determine whether the MAC address confirmation message is consistent with the information in the MAC address management table; if they are consistent, reply to the sub-device that the MAC address confirmation is successful; if they are inconsistent, send the MAC address confirmation message to the MAC address management platform, so that the MAC address management platform confirms the MAC address of the sub-device based on the MAC address confirmation message and the information in the MAC address management database.

[0082] The MAC address management platform confirms the MAC address of the sub-device based on the MAC address confirmation message and the information in the MAC address management database, including: determining whether the MAC address confirmation message is consistent with the information in the preset MAC address management database, wherein the MAC address confirmation message is sent to the master device after the sub-device is restarted and powered on. If the device serial number of the master device in the MAC address confirmation message is the serial number of another master device and the remaining information is consistent, the other master device is notified to delete the information of the sub-device from its corresponding MAC address management table; the MAC address management database is updated based on the MAC address confirmation message, and the master device is notified to update the MAC address management table based on the MAC address confirmation message, so that the master device replies to the sub-device that the MAC address confirmation is successful after updating the MAC address management table.

[0083] Specifically, a device needs to go through the MAC address application process when it first goes online. In addition to the first time, electronic devices need to register with the main device after each power outage and restart, and report the device's current MAC address to ensure that the MAC address of the sub-device is within the management range of the main device. Each time a sub-device is powered on and restarted, the MAC address management module of the sub-device will also send a MAC address confirmation message to the MAC address management module of the main device. The purpose of this message is to confirm whether the MAC address is within the MAC address management range of the main device. If it is not within the management range, it is generally because the sub-device has been moved to another main device, or the sub-device has not been online for a long time and its MAC address has been recycled. If a sub-device is moved to another master device, the master device will follow the device migration process. This process includes: the sub-device sends a MAC address confirmation message to the master device to report its MAC address information. The master device will query its built-in MAC address management table. If the sub-device's MAC address is in the MAC address management table, it will reply to the sub-device, stating that the MAC address has been successfully confirmed. If the sub-device's MAC address is not found, the master device's MAC address management module will report the sub-device's device information and its own device information to the platform MAC address management module of the MAC address management platform. The platform MAC address management module of the MAC address management platform will then query the MAC address management database for the sub-gateway's MAC address. If the platform MAC address management module finds that the sub-device's device information and MAC address are correct, but the master device information is incorrect, this indicates that the sub-device has been moved and its MAC address information is not in the current master device it is reporting to, but is in another master device. The sub-device's MAC address information can be adjusted according to the migration process. If the platform MAC address management module finds that the sub-device's MAC address has been assigned to another device, it will reply to the master device, following the MAC address application process for the sub-device upon initial power-up, initiating the new device MAC address application process.

[0084] Exemplary, such as Figure 7 As shown, Figure 7 To determine the MAC address information adjustment process after the sub-device is moved:

[0085] Step S401: After restarting and powering on, the sub-gateway sends a MAC address confirmation message to the master gateway 1. This message confirms whether the sub-gateway's MAC address is valid and consistent with the information in the master gateway's MAC address management table. The MAC address confirmation message includes the sub-gateway's device serial number, the number of MAC addresses, information about each MAC address, the device type, and the gateway serial number of the parent master gateway.

[0086] Step S402: After receiving the message, the main gateway 1 searches for the MAC address information of the sub-gateway in the MAC address management table. If the main gateway 1 finds the sub-gateway MAC address information and it is consistent with the information reported by the sub-gateway, it means that the sub-gateway MAC address information is confirmed successfully, and the confirmation process ends and executes step S409; otherwise, execute step S403.

[0087] Step S403: If the main gateway 1 fails to find the sub-gateway MAC address information, it sends a MAC address confirmation message to the MAC address management platform, which checks whether the sub-gateway MAC address is valid.

[0088] Step S404: After receiving the message, the MAC address management platform searches for the corresponding device information based on the MAC address information in the MAC address confirmation message. If the sub-gateway information is correct and the main gateway 1 information is incorrect, but is another main gateway 2, it means that the sub-gateway device has been newly moved from the main gateway 2 to the current main gateway 1.

[0089] Step S405 : The MAC address management platform sends a message to notify the main gateway 2 to delete the device information and MAC address information of the sub-gateway in the MAC address management table of the main gateway 2 .

[0090] Step S406: After deleting the sub-gateway information, the FTTR main gateway 2 replies to the MAC address management platform that the sub-gateway device information is successfully deleted.

[0091] Step S407: After receiving the message reply from the master gateway 2, the MAC address management platform adjusts the master gateway information corresponding to the sub-gateway in the MAC address database to the information of the master gateway 1, and replies to the master gateway 1, and the MAC address adjustment is completed.

[0092] Step S408: After receiving the message, the main gateway 1 adds the MAC address of the sub-gateway to its own MAC address management data table.

[0093] Step S409: Group gateway 1 replies with the sub-gateway MAC address to confirm success.

[0094] Furthermore, the main device detects whether there is a de-networked sub-device, and reports the de-networked sub-device to the MAC address management platform when it is determined that there is the de-networked sub-device, so that the MAC address management platform can reclaim the MAC address of the de-networked sub-device, including: periodically detecting the registration status of the sub-device to count the continuous offline time of the sub-device, and when the continuous offline time of the sub-device exceeds a preset time threshold, determining that the sub-device is a de-networked sub-device; sending a first MAC address revocation message to the MAC address management platform, so that the MAC address management platform deletes the information of the de-networked sub-device in the MAC address database to reclaim the MAC address of the de-networked sub-device, wherein the first MAC address revocation message includes the device serial number of the de-networked sub-device; after the MAC address management platform deletes the information of the de-networked sub-device, the information of the de-networked sub-device is deleted from the MAC address data table.

[0095] Specifically, the master device will record the registration status of the connected sub-devices. If a sub-device goes offline, the device will record the time when the sub-device went offline. The MAC address management module of the master device will also periodically query the offline time of the offline sub-device. The period here can be configured according to needs. In this embodiment, the default period is 24 hours. The master device compares the recorded sub-device's most recent offline time with the current time. If it exceeds the preset time threshold, it will send a message to the MAC address management platform to reclaim the MAC address of the offline sub-device. The time threshold is configurable, and in this embodiment, it is 1 year. In addition, after the MAC address is reclaimed, the sub-device needs to apply for a MAC address according to the new device MAC address application process described above when it comes online again. This will not be repeated here.

[0096] Exemplary, such as Figure 8 As shown in the figure, this is the MAC address recovery process after the sub-gateway goes offline: the main gateway will record the registration status of the sub-gateway. If the sub-gateway goes offline, the main gateway will record the time when the sub-gateway goes offline.

[0097] Step S501: The main gateway periodically queries the registration status of the sub-gateway. If the registration status of the sub-gateway is offline, the offline time is compared with the current time. If the offline time exceeds the preset time threshold compared with the current time, step S502 is executed.

[0098] Step S502: Send a MAC address reclaim message to the MAC address management platform, wherein the message carries the device serial number corresponding to the MAC address to be reclaimed.

[0099] Step S503: After receiving the message, the MAC address management platform deletes the information of the relevant sub-gateway device in the MAC address management database to release the MAC address, and replies to the main gateway that the deletion is successful.

[0100] Step S504: After receiving the reply message from the MAC address management platform, the main gateway deletes the MAC address information of the related sub-device from the MAC address management table, thereby realizing the recovery of the offline MAC address.

[0101] Furthermore, it detects whether there is a shut down service, and when it is determined that there is a shut down service, reports the MAC address corresponding to the shut down service to the MAC address management platform, so that the MAC address management platform can reclaim the MAC address corresponding to the shut down service, including: when it is determined that there is a shut down service, sending a second MAC address reclaim message to the MAC address management platform, so that the MAC address management platform changes the allocation status of the MAC address corresponding to the shut down service to unallocated in the MAC address database, so as to reclaim the MAC address corresponding to the shut down service, wherein the second MAC address reclaim message includes the MAC address information of the running shut down service; after the MAC address management platform changes the allocation status of the MAC address corresponding to the shut down service to unallocated, the information of the MAC address corresponding to the running shut down service is deleted from the MAC address data table.

[0102] Specifically, the master device can receive notification information about the shutdown of a service, thereby determining that a service has been shut down. After determining to shut down the service, the master device will determine the MAC address of the master device and the MAC address of the sub-device previously used to run the shut-down service, and then send a second MAC address reclaim message containing the MAC address information of the service being shut down to the MAC address management platform. After receiving the second MAC address reclaim message, the MAC address management platform will modify the status of the MAC address running the shut-down service to unallocated, and send a MAC address status modification completion message to the master device. After receiving the message, the master device deletes the information of the MAC address corresponding to the service being shut down from the MAC address data table, thereby completing the recovery of the MAC address of the service being shut down.

[0103] It is worth noting that the MAC address dynamic management method provided in this application is also used in networking scenarios with secondary sub-devices, and can dynamically manage the MAC addresses of the secondary sub-devices in the scenario.

[0104] Specifically, when a secondary sub-device is hung under the sub-device and the working mode of the sub-device is a bridge mode, the fourth application message of the MAC address is directly sent to the main device after the secondary sub-device is powered on for the first time, wherein the fourth application message carries the serial number of the secondary sub-device; the main device sends a fifth application message of the MAC address to the MAC address management platform according to the fourth application message, wherein the fifth application message carries the device serial number of the secondary sub-device, the number of MAC address applications, the type of the device applying for the MAC address (the type of the device applying for the MAC address in this process is the secondary sub-device) and the device serial number of the main device; the MAC address management platform generates MAC address allocation information according to the fifth application message and sends it to the main device, and updates the MAC address management database according to the MAC address allocation information; the main device updates the MAC address management table according to the MAC address allocation information, and sends the MAC address allocation information directly to the secondary sub-device, so that the secondary sub-device configures the MAC address according to the MAC address allocation information.

[0105] Furthermore, when the sub-device has a secondary sub-device hanging under it and the working mode of the sub-device is routing mode, a fourth application message is sent to the sub-device when the secondary sub-device is powered on for the first time; the sub-device forwards the fourth application message to the main device, so that the main device sends a fifth application message to the MAC address management platform according to the fourth application message; the MAC address management platform generates MAC address allocation information according to the fourth application message and sends it to the main device, and updates the MAC address management database according to the MAC address allocation information; the main device updates the MAC address management table according to the MAC address allocation information, and sends the MAC address allocation information to the sub-device; the sub-device forwards the MAC address allocation information to the secondary sub-device, so that the secondary sub-device configures the MAC address according to the MAC address allocation information.

[0106] Specifically, this embodiment is described using the dynamic management of MAC addresses in a Mesh networking scenario. Figure 9 As shown in the figure, this is a block diagram of the MAC address dynamic management system in the Mesh networking scenario. Figure 9The mesh network is a multi-level network. The master AP serves as the controller, while sub-AP1, sub-AP2, and sub-AP3 serve as agents. Sub-AP1 and sub-AP2 are connected to the master AP, and sub-AP1 is connected to sub-AP3. Each master and sub-AP can have multiple sub-APs. The master AP is the primary device, sub-AP1 and sub-AP2 are sub-devices, and sub-AP3 is the secondary sub-device. The master AP is pre-configured with a MAC address for communication with the MAC address management platform; other sub-APs do not require MAC addresses.

[0107] In the Mesh networking scenario, the functions and workflows implemented by the master AP are similar to those of the Figure 2 The functions and workflows implemented by the master device are the same. If there is only one level of networking in the Mesh network, that is, the master AP only has sub-AP1 and sub-AP2, and sub-AP1 and sub-AP2 do not have secondary sub-APs, the workflows of sub-AP1 and sub-AP2 are the same. Figure 2 The workflow of the neutron device is the same, but if the Mesh network is larger than one level, that is, sub-AP1 or sub-AP2 is connected to other secondary sub-APs, such as Figure 9 Neutron AP1 is connected to sub-AP3. In addition to completing its own MAC address application and reporting, sub-AP1 also handles the MAC address application and reporting workflow of the connected device AP3 differently depending on its working mode.

[0108] The master AP is responsible for MAC address management for all its subordinate sub-APs. The master AP MAC address management module communicates with the platform MAC address management module via a TCP connection to dynamically apply for, adjust, and reclaim MAC addresses for itself and all sub-APs. The MAC address management platform's MAC address management database stores the allocation of all MAC addresses. Sub-APs operate in two modes: bridge mode and routing mode. Depending on the operating mode, the MAC address application process for subordinate secondary sub-APs varies.

[0109] When a sub-AP operates in bridging mode, it provides a communication channel only for its subordinate secondary sub-APs. That is, when sub-AP1 operates in bridging mode, sub-AP3 accesses the Mesh network through sub-AP1 but obtains its IP address from the master AP. In this case, sub-AP3 establishes a private connection with the master AP, and its MAC address management module communicates with the master AP's MAC address management module over this private connection. This private connection allows sub-AP3's MAC address management module to request a MAC address and report MAC address information to the master AP's MAC address management module during initial online access and after a power-off restart.

[0110] If the sub-AP works in routing mode, the sub-AP assigns an IP address to its subordinate secondary sub-AP. That is, when sub-AP1 works in routing mode, sub-AP3 obtains an IP address from sub-AP1. In this case, sub-AP3 establishes a private connection with sub-AP1, and the MAC address management module of sub-AP3 communicates with the MAC address management module of sub-AP1 through the private connection. The MAC address management module of sub-AP3 performs the MAC address application and MAC address reporting processes with the MAC address management module of sub-AP1 when it first goes online and after power failure and restart. After receiving the MAC address application and MAC address reporting messages from the MAC address management module of sub-AP3, the MAC address management module of sub-AP1 forwards the messages to the MAC address management module of the master AP, which then handles the MAC address application and reporting processes.

[0111] It is worth noting that since the topology structure in the Mesh network will change according to factors such as the device's WiFi signal strength and stability, and changes in the device's physical location, the sub-AP1 working in routing mode does not record the MAC address information of the sub-AP3. The MAC address information of all sub-APs is only saved in the MAC address management table set in the main AP.

[0112] Exemplary, such as Figure 10 As shown in FIG, this figure shows the MAC address application process of sub-AP3 when sub-AP1 works in bridge mode.

[0113] When sub-AP3 is first powered on and connected to the network, it generates a random MAC address. Sub-AP3 connects to the Mesh network through sub-AP1 and establishes a private connection with the master AP. Sub-AP1 operates in bridge mode, providing a communication channel only between the master AP and sub-AP3. During this phase, the randomly generated MAC address of sub-AP3 is used only for communication within the LAN between sub-AP3 and the master AP.

[0114] Step S601: The sub-AP3 sends a fourth application message to the master AP through a private protocol to apply for a MAC address. The message carries the device serial number of the sub-AP3.

[0115] Step S602: After receiving the fourth application message, the master AP sends a fifth application message to the MAC address management platform. The fifth application message contains: the device serial number of AP3, the number of MAC addresses applied for, the type of device applying for the MAC address (in this process, the type of device applying for the MAC address is a secondary sub-AP), and the device serial number of the master AP.

[0116] Step S603: After receiving the fifth application message, the MAC address management platform allocates a MAC address to the sub-AP3 according to the fifth application message, updates the information corresponding to the allocated MAC address in the platform MAC address database, and returns the sub-MAC address allocation information to the master AP.

[0117] Step S604: After receiving the MAC address allocation information from the MAC address management platform, the master AP updates the MAC address management table based on the MAC address allocation information. The updated information includes: the device serial number of the slave AP3, the number of MAC addresses of the slave AP3, and the MAC address information of the slave AP3.

[0118] In step S605 , after the master AP updates the MAC address management table, it sends the MAC address allocation information back to the slave AP3 .

[0119] Step S606: After receiving the MAC address allocation information, the sub-AP3 configures the allocated MAC address into the device and restarts the device to take effect.

[0120] Exemplary, such as Figure 11 As shown in the figure, this is the MAC address application process of sub-AP3 when sub-AP1 works in routing mode:

[0121] Sub-AP3 and Sub-AP1 are connected to the Mesh network. Sub-AP1 operates in routing mode. Sub-AP3 obtains an IP address from Sub-AP1 and establishes a private connection with Sub-AP1. When Sub-AP3 is first connected to the network and powered on, it generates a random MAC address. During this phase, Sub-AP3's randomly generated MAC address is used only for communication within the LAN between Sub-AP3 and Sub-AP1.

[0122] Step S701: Sub-AP3 sends a fourth application message to sub-AP1 through a proprietary protocol to apply for a MAC address. The fourth application message carries the device serial number of sub-AP3.

[0123] Step S702: After receiving the fourth application message from the sub-AP3, the sub-AP1 forwards the fourth application message to the master AP, so as to apply for an address from the MAC address management platform through the master AP.

[0124] Step S703: After receiving the fourth message, the master AP sends a fifth message to the MAC address management platform.

[0125] Step S704: After receiving the fifth application message, the MAC address management platform allocates MAC addresses to the sub-AP3 according to the number of MAC addresses in the fifth application message, updates the information corresponding to the allocated MAC addresses in the MAC address management database, and sends MAC address allocation information to the master AP.

[0126] Step S705: After receiving the MAC address allocation information in the MAC address reply, the master AP updates the newly allocated MAC address into the MAC address management table.

[0127] Step S706: After updating the MAC address management table, the master AP replies to the slave AP1 with the MAC address allocation information.

[0128] Step S707: After receiving the MAC address allocation information, the sub-AP1 replies the MAC address allocation information to the sub-AP3.

[0129] Step S708: After receiving the MAC address allocation information, the sub-AP3 configures the allocated MAC address into the device and restarts the device for the address to take effect.

[0130] The embodiment of the present application provides a MAC address dynamic management method, which has the beneficial effect of allocating MAC addresses on demand for newly connected devices and new services through dynamic MAC address management, and regularly recovering MAC addresses of devices that have been delisted or whose services have been shut down, so as to reuse MAC address resources and effectively solve the problems of MAC address resource waste and resource shortage.

[0131] Please refer to Figure 12 , Figure 12 A flowchart of a MAC address dynamic management method provided in an embodiment of the present application.

[0132] like Figure 12 As shown, the method is used in a MAC address management platform and includes:

[0133] Step 801: Allocate a MAC address to a slave device according to a MAC address request message sent by a master device, wherein the MAC address request message is generated by the master device according to the MAC address requirement of the slave device.

[0134] Step 802: Allocate MAC addresses to the sub-device and the main device according to the MAC address request message sent by the main device, wherein the MAC address request message is generated by the main device according to the MAC address requirement of the newly added service;

[0135] Step 803: Receive the network-deregistered sub-device reported by the master device, and retrieve the MAC address of the network-deregistered sub-device, wherein the network-deregistered sub-device is detected and determined by the master device;

[0136] Step 804: Receive the MAC address corresponding to the shut down service reported by the master device, and recover the MAC address corresponding to the shut down service, wherein the shut down service is detected and determined by the master device.

[0137] The method further includes:

[0138] Receive a MAC address confirmation message of the sub-device sent by the main device, and determine whether the MAC address confirmation message is consistent with information in a preset MAC address management database, wherein the MAC address confirmation message is sent to the main device after the sub-device is restarted and powered on.

[0139] If the device serial number of the master device in the MAC address confirmation message is the serial number of the other master device and the rest of the information is consistent, instruct the other master device to delete the information of the sub-device in its corresponding MAC address management table;

[0140] The MAC address management database is updated according to the MAC address confirmation message, and the master device is notified to update the MAC address management table according to the MAC address confirmation message, so that the master device replies to the slave device that the MAC address confirmation is successful after updating the MAC address management table.

[0141] Please refer to Figure 13 , Figure 13 A schematic block diagram of a MAC address dynamic management device provided in an embodiment of the present application.

[0142] like Figure 13 As shown, the device is used in a main device, including:

[0143] A first application module, configured to send a MAC address application message to a MAC address management platform according to a MAC address requirement of a connected sub-device, so that the MAC address management platform allocates a MAC address to the sub-device;

[0144] A second application module, which is used to send a MAC address application message to the MAC address management platform according to the MAC address requirements of the newly added service, so that the MAC address management platform allocates MAC addresses to the sub-device and the main device;

[0145] A first reporting module, which is used to detect whether there is a sub-device that has been withdrawn from the network, and report the withdrawn sub-device to the MAC address management platform when it is determined that the sub-device has been withdrawn from the network, so that the MAC address management platform can reclaim the MAC address of the sub-device that has been withdrawn from the network;

[0146] The second reporting module is used to detect whether there is a shut down service, and when it is determined that there is a shut down service, report the MAC address corresponding to the shut down service to the MAC address management platform, so that the MAC address management platform can reclaim the MAC address corresponding to the shut down service.

[0147] like Figure 14 As shown, Figure 14 A schematic block diagram of a MAC address dynamic management device provided in an embodiment of the present application.

[0148] The device is used in the MAC address management platform, including:

[0149] A first allocation module, configured to allocate a MAC address to a slave device according to a MAC address request message sent by a master device, wherein the MAC address request message is generated by the master device according to a MAC address requirement of the slave device;

[0150] a second allocation module, configured to allocate MAC addresses to the sub-device and the main device according to a MAC address application message sent by the main device, wherein the MAC address application message is generated by the main device according to the MAC address demand of the newly added service;

[0151] A first recovery module, configured to receive a sub-device that has been reported by the master device and recover a MAC address of the sub-device that has been detected and determined by the master device;

[0152] The second recovery module is configured to receive a MAC address corresponding to the shut down service reported by the master device, and recover the MAC address corresponding to the shut down service, wherein the shut down service is detected and determined by the master device.

[0153] It should be noted that those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned embodiments and will not be repeated here.

[0154] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0155] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments. The above description is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A MAC address dynamic management method, characterized in that: The method is used in a master device and includes: Send a MAC address request message to the MAC address management platform according to the MAC address requirements of the connected sub-device, so that the MAC address management platform allocates a MAC address to the sub-device; Sending a MAC address request message to the MAC address management platform according to the MAC address requirements of the newly added service, so that the MAC address management platform allocates MAC addresses to the sub-device and the main device; Detect whether there is a sub-device that has been withdrawn from the network, and report the withdrawn sub-device to the MAC address management platform when it is determined that the sub-device has been withdrawn from the network, so that the MAC address management platform can reclaim the MAC address of the sub-device that has been withdrawn from the network; Detect whether there is a shut-down service, and when it is determined that there is a shut-down service, report the MAC address corresponding to the shut-down service to the MAC address management platform, so that the MAC address management platform reclaims the MAC address corresponding to the shut-down service; The method further includes: Receive a MAC address confirmation message sent by the sub-device after it is restarted and powered on, wherein the MAC address confirmation message includes: a device serial number of the sub-device, the number of MAC addresses of the sub-device, information about each MAC address of the sub-device, and a device serial number of the main device; Determine whether the MAC address confirmation message is consistent with information in a preset MAC address management table; If they are consistent, the MAC address is replied to the sub-device to confirm success; If they are inconsistent, sending the MAC address confirmation message to the MAC address management platform, so that the MAC address management platform confirms the MAC address of the sub-device according to the MAC address confirmation message and information in the MAC address management database; The main device includes a MAC address management table, and the MAC address management platform includes a MAC address management database.

2. The MAC address dynamic management method according to claim 1, characterized in that: Sending a MAC address request message to a MAC address management platform according to a MAC address requirement of a connected sub-device, so that the MAC address management platform allocates a MAC address to the sub-device, including: Receive a first application message for a MAC address sent by the sub-device, wherein the first application message includes a device serial number of the sub-device; Sending a second MAC address application message to the MAC address management platform according to the first application message, so that the MAC address management platform generates MAC address allocation information according to the second application message, and updates a preset MAC address management database according to the MAC address allocation information, wherein the second application message includes: a device serial number of the sub-device, a number of MAC addresses applied for, and a device serial number of the master device; Receiving MAC address allocation information generated by the MAC address management platform; The preset MAC address management table is updated according to the MAC address allocation information, and the MAC address allocation information is sent to the sub-device, so that the sub-device configures the MAC address according to the MAC address allocation information.

3. The MAC address dynamic management method according to claim 1, characterized in that: According to the MAC address requirements of the newly added service, a MAC address request message is sent to the MAC address management platform so that the MAC address management platform allocates a MAC address to the sub-device, further comprising: Upon receiving a new service demand, sending a third application message of the MAC address to the MAC address management platform, so that the MAC address management platform generates MAC address allocation information according to the third application message, and updates the MAC address management database according to the MAC address allocation information, wherein the third application message includes: the device serial number of the device applying for the MAC address, the number of MAC addresses applied for, and the device serial number of the master device; Receiving MAC address allocation information generated by the MAC address management platform; Updating the MAC address management table according to the MAC address allocation information, and configuring the MAC address of the master device itself according to the master device MAC address allocation information in the MAC address allocation information; The sub-device MAC address allocation information in the MAC address allocation information is sent to the sub-device, so that the sub-device configures a MAC address according to the sub-device MAC address allocation information.

4. The MAC address dynamic management method according to claim 1, characterized in that: Detecting whether there is a sub-device that has been withdrawn from the network, and reporting the sub-device that has been withdrawn from the network to the MAC address management platform when it is determined that the sub-device has been withdrawn from the network, so that the MAC address management platform reclaims the MAC address of the sub-device that has been withdrawn from the network, including: Periodically detecting the registration status of the sub-device to count the continuous offline time of the sub-device, and determining that the sub-device is a disconnected sub-device when the continuous offline time of the sub-device exceeds a preset time threshold; Sending a first MAC address reclaim message to the MAC address management platform, so that the MAC address management platform deletes the information of the withdrawn sub-device from the MAC address management database to reclaim the MAC address of the withdrawn sub-device, wherein the first MAC address reclaim message includes the device serial number of the withdrawn sub-device; After the MAC address management platform deletes the information of the sub-device that has been delisted, the information of the sub-device that has been delisted is deleted from the MAC address management table.

5. The MAC address dynamic management method according to claim 1, characterized in that: Detecting whether there is a shut-down service, and when determining that there is a shut-down service, reporting the MAC address corresponding to the shut-down service to the MAC address management platform so that the MAC address management platform reclaims the MAC address corresponding to the shut-down service, including: When it is determined that there is a shut down service, a second MAC address reclaiming message is sent to the MAC address management platform, so that the MAC address management platform changes the allocation status of the MAC address corresponding to the shut down service to unallocated in the MAC address management database, so as to reclaim the MAC address corresponding to the shut down service, wherein the second MAC address reclaiming message includes the MAC address information of the MAC address running the shut down service; After the MAC address management platform modifies the allocation status of the MAC address corresponding to the disabled service to unallocated, the information of the MAC address corresponding to the disabled service is deleted from the MAC address management table.

6. A MAC address dynamic management method, characterized in that: This method is used in a MAC address management platform and includes: Allocate a MAC address for the slave device according to a MAC address request message sent by the master device, wherein the MAC address request message is generated by the master device according to the MAC address requirement of the slave device; Allocate MAC addresses to the sub-device and the main device according to a MAC address request message sent by the main device, wherein the MAC address request message is generated by the main device according to the MAC address requirement of the newly added service; Receive a sub-device that has been reported by the master device to have left the network, and recover the MAC address of the sub-device that has been detected and determined by the master device; Receiving a MAC address corresponding to the shut down service reported by the master device, and recovering the MAC address corresponding to the shut down service, wherein the shut down service is detected and determined by the master device; The method further includes: receiving a MAC address confirmation message of the slave device sent by the master device, and determining whether the MAC address confirmation message is consistent with information in a preset MAC address management database, wherein the MAC address confirmation message is sent by the slave device to the master device after being restarted and powered on; If the device serial number of the master device in the MAC address confirmation message is the serial number of the other master device and the rest of the information is consistent, instruct the other master device to delete the information of the sub-device in its corresponding MAC address management table; updating the MAC address management database according to the MAC address confirmation message, and notifying the master device to update the MAC address management table according to the MAC address confirmation message, so that the master device replies to the slave device that the MAC address confirmation is successful after updating the MAC address management table; The main device includes a MAC address management table, and the MAC address management platform includes a MAC address management database.

7. A MAC address dynamic management device for implementing the MAC address dynamic management method according to any one of claims 1 to 5, characterized in that: include: A first application module, configured to send a MAC address application message to a MAC address management platform according to a MAC address requirement of a connected sub-device, so that the MAC address management platform allocates a MAC address to the sub-device; A second application module, which is used to send a MAC address application message to the MAC address management platform according to the MAC address requirements of the newly added service, so that the MAC address management platform allocates MAC addresses to the sub-device and the main device; A first reporting module, which is used to detect whether there is a sub-device that has been withdrawn from the network, and report the withdrawn sub-device to the MAC address management platform when it is determined that the sub-device has been withdrawn from the network, so that the MAC address management platform can reclaim the MAC address of the sub-device that has been withdrawn from the network; A second reporting module, which is used to detect whether there is a shut-down service, and when it is determined that there is a shut-down service, report the MAC address corresponding to the shut-down service to the MAC address management platform, so that the MAC address management platform can reclaim the MAC address corresponding to the shut-down service; The device is also used for: Receive a MAC address confirmation message sent by the sub-device after it is restarted and powered on, wherein the MAC address confirmation message includes: a device serial number of the sub-device, the number of MAC addresses of the sub-device, information about each MAC address of the sub-device, and a device serial number of the main device; Determine whether the MAC address confirmation message is consistent with information in a preset MAC address management table; If they are consistent, the MAC address is replied to the sub-device to confirm success; If they are inconsistent, sending the MAC address confirmation message to the MAC address management platform, so that the MAC address management platform confirms the MAC address of the sub-device according to the MAC address confirmation message and information in the MAC address management database; The main device includes a MAC address management table, and the MAC address management platform includes a MAC address management database.

8. A MAC address dynamic management device for implementing the MAC address dynamic management method according to claim 6, characterized in that: include: A first allocation module, configured to allocate a MAC address to a slave device according to a MAC address request message sent by a master device, wherein the MAC address request message is generated by the master device according to a MAC address requirement of the slave device; a second allocation module, configured to allocate MAC addresses to the sub-device and the main device according to a MAC address application message sent by the main device, wherein the MAC address application message is generated by the main device according to the MAC address demand of the newly added service; A first recovery module, configured to receive a sub-device that has been reported by the master device and recover a MAC address of the sub-device that has been detected and determined by the master device; a second recovery module, configured to receive a MAC address corresponding to the shut down service reported by the master device, and recover the MAC address corresponding to the shut down service, wherein the shut down service is detected and determined by the master device; The device is also used for: receiving a MAC address confirmation message of the slave device sent by the master device, and determining whether the MAC address confirmation message is consistent with information in a preset MAC address management database, wherein the MAC address confirmation message is sent by the slave device to the master device after being restarted and powered on; If the device serial number of the master device in the MAC address confirmation message is the serial number of the other master device and the rest of the information is consistent, instruct the other master device to delete the information of the sub-device in its corresponding MAC address management table; updating the MAC address management database according to the MAC address confirmation message, and notifying the master device to update the MAC address management table according to the MAC address confirmation message, so that the master device replies to the slave device that the MAC address confirmation is successful after updating the MAC address management table; The main device includes a MAC address management table, and the MAC address management platform includes a MAC address management database.

Citation Information

Patent Citations

  • Method, device and system for distributing MAC address

    CN108023972A