CN108183978A - A kind of communication equipment IP address configuration method and communication equipment - Google Patents

A kind of communication equipment IP address configuration method and communication equipment Download PDF

Info

Publication number
CN108183978A
CN108183978A CN201810273298.1A CN201810273298A CN108183978A CN 108183978 A CN108183978 A CN 108183978A CN 201810273298 A CN201810273298 A CN 201810273298A CN 108183978 A CN108183978 A CN 108183978A
Authority
CN
China
Prior art keywords
address
communication equipment
host computer
sent
memory module
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.)
Granted
Application number
CN201810273298.1A
Other languages
Chinese (zh)
Other versions
CN108183978B (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.)
Beijing Institute of Environmental Features
Original Assignee
Beijing Institute of Environmental Features
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 Beijing Institute of Environmental Features filed Critical Beijing Institute of Environmental Features
Priority to CN201810273298.1A priority Critical patent/CN108183978B/en
Publication of CN108183978A publication Critical patent/CN108183978A/en
Application granted granted Critical
Publication of CN108183978B publication Critical patent/CN108183978B/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/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • 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

Abstract

The present invention relates to fields of communication technology, provide a kind of communication equipment IP address configuration method and communication equipment, this method include:Detect it is described it is communication device initiated after, the first IP address is read from the memory module of the communication equipment;The network connection between the communication equipment and host computer is established using first IP address;Receive the IP address reset indication that the host computer is sent;According to the IP address reset indication, in the second IP address storage to the memory module that the IP address reset indication is carried, first IP address stored originally in the memory module is covered;After detecting that the communication equipment is restarted, second IP address is read from the memory module;Second IP address is configured to the IP address of the communication equipment.This programme, which can be realized, is configured the IP address of communication equipment.

Description

A kind of communication equipment IP address configuration method and communication equipment
Technical field
The present invention relates to field of communication technology more particularly to a kind of communication equipment IP address configuration method and communication equipments.
Background technology
IP address (Internet Protocol Address, internet protocol address) is that one kind that IP agreement provides is same Address format, it is one logical address of each network and each host assignment on internet, carrys out screen with this Manage the difference of address so that each network and host can interconnect.For current network communicating system, in network communication System design process specifies IP address for each communication equipment, and the IP address of communication equipment will after the completion of network communicating system design It can not change.Due to same communication equipment may need from different host computer communications, if the IP address of communication equipment with it is upper The IP address of position machine belongs to the different network segments, and the communication between communication equipment and host computer is likely to occur exception, but can not lead to The IP address for crossing again configuration of communications device enables host computer and communication equipment normal communication, leads to the usage experience of user It is poor.
Therefore, for above deficiency, it is desirable to provide a kind of technical side that the IP address of communication equipment can be configured Case.
Invention content
The technical problem to be solved in the present invention is after the completion of network communicating system exploitation that the IP address of communication equipment can not Change, for the defects in the prior art, provide it is a kind of can be to technical solution that communication equipment IP address is configured.
In order to solve the above technical problem, the present invention provides a kind of communication equipment IP address configuration method, including:
Detect it is described it is communication device initiated after, the first IP address is read from the memory module of the communication equipment;
The network connection between the communication equipment and host computer is established using first IP address;
Receive the IP address reset indication that the host computer is sent;
According to the IP address reset indication, the second IP address that the IP address reset indication is carried is stored to described In memory module, first IP address stored originally in the memory module is covered;
After detecting that the communication equipment is restarted, second IP address is read from the memory module;
Second IP address is configured to the IP address of the communication equipment.
Optionally,
The network connection established using first IP address between the communication equipment and host computer, including:
Receive the Address Resolution Protocol ARP request that the host computer is sent;
Obtain the target ip address entrained by the ARP request;
Judge whether the target ip address and first IP address are identical;
If so, the first MAC Address of the communication equipment is sent to the host computer, so that the host computer creates Mapping relations between first IP address and first MAC Address, and can be according to first MAC Address to described Communication equipment sends information.
Optionally,
It is described judge whether the target ip address and first IP address identical after, further comprise:
If the target ip address is identical with first IP address, the host computer is obtained from the ARP request Third IP address and the second MAC Address, and store the mapping relations of the third IP address and second MAC Address, with Information is sent to the host computer according to the third IP address and the mapping relations of second MAC Address.
Optionally,
After in the second IP address storage to the memory module for carrying the IP address reset indication, into One step includes:
The first subnet mask of first IP address is obtained, obtains the second subnet mask of second IP address;
First IP address, the first subnet mask, the second IP address and the second subnet mask are converted into correspondence respectively Binary sequence;
By the corresponding binary sequence of first IP address binary sequence corresponding with first subnet mask into Row binary system and operation obtain the first verification sequence;
By the corresponding binary sequence of second IP address binary sequence corresponding with second subnet mask into Row binary system and operation obtain the second verification sequence;
Judge whether the first verification sequence and the described second verification sequence are identical;
First IP address is prompted to be located at the same network segment with second IP address if so, being sent to the host computer Prompt message.
The embodiment of the present invention additionally provides a kind of communication equipment, including:On-site programmable gate array FPGA and memory module;
The memory module, for storing the first IP address;
The FPGA, for detect it is described it is communication device initiated after, the first IP is read from the memory module Address, after establishing the network connection between host computer using first IP address, with receiving the IP that the host computer is sent Location reset indication in the second IP address storage to the memory module for carrying the IP address reset indication, is deposited to described Chu Mo first IP address in the block is covered and after the communication equipment restarting is detected, is deposited from described Second IP address is read, and second IP address is configured to the IP address of the communication equipment in storage module.
Optionally,
The FPGA includes:ARP handshake modules;
The ARP handshake modules for receiving the ARP request that the host computer is sent, obtain what the ARP request carried Target ip address, and judge whether the target ip address and first IP address are identical, if so, by the communication equipment The first MAC Address be sent to the host computer so that the host computer creates first IP address with the first MAC Mapping relations between location, and can information be sent to the communication equipment according to first MAC Address.
Optionally,
The ARP handshake modules, be further used for judge the target ip address it is identical with first IP address it Afterwards, the third IP address and the second MAC Address of the host computer are obtained from the ARP request, and with storing the 3rd IP Location and the mapping relations of second MAC Address, so that the FPGA is according to the third IP address and second MAC Address Mapping relations to the host computer send information.
Optionally,
The communication equipment further comprises:Flash array;
The FPGA further comprises:Data reception module and data transmission blocks;
The flash array, for storing the data that external data source is sent to the FPGA;
The data reception module for receiving the data that the host computer is sent, and the data received is just stored Into the flash array;
The data transmission blocks, for the data requesting instructions sent according to the host computer, from the flash array It reads corresponding data and is sent to the host computer.
Optionally,
It is any one or more in the data reception module, the data transmission blocks and the ARP handshake modules, It is developed by hardware description language.
Optionally,
The FPGA is further used for performing following operation:
The first subnet mask of first IP address is obtained, obtains the second subnet mask of second IP address;
First IP address, the first subnet mask, the second IP address and the second subnet mask are converted into correspondence respectively Binary sequence;
By the corresponding binary sequence of first IP address binary sequence corresponding with first subnet mask into Row binary system and operation obtain the first verification sequence;
By the corresponding binary sequence of second IP address binary sequence corresponding with second subnet mask into Row binary system and operation obtain the second verification sequence;
Judge whether the first verification sequence and the described second verification sequence are identical;
First IP address is prompted to be located at the same network segment with second IP address if so, being sent to the host computer Prompt message.
Implement communication equipment IP address configuration method provided in an embodiment of the present invention and communication equipment, at least have has as follows Beneficial effect:
1st, the first IP address is stored in the memory module of communication equipment, memory module can be utilized when communication device initiated First IP address of middle storage establishes the network connection between host computer, can be sent out after the completion of network connection foundation with host computer The IP address reset indication sent, in the second IP address storage to memory module that IP address reset indication is carried to the first IP Location is covered, in this way, when communication module restarts, can read the second IP address from memory module, and by second IP address is configured to the IP address of communication equipment.It can be seen that communication equipment reads IP after restarting every time from memory module Location is to establish the communication connection between host computer, so as to the IP address reset indication that is sent according to host computer to storing mould The IP address stored in block is updated, and realizes and the IP address of communication equipment is configured, and promotes the usage experience of user.
2nd, it crosses and receives the ARP request that host computer is sent, it may be determined that whether the communication equipment to communicate needed for host computer is to work as Preceding communication equipment, when the communication equipment for determining to communicate needed for host computer is current communication devices, by the MAC of current communication devices Address is sent to host computer so that host computer can send information according to received MAC Address to current communication devices, protect Card host computer can communicate with multiple communication equipments, promote the usage experience of user.
3rd, host computer can create the mapping relations between MAC Address and target ip address after MAC Address is received, this When sample host computer needs to send information to same communication equipment again, MAC Address can be directly obtained according to mapping relations to phase The communication equipment answered sends information, without sending ARP request again, contributes to the raising of traffic rate.
4th, by storing the mapping relations between the IP address of host computer and MAC Address, communication equipment is in addition to that can receive The information that host computer is sent can also send information to host computer, realize the two-way communication between host computer and communication equipment, carry The applicability of the communication equipment IP address configuration method is risen.
5th, after determining that the second IP address is located at the same network segment with the first IP address, prompt message is sent to host computer, is carried Show that the second IP address of host computer is located at the same network segment with the first IP address.If the in this way, IP address weight that communication equipment receives It is not transmitted by host computer or host computer is sent under by the state of forcing to do one's bidding to put instruction, and the user of host computer can send out in time Now and using handling accordingly, the safety to communicate between host computer and communication equipment is helped to improve.
6th, ARP handshake modules, data reception module and the data transmission blocks that FPGA includes, can pass through Hardware description language The form of speech is described, ARP handshake modules, data reception module and the data transmission blocks developed in this way independent of The support of FPGA hardware function module can realize that the communication that the embodiment of the present invention is previously mentioned is set by the FPGA of various models It is standby, the applicability of the communication equipment on the one hand can be improved, the FPGA that lower end on the other hand may be used realizes that the present invention is real The communication equipment that example is provided is applied, ensure that communication equipment has relatively low cost.
Description of the drawings
Fig. 1 is the flow chart that the embodiment of the present invention one provides communication equipment IP address configuration method;
Fig. 2 is the schematic diagram that the embodiment of the present invention five provides communication equipment;
Fig. 3 is the schematic diagram that the embodiment of the present invention six provides communication equipment;
Fig. 4 is the schematic diagram that the embodiment of the present invention eight provides communication equipment;
Fig. 5 is the flow chart of 11 offer communication equipment IP address configuration methods of the embodiment of the present invention.
In figure:201:FPGA;202:Memory module;2011:ARP handshake modules;2012:Data reception module;2013:Number According to sending module;403:Flash array.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is The part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people Member's all other embodiments obtained under the premise of creative work is not made, shall fall within the protection scope of the present invention.
Embodiment one
As shown in Figure 1, communication equipment IP address configuration method provided in an embodiment of the present invention, may comprise steps of:
Step 101:Detect it is communication device initiated after, the first IP address is read from the memory module of communication equipment;
Step 102:The network connection between communication equipment and host computer is established using the first IP address;
Step 103:Receive the IP address reset indication that host computer is sent;
Step 104:According to IP address reset indication, the second IP address storage to storage that IP address reset indication is carried In module, the first IP address stored originally in memory module is covered;
Step 105:After detecting that communication equipment is restarted, the second IP address is read from memory module;
Step 106:Second IP address is configured to the IP address of communication equipment.
Communication equipment IP address configuration method provided in an embodiment of the present invention is stored in the memory module of communication equipment One IP address can utilize the first IP address stored in memory module to establish the net between host computer when communication device initiated Network connects, and the IP address reset indication that can be sent after the completion of network connection foundation with host computer takes IP address reset indication The first IP address is covered in the second IP address storage to memory module of band, in this way, when communication module restarts, The second IP address can be read from memory module, and the second IP address is configured to the IP address of communication equipment.It can be seen that Communication equipment reads IP address to establish the communication connection between host computer from memory module after restarting every time, so as to The IP address stored in memory module is updated according to the IP address reset indication that host computer is sent, is realized to communication equipment IP address be configured, promote the usage experience of user.
Embodiment two
On the basis of embodiment one provides communication equipment IP address configuration method, step 102 utilizes the first IP address When establishing the network connection between communication equipment and host computer, it can specifically realize in the following way:
A1:Receive ARP (Address Resolution Protocol, the address resolution protocol) requests that host computer is sent;
A2:Obtain the target ip address entrained by ARP request;
A3:Judge whether target ip address identical with the first IP address, if so, performing A4, otherwise terminate current Flow;
A4:First MAC Address of communication equipment is sent to host computer, so that host computer creates the first IP address and first Mapping relations between MAC Address, and host computer is allow to send information to communication equipment according to the first MAC Address.
After the first IP address is read in the memory module from communication equipment, real-time reception host computer passes through the forms of broadcasting The ARP request of transmission carries the target ip address of the communication equipment to communicate needed for host computer in ARP request.It is receiving To after ARP request, the target ip address that ARP request carries is obtained, and by the target ip address got and read the One IP address is compared, and judges whether target ip address is identical with the first IP address.If target ip address and the first IP Location is identical, illustrates the communication equipment to communicate needed for host computer for current communication devices, by the first MAC of current communication devices Address is sent to host computer.If target ip address is different from the first IP address, illustrate the communication to communicate needed for host computer Equipment is not current communication devices, will receive ARP request discarding.Host computer creates first after the first MAC Address is received Mapping relations between MAC Address and target ip address (the first IP address), hereafter host computer can be obtained according to the mapping relations The first MAC Address of target communication device is obtained, then can IP address weight be sent to target communication device according to the first MAC Address Put the information such as instruction.
The ARP request sent by receiving host computer, it may be determined that whether the communication equipment to communicate needed for host computer is to work as Preceding communication equipment, when the communication equipment for determining to communicate needed for host computer is current communication devices, by the MAC of current communication devices Address is sent to host computer so that host computer can send information according to received MAC Address to current communication devices, protect Card host computer can communicate with multiple communication equipments, promote the usage experience of user.In addition, host computer is receiving MAC Behind address, the mapping relations between MAC Address and target ip address can be created, such host computer needs to set to same communication again Preparation deliver letters breath when, can be directly obtained according to mapping relations MAC Address to corresponding communication equipment send information, without again ARP request is sent, contributes to the raising of traffic rate.
Embodiment three
On the basis of embodiment two provides communication equipment IP address configuration method, judge target ip address whether with After first IP address is identical, if it is determined that target ip address is identical with the first IP address, can also be asked from received ARP It asks middle and obtains the third IP address and the second MAC Address of host computer, and store reflecting between third IP address and the second MAC Address Penetrate relationship.
After determining that the target ip address entrained by ARP request is identical with the first IP address, ARP request institute is further obtained The IP address and MAC Address of the host computer of carrying establish the mapping relations between the IP address of host computer and MAC Address and progress It, can be according to the mapping of host computer IP address and MAC Address if communication equipment needs to send information to host computer after storage Relationship obtains the MAC Address of host computer, and then sends information to host computer according to the MAC Address of host computer.In this way, pass through storage Mapping relations between the IP address and MAC Address of host computer, information of the communication equipment in addition to host computer transmission can be received, also Information can be sent to host computer, realize the two-way communication between host computer and communication equipment, with improving communication equipment IP The applicability of location configuration method.
Example IV
On the basis of any embodiment provides communication equipment IP address configuration method in embodiment one to embodiment three, The storage of the second IP address to after in memory module, can be detected further the second IP address and the first IP address whether position In the same network segment, detailed process can be accomplished by the following way:
B1:The first subnet mask of the first IP address is obtained, and obtains the second subnet mask of the second IP address;
B2:The first IP address, the first subnet mask, the second IP address and the second subnet mask are converted to respectively corresponding Binary sequence;
B3:By corresponding with the first subnet mask binary sequence of the corresponding binary sequence of the first IP address carry out two into System and operation obtain the first verification sequence;
B4:By corresponding with the second subnet mask two-stage system sequence of the corresponding binary sequence of the second IP address carry out two into System and operation obtain the second verification sequence;
B5:Judge whether the first verification sequence and the second verification sequence are identical, if so, performing B6, otherwise terminate current Flow;
B6:The first IP address of prompting is sent to host computer and the second IP address is located at the prompt message of the same network segment.
For example, it is in the first IP address that communication equipment booting is read from memory module after the power is turned on 211.95.165.24, the second IP address got in secondary IP address reset indication be 211.95.164.78, the first IP address The first subnet mask for 255.255.254.0, the second subnet mask of the second IP address is 255.255.254.0.By first After IP address, the second IP address, the first subnet mask and the second subnet mask are respectively converted into two-stage system sequence, with two-stage system sequence The correspondence of row is as follows:
First IP address:11010011 01011111 10100101 00011000;
First subnet mask:11111111 11111111 111111110 00000000;
Second IP address:11010011 01011111 10100100 01001110;
Second subnet mask:11111111 11111111 111111110 00000000.
First IP address binary sequence corresponding with the first subnet mask is subjected to binary system and operation, first is obtained and tests Demonstrate,prove sequence 11,010,011 01,011,111 10,100,100 00000000.By the second IP address corresponding with the second subnet mask two System sequence carries out binary system and operation, obtains the second verification sequence 11,010,011 01,011,111 10,100,100 00000000.
Since the first verification sequence is identical with the second verification sequence, information simultaneously is sent to host computer, with prompting the first IP Location belongs to the same network segment with the second IP address.
Under normal circumstances, it is the IP address due to host computer and communication equipment that resetting is carried out to the IP address of communication equipment Not in the same network segment, if the second IP address got in secondary IP address reset indication and the first IP stored in memory module Address is in the same network segment, can't change the network segment residing for communication equipment using the first IP address of the second IP address replacement, this When IP address reset indication may be illegal instruction, it is intended that be engaged in and illegal read the behaviors such as communication equipment stored information.True After fixed second IP address is located at the same network segment with the first IP address, prompt message is sent to host computer, prompts host computer the 2nd IP Address is located at the same network segment with the first IP address.In this way, if the IP address reset indication that communication equipment receives is not upper Transmitted by machine or host computer is sent under by the state of forcing to do one's bidding, and the user of host computer can have found and in time using corresponding It handles, helps to improve the safety to communicate between host computer and communication equipment.
It should be noted that the first IP address and the first subnet mask and the second IP address and the second subnet mask When carrying out binary system and operation, for mutually to its two binary numbers, if two binary numbers are 1, with operation As a result it is 0 with operation result if it is 0 to have one in two binary numbers for 1.
Embodiment five
As shown in Fig. 2, communication equipment provided in an embodiment of the present invention, including:FPGA (Field-Programmable Gate Array, field programmable gate array) 201 and memory module 202;
Memory module 202 is for the first IP address of storage;
FPGA201 be used for detect it is communication device initiated after, the first IP address is read from memory module 202, utilize After first IP address establishes the network connection with upper machine support, the IP address reset indication that host computer is sent is received, by IP In the second IP address storage to memory module 202 that location reset indication carries, the first IP address in memory module 202 is carried out Covering, and the second IP address is read from memory module 202 after communication equipment restarting is detected, the second IP address is matched It is set to the IP address of communication equipment.
Communication equipment provided in an embodiment of the present invention is stored with the first IP address in memory module, is established by cable on communication equipment FPGA can read the first IP address from memory module during machine, and build on the network between host computer using the first IP address Connection.After the second IP address is obtained in the IP address reset indication that FPGA is sent out from host computer, FPGA stores the second IP address The first IP address is covered into memory module.When communication equipment is restarted, FPGA can read from memory module Second IP address is configured to the IP address of communication equipment by two IP address, you can be carried out using the second IP address and host computer Communication.It can be seen that FPGA can be according to the IP address reset indication that host computer is sent to the IP address that is stored in memory module It is updated, and all the IP address stored in memory module can be set as communication equipment during each communication equipment restarting IP address, so as to which the IP address of communication equipment is configured according to demand, improve the usage experience of user.
In embodiments of the present invention, memory module can be EEPROM (Electrically Erasable Programmable read only memory, Electrically Erasable Programmable Read-Only Memory), EEPROM can still be protected after a loss of power The stored data of card are not lost, and can ensure that host computer can be with to new data are written after data erasing that it is stored The IP address of communication equipment is repeatedly reset, and ensures that communication equipment can use what is reset always after resetting every time IP address.
Embodiment six
On the basis of embodiment five provides communication equipment, as shown in figure 3, FPGA201 can include ARP handshake modules 2011;
ARP handshake modules 2011 are used to receive the ARP request of host computer transmission, with obtaining the Target IP that ARP request carries Location, and judge whether target ip address is identical with the first IP address, if so, the first MAC Address of communication equipment is sent to Host computer, so that host computer creates the mapping relations between the first IP address and the first MAC Address, and can be according to the first MAC Address sends information to communication equipment.
Embodiment seven
On the basis of embodiment six provides communication equipment, as shown in figure 3, ARP handshake modules 2011 are further used for After judging that target ip address is identical with the first IP address, the third IP address and second of host computer is obtained from ARP request MAC Address, and the mapping relations of third IP address and the second MAC Address are stored, so that FPGA201 can be according to third IP address With the mapping relations of the second MAC Address information is sent to host computer.
Embodiment eight
On the basis of embodiment six provides communication equipment, as shown in figure 4, the communication equipment can also include flash memory battle array Row 403;
FPGA201 further comprises:Data reception module 2012 and data transmission blocks 2013;
Flash array 403, for storing the data that external data source is sent to FPGA201;
Data reception module 2012 for receiving the data of host computer transmission, and the data received is just stored to sudden strain of a muscle It deposits in array 403;
For the data requesting instructions sent according to host computer, phase is read from flash array 403 for data transmission blocks 2013 The data answered are sent to host computer.
Communication equipment can include flash array, and correspondingly FPGA includes data transmission blocks and data reception module, number The data of host computer transmission can be received according to receiving module, and received data are stored into big flash array, data are sent Module can receive the data requesting instructions of host computer transmission, and read corresponding number from flash array according to data requesting instructions According to being sent to host computer.In addition, FPGA can also be connected with external data source, and when data source has data input, FPGA The data of data source input are stored into flash array, wherein, data source can be that the information collections such as camera, microphone are set It is standby.
When communication equipment includes flash array, communication equipment can be used as storage device, and number is obtained from data source The additions and deletions of paired data is instructed to change look into, and can be according to the instruction of host computer according to being stored, and according to what host computer was sent IP address is reset, is communicated with realizing with multiple host computers positioned at different segment.
Embodiment nine
On the basis of embodiment eight provides communication equipment, as shown in figure 4, ARP handshake modules 2011, data reception In block 2012 and data transmission blocks 2013 it is any one or more can by hardware description language develop obtain.
ARP handshake modules, data reception module and the data transmission blocks that FPGA includes, can pass through hardware description language Form be described, ARP handshake modules, data reception module and the data transmission blocks developed in this way independent of The support of FPGA hardware function module can realize that the communication that the embodiment of the present invention is previously mentioned is set by the FPGA of various models It is standby, the applicability of the communication equipment on the one hand can be improved, the FPGA that lower end on the other hand may be used realizes that the present invention is real The communication equipment that example is provided is applied, ensure that communication equipment has relatively low cost.
Embodiment ten
On the basis of embodiment five provides any communication equipment to embodiment nine, FPGA201 can be also used for performing Following operation:
The first subnet mask of the first IP address is obtained, obtains the second subnet mask of the second IP address;
The first IP address, the first subnet mask, the second IP address and the second subnet mask are converted to corresponding two respectively System sequence;
The corresponding binary sequence of first IP address binary sequence corresponding with the first subnet mask is subjected to binary system With operation, the first verification sequence is obtained;
The corresponding binary sequence of second IP address binary sequence corresponding with the second subnet mask is subjected to binary system With operation, the second verification sequence is obtained;
Judge whether the first verification sequence and the second verification sequence are identical;
If so, the prompt message that the first IP address is prompted to be located at the same network segment with the second IP address is sent to host computer.
It should be noted that above-mentioned each embodiment provides information exchange between each module in communication equipment, holds The contents such as row process, due to being based on same design with the method for the present invention embodiment, particular content can be found in the method for the present invention implementation Narration in example, details are not described herein again.
Embodiment 11
With reference to communication equipment shown in Fig. 4, to communication equipment IP address configuration method provided in an embodiment of the present invention It is described in further detail, as shown in figure 5, this method may comprise steps of:
Step 501:The first IP address is read from the memory module of communication equipment.
In embodiments of the present invention, when communication equipment after the power is turned on, FPGA reads the first IP address for storing in memory module. Specifically, FPGA includes IP configuration modules, and after communication equipment electrifying startup, IP configuration modules read from memory module One IP address.Wherein, IP configuration modules can be developed by hardware description language.
For example, after electrically activating on a communications device, the first IP address is read from the memory module of communication equipment 211.95.165.24。
Step 502:The ARP request of host computer transmission is received by ARP handshake modules, and target is obtained from ARP request IP address.
In embodiments of the present invention, after communication device initiated, the ARP handshake module real-time receptions host computer that FPGA includes is sent out The ARP request sent, after the ARP request that a host computer is sent is received, ARP handshake modules are by solving ARP request Analysis obtains the target ip address that ARP request carries.
Step 503:Judge whether target ip address is identical with the first IP address using ARP handshake modules, if so, performing Step 504, step 502 is otherwise performed.
In embodiments of the present invention, after the target ip address for getting ARP request carrying, ARP's ARP handshake modules shakes hands Module further judge acquired in target ip address all and the first IP address that IP configuration modules are read it is whether identical.If It is to illustrate that the communication equipment that host computer communicates is current communication devices, correspondingly performs step 504.If not, it says The communication equipment that bright host computer communicates is not current communication devices, correspondingly performs step 502, continues with ARP Handshake module receives the ARP request that host computer is sent.
For example, the target ip address that ARP handshake modules are obtained from ARP request is 211.95.165.24, due to Target IP Address is identical with the first IP address, therefore performs step 504.
Step 504:The MAC Address of communication equipment is sent to host computer by ARP handshake modules, establish communication equipment with it is upper Network connection between machine.
In embodiments of the present invention, ARP handshake modules will communicate after determining that target ip address is identical with the first IP address The MAC Address of equipment is sent to host computer.Host computer is after the MAC Address transmitted by communication equipment is received, with creating the MAC Mapping relations between location and target ip address, later host computer need to corresponding to target ip address communication equipment send letter During breath, the MAC Address of communication equipment can be determined according to the mapping relations, and then send and believe to communication equipment according to MAC Address Breath.
Step 505:ARP handshake modules obtain host computer IP address and MAC Address, and store host computer IP address with Mapping relations between MAC Address.
In embodiments of the present invention, ARP handshake modules, can also be from institute after the first IP address is sent to host computer The IP address and MAC Address of host computer are obtained in the ARP request received, creates the mapping of host computer IP address and MAC Address After relationship, by mapping relations storage to the local of communication equipment.Later, the data transmission blocks included by communication equipment, can To determine the MAC Address of host computer according to the mapping relations, and then according to MAC Address to host computer transmission data.
Step 506:The IP address reset indication that host computer is sent is received, and the 2nd IP is obtained in secondary IP address reset indication Address.
In embodiments of the present invention, it after the network connection of host computer and communication equipment is established using the first IP address, connects The IP address reset indication that host computer is sent is received, is determining that received IP address reset indication is for current communication devices Afterwards, IP configuration modules parse IP address reset indication, obtain the second IP address that IP address reset indication carries.
For example, the second IP address got in secondary IP address reset indication is 211.95.164.78.
Step 507:Second IP address is stored into memory module, to the first IP address stored originally in memory module It is covered.
In embodiments of the present invention, IP configuration modules are after the second IP address is got, by the storage of the second IP address to depositing It stores up in module, and the first IP address stored originally in memory module is covered.In addition, IP configuration modules can detect Whether two IP address and the first IP address are located at the same network segment, if located in the same network segment, then to host computer with prompting the first IP Location is located at the prompt message of the same network segment with the second IP address.
Step 508:After communication apparatus communication, the second IP address is read from memory module.
In embodiments of the present invention, after communication equipment is resetted or restarted, IP configuration modules are read from memory module Second IP address.
For example, after communication equipment is restarted, the second IP address is read from the memory module of communication equipment 211.95.164.78。
Step 509:Second IP address is set as to the IP address of communication equipment, is established between communication equipment and host computer Network connection.
In embodiments of the present invention, IP configuration modules utilize second after the second IP address is read from memory module IP address establishes the network connection between communication equipment and host computer, and detailed process using the first IP address with establishing communication equipment The process of network connection is similar between host computer, the step of may refer to step 502 to step 504, or else repeats herein.
In conclusion communication equipment IP address configuration method provided in an embodiment of the present invention and communication equipment, communication equipment Memory module in be stored with the first IP address, the first IP address for storing in memory module can be utilized when communication device initiated The network connection between host computer is established, the IP address resetting that can be sent after the completion of network connection foundation with host computer refers to It enables, the second IP address that IP address reset indication carries is stored into memory module, the first IP address is covered, in this way, When communication module restarts, the second IP address can be read from memory module, and the second IP address is configured to communicate The IP address of equipment.It can be seen that communication equipment reads IP address to establish and host computer after restarting every time from memory module Between communication connection, so as to the IP address reset indication that is sent according to host computer to the IP address that is stored in memory module It is updated, realizes and the IP address of communication equipment is configured, promote the usage experience of user.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that:It still may be used To modify to the technical solution recorded in foregoing embodiments or carry out equivalent replacement to which part technical characteristic; And these modification or replace, various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (10)

1. a kind of communication equipment IP address configuration method, which is characterized in that including:
Detect it is described it is communication device initiated after, the first IP address is read from the memory module of the communication equipment;
The network connection between the communication equipment and host computer is established using first IP address;
Receive the IP address reset indication that the host computer is sent;
According to the IP address reset indication, the second IP address storage that the IP address reset indication is carried to the storage In module, first IP address stored originally in the memory module is covered;
After detecting that the communication equipment is restarted, second IP address is read from the memory module;
Second IP address is configured to the IP address of the communication equipment.
2. according to the method described in claim 1, it is characterized in that, it is described using first IP address establish it is described communication set The standby network connection between host computer, including:
Receive the Address Resolution Protocol ARP request that the host computer is sent;
Obtain the target ip address entrained by the ARP request;
Judge whether the target ip address and first IP address are identical;
If so, the first MAC Address of the communication equipment is sent to the host computer, so that described in host computer establishment Mapping relations between first IP address and first MAC Address, and can be according to first MAC Address to the communication Equipment sends information.
3. according to the method described in claim 2, it is characterized in that, judge the target ip address and the first IP described After whether address is identical, further comprise:
If the target ip address is identical with first IP address, the of the host computer is obtained from the ARP request Three IP address and the second MAC Address, and the mapping relations of the third IP address and second MAC Address are stored, with basis The third IP address and the mapping relations of second MAC Address send information to the host computer.
4. according to the method any in claims 1 to 3, which is characterized in that described by the IP address reset indication After in the second IP address storage to the memory module carried, further comprise:
The first subnet mask of first IP address is obtained, obtains the second subnet mask of second IP address;
First IP address, the first subnet mask, the second IP address and the second subnet mask are converted to corresponding two respectively System sequence;
The corresponding binary sequence of first IP address binary sequence corresponding with first subnet mask is carried out two System and operation obtain the first verification sequence;
The corresponding binary sequence of second IP address binary sequence corresponding with second subnet mask is carried out two System and operation obtain the second verification sequence;
Judge whether the first verification sequence and the described second verification sequence are identical;
First IP address is prompted to be located at carrying for the same network segment with second IP address if so, being sent to the host computer Show information.
5. a kind of communication equipment, which is characterized in that including:On-site programmable gate array FPGA and memory module;
The memory module, for storing the first IP address;
The FPGA, for detect it is described it is communication device initiated after, first IP address is read from the memory module, After establishing the network connection between host computer using first IP address, the IP address resetting that the host computer is sent is received Instruction, in the second IP address storage to the memory module that the IP address reset indication is carried, to the memory module In first IP address covered and after communication equipment restarting is detected, from the memory module It is middle to read second IP address, and second IP address is configured to the IP address of the communication equipment.
6. communication equipment according to claim 5, which is characterized in that the FPGA includes:ARP handshake modules;
The ARP handshake modules for receiving the ARP request that the host computer is sent, obtain the target that the ARP request carries IP address, and judge whether the target ip address and first IP address are identical, if so, by the communication equipment One MAC Address is sent to the host computer so that the host computer create first IP address and first MAC Address it Between mapping relations, and can according to first MAC Address to the communication equipment send information.
7. communication equipment according to claim 6, which is characterized in that
The ARP handshake modules are further used for after judging that the target ip address is identical with first IP address, from The third IP address and the second MAC Address of the host computer are obtained in the ARP request, and stores the third IP address and institute The mapping relations of the second MAC Address are stated, so that mappings of the FPGA according to the third IP address and second MAC Address Relationship sends information to the host computer.
8. communication equipment according to claim 6, which is characterized in that further comprise:Flash array;
The FPGA further comprises:Data reception module and data transmission blocks;
The flash array, for storing the data that external data source is sent to the FPGA;
The data reception module for receiving the data that the host computer is sent, and the data received is just stored to institute It states in flash array;
The data transmission blocks for the data requesting instructions sent according to the host computer, are read from the flash array Corresponding data are sent to the host computer.
9. communication equipment according to claim 8, which is characterized in that
It is any one or more in the data reception module, the data transmission blocks and the ARP handshake modules, pass through Hardware description language is developed.
10. according to the communication equipment any in claim 5 to 9, which is characterized in that the FPGA is further used for holding The following operation of row:
The first subnet mask of first IP address is obtained, obtains the second subnet mask of second IP address;
First IP address, the first subnet mask, the second IP address and the second subnet mask are converted to corresponding two respectively System sequence;
The corresponding binary sequence of first IP address binary sequence corresponding with first subnet mask is carried out two System and operation obtain the first verification sequence;
The corresponding binary sequence of second IP address binary sequence corresponding with second subnet mask is carried out two System and operation obtain the second verification sequence;
Judge whether the first verification sequence and the described second verification sequence are identical;
First IP address is prompted to be located at carrying for the same network segment with second IP address if so, being sent to the host computer Show information.
CN201810273298.1A 2018-03-29 2018-03-29 Communication equipment IP address configuration method and communication equipment Active CN108183978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810273298.1A CN108183978B (en) 2018-03-29 2018-03-29 Communication equipment IP address configuration method and communication equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810273298.1A CN108183978B (en) 2018-03-29 2018-03-29 Communication equipment IP address configuration method and communication equipment

Publications (2)

Publication Number Publication Date
CN108183978A true CN108183978A (en) 2018-06-19
CN108183978B CN108183978B (en) 2021-01-22

Family

ID=62553848

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810273298.1A Active CN108183978B (en) 2018-03-29 2018-03-29 Communication equipment IP address configuration method and communication equipment

Country Status (1)

Country Link
CN (1) CN108183978B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110662197A (en) * 2019-09-02 2020-01-07 京信通信系统(中国)有限公司 Parameter configuration method, device, communication equipment and storage medium
CN111063283A (en) * 2020-01-19 2020-04-24 苏州华兴源创科技股份有限公司 Liquid crystal module aging testing equipment
TWI825923B (en) * 2022-08-16 2023-12-11 皓德盛科技有限公司 Field programmable logic gate array for financial transactions

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577722A (en) * 2009-06-03 2009-11-11 中兴通讯股份有限公司 Method for realizing MAC forced forwarding function and device
CN102158565A (en) * 2011-04-07 2011-08-17 瑞斯康达科技发展股份有限公司 Method and system for configuring Internet protocol (IP) address for remote device
CN103957288A (en) * 2014-04-28 2014-07-30 福建星网锐捷网络有限公司 Method, device and equipment for IP address dynamic allocation
CN104301451A (en) * 2014-10-17 2015-01-21 福建星网锐捷网络有限公司 Cross-network-segment host communication method, device and system
US20150249598A1 (en) * 2014-02-28 2015-09-03 Level 3 Communications, Llc Selecting network services based on hostname
CN105704206A (en) * 2015-12-31 2016-06-22 西安诺瓦电子科技有限公司 Implementation method for performing Ethernet communication with LED display control card
CN106254571A (en) * 2016-08-05 2016-12-21 杭州华三通信技术有限公司 A kind of client ip address distribution method and device
CN106506720A (en) * 2016-11-16 2017-03-15 西安诺瓦电子科技有限公司 Network ip address auto-allocation method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577722A (en) * 2009-06-03 2009-11-11 中兴通讯股份有限公司 Method for realizing MAC forced forwarding function and device
CN102158565A (en) * 2011-04-07 2011-08-17 瑞斯康达科技发展股份有限公司 Method and system for configuring Internet protocol (IP) address for remote device
US20150249598A1 (en) * 2014-02-28 2015-09-03 Level 3 Communications, Llc Selecting network services based on hostname
CN103957288A (en) * 2014-04-28 2014-07-30 福建星网锐捷网络有限公司 Method, device and equipment for IP address dynamic allocation
CN104301451A (en) * 2014-10-17 2015-01-21 福建星网锐捷网络有限公司 Cross-network-segment host communication method, device and system
CN105704206A (en) * 2015-12-31 2016-06-22 西安诺瓦电子科技有限公司 Implementation method for performing Ethernet communication with LED display control card
CN106254571A (en) * 2016-08-05 2016-12-21 杭州华三通信技术有限公司 A kind of client ip address distribution method and device
CN106506720A (en) * 2016-11-16 2017-03-15 西安诺瓦电子科技有限公司 Network ip address auto-allocation method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110662197A (en) * 2019-09-02 2020-01-07 京信通信系统(中国)有限公司 Parameter configuration method, device, communication equipment and storage medium
CN111063283A (en) * 2020-01-19 2020-04-24 苏州华兴源创科技股份有限公司 Liquid crystal module aging testing equipment
TWI825923B (en) * 2022-08-16 2023-12-11 皓德盛科技有限公司 Field programmable logic gate array for financial transactions

Also Published As

Publication number Publication date
CN108183978B (en) 2021-01-22

Similar Documents

Publication Publication Date Title
CN107613020A (en) A kind of device management method and device
CN108183978A (en) A kind of communication equipment IP address configuration method and communication equipment
CN110430096A (en) A kind of gateway test method and equipment
CN105743670B (en) Access control method, system and access point
CN109842523A (en) A kind of firmware upgrade method, device, equipment and storage medium
CN107347205A (en) A kind of network section system of selection, apparatus and system
CN105141628B (en) A kind of method and device for realizing push
CN106547634A (en) A kind of method and device of striding course communication
CN109508485A (en) A kind of data processing model dissemination method, device, server and storage medium
CN108243404A (en) Ratification method, device and the equipment of phone number binding state
CN107623698A (en) Remote debugging network equipment method and device
CN107547565A (en) A kind of network access verifying method and device
CN109873728A (en) A kind of terminal test method, device and storage medium
CN109981360A (en) Internet of things equipment website activating method, device, system and storage medium
CN110365701A (en) The management method of customer terminal equipment, calculates equipment and storage medium at device
CN104144096A (en) Virtual network layer construction method, device and system
CN104079571A (en) Method and device for recognizing Android simulator
CN107645428A (en) A kind of automatic test approach and device
CN113271299B (en) Login method and server
CN108924219A (en) The method, apparatus and system of remote operation terminal
CN108540552A (en) Apparatus interconnection method, apparatus, system, equipment and storage medium
CN108093097A (en) The connection method of camera and home gateway and home gateway
CN101753370A (en) System and method for detecting usability of certification process for broadband access user
CN106797329A (en) Special-purpose terminal and its operating method for measuring the Internet wire quality
CN106131039A (en) The processing method and processing device of SYN flood attack

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