Method for rewriting and recycling device MAC address twice

By recording device rewriting information on the MAC address management platform, and ensuring that the rewriting is performed only when the target MAC address and CRC check password are correct, the problem of manufacturers being unable to promptly reclaim MAC addresses modified by distributors is solved, thus achieving security and reliability in rewriting.

CN119728647BActive Publication Date: 2025-11-18NANJING SHIDIAN ELECTRONIC TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the existing technology, manufacturers cannot promptly recover the device MAC address modified by the distributor, and the existing rewriting methods are not secure or reliable.

Method used

By establishing a MAC address management platform in advance, equipment providers, distributors, and end customers connect to the platform to record the device's rewriting information and rewrite the device when the target MAC address and CRC verification password are correct, ensuring the security and reliability of the rewriting.

Benefits of technology

This allows equipment providers to promptly reclaim MAC addresses modified by distributors, improving the security and reliability of the rewriting process and preventing malicious tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728647B_ABST
    Figure CN119728647B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a device MAC address secondary rewriting and recycling method, which comprises the following steps: when the MAC address of a device is to be rewritten, a target MAC address and a CRC check password are obtained; the target MAC address and the CRC check password are sent to the device, so that the device judges whether the target MAC address meets the requirements and whether the CRC check password is correct; when the target MAC address meets the requirements and the CRC check password is correct, the original MAC address is changed into the target MAC address, and information that the MAC address of the device has been rewritten is fed back to a previously established MAC address management platform for storage; a device provider is connected with the MAC address management platform, and the device provider can obtain the data information stored in the MAC address management platform. The embodiment of the present application can enable the manufacturer to timely recover the modified MAC address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] When manufacturers produce network equipment, they first insert the MAC address they obtained into the equipment. Then, the distributors replace it with the MAC address they obtained, according to their own brand, before finally sending it to the customer.

[0003] In existing technologies, manufacturers are unaware whether their MAC addresses have been modified, and therefore cannot promptly reclaim MAC addresses that have been modified by distributors. Since manufacturers have a limited number of MAC addresses, they will run out if not reclaimed in time. Furthermore, existing methods for rewriting device MAC addresses are not very secure or reliable. Therefore, this application provides a method for secondary rewriting of device MAC addresses to solve the above problems. Summary of the Invention

[0004] This application provides a method for rewriting and reclaiming a device's MAC address, which is not only safe and reliable, but also allows manufacturers to promptly reclaim MAC addresses that have been modified by distributors.

[0005] This application provides a method for rewriting a device's MAC address, the method comprising:

[0006] When the device's MAC address needs to be rewritten, obtain the target MAC address and CRC check password;

[0007] The target MAC address and the CRC check password are sent to the device so that the device can determine whether the target MAC address meets the requirements and whether the CRC check password is correct. If the target MAC address meets the requirements and the CRC check password is correct, the original MAC address is changed to the target MAC address, and the information that the device's MAC address has been changed is fed back to a pre-established MAC address management platform for storage. The device provider, distributor, 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.

[0008] In the device MAC address rewriting method described in this application embodiment, the step of sending the target MAC address and the CRC check password to the device so that the device can determine whether the target MAC address meets the requirements and whether the CRC check password is correct includes:

[0009] The target MAC address is sent to the device so that the device can determine whether the length of the target MAC address is valid and whether the target MAC address is duplicated.

[0010] If the target MAC address has a valid length and is not duplicated, the CRC checksum password is sent to the device so that the device can determine whether the CRC checksum password is correct.

[0011] In the device MAC address rewriting method described in this application embodiment, after sending the target MAC address to the device so that the device can determine whether the length of the target MAC address is valid and whether the target MAC address is duplicated, the method further includes:

[0012] When the device receives the first alarm code returned by the device because it determines that the length of the target MAC address is invalid, the device resends the target MAC address with a valid length.

[0013] In the device MAC address rewriting method described in this application embodiment, after sending the target MAC address to the device so that the device can determine whether the length of the target MAC address is valid and whether the target MAC address is duplicated, the method further includes:

[0014] When the device receives a second alarm code because it has determined that the target MAC address is duplicated, a new target MAC address is resent to the device.

[0015] In the device MAC address rewriting method described in this application embodiment, after the CRC check password is sent to the device so that the device can determine whether the CRC check password is correct, it further includes:

[0016] When the device receives a third alarm code indicating that the CRC check password is incorrect, the correct CRC check password is resent to the device.

[0017] In the device MAC address rewriting method described in this application embodiment, after sending the target MAC address to the device, it further includes:

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

[0019] In the device MAC address rewriting method described in this application embodiment, after the device has rewritten its MAC address, the method further includes:

[0020] When the device receives the fourth alarm code after restarting because the MAC address rewriting failed, the device will rewrite the MAC address a second time.

[0021] In the device MAC address rewriting method described in this application embodiment, before sending the target MAC address and the CRC check password to the device, the method further includes:

[0022] Connect the information input terminal to the device;

[0023] Sending the target MAC address and the CRC checksum to the device includes:

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

[0025] This application embodiment also provides a device MAC address recycling method, for the device provider described in the above embodiments, the method comprising:

[0026] Obtain equipment lifespan and runtime information;

[0027] Based on the service life information and runtime information, determine whether the equipment has reached its scrapping time;

[0028] If so, the device is tested, and the test results are used to determine whether the device has reached the scrapping standard.

[0029] If so, the MAC address of the device will be reclaimed.

[0030] In the device MAC address recycling method described in this application embodiment, after determining whether the device has reached the scrapping standard based on the test results, it further includes:

[0031] If not, the use of the device shall be extended.

[0032] The device MAC address rewriting method provided in this application pre-establishes a MAC address management platform. Device providers, distributors, and end customers are simultaneously connected to this platform. Each time a distributor rewrites a device's MAC address, the MAC address management platform records the rewritten device information, as well as the device's MAC address before and after the rewrite. Therefore, device providers can use this platform to know if their MAC address has been modified and can promptly reclaim any MAC addresses modified by distributors. Furthermore, when a device provider rewrites a device's MAC address, the device needs to determine if the MAC address provided by the distributor is duplicated and if the provided CRC checksum is correct. Only if the MAC address is unique and the CRC checksum is correct will the device rewrite its MAC address, significantly improving security and reliability. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a flowchart illustrating the method for rewriting the device MAC address in an embodiment of this application.

[0035] Figure 2 This is a schematic diagram of the device MAC address rewriting process provided in the embodiments of this application.

[0036] Figure 3 This is another flowchart illustrating the method for rewriting the device MAC address in an embodiment of this application.

[0037] Figure 4 This is a flowchart illustrating the device MAC address recycling method provided in an embodiment of this application. Detailed Implementation

[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the protection scope of this application.

[0039] This application provides a method for rewriting a device's MAC address. Please refer to [link / reference]. Figure 1 , Figure 1 This is a flowchart illustrating a method for rewriting a device MAC address in an embodiment of this application. The method may include the following steps:

[0040] Step 101: When the MAC address of the device needs to be rewritten, obtain the target MAC address and CRC verification password.

[0041] The device in this embodiment is a coupler device based on Profinet read / write blocks. However, it should be noted that the device in this embodiment is not limited to a coupler device based on Profinet read / write blocks.

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

[0043] In this context, primary rewriting refers to the MAC address that the manufacturer (equipment provider) places in the network equipment during production. Secondary rewriting refers to the rewriting of the MAC address written by the manufacturer to a custom MAC address before the distributor delivers the equipment to the customer, based on their own branding. It's important to note that the method described in this application is applicable not only to distributors but also to manufacturers. For example, if a distributor doesn't want to change the MAC address themselves, the manufacturer can use the method described in this application to directly rewrite the MAC address according to the distributor's (intermediary customer's) needs. The distributor only needs to provide the desired MAC address (target MAC address).

[0044] Step 102: The target MAC address and the CRC check password are sent to the device so that the device can determine whether the target MAC address meets the requirements and whether the CRC check password is correct. If the target MAC address meets the requirements and the CRC check password is correct, the original MAC address is changed to the target MAC address, and the information that the device's MAC address has been rewritten is fed back to a pre-established MAC address management platform for storage. The device provider, distributor, 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.

[0045] Specifically, after the target MAC address and CRC check password are sent to the device, the device will determine whether the target MAC address meets the requirements and whether the CRC check password is correct. If the target MAC address meets the requirements and the CRC check 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 changed to a pre-established MAC address management platform for storage. The device provider can know from the MAC address management platform which device's MAC address has been changed, when it was changed, which MAC address it was changed to, and who (device provider, distributor, or customer) made the change, etc. This not only allows for the timely recovery of the modified MAC address but also enables traceability and prevention of malicious tampering (malicious modification by the customer).

[0046] In this system, equipment providers, distributors, and end customers are all connected to the MAC address management platform. While their data is interconnected, access to information is managed by permissions. For example, the permissions of equipment providers, distributors, and end customers differ, with equipment providers and distributors having greater permissions than end customers.

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

[0048] Connect the information input terminal to the device;

[0049] Sending the target MAC address and the CRC checksum to the device includes:

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

[0051] The information input terminal is equipped with TIA Portal software. After the information input terminal is connected to the device, a new project is created using TIA Portal, the project is modified to add a write function module, the index is written using 0x6001 and 0x6000, and the target MAC address and CRC verification password are sent.

[0052] The device, after confirming the target MAC address meets the requirements and the CRC verification password is correct, stores the information in flash memory, changes the MAC rewrite flag, then resets the TIA Portal software, writes the target MAC address, and resets again after a 300ms delay. Figure 2 As shown.

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

[0054] The target MAC address is sent to the device so that the device can determine whether the length of the target MAC address is valid and whether the target MAC address is duplicated.

[0055] If the target MAC address has a valid length and is not duplicated, the CRC checksum password is sent to the device so that the device can determine whether the CRC checksum password is correct.

[0056] In this embodiment, the target MAC address is first sent to the device. After the device determines that the length of the target MAC address is valid and the target MAC address is not repeated, the CRC check password is then sent to the device so that the device can determine whether the CRC check password is correct.

[0057] In some embodiments, after sending the target MAC address to the device so that the device can determine whether the length of the target MAC address is valid and whether the target MAC address is duplicated, the method further includes:

[0058] When the device receives the first alarm code returned by the device because it determines that the length of the target MAC address is invalid, the device resends the target MAC address with a valid length.

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

[0060] The first alarm code is 0x200, which means that the length of the provided target MAC address is invalid and a valid target MAC address needs to be provided again, as shown in Table 1 below:

[0061] Table 1 Alarm Code Information

[0062] Alarm codes reason deal with 0x200 Invalid MAC address length Reissue MAC address 0x201 MAC address verification error Reissue MAC address 0x202 Duplicate MAC address Change to a new MAC address

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

[0064] In some embodiments, after sending the target MAC address to the device so that the device can determine whether the length of the target MAC address is valid and whether the target MAC address is duplicated, the method further includes:

[0065] When the device receives a second alarm code because it has determined that the target MAC address is duplicated, a new target MAC address is resent to the device.

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

[0067] The second alarm code is 0x202, which means that the provided target MAC address is duplicated and a valid target MAC address needs to be provided again, as shown in Table 1 above.

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

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

[0070] When the device receives a third alarm code indicating that the CRC check password is incorrect, the correct CRC check password is resent to the device.

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

[0072] The third alarm code is 0x202, which means that the target MAC address verification is incorrect and the MAC address needs to be resent, as shown in Table 1 above.

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

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

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

[0076] Specifically, create a new project using TIA Portal, 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 has rewritten the MAC address, the method further includes:

[0078] When the device receives the fourth alarm code after restarting because the MAC address rewriting failed, the device will rewrite the MAC address a second time.

[0079] After modifying the MAC address, the device will restart and reconnect to TIA Portal. The read-write block function will be used to read the device's current MAC address and determine whether the device's current MAC address is the target MAC address. If not, it means that the MAC address rewriting was unsuccessful. At this time, a fourth alarm code will be generated to inform that the MAC address rewriting was unsuccessful and that the rewriting should be done again.

[0080] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0081] In practice, this application is not limited by the execution order of the described steps. Without causing conflicts, some steps may be performed in other orders or simultaneously.

[0082] As can be seen from the above, the device MAC address rewriting method provided in this application pre-establishes a MAC address management platform, and then connects the device provider, distributor, and end customer to the MAC address management platform simultaneously. Each time a distributor rewrites the device's MAC address, the MAC address management platform records the rewritten device information, as well as the device's MAC address information before and after the rewrite. Therefore, the device provider can know whether its MAC address has been modified through this MAC address management platform, and thus can promptly reclaim the MAC address modified by the distributor. Furthermore, when the device provider rewrites the device's MAC address, the device needs to determine whether the MAC address provided by the distributor is duplicated, and whether the provided CRC check password is correct. Only if the MAC address is not duplicated and the CRC check password is correct will the device rewrite its MAC address, greatly improving security and reliability.

[0083] This application also provides a method for recycling device MAC addresses. Please refer to [link / reference]. Figure 4 , Figure 4 This is a flowchart illustrating a device MAC address recycling method provided in an embodiment of this application. The method is used by the device provider described in the above embodiment and may include the following steps:

[0084] Step 201: Obtain the equipment's lifespan information and runtime information.

[0085] The device described in this application embodiment is a coupler device based on Profinet read / write blocks, and its normal service life is approximately five years. It should be noted that the device described in this application embodiment is not limited to coupler devices based on Profinet read / write blocks.

[0086] The equipment provider records the lifespan information for each device. The provider can obtain the device's production information by sending 0x4001, its runtime information by sending 0x4011, and its MAC address by sending 0x6003.

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

[0088] If the operating time of the equipment exceeds its service life, the equipment is considered to have reached the end of its service life.

[0089] Step 203: If yes, then test the device and determine whether the device has reached the scrapping standard based on the test results.

[0090] Step 204: If yes, then reclaim the MAC address of the device.

[0091] Specifically, if a device reaches the end-of-life standard, its MAC address will be reclaimed.

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

[0093] If not, the use of the device shall be extended.

[0094] Specifically, if the equipment has not reached the scrapping standard, it will be allowed to continue to be used for an extended period.

[0095] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0096] In practice, this application is not limited by the execution order of the described steps. Without causing conflicts, some steps may be performed in other orders or simultaneously.

[0097] As can be seen from the above, the device MAC address recycling method provided in this application embodiment obtains the device's lifespan information and runtime information, and then determines whether the device has reached its scrapping time based on the lifespan information and runtime information. If so, the device is tested, and the device is determined based on the test results to determine whether the device has reached the scrapping standard. If so, the device's MAC address is recycled, thereby enabling timely recycling of the MAC address of scrapped devices.

[0098] The above provides a detailed description of the device MAC address rewriting and recycling method provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for rewriting and reclaiming a device's MAC address, characterized in that, include: Steps for rewriting a MAC address: When the device's MAC address needs to be rewritten, obtain the target MAC address and CRC check password; The target MAC address and the CRC checksum are sent to the device so that the device can determine whether the target MAC address meets the requirements and whether the CRC checksum is correct. If the target MAC address meets the requirements and the CRC checksum is correct, the original MAC address is changed to the target MAC address, and the information that the device's MAC address has been changed is fed back to a pre-established MAC address management platform for storage. The device provider, distributor, 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. The MAC address management platform records the device information that has been changed, as well as the MAC address information of the device before and after the change. MAC address recycling steps: The device's runtime information is obtained by sending the 0x4011 command, and the device's lifespan information is combined with the device's service life information to determine whether the device has reached its end-of-life. If so, the device is tested, and the test results are used to determine whether the device has reached the scrapping standard. If so, the MAC address of the device will be reclaimed.

2. The method for secondary rewriting and recycling of device MAC addresses as described in claim 1, characterized in that, The step of sending the target MAC address and the CRC checksum to the device so that the device can determine whether the target MAC address meets the requirements and whether the CRC checksum is correct includes: The target MAC address is sent to the device so that the device can determine whether the length of the target MAC address is valid and whether the target MAC address is duplicated. If the target MAC address has a valid length and is not duplicated, the CRC checksum password is sent to the device so that the device can determine whether the CRC checksum password is correct.

3. The method for secondary rewriting and recycling of device MAC addresses as described in claim 2, characterized in that, After sending the target MAC address to the device so that the device can determine whether the length of the target MAC address is valid and whether the target MAC address is duplicated, the method further includes: When the device receives the first alarm code returned by the device because it determines that the length of the target MAC address is invalid, the device resends the target MAC address with a valid length.

4. The method for secondary rewriting and recycling of device MAC addresses as described in claim 2, characterized in that, After sending the target MAC address to the device so that the device can determine whether the length of the target MAC address is valid and whether the target MAC address is duplicated, the method further includes: When the device receives a second alarm code because it has determined that the target MAC address is duplicated, a new target MAC address is resent to the device.

5. The method for secondary rewriting and recycling of device MAC addresses as described in claim 2, characterized in that, The step of sending the CRC checksum to the device so that the device can determine whether the CRC checksum is correct also includes: When the device receives a third alarm code indicating that the CRC check password is incorrect, the correct CRC check password is resent to the device.

6. The method for secondary rewriting and recycling of device MAC addresses as described in claim 2, characterized in that, After sending the target MAC address to the device, the method further includes: The flag of the target MAC address is sent to the device.

7. The method for secondary rewriting and recycling of device MAC addresses as described in claim 1, characterized in that, After the device completes the MAC address rewriting, it also includes: When the device receives the fourth alarm code after restarting because the MAC address rewriting failed, the device will rewrite the MAC address a second time.

8. The method for secondary rewriting and recycling of device MAC addresses as described in claim 1, characterized in that, Before sending the target MAC address and the CRC checksum to the device, the method further includes: Connect the information input terminal to the device; Sending the target MAC address and the CRC checksum to the device includes: The target MAC address and the CRC check password are sent to the device through the information input terminal.

9. The method for secondary rewriting and recycling of device MAC addresses as described in claim 1, characterized in that, After determining whether the equipment has reached the scrapping standard based on the test results, the process also includes: If not, the use of the device shall be extended.

Citation Information

Patent Citations

  • 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