CN110708403B - Circuit and method for automatically configuring MAC address of network card by utilizing singlechip - Google Patents

Circuit and method for automatically configuring MAC address of network card by utilizing singlechip Download PDF

Info

Publication number
CN110708403B
CN110708403B CN201911122204.1A CN201911122204A CN110708403B CN 110708403 B CN110708403 B CN 110708403B CN 201911122204 A CN201911122204 A CN 201911122204A CN 110708403 B CN110708403 B CN 110708403B
Authority
CN
China
Prior art keywords
mac address
singlechip
electronic switch
main control
control chip
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
CN201911122204.1A
Other languages
Chinese (zh)
Other versions
CN110708403A (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.)
Hu Qiang
Original Assignee
Chengdu Xima Technology Development 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 Chengdu Xima Technology Development Co ltd filed Critical Chengdu Xima Technology Development Co ltd
Priority to CN201911122204.1A priority Critical patent/CN110708403B/en
Publication of CN110708403A publication Critical patent/CN110708403A/en
Application granted granted Critical
Publication of CN110708403B publication Critical patent/CN110708403B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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 circuit and a method for automatically configuring a network card MAC address by utilizing a singlechip, wherein the circuit comprises an MAC address storage chip, an electronic switch, a network main control chip and the singlechip; the singlechip is connected with the MAC address memory through the electronic switch, and writes a required MAC address into the MAC address memory, and controls the electronic switch to enable the MAC address memory chip to be communicated with the network main control chip, and simultaneously controls the network main control chip to start and run, and the network card works according to the set MAC address. The invention can conveniently modify the MAC address of the network card, and has simple structure and convenient implementation.

Description

Circuit and method for automatically configuring MAC address of network card by utilizing singlechip
Technical Field
The invention relates to the field of circuits, in particular to a circuit and a method for automatically configuring a network card MAC address by utilizing a singlechip.
Background
Ethernet is the most widely used network in the world now, each Ethernet card has a unique MAC address, the MAC address of the Ethernet card is generally configured by the manufacturer, users need to modify, generally use the special program provided by the manufacturer, set in DOS state, take the serial network card of Taiwan Realtek company of China as an example, its manufacturer provides PG8168.EXE set program, the computer starts to enter DOS state, run PG8168.EXE program, this program will automatically write the MAC address in the configuration file 8168.CFG under the current folder into the network card, and automatically increase the MAC address in the configuration file by 1, prepare to set the next network card, if need to set the designated MAC address to the network card, need to edit the content of 8168.CFG manually before running PG8168.EXE program, the MAC address of Ethernet needs to change by using the program provided by the manufacturer, need to start the computer to enter DOS system, then run the set program again, can not realize for some application scenarios that need to modify MAC address automatically.
Disclosure of Invention
Aiming at the defects of the background technology and the existing design, the invention provides a circuit and a method for automatically configuring the MAC address of the network card by utilizing the singlechip.
A circuit for automatically configuring a network card MAC address by utilizing a singlechip comprises a MAC address memory, an electronic switch, a network main control chip and the singlechip; the singlechip is connected with the memory through the electronic switch and writes a required MAC address into the MAC address memory, and controls the electronic switch to enable the MAC address memory chip to be communicated with the network main control chip and simultaneously controls the network main control chip to start running, and the network card works according to the set MAC address.
Further, the memory is an EEPROM or FLASH memory for storing the MAC address.
Further, the electronic switch is a 4-pole double-throw electronic switch.
Further, the electronic switch is connected with the memory or the network card by selecting different switching directions.
Further, the starting operation of the network main control chip is controlled by a single chip microcomputer.
Further, the single chip microcomputer is a 4-bit, 8-bit, 16-bit or 32-bit single chip microcomputer or is equivalently replaced by a ASIC, FPGA, CPLD logic circuit.
A method for automatically configuring the MAC address of a network card by utilizing a singlechip comprises the following steps:
s1: the singlechip is communicated with the MAC address storage chip through the electronic switch;
s2: the singlechip writes a required MAC address into the memory chip;
s3: the singlechip controls the electronic switch to communicate the network main control chip and the MAC address memory;
s4: the singlechip controls the network main control chip to start and run, and the network card works according to the MAC address set by the memory.
The invention has the beneficial effects that:
the invention can realize the automatic configuration of the MAC addresses of the Ethernet cards, each Ethernet card has a unique MAC address, the MAC address can be changed after the network card is replaced, then the IP address related to the MAC address of the Ethernet card is often required to be manually reset, and some software binding the MAC address is also required to be manually reconfigured or installed. With the circuit and the method of the invention, the singlechip can set the MAC address of the network card according to the requirement, thereby realizing the realization of no need of manual configuration and improving the working efficiency.
Drawings
Fig. 1 is a schematic circuit diagram of automatically configuring a network card MAC address by using a single-chip microcomputer.
Detailed Description
For a clearer understanding of technical features, objects, and effects of the present invention, a specific embodiment of the present invention will be described with reference to the accompanying drawings.
In this embodiment, as shown in fig. 1, a method for configuring an ethernet card MAC address by using a single-chip microcomputer is to add a four-pole double-throw electronic switch on a serial communication line of a network main control chip reading MAC address storage chip, a center contact of the four-pole double-throw electronic switch is connected to the MAC address storage chip, an a group contact of the four-pole double-throw electronic switch is connected to the network main control chip, a B group contact of the four-pole double-throw electronic switch is connected to the single-chip microcomputer, and the single-chip microcomputer is used to control the start of the network main control chip and control the switching direction of the four-pole double-throw electronic switch; when the power is on, the singlechip, the four-pole double-throw electronic switch and the MAC address storage chip are powered on and run firstly (the singlechip enables the network main control chip not to be started), and the singlechip controls the four-pole double-throw electronic switch to be communicated with the pins of the singlechip and the MAC address storage chip, so that the singlechip can write the needed MAC address information into the MAC address storage chip, then the singlechip controls the four-pole double-throw electronic switch to be switched and communicated with the network main control chip and the MAC address storage chip, then the singlechip controls the network main control chip to be started and run, and the Ethernet card works according to the MAC address set by the singlechip.
The single chip microcomputer can be various 4-bit, 8-bit, 16-bit and 32-bit single chip microcomputers, and can also realize the same function by logic circuits such as ASIC, FPGA, CPLD.
The four-pole double-throw electronic switch can be a single-piece four-pole double-throw electronic switch, such as: PI3V312, PI5V330, CH440, etc., may also be obtained by other electronic switch combinations: for example, the combination of the two three-pole double-throw electronic switches 74HC4053 or the combination of the two four-pole single-throw electronic switches 74HC4066 can be completed by other combinations, so long as the input and the output comprise the function of 4-pole double throw.
A method for configuring an Ethernet card MAC address by utilizing a singlechip comprises the following steps:
the method comprises the steps that S1, power is applied, a singlechip enables a network card main control chip not to be started, the singlechip controls S1 to be switched to a b end, and a MAC address storage chip U2 is connected to a pin of the singlechip;
s2, the singlechip writes the required MAC address data into the U2;
s3, the singlechip controls the S1 to be switched to the end a, and the MAC address memory chip U2 is connected to the network main control chip U1;
s4, the singlechip controls the network main control chip U1 to start operation, and the network card works according to the set MAC address.
The foregoing has shown and described the basic principles and main features of the present invention and the advantages of the present invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, and that the above embodiments and descriptions are merely illustrative of the principles of the present invention, and various changes and modifications may be made without departing from the spirit and scope of the invention, which is defined in the appended claims. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (1)

1. A method for automatically configuring a network card MAC address by utilizing a singlechip is characterized in that:
the method is realized based on a circuit for automatically configuring the MAC address of the network card by utilizing a singlechip, and the circuit for automatically configuring the MAC address of the network card by utilizing the singlechip comprises the following components: the system comprises a network main control chip, an MAC address memory, an electronic switch and a singlechip; the singlechip is connected with the memory through the electronic switch and writes a required MAC address into the memory, controls the electronic switch to enable the MAC address storage chip to be communicated with the network main control chip, and simultaneously controls the network main control chip to start operation, and the network card works according to the set MAC address; the memory is an EEPROM or FLASH memory and is used for storing the MAC address; the electronic switch is a 4-pole double-throw electronic switch; the 4-pole double-throw electronic switch enables the MAC storage chip to be connected with the singlechip or the network main control chip by selecting different switching directions; the starting operation of the network main control chip is controlled by a singlechip; the singlechip is a 4-bit, 8-bit, 16-bit or 32-bit singlechip or is equivalently replaced by a ASIC, FPGA, CPLD logic circuit;
the method for automatically configuring the MAC address of the network card by utilizing the singlechip comprises the following steps of:
s1: the singlechip is communicated with the MAC address storage chip through the electronic switch;
s2: the singlechip writes a required MAC address into the MAC address storage chip;
s3: the singlechip controls the electronic switch to enable the network main control chip to be communicated with the MAC address storage chip;
s4: the singlechip controls the network main control chip to start running, and the network card works according to the set MAC address;
the working principle of the method is as follows:
a four-pole double-throw electronic switch is added on a serial communication line of a network main control chip reading MAC address storage chip, a central contact of the four-pole double-throw electronic switch is connected with the MAC address storage chip, an A group contact of the four-pole double-throw electronic switch is connected with the network main control chip, a B group contact of the four-pole double-throw electronic switch is connected with a singlechip, and the singlechip is used for controlling the starting of the network main control chip and controlling the switching direction of the four-pole double-throw electronic switch; when the power is on, the singlechip, the four-pole double-throw electronic switch and the MAC address storage chip are powered on and run at first, the singlechip enables the network main control chip not to be started, the singlechip controls the four-pole double-throw electronic switch to be communicated with the pins of the singlechip and the MAC address storage chip, the singlechip can write the needed MAC address information into the MAC address storage chip, then the singlechip controls the four-pole double-throw electronic switch to be switched and communicated with the network main control chip and the MAC address storage chip, then the singlechip controls the network main control chip to be started and run, and the Ethernet card works according to the MAC address set by the singlechip.
CN201911122204.1A 2019-11-15 2019-11-15 Circuit and method for automatically configuring MAC address of network card by utilizing singlechip Active CN110708403B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911122204.1A CN110708403B (en) 2019-11-15 2019-11-15 Circuit and method for automatically configuring MAC address of network card by utilizing singlechip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911122204.1A CN110708403B (en) 2019-11-15 2019-11-15 Circuit and method for automatically configuring MAC address of network card by utilizing singlechip

Publications (2)

Publication Number Publication Date
CN110708403A CN110708403A (en) 2020-01-17
CN110708403B true CN110708403B (en) 2024-03-26

Family

ID=69206398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911122204.1A Active CN110708403B (en) 2019-11-15 2019-11-15 Circuit and method for automatically configuring MAC address of network card by utilizing singlechip

Country Status (1)

Country Link
CN (1) CN110708403B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101958832A (en) * 2010-09-02 2011-01-26 北京东土科技股份有限公司 Field-configurable unmanaged Ethernet switch
CN102364443A (en) * 2011-06-27 2012-02-29 浪潮电子信息产业股份有限公司 Method for online programming network card configuration file
CN103885921A (en) * 2014-04-22 2014-06-25 国家电网公司 Flash memorizer, FPGA chip and configuration method of FPGA chip
CN205564000U (en) * 2016-04-25 2016-09-07 吉林建筑大学城建学院 A intermediate data transport module that is used for host computer and next quick -witted communication
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101958832A (en) * 2010-09-02 2011-01-26 北京东土科技股份有限公司 Field-configurable unmanaged Ethernet switch
CN102364443A (en) * 2011-06-27 2012-02-29 浪潮电子信息产业股份有限公司 Method for online programming network card configuration file
CN103885921A (en) * 2014-04-22 2014-06-25 国家电网公司 Flash memorizer, FPGA chip and configuration method of FPGA chip
CN205564000U (en) * 2016-04-25 2016-09-07 吉林建筑大学城建学院 A intermediate data transport module that is used for host computer and next quick -witted communication
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

Also Published As

Publication number Publication date
CN110708403A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN104967585B (en) A kind of method and apparatus of remote debugging mobile terminal
CN104778109B (en) Program downloading system and method of PCIE/PCIX external plug-in card
CN108108324B (en) PCIE (peripheral component interface express) expansion method and device
CN109614232B (en) Task processing method and device, storage medium and electronic device
JP2016045954A (en) System and method for initializing rf module through nonvolatile control
CN110912836A (en) Method, control device, storage medium, and system for forwarding data by forwarding device
CN208061193U (en) Clustered control device
CN104881312A (en) FPGA (Field Programmable Gate Array) logic code iterable upgrading method and circuit
CN110708403B (en) Circuit and method for automatically configuring MAC address of network card by utilizing singlechip
CN104158709A (en) Optical module identification method and port extender
US6023761A (en) Method and system for using decompression on compressed software stored in non-volatile memory of an embedded computer system to yield decompressed software including initialized variables for a runtime environment
CN110554881A (en) Switching chip working mode remote switching system and method based on CPLD
CN210629552U (en) Circuit for automatically configuring MAC address of network card by utilizing single chip microcomputer
CN110568946B (en) Port control method, device and medium
CN210958390U (en) Isolation gatekeeper device for network security
CN210573287U (en) Expansion circuit
CN114499700B (en) Method, device, processor and storage medium for realizing Bluetooth module production test and verification by AP intelligent terminal through serial port communication
CN116886524A (en) Configuration method, device and server for pre-starting execution environment function
JP2001512258A (en) Circuit device for memory occupation area management and processing of user program in small control unit
CN115718641A (en) Memory simulation method and device, storage medium and electronic device
CN115904418A (en) System and method for burning firmware of PCIE (peripheral component interface express) cascade chip
CN113037880B (en) Gateway IP address configuration method and device, gateway and readable storage medium
CN113064833A (en) Single chip microcomputer simulation method, system, device, equipment and storage medium
CN111124890B (en) Distributed database performance test method, system, terminal and storage medium
CN108241546B (en) Method, device and system for sharing use of BDI debugger

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240416

Address after: No. 20, Unit 4, Building 2, No. 1 Ximianqiao East 1st Street, Wuhou District, Chengdu City, Sichuan Province, 610000

Patentee after: Hu Qiang

Country or region after: China

Address before: No. 33 Wuqing South Road, Chengdu City, Sichuan Province, 610000 (within the Wuhou New City Management Committee)

Patentee before: Chengdu Xima Technology Development Co.,Ltd.

Country or region before: China