Equipment MAC (Media Access Control) address secondary rewriting and recycling method

By establishing a MAC address management platform in the device and verifying the target MAC address and CRC verification password on the device, the problem that the manufacturer cannot recover the MAC address modified by the dealer in time is solved, and the security and reliability of the rewriting process are improved.

CN119728647AActive Publication Date: 2025-03-28NANJING SHIDIAN ELECTRONIC TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411613748.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-03-28
Estimated Expiration
2044-11-13

AI Technical Summary

Technical Problem

In the prior art, manufacturers cannot recover the equipment MAC address modified by the dealer in time, and the existing equipment MAC address rewriting method is unsafe and reliable.

Method used

By pre-establishing a MAC address management platform in the device and allowing device providers, dealers and terminal customers to connect to the platform, the platform records the rewrite information every time the dealer rewrites the device's MAC address, and the manufacturer can track the MAC address modification through the platform. At the same time, before rewriting the MAC address, the device judges the legality and uniqueness of the target MAC address and CRC verification password, and only rewrites it after passing the verification.

Benefits of technology

It enables the manufacturer to timely retrieve the MAC address modified by the dealer, and improves the security and reliability of the equipment MAC address rewriting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728647A_ABST
    Figure CN119728647A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a device MAC address secondary rewriting and recycling method, and the method comprises the steps: obtaining a target MAC address and a CRC verification password when the MAC address of a device needs to be rewritten for the second time; and issuing the target MAC address and the CRC verification password to the equipment, enabling the equipment to judge whether the target MAC address meets the requirement and whether the CRC verification password is correct, and changing the original MAC address into the target MAC address when the target MAC address meets the requirement and the CRC verification password is correct. The information that the MAC address of the device is rewritten is fed back to a pre-established MAC address management platform to be stored, the device provider is connected with the MAC address management platform, and the device provider can obtain the data information stored by the MAC address management platform from the MAC address management platform. According to the embodiment of the invention, a manufacturer can take back the modified MAC address in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to a method for secondary rewriting and recycling a device MAC address. Background Art

[0002] When a manufacturer produces network equipment, the MAC address obtained by the manufacturer will be placed in the equipment first. The dealer will then replace it with the MAC address applied for by the dealer according to its own brand, and finally send it to the customer.

[0003] In the prior art, manufacturers do not know whether their MAC addresses have been modified, so they cannot promptly recover MAC addresses that have been modified by dealers. Because the number of MAC addresses of manufacturers is limited, if they cannot be recovered in time, they will be used up. In addition, the device MAC address rewriting method of the prior art is not very safe and reliable. Therefore, this application provides a device MAC address secondary rewriting method to solve the above problems. Summary of the invention

[0004] The embodiment of the present application provides a method for secondary rewriting and recycling of a device MAC address, which is not only safe and reliable, but also enables the manufacturer to promptly recover the MAC address that has been modified by the dealer.

[0005] The present application provides a method for rewriting a MAC address of a device, the method comprising:

[0006] When the MAC address of the device is to be rewritten for the second time, the target MAC address and CRC verification password are obtained;

[0007] The target MAC address and the CRC verification password are sent to the device to allow the device to determine whether the target MAC address meets the requirements and whether the CRC verification password is correct. When the target MAC address meets the requirements and the CRC verification password is correct, the original MAC address is changed to the target MAC address, and the information that the MAC address of the device has been rewritten is fed back to a pre-established MAC address management platform for storage, wherein the equipment provider, dealer and end customer are all connected to the MAC address management platform, and all three can obtain the data information stored by the MAC address management platform from the MAC address management platform.

[0008] In the device MAC address secondary rewriting method described in the embodiment of the present application, the target MAC address and the CRC verification password are sent to the device so that the device determines whether the target MAC address meets the requirements and whether the CRC verification password is correct, including:

[0009] Sending the target MAC address to the device so that the device determines whether the length of the target MAC address is legal and whether the target MAC address is repeated;

[0010] If the length of the target MAC address is legal and the target MAC address is not repeated, the CRC verification password is sent to the device to allow the device to determine whether the CRC verification password is correct.

[0011] In the device MAC address secondary rewriting method described in the embodiment of the present application, after sending the target MAC address to the device so that the device determines whether the length of the target MAC address is legal and whether the target MAC address is repeated, it also includes:

[0012] When receiving the first alarm code returned by the device due to determining that the length of the target MAC address is illegal, re-send the target MAC address with a legal length to the device.

[0013] In the device MAC address secondary rewriting method described in the embodiment of the present application, after sending the target MAC address to the device so that the device determines whether the length of the target MAC address is legal and whether the target MAC address is repeated, it also includes:

[0014] When receiving the second alarm code returned by the device due to determining that the target MAC address is duplicated, a new target MAC address is re-sent to the device.

[0015] In the device MAC address secondary rewriting method described in the embodiment of the present application, after sending the CRC verification password to the device so that the device can determine whether the CRC verification password is correct, it also includes:

[0016] When receiving the third warning code returned by the device due to determining that the CRC verification password is incorrect, the correct CRC verification password is re-issued to the device.

[0017] In the device MAC address secondary rewriting method described in the embodiment of the present application, after the target MAC address is sent to the device, it also includes:

[0018] The target MAC address flag is sent to the device.

[0019] In the method for rewriting the MAC address of a device described in the embodiment of the present application, after the device completes the MAC address rewriting, the method further includes:

[0020] When receiving the fourth alarm code returned by the device after restarting because it is determined that the MAC address rewriting is unsuccessful, the MAC address of the device is rewritten for the second time.

[0021] In the device MAC address secondary rewriting method described in the embodiment of the present application, before the target MAC address and the CRC verification password are sent to the device, it also includes:

[0022] Connecting an information input terminal to the device;

[0023] The sending the target MAC address and the CRC verification password to the device includes:

[0024] The target MAC address and the CRC verification password are sent to the device through the information input terminal.

[0025] The present application also provides a method for recovering a device MAC address, which is used by the device provider described in the above embodiment. The method includes:

[0026] Obtain equipment life and operation time information;

[0027] Determining whether the device has reached the scrapping time based on the service life information and the operation time information;

[0028] If yes, testing the device and determining whether the device has reached the scrap standard based on the test results;

[0029] If yes, the MAC address of the device is recovered.

[0030] In the device MAC address recycling method described in the embodiment of the present application, after determining whether the device has reached the scrap standard based on the test result, the method further includes:

[0031] If not, the device is put into extended use.

[0032] The device MAC address secondary rewriting method provided in the embodiment of the present application pre-establishes a MAC address management platform, and then connects the device provider, dealer and terminal customer to the MAC address management platform at the same time. Each time the dealer rewrites the MAC address of the device, the MAC address management platform will record the rewritten device information, as well as the MAC address information of the device before and after the rewrite. Therefore, the device provider can know whether its MAC address has been modified through the MAC address management platform, so that it can promptly recover the MAC address that has been modified by the dealer. In addition, when the device provider rewrites the MAC address of the device, the device needs to determine whether the MAC address provided by the dealer is repeated and whether the CRC verification password provided is correct. Only when the MAC address is not repeated and the CRC verification password is correct, the device will rewrite its MAC address, which greatly improves security and reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.

[0034] Figure 1 A flowchart of a method for secondary rewriting of a device MAC address provided in an embodiment of the present application.

[0035] Figure 2 A schematic diagram of the secondary rewriting process of the device MAC address provided in an embodiment of the present application.

[0036] Figure 3 Another flowchart of the method for secondary rewriting of the device MAC address provided in an embodiment of the present application.

[0037] Figure 4 A flowchart of a method for recovering a device MAC address provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0039] This application embodiment provides a method for rewriting a device MAC address. Figure 1 , Figure 1 A schematic diagram of a flow chart of a method for rewriting a device MAC address provided in an embodiment of the present application, wherein the method may include the following steps:

[0040] Step 101, when the MAC address of the device is to be rewritten for the second time, the target MAC address and CRC verification password are obtained.

[0041] The device of the embodiment of the present application is a coupler device based on a profinet read / write block. Of course, it should be noted that the device of the embodiment of the present application is not limited to a coupler device based on a profinet read / write block.

[0042] The target MAC address is the MAC address that the dealer wants to change to.

[0043] Among them, the first rewrite is the MAC address that the manufacturer (equipment provider) puts in the device when producing the network device. The second rewrite refers to the dealer rewriting the MAC address written by the manufacturer according to its own brand before giving the device to the customer, rewriting it into the MAC address applied for by itself, and then giving the device to the user. It should be noted that the method of the embodiment of the present application is not only applicable to dealers, but also to manufacturers. For example, when the dealer does not want to change the MAC address of the device by himself, the manufacturer can use the method of the embodiment of the present application to directly help the dealer rewrite the MAC address according to the needs of the dealer (intermediate customer). The dealer only needs to provide the MAC address (target MAC address) that he wants to change to.

[0044] Step 102, the target MAC address and the CRC verification password are sent to the device, so that the device can determine whether the target MAC address meets the requirements and whether the CRC verification password is correct, and when the target MAC address meets the requirements and the CRC verification password is correct, the original MAC address is changed to the target MAC address, and the information that the MAC address of the device has been rewritten is fed back to a pre-established MAC address management platform for storage, wherein the equipment provider, dealer and end customer are all connected to the MAC address management platform, and all three can obtain the data information stored in the MAC address management platform from the MAC address management platform.

[0045] Specifically, after the target MAC address and CRC verification password are sent to the device, the device will determine whether the target MAC address meets the requirements and whether the CRC verification password is correct. If the target MAC address meets the requirements and the CRC verification password is correct, the device will change the original MAC address to the target MAC address, and feed back the information that the device's MAC address has been rewritten to the pre-established MAC address management platform for storage. The equipment provider can know from the MAC address management platform which device's MAC address has been rewritten, when it was rewritten, which MAC address it was rewritten to, and who (equipment provider, dealer or customer) performed the rewrite, etc., so that not only can the modified MAC address be recovered in time, but also the source can be traced to prevent malicious tampering (malicious modification by customers).

[0046] Among them, equipment providers, dealers and end customers are all connected to the MAC address management platform. The data of the three parties are interconnected, but there is authority management for obtaining information. For example, the authority of equipment providers, dealers and end customers is different, and the authority of equipment providers and dealers is greater than that of end customers.

[0047] In some embodiments, before sending the target MAC address and the CRC verification password to the device, the method further includes:

[0048] Connecting an information input terminal to the device;

[0049] The sending the target MAC address and the CRC verification password to the device includes:

[0050] The target MAC address and the CRC verification password are sent to the device through the information input terminal.

[0051] Among them, the information input terminal is equipped with Botu software. After the information input terminal is connected to the device, use Botu to create a new project, modify the project to add a write function module, use 0x6001 and 0x6000 to write the index, and send the target MAC address and CRC verification password.

[0052] Among them, after the target MAC address meets the requirements and the CRC verification password is correct, the device stores it in the flash, changes the MAC rewrite flag, and then the Botu software is reset, writes the target MAC address, and delays 300ms for the Botu software to reset. Figure 2 shown.

[0053] In some embodiments, sending the target MAC address and the CRC verification password to the device so that the device determines whether the target MAC address meets the requirements and whether the CRC verification password is correct includes:

[0054] Sending the target MAC address to the device so that the device determines whether the length of the target MAC address is legal and whether the target MAC address is repeated;

[0055] If the length of the target MAC address is legal and the target MAC address is not repeated, the CRC verification password is sent to the device to allow the device to determine whether the CRC verification password is correct.

[0056] Among them, in the embodiment of the present application, the target MAC address is first sent to the device. After the device determines that the length of the target MAC address is legal and the target MAC address is not repeated, the CRC verification password is sent to the device to allow the device to determine whether the CRC verification password is correct.

[0057] In some embodiments, after sending the target MAC address to the device so that the device determines whether the length of the target MAC address is legal and whether the target MAC address is repeated, the method further includes:

[0058] When receiving the first alarm code returned by the device due to determining that the length of the target MAC address is illegal, re-send the target MAC address with a legal length to the device.

[0059] Specifically, when the device determines that the length of the target MAC address is illegal, it will generate a first alarm code.

[0060] The first warning code is 0x200, which means that the length of the provided target MAC address is illegal and a legal target MAC address needs to be re-provided, as shown in Table 1 below:

[0061] Table 1 Alarm code related information

[0062] Alarm code reason deal with 0x200 The length of the Mac address is invalid Re-issue the MAC address 0x201 Mac address verification error Re-issue the MAC address 0x202 Duplicate Mac Address Change the MAC address

[0063] like Figure 3 As shown, the device receives 0x6001 (after the MAC address) and determines whether the length of the write function block is 6. If not, a 0x200 alarm code is generated.

[0064] In some embodiments, after sending the target MAC address to the device so that the device determines whether the length of the target MAC address is legal and whether the target MAC address is repeated, the method further includes:

[0065] When receiving the second alarm code returned by the device due to determining that the target MAC address is duplicated, a new target MAC address is re-sent to the device.

[0066] Specifically, when the device determines that the target MAC address is duplicated, it will generate a second alarm code.

[0067] Among them, the second alarm code is 0x202, which means that the provided target MAC address is repeated and a legal target MAC address needs to be re-provided, as shown in Table 1 above.

[0068] like Figure 3 As shown, when the device determines that the target MAC address is repeated, it generates a 0x202 alarm code.

[0069] In some embodiments, after sending the CRC verification password to the device so that the device can determine whether the CRC verification password is correct, the method further includes:

[0070] When receiving the third warning code returned by the device due to determining that the CRC verification password is incorrect, the correct CRC verification password is re-issued to the device.

[0071] Specifically, when the device determines that the CRC verification password is incorrect, it will generate a third warning code.

[0072] Among them, the third alarm code is 0x202, which means that the target MAC address verification error occurs and the MAC address needs to be re-issued, as shown in Table 1 above.

[0073] like Figure 3 As shown, when the device determines that the CRC verification password is incorrect, a 0x201 alarm code is generated.

[0074] In some embodiments, after sending the target MAC address to the device, the method further includes:

[0075] The target MAC address flag is sent to the device.

[0076] Specifically, use Botu to create a new project, modify the project to add a write function module, use 0x6002 to write the index, and issue a write flag.

[0077] In some embodiments, after the device completes the MAC address rewriting, the method further includes:

[0078] When receiving the fourth alarm code returned by the device after restarting because it is determined that the MAC address rewriting is unsuccessful, the MAC address of the device is rewritten for the second time.

[0079] Among them, after the device changes the MAC address, it will restart, reconnect with Botu after restart, use the read-write block function to read the MAC address of the device at this time, and determine whether the MAC address of the device at this time is the target MAC address. If not, it means that the MAC address rewrite is unsuccessful. At this time, the fourth alarm code is generated, informing that the MAC address rewrite is unsuccessful and please rewrite it.

[0080] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0081] In specific implementation, the present application is not limited by the execution order of the various steps described. If no conflict occurs, some steps can be performed in other orders or simultaneously.

[0082] As can be seen from the above, the device MAC address secondary rewriting method provided in the embodiment of the present application pre-establishes a MAC address management platform, and then connects the device provider, dealer and terminal customer to the MAC address management platform at the same time. Each time the dealer rewrites the MAC address of the device, the MAC address management platform will record the rewritten device information, as well as the MAC address information of the device before and after the rewrite. Therefore, the device provider can know whether its MAC address has been modified through the MAC address management platform, so that it can promptly recover the MAC address that has been modified by the dealer. In addition, when the device provider rewrites the MAC address of the device, the device needs to determine whether the MAC address provided by the dealer is repeated, and whether the CRC verification password provided is correct. Only when the MAC address is not repeated and the CRC verification password is correct, the device will rewrite its MAC address, which greatly improves security and reliability.

[0083] The present application also provides a method for recovering a device MAC address. Figure 4 , Figure 4 A flow chart of a method for recovering a device MAC address provided in an embodiment of the present application, the method is used by the device provider described in the above embodiment, and the method may include the following steps:

[0084] Step 201, obtaining service life information and operation time information of the equipment.

[0085] The device in the embodiment of the present application is a coupler device based on a profinet read / write block, and the normal service life of the device is about five years. It should be noted that the device in the embodiment of the present application is not limited to a coupler device based on a profinet read / write block.

[0086] The device provider records the service life information of each device. The device provider can obtain the production information of the device by sending 0x4001, obtain the operation time information of the device by sending 0x4011, and obtain the MAC address of the device by sending 0x6003.

[0087] Step 202: determine whether the device has reached the scrapping time based on the service life information and the operation time information.

[0088] Among them, if the operating time of the equipment exceeds the service life of the equipment, the equipment reaches the scrap time.

[0089] Step 203: If yes, the device is tested, and based on the test result, it is determined whether the device has reached the scrap standard.

[0090] Step 204: If yes, the MAC address of the device is recovered.

[0091] Specifically, if a device reaches a scrapping standard, the MAC address of the device is reclaimed.

[0092] In some embodiments, after determining whether the device has reached the scrap standard based on the test results, the method further includes:

[0093] If not, the device is put into extended use.

[0094] Specifically, if the equipment has not reached the scrap standard, the equipment can be used for a longer period of time.

[0095] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0096] In specific implementation, the present application is not limited by the execution order of the various steps described. If no conflict occurs, some steps can be performed in other orders or simultaneously.

[0097] From the above, it can be seen that the device MAC address recovery method provided in the embodiment of the present application obtains the service life information and operation time information of the device, and then determines whether the device has reached the scrap time based on the service life information and operation time information. If so, the device is tested, and based on the test results, it is determined whether the device has reached the scrap standard. If so, the MAC address of the device is recovered, so that the MAC address of the scrapped device can be recovered in time.

[0098] The above is a detailed introduction to the device MAC address secondary rewriting and recycling method provided in the embodiment of the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application; at the same time, for those skilled in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for rewriting a device MAC address twice, characterized in that: The method comprises: When the MAC address of the device is to be rewritten for the second time, the target MAC address and CRC verification password are obtained; The target MAC address and the CRC verification password are sent to the device to allow the device to determine whether the target MAC address meets the requirements and whether the CRC verification password is correct. When the target MAC address meets the requirements and the CRC verification password is correct, the original MAC address is changed to the target MAC address, and the information that the MAC address of the device has been rewritten is fed back to a pre-established MAC address management platform for storage, wherein the equipment provider, dealer and end customer are all connected to the MAC address management platform, and all three can obtain the data information stored by the MAC address management platform from the MAC address management platform.

2. The device MAC address secondary rewriting method according to claim 1, characterized in that: The sending the target MAC address and the CRC verification password to the device so that the device determines whether the target MAC address meets the requirements and whether the CRC verification password is correct, includes: Sending the target MAC address to the device so that the device determines whether the length of the target MAC address is legal and whether the target MAC address is repeated; If the length of the target MAC address is legal and the target MAC address is not repeated, the CRC verification password is sent to the device to allow the device to determine whether the CRC verification password is correct.

3. The device MAC address secondary rewriting method according to claim 2, characterized in that: After sending the target MAC address to the device so that the device determines whether the length of the target MAC address is legal and whether the target MAC address is repeated, the method further includes: When receiving the first alarm code returned by the device due to determining that the length of the target MAC address is illegal, re-send the target MAC address with a legal length to the device.

4. The method for rewriting the device MAC address as claimed in claim 2, characterized in that: After sending the target MAC address to the device so that the device determines whether the length of the target MAC address is legal and whether the target MAC address is repeated, the method further includes: When receiving the second alarm code returned by the device due to determining that the target MAC address is duplicated, a new target MAC address is re-sent to the device.

5. The method for rewriting the device MAC address as claimed in claim 2, characterized in that: After sending the CRC verification password to the device so that the device can determine whether the CRC verification password is correct, the method further includes: When receiving the third warning code returned by the device due to determining that the CRC verification password is incorrect, the correct CRC verification password is re-issued to the device.

6. The device MAC address secondary rewriting method according to claim 2, characterized in that: After sending the target MAC address to the device, the method further includes: The target MAC address flag is sent to the device.

7. The method for rewriting the device MAC address as claimed in claim 1, characterized in that: After the device completes the MAC address rewriting, it also includes: When receiving the fourth alarm code returned by the device after restarting because it is determined that the MAC address rewriting is unsuccessful, the MAC address of the device is rewritten for the second time.

8. The method for rewriting the device MAC address as claimed in claim 1, characterized in that: Before sending the target MAC address and the CRC verification password to the device, the method further includes: Connecting an information input terminal to the device; The sending the target MAC address and the CRC verification password to the device includes: The target MAC address and the CRC verification password are sent to the device through the information input terminal.

9. A device MAC address recovery method, used by the device provider of claim 1, characterized in that: The method comprises: Obtain equipment life and operation time information; Determining whether the device has reached the scrapping time based on the service life information and the operation time information; If yes, testing the device and determining whether the device has reached the scrap standard based on the test results; If yes, the MAC address of the device is recovered.

10. The device MAC address secondary rewriting method according to claim 9, characterized in that: After determining whether the device has reached the scrap standard based on the test results, the method further includes: If not, the device is put into extended use.

Citation Information

Patent Citations

  • Method and system for automatically generating MAC address of power distribution terminal

    CN106790756A

  • MAC address burning method and device, equipment and storage medium

    CN113010190A

  • Network card MAC address burning method and system, electronic equipment and storage medium

    CN115242753A

  • MAC (Media Access Control) address management and burning method of product and production management system

    CN117149228A

  • Bus module IP address modification method and device, equipment and storage medium

    CN117978781A