CN113726921A - Method for automatically updating MAC address - Google Patents
Method for automatically updating MAC address Download PDFInfo
- Publication number
- CN113726921A CN113726921A CN202111010401.1A CN202111010401A CN113726921A CN 113726921 A CN113726921 A CN 113726921A CN 202111010401 A CN202111010401 A CN 202111010401A CN 113726921 A CN113726921 A CN 113726921A
- Authority
- CN
- China
- Prior art keywords
- mac address
- equipment
- updating
- address
- automatically
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 19
- 230000006855 networking Effects 0.000 claims abstract description 4
- 230000002950 deficient Effects 0.000 claims description 4
- 230000009286 beneficial effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5053—Lease time; Renewal aspects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to the technical field of communication, in particular to a method for automatically updating an MAC address, which comprises an automatic updating device, a program initializing device and a connecting device, wherein firstly, the device program is initialized to initialize a specific MAC address and a default IP address; starting network service, networking equipment, automatically updating a device to search an IP of the equipment and automatically connecting to obtain an MAC address of the equipment; judging whether the equipment MAC address is the same as the specific MAC address, if so, generating a new MAC address, and then comparing the new MAC address with the specific MAC address until generating a non-repeated MAC address; the MAC address of the equipment is updated until the equipment is updated, and the unique address is set for the chip by setting a unified algorithm and a unified protocol through an automatic updating device, so that the uniqueness of the address of the chip is ensured, and the phenomenon of repeated addresses of the chip is avoided; and the repeated MAC addresses are automatically updated and debugged, so that the uniqueness of the MAC addresses of the equipment is ensured.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a method for automatically updating an MAC address.
Background
At present, embedded devices have various methods for generating MAC addresses, for example, unique addresses of chips are used, but in actual work, it is found that chip addresses cannot guarantee uniqueness, and repetition occurs at a certain probability. The method adopts a unified algorithm and a unified protocol, realizes updating automation and ensures the uniqueness of the MAC address of the equipment.
Disclosure of Invention
The invention aims to provide a method for automatically updating MAC addresses.
In order to achieve the purpose, the invention adopts the following technical scheme:
there is provided a method of automatically updating a MAC address, the network device comprising an automatic updating means, a program initializing means and a connecting means,
the program initialization device is used for initializing the MAC address of the equipment to become a specific address and setting a default IP address;
the connecting device is connected with the equipment and accesses the equipment to the network, and the automatic updating device is connected with the equipment and is used for searching and connecting an IP address and acquiring the MAC address of the equipment; the method for automatically updating the MAC address comprises the following steps:
firstly, initializing a device program, and initializing a specific MAC address and a default IP address;
starting network service, networking equipment, automatically updating a device to search an IP of the equipment and automatically connecting to obtain an MAC address of the equipment;
judging whether the equipment MAC address is the same as the specific MAC address, if so, generating a new MAC address, and then comparing the new MAC address with the specific MAC address until generating a non-repeated MAC address;
and updating the MAC address of the device until the device finishes updating.
Further, after the network service is started by the connecting device, the IP address of the device to be connected is automatically updated, and if the device cannot be connected, the connection is repeated until the connection is successful.
Further, after the automatic updating device obtains the device MAC address, if the device MAC address is different from the specific MAC address, the device MAC address does not need to be updated.
Further, the automatic updating device generates a new MAC address, but if the updating of the MAC address of the apparatus is unsuccessful, the updating procedure is restarted, and if the continuous updating fails for 3 times, the apparatus determines that the defective item is rechecked.
The invention has the beneficial effects that: the method for automatically updating the MAC address sets a unified algorithm and a unified protocol through the automatic updating device, sets a unique address for the chip, ensures the uniqueness of the chip address and avoids the occurrence of the repeated phenomenon of the chip address; and the repeated MAC addresses are automatically updated and debugged, so that the uniqueness of the MAC addresses of the equipment is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings in the embodiments of the present invention are briefly described below.
FIG. 1 is a flow chart of the automatic MAC address update according to the embodiment of the present invention;
Detailed Description
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
Wherein the showings are for the purpose of illustration only and are shown by way of illustration only and not in actual form, and are not to be construed as limiting the present patent; to better illustrate the embodiments of the present invention, some components of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product.
Referring to fig. 1, a method for automatically updating a MAC address, the network device includes an automatic updating device, a program initializing device and a connecting device, the program initializing device is used for initializing a device MAC address to a specific address and setting a default IP address; the connecting device is connected with the equipment and accesses the equipment to the network, and the automatic updating device is connected with the equipment and is used for searching and connecting an IP address and acquiring the MAC address of the equipment; the method for automatically updating the MAC address comprises the following steps:
firstly, initializing a device program, and initializing a specific MAC address and a default IP address;
starting network service, networking equipment, automatically updating a device to search an IP of the equipment and automatically connecting to obtain an MAC address of the equipment;
judging whether the equipment MAC address is the same as the specific MAC address, if so, generating a new MAC address, and then comparing the new MAC address with the specific MAC address until generating a non-repeated MAC address;
and updating the MAC address of the device until the device finishes updating.
The working principle is as follows: the method is mainly applied to software of embedded equipment, instructions of reading and writing the MAC address of the equipment are unified, the equipment address is initialized to a specific address, a default IP address is set at the same time, then the equipment is accessed into a network, an automatic updating program can automatically search the IP, if the IP is found, an automatic updating device can automatically connect the IP to obtain the MAC address of the equipment, and if the MAC address of the equipment is the same as the specific MAC address, the MAC address is updated. Firstly, generating an MAC address which cannot be repeated according to a rule, and finally updating the equipment MAC address to finish the updating of the equipment MAC address.
After the network service is started by the connecting device, the IP address of the device needing to be connected is automatically updated, if the connection cannot be carried out, the connection is repeated until the connection is successful, and when the connection of the IP address is unsuccessful, the connection is tried again by considering the reasons of program initialization failure or network obstruction and the like, the program is reinitialized again or the network is reconnected until the IP is connected and the device information is obtained.
After the automatic updating device acquires the equipment MAC address, if the equipment MAC address is different from the specific MAC address, the MAC address does not need to be updated, and if the MAC address acquired for the first time is different from other specific MAC addresses, a new MAC address does not need to be generated and does not need to be updated.
And the automatic updating device generates a new MAC address, but the updating of the equipment MAC address is unsuccessful, the updating program is started again, if the continuous updating fails for 3 times, the equipment judges that the defective product is rechecked, and after the new MAC address is generated, the equipment MAC address is automatically updated, but the continuous updating still fails for 3 times, the equipment problem is considered, and the program defines the equipment as the defective product to be rechecked.
Claims (4)
1. A method for automatically updating MAC addresses, characterized in that the network device comprises an automatic updating device, a program initializing device and a connecting device,
the program initialization device is used for initializing the MAC address of the equipment to become a specific address and setting a default IP address;
the connecting device is connected with the equipment and accesses the equipment to the network, and the automatic updating device is connected with the equipment and is used for searching and connecting an IP address and acquiring the MAC address of the equipment; the method for automatically updating the MAC address comprises the following steps:
firstly, initializing a device program, and initializing a specific MAC address and a default IP address;
starting network service, networking equipment, automatically updating a device to search an IP of the equipment and automatically connecting to obtain an MAC address of the equipment;
judging whether the equipment MAC address is the same as the specific MAC address, if so, generating a new MAC address, and then comparing the new MAC address with the specific MAC address until generating a non-repeated MAC address;
and updating the MAC address of the device until the device finishes updating.
2. The method of claim 1, wherein the MAC address is updated automatically by: and after the connecting device starts the network service, the IP address of the equipment to be connected of the device is automatically updated, and if the equipment cannot be connected, the connection is repeated until the connection is successful.
3. The method of claim 1, wherein the MAC address is updated automatically by: after the automatic updating device acquires the equipment MAC address, if the equipment MAC address is different from the specific MAC address, the MAC address does not need to be updated.
4. The method of claim 1, wherein the MAC address is updated automatically by: and the automatic updating device generates a new MAC address, if the updating of the MAC address of the equipment is unsuccessful, the updating program is started again, and if the continuous updating fails for 3 times, the equipment judges that the defective product is rechecked.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111010401.1A CN113726921A (en) | 2021-08-31 | 2021-08-31 | Method for automatically updating MAC address |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111010401.1A CN113726921A (en) | 2021-08-31 | 2021-08-31 | Method for automatically updating MAC address |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113726921A true CN113726921A (en) | 2021-11-30 |
Family
ID=78679550
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111010401.1A Pending CN113726921A (en) | 2021-08-31 | 2021-08-31 | Method for automatically updating MAC address |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113726921A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106131241A (en) * | 2016-08-15 | 2016-11-16 | 广东欧珀移动通信有限公司 | A kind of method for connecting network, device and mobile terminal |
CN106790756A (en) * | 2016-12-29 | 2017-05-31 | 山东鲁能智能技术有限公司 | Distribution terminal MAC address automatic generation method and system |
CN107770299A (en) * | 2017-10-24 | 2018-03-06 | 郑州云海信息技术有限公司 | A kind of MAC Address writes with a brush dipped in Chinese ink method, system, device and storage medium |
CN108632107A (en) * | 2017-12-29 | 2018-10-09 | 研祥智能科技股份有限公司 | MAC Address of Network Card detection method and device |
-
2021
- 2021-08-31 CN CN202111010401.1A patent/CN113726921A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106131241A (en) * | 2016-08-15 | 2016-11-16 | 广东欧珀移动通信有限公司 | A kind of method for connecting network, device and mobile terminal |
CN106790756A (en) * | 2016-12-29 | 2017-05-31 | 山东鲁能智能技术有限公司 | Distribution terminal MAC address automatic generation method and system |
CN107770299A (en) * | 2017-10-24 | 2018-03-06 | 郑州云海信息技术有限公司 | A kind of MAC Address writes with a brush dipped in Chinese ink method, system, device and storage medium |
CN108632107A (en) * | 2017-12-29 | 2018-10-09 | 研祥智能科技股份有限公司 | MAC Address of Network Card detection method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6772420B1 (en) | System for obtaining appropriate device drivers by accessing table having list of manufacturers and link-layer addresses assigned to device drivers | |
WO2019100921A1 (en) | Information pushing method and device | |
CN102546267B (en) | Automatic configuration method of network device and management server | |
CN103916277B (en) | The method and apparatus that realization does not interrupt forwarding service when restarting | |
CN111597123A (en) | Automatic address allocation method, device, computer equipment and storage medium | |
CN105959188B (en) | Method and device for controlling user terminal to be on-line | |
JP2000083037A (en) | Method and device for identifying device in connumication network | |
CN112055066B (en) | Communication method, communication device, diagnosis device, and computer-readable storage medium | |
CN109413222B (en) | Automatic batch order setting method and system for cloud terminals | |
CN113726921A (en) | Method for automatically updating MAC address | |
US8072907B2 (en) | Method and system to restart IS-IS when LSP wraps | |
US20060218257A1 (en) | Apparatus having network capability and method for assigning IP address | |
CN107360095B (en) | Method for realizing port forwarding in router based on client host name | |
CN109981813B (en) | Message processing method and device | |
CN110324436B (en) | Proxy method and device for transport layer proxy | |
CN116962114A (en) | Equipment interconnection method, device, equipment and medium based on distributed soft bus | |
CN105790944A (en) | Wechat-based network authentication method and device | |
CN108733425B (en) | Service change information sending method and device, electronic equipment and storage medium | |
CN116149990A (en) | Automatic deployment method for test environment | |
CN105072669A (en) | Access control method and device for site | |
CN116847432A (en) | Subnet fusion method and device, electronic equipment and storage medium | |
CN102932360A (en) | Method and system for updating interface dynamically | |
CN112291343B (en) | Information acquisition method and device and electronic equipment | |
CN110769462B (en) | Network access control method and device | |
US20050249136A1 (en) | Dynamic assignment of station addresses transmitted over shared-communications channels |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20211130 |