CN106790756B - Automatic generation method and system for MAC address of power distribution terminal - Google Patents

Automatic generation method and system for MAC address of power distribution terminal Download PDF

Info

Publication number
CN106790756B
CN106790756B CN201611247004.5A CN201611247004A CN106790756B CN 106790756 B CN106790756 B CN 106790756B CN 201611247004 A CN201611247004 A CN 201611247004A CN 106790756 B CN106790756 B CN 106790756B
Authority
CN
China
Prior art keywords
mac address
server
power distribution
terminal
terminal equipment
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.)
Active
Application number
CN201611247004.5A
Other languages
Chinese (zh)
Other versions
CN106790756A (en
Inventor
侯贺龙
王倩倩
叶泽亮
张晓花
熊建成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong luruan Digital Technology Co.,Ltd. smart energy branch
Original Assignee
State Grid Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by State Grid Intelligent Technology Co Ltd filed Critical State Grid Intelligent Technology Co Ltd
Priority to CN201611247004.5A priority Critical patent/CN106790756B/en
Publication of CN106790756A publication Critical patent/CN106790756A/en
Application granted granted Critical
Publication of CN106790756B publication Critical patent/CN106790756B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-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)

Abstract

The invention discloses a method and a system for automatically generating a power distribution terminal MAC address, which comprise the following steps: initiating a communication connection request with the terminal equipment through an upper computer of the server; after the terminal equipment is powered on, replying a connection result with the server; if the connection is not successful, the operation is directly quitted, if the connection is successful, a power distribution terminal MAC address is generated at the server end and is sent to the power distribution terminal, the power distribution terminal modifies the MAC address of the power distribution terminal into the MAC address sent by the server, and information about whether the modification is successful is returned to the server; if the MAC address is not modified successfully, the server regenerates a new MAC address and sends the new MAC address to the power distribution terminal again until the MAC address is modified successfully; and if the MAC address is successfully modified, displaying the MAC address on an upper computer of the server. The invention generates the unique MAC address, stores the unique MAC address in the memory of the terminal equipment for the next startup, reading and verification, and completes the generation of the MAC address without excessive participation of personnel in the whole process, thereby saving labor and time.

Description

Automatic generation method and system for MAC address of power distribution terminal
Technical Field
The invention relates to the technical field of computers, in particular to a method and a system for automatically generating an MAC address of a power distribution terminal.
Background
At present, the MAC address can not be modified after the power distribution terminal equipment is upgraded, so that the power distribution terminals in the local area network are all the same MAC address.
Since the power distribution terminal cannot modify the MAC address after being upgraded, the terminal devices in the lan are all the same MAC address, which may result in failure to perform networking and operation on the devices in the lan, and possibly cause abnormal operation of the devices.
The current MAC address modification mode of the power distribution terminal equipment is as follows: professional staff are required to participate, and after the terminal operating system is accessed through a serial port or a network port, the MAC address is manually modified, so that time and labor are wasted for thousands of terminal devices on the spot.
The MAC generation method of other product devices basically opens a new module in the terminal device to be specially responsible for MAC address generation, but the memory and storage of the distribution terminal device are always in the way, and the additional operation cost of the terminal device is wasted, which increases the burden of the distribution terminal device, so that it is necessary to provide an automatic MAC address generation method of the distribution terminal device to solve the dilemma.
Disclosure of Invention
In order to solve the defects of the prior art, the invention discloses a method for automatically generating a power distribution terminal MAC address, which is made into an upper software-equipment upgrading assistant to replace the tool of the traditional power distribution terminal equipment upgrading mode, automatically modifies the MAC address of equipment after the equipment is upgraded, generates the MAC address according to the system time of the terminal equipment and the IP address of the terminal equipment, avoids the possibility of MAC address repetition and ensures that the equipment can be operated in a local area network.
In order to achieve the purpose, the invention adopts the following specific scheme:
the automatic generation method of the MAC address of the power distribution terminal comprises the following steps:
initiating a communication connection request with the terminal equipment through an upper computer of the server;
after the terminal equipment is powered on, replying a connection result with the server;
if the connection is not successful, the operation is directly quitted, if the connection is successful, a power distribution terminal MAC address is generated at the server end and is sent to the power distribution terminal, the power distribution terminal modifies the MAC address of the power distribution terminal into the MAC address sent by the server, and information about whether the modification is successful is returned to the server;
if the MAC address is not modified successfully, the server regenerates a new MAC address and sends the new MAC address to the power distribution terminal again until the MAC address is modified successfully;
and if the MAC address is successfully modified, displaying the MAC address on an upper computer of the server.
Further, the IP address in the terminal device and its own MAC address need to be guaranteed to be non-duplicate addresses, otherwise the terminal device cannot be started normally, the terminal device is powered on to start, and the terminal device can run normally using the initial MAC.
Further, the IP address of the terminal device is input into the upper computer software of the server, and then the server is in communication connection with the terminal device corresponding to the IP address.
Further, after the server communicates with the terminal device, the server generates a new initialized MAC address of the terminal device according to the system time of the terminal device and the IP address of the terminal device.
Further, the server sends a new initialized MAC address, namely a target MAC address, to the terminal device, so that the terminal device replaces the MAC address with the initialized MAC address of the terminal device and takes effect after the terminal device is verified to be legal.
Further, the way for the terminal device to verify whether the initialized MAC address is legal is as follows: judging whether the initialized MAC address conforms to the following format:
the MAC address format is 6 bytes of binary code and the format is XX-XX-XX-XX.
The system comprises a power distribution terminal MAC address automatic generation system, a server and a server, wherein data are processed at the server, the server is configured to initiate a communication connection request with terminal equipment and judge a connection result with the terminal equipment;
if the connection is not successful, the operation is directly quitted, if the connection is successful, the server is configured to generate a power distribution terminal MAC address and send the power distribution terminal MAC address to the power distribution terminal, and whether the power distribution terminal modifies the MAC address of the power distribution terminal into the sent MAC address is judged;
if the MAC address is not modified successfully, the server is configured to regenerate a new MAC address and send the new MAC address again until the power distribution terminal is modified successfully;
and if the MAC address is successfully modified, displaying the MAC address on an upper computer of the server.
In another system mode, the MAC address of the power distribution terminal is automatically generated, data is processed at a terminal equipment end, and after the terminal equipment is electrified, the terminal equipment is configured to receive a communication connection request initiated by an upper computer of the server and with the terminal equipment and reply a connection result with the server to the server;
if the connection is not successful, the operation is directly quitted, and if the connection is successful, the power distribution terminal is configured to modify the MAC address of the power distribution terminal into the MAC address of the power distribution terminal generated and sent by the server and return information about whether the modification is successful to the server;
if the MAC address is not modified successfully, the power distribution terminal is configured to continue to receive a new MAC address which is generated again by the server and sent again until the MAC address is modified successfully;
if the MAC address is modified successfully, the power distribution terminal is configured to display the information of the successful modification on an upper computer of the server.
The invention has the advantages of
According to the MAC address generation method, the terminal equipment ensures the uniqueness of the MAC address in the local area network to a certain extent by utilizing the time randomness of the terminal equipment and the uniqueness of the IP address in the local area network, finally generates the unique MAC address, stores the unique MAC address in the memory of the terminal equipment for the next startup reading verification, completes the generation of the MAC address without excessive participation of personnel in the whole process, and saves labor and time.
Drawings
FIG. 1 is a flow chart of MAC address generation of the present invention;
FIG. 2 is a top level software-to-device upgrade helper interface diagram of the present invention;
FIG. 3 is a high level software-to-device upgrade assistant download program interface diagram of the present invention.
Detailed Description
The invention is described in detail below with reference to the accompanying drawings:
as shown in fig. 1, after the device is upgraded, the MAC address of the device is automatically modified, and the MAC address is generated through a series of operations according to the system time of the terminal device and the IP address of the terminal device, so that the possibility of MAC address duplication is eliminated, and the device can be operated in the local area network. In addition, according to the MAC address, the time for downloading the file can be reversely deduced through inverse operation with the IP address of the terminal equipment, and service personnel can conveniently confirm whether the program is the latest.
The method of generating the MAC address through a series of operations using the system time of the terminal device and the IP address of the terminal device is a technique that can be implemented by those skilled in the art based on existing information and operation methods.
A terminal equipment terminal:
A. ensuring that the IP and MAC of the terminal equipment in the local area network cannot be repeated, otherwise, the terminal equipment cannot be started normally;
B. and powering on and starting the equipment, wherein the equipment uses the initial MAC and operates normally.
And upper computer software in the server side:
A. inputting the IP of the terminal equipment and connecting the terminal equipment;
B. generating an MAC address according to the system time of the terminal equipment and the IP of the terminal equipment;
C. and sending the target MAC address to the terminal equipment, and enabling the terminal equipment to replace the MAC address with the MAC address of the terminal equipment and take effect.
The basis for ensuring that the IP and the MAC of the terminal equipment in the local area network cannot be repeated is as follows: the terminal equipment can normally communicate with the upper computer software and other terminal equipment, and the operation is normal without alarming.
The normal communication between the terminal equipment and the upper computer software and other terminal equipment is as follows: the data sent to the upper computer software and other terminal equipment on the terminal equipment can be normally displayed, and the data are all in a normal range.
The initial MAC address is: for a distribution point terminal device, there are generally two network cards, each network card has an MAC, and the initial MACs of the two network cards are: 00:55:25:33:45:25 and 00:15:25:35:45:50
Generating the MAC address according to the system time of the terminal equipment and the IP of the terminal equipment as follows:
the system time of the terminal equipment and the IP address of the terminal equipment are used for generating the MAC address through a series of operations, and the method has the advantages that: due to the randomness of system time and the uniqueness of the IP addresses within the local area network, the uniqueness of the MAC addresses within the local area network may be determined.
The way of sending the target MAC address to the terminal device is: by means of a portal.
Causing the terminal device to replace the MAC address with the MAC address of the terminal device and to take effect as: the terminal device is required to verify whether the MAC address is valid before replacing the MAC, and the MAC address is valid.
A flag to verify whether the MAC address is legitimate: the MAC address format is typically 6 bytes of binary code (represented by 6 sets of 16-ary numbers) in the format XX-XX.
The actual operation steps are as shown in FIG. 2:
A. inputting the IP address of the terminal equipment, and clicking the [ connecting equipment ];
B. inputting the IP address of the equipment to be upgraded, clicking a downloading program after connecting the equipment, and downloading the upgrading file and the MAC address into the terminal equipment;
C. and a downloading progress bar appears, downloading can be completed within about 40 seconds, and the MAC of the two network cards can be displayed at the same time (the power distribution terminal equipment generally has two network cards, so that two MACs are provided.
As can be seen from fig. 3, the generation of the MAC address is already completed when the program is upgraded, and MAC conflicts in the lan are not caused, the present invention can automatically modify the MAC address of the device after the device is upgraded, and generate the MAC address according to the system time of the terminal device and the IP address of the terminal device, thereby eliminating the possibility of the MAC address duplication and ensuring that the device can be operated in the lan.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (5)

1. The method for automatically generating the MAC address of the power distribution terminal is characterized by comprising the following steps of:
the terminal equipment is powered on and started, and the equipment uses the initial MAC and runs normally;
initiating a communication connection request with the terminal equipment through an upper computer of the server;
the terminal equipment replies a connection result with the server;
if the connection is not successful, the operation is directly quitted, if the connection is successful, a power distribution terminal MAC address is generated at the server end and is sent to the power distribution terminal, the power distribution terminal modifies the MAC address of the power distribution terminal into the MAC address sent by the server, and information about whether the modification is successful is returned to the server;
if the MAC address is not modified successfully, the server regenerates a new MAC address and sends the new MAC address to the power distribution terminal again until the MAC address is modified successfully;
if the MAC address is successfully modified, displaying the MAC address on an upper computer of the server;
when the server communicates with the terminal equipment, the server generates a new initialized MAC address of the terminal equipment according to the system time of the terminal equipment and the IP address of the terminal equipment;
inputting the IP address of the terminal equipment in upper computer software of a server, and establishing communication connection between the server and the terminal equipment corresponding to the IP address;
in order to ensure normal communication between the server and the terminal device corresponding to the IP address, the IP address of the terminal device and its own MAC address need to be ensured as non-duplicated addresses.
2. The method as claimed in claim 1, wherein the server sends a new initialized MAC address, i.e. a target MAC address, to the terminal device, so that the terminal device replaces the MAC address with the initialized MAC address of the terminal device and becomes valid after verification.
3. The method for automatically generating the power distribution terminal MAC address as claimed in claim 2, wherein the terminal device verifies whether the initialized MAC address is legal by: judging whether the initialized MAC address conforms to the following format:
the MAC address format is 6 bytes of binary code and the format is XX-XX-XX-XX.
4. The automatic generation system of the power distribution terminal MAC address is characterized in that data are processed at a server end, the server is configured to initiate a communication connection request with terminal equipment, and a connection result with the terminal equipment is judged;
if the connection is not successful, the operation is directly quitted, if the connection is successful, the server is configured to generate a power distribution terminal MAC address and send the power distribution terminal MAC address to the power distribution terminal, and whether the power distribution terminal modifies the MAC address of the power distribution terminal into the sent MAC address is judged;
if the MAC address is not modified successfully, the server is configured to regenerate a new MAC address and send the new MAC address again until the power distribution terminal is modified successfully;
if the MAC address is successfully modified, displaying the MAC address on an upper computer of the server;
when the server communicates with the terminal equipment, the server generates a new initialized MAC address of the terminal equipment according to the system time of the terminal equipment and the IP address of the terminal equipment;
inputting the IP address of the terminal equipment in upper computer software of a server, and establishing communication connection between the server and the terminal equipment corresponding to the IP address;
in order to ensure normal communication between the server and the terminal device corresponding to the IP address, the IP address of the terminal device and its own MAC address need to be ensured as non-duplicated addresses.
5. The automatic generation system of the MAC address of the power distribution terminal is characterized in that data are processed at a terminal equipment end, and after the terminal equipment is electrified, the terminal equipment is configured to receive a communication connection request initiated by an upper computer of a server and transmitted to the terminal equipment and reply a connection result with the server to the server;
if the connection is not successful, the operation is directly quitted, and if the connection is successful, the power distribution terminal is configured to modify the MAC address of the power distribution terminal into the MAC address of the power distribution terminal generated and sent by the server and return information about whether the modification is successful to the server;
if the MAC address is not modified successfully, the power distribution terminal is configured to continue to receive a new MAC address which is generated again by the server and sent again until the MAC address is modified successfully;
if the MAC address is modified successfully, the power distribution terminal is configured to display the information which is modified successfully on an upper computer of the server;
when the server communicates with the terminal equipment, the server generates a new initialized MAC address of the terminal equipment according to the system time of the terminal equipment and the IP address of the terminal equipment;
inputting the IP address of the terminal equipment in upper computer software of a server, and establishing communication connection between the server and the terminal equipment corresponding to the IP address;
in order to ensure normal communication between the server and the terminal device corresponding to the IP address, the IP address of the terminal device and its own MAC address need to be ensured as non-duplicated addresses.
CN201611247004.5A 2016-12-29 2016-12-29 Automatic generation method and system for MAC address of power distribution terminal Active CN106790756B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611247004.5A CN106790756B (en) 2016-12-29 2016-12-29 Automatic generation method and system for MAC address of power distribution terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611247004.5A CN106790756B (en) 2016-12-29 2016-12-29 Automatic generation method and system for MAC address of power distribution terminal

Publications (2)

Publication Number Publication Date
CN106790756A CN106790756A (en) 2017-05-31
CN106790756B true CN106790756B (en) 2020-04-24

Family

ID=58929194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611247004.5A Active CN106790756B (en) 2016-12-29 2016-12-29 Automatic generation method and system for MAC address of power distribution terminal

Country Status (1)

Country Link
CN (1) CN106790756B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108320152A (en) * 2018-01-17 2018-07-24 深圳喆行科技有限公司 A kind of recharge method and system of stored value card
CN111835875B (en) * 2019-04-22 2022-12-30 普天信息技术有限公司 Communication method and device for private network terminal and industry terminal
CN113726921A (en) * 2021-08-31 2021-11-30 安徽华夏光电股份有限公司 Method for automatically updating MAC address
CN114422481B (en) * 2021-12-13 2024-03-15 科华数据股份有限公司 Network equipment management method and related device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065167A (en) * 2014-06-26 2014-09-24 国家电网公司 Method for realizing automatic registration of intelligent distribution terminal
CN104079686A (en) * 2014-07-17 2014-10-01 福州瑞芯微电子有限公司 Setting method and distributing method for terminal equipment MAC address
CN104955026A (en) * 2015-06-11 2015-09-30 重庆蓝岸通讯技术有限公司 Method for modifying MAC addresses of Bluetooth (Personal Digital Assistant) and WiFi of PDA

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647856B (en) * 2013-12-23 2017-09-08 成都西加云杉科技有限公司 APP obtains the method and system of the MAC Address of local terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065167A (en) * 2014-06-26 2014-09-24 国家电网公司 Method for realizing automatic registration of intelligent distribution terminal
CN104079686A (en) * 2014-07-17 2014-10-01 福州瑞芯微电子有限公司 Setting method and distributing method for terminal equipment MAC address
CN104955026A (en) * 2015-06-11 2015-09-30 重庆蓝岸通讯技术有限公司 Method for modifying MAC addresses of Bluetooth (Personal Digital Assistant) and WiFi of PDA

Also Published As

Publication number Publication date
CN106790756A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106790756B (en) Automatic generation method and system for MAC address of power distribution terminal
CN107920112B (en) Configuration file pushing method supporting gray mode, central server and storage medium
CN103970566B (en) A kind of method and apparatus of router firmware upgrading
CN112532704A (en) Data transmission method and device, electronic equipment and storage medium
CN112152825B (en) Multi-stage module upgrading method and device for household appliance and electronic equipment
CN113568646B (en) Novel portable program upgrading method
CN114124904A (en) Method and system for verifying MAC addresses to be burnt into multiple devices by server
CN107277163B (en) Equipment remote mapping method and device
CN110677248B (en) Safe binding method and system based on narrowband Internet of things
CN112788576A (en) Equipment offline processing method and system, storage medium and electronic device
CN107908408A (en) A kind of long-distance cloud mobile phone application installation method
CN112615835B (en) Charging pile multi-communication protocol support method and storage medium
CN110225097B (en) Information processing method, device and storage medium
CN112416847B (en) Redis cluster creation method, system and device
CN114186219A (en) Heterogeneous system integration method and system for password cracking
CN114579166A (en) Component module upgrading method, component module and financial robot
CN107231244B (en) System, method and device for initializing encryption machine
CN208156647U (en) A kind of auxiliary device for the upgrading of distribution apparatus program
CN101931545A (en) Method and device for repeatedly producing or repeatedly upgrading firewall
CN112217659A (en) Method and system for adding client terminal equipment in SD-WAN (secure digital-Wide area network) system
CN113759871B (en) Multi-controller refreshing method, device, equipment and readable storage medium
CN108632368B (en) Remote debugging system and method for chip operating system
CN103795682A (en) Password list management method and device
CN113596005B (en) Binding method, binding device, binding system, storage medium and binding electronic device for equipment
CN116107603B (en) Firmware upgrading method and device, storage medium and electronic equipment

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
CB02 Change of applicant information

Address after: 250101 block B, Yinhe building, 2008 Xinjie street, hi tech Zone, Ji'nan, Shandong.

Applicant after: Shandong Luneng Intelligent Technology Co., Ltd.

Address before: 250101 B block 626, Yinhe building, 2008 Xinjie street, Ji'nan high tech Zone, Shandong.

Applicant before: Shandong Luneng Intelligent Technology Co., Ltd.

CB02 Change of applicant information
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 250101 Electric Power Intelligent Robot Production Project 101 in Jinan City, Shandong Province, South of Feiyue Avenue and East of No. 26 Road (ICT Industrial Park)

Applicant after: National Network Intelligent Technology Co., Ltd.

Address before: 250101 block B, Yinhe building, 2008 Xinjie street, hi tech Zone, Ji'nan, Shandong.

Applicant before: Shandong Luneng Intelligent Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201215

Address after: Room 902, 9 / F, block B, Yinhe building, 2008 Xinluo street, hi tech Zone, Jinan City, Shandong Province

Patentee after: Shandong Luneng Software Technology Co.,Ltd. intelligent electrical branch

Address before: 250101 power intelligent robot production project 101 south of Feiyue Avenue and east of No.26 Road (in ICT Industrial Park) in Suncun District of Gaoxin, Jinan City, Shandong Province

Patentee before: National Network Intelligent Technology Co.,Ltd.

TR01 Transfer of patent right
CP01 Change in the name or title of a patent holder

Address after: Room 902, 9 / F, block B, Yinhe building, 2008 Xinluo street, hi tech Zone, Jinan City, Shandong Province

Patentee after: Shandong luruan Digital Technology Co.,Ltd. smart energy branch

Address before: Room 902, 9 / F, block B, Yinhe building, 2008 Xinluo street, hi tech Zone, Jinan City, Shandong Province

Patentee before: Shandong Luneng Software Technology Co.,Ltd. intelligent electrical branch

CP01 Change in the name or title of a patent holder