CN104917850B - A kind of IP management method and system based on controller - Google Patents
A kind of IP management method and system based on controller Download PDFInfo
- Publication number
- CN104917850B CN104917850B CN201510229766.1A CN201510229766A CN104917850B CN 104917850 B CN104917850 B CN 104917850B CN 201510229766 A CN201510229766 A CN 201510229766A CN 104917850 B CN104917850 B CN 104917850B
- Authority
- CN
- China
- Prior art keywords
- controller
- network interface
- broadcast frame
- order
- broadcast
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/30—Managing network names, e.g. use of aliases or nicknames
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The IP management method based on controller that the present invention relates to a kind of, which comprises S1 sends broadcast frame;S2, controller receive broadcast frame by broadcast frame network interface;S3, controller according in broadcast frame frame head and postamble judge broadcast frame whether be IP configuration frame;S4 if so, controller takes out operational order from broadcast frame, and is responded accordingly according to operational order;Otherwise, next broadcast frames to be received such as step S2 are executed.The present invention also proposes a kind of IP management system based on controller.The present invention can be realized by the above method and system and be read out and modify operation to the IP address of each network interface of controller, so that not needing to be reset, simplifying operating process, save the time after each network interface IP address to controller is forgotten.
Description
Technical field
The present invention relates to a kind of IP management method and system based on controller.
Background technique
In the prior art, after controller factory, the external IP address of all network interfaces is the same on controller, in reality
In, the IP address of controller network interface after passing into silence common method be resetting, on the other hand, obtain, modification IP address mistake
Journey is complicated, takes a long time.
Summary of the invention
The technical problem to be solved by the present invention is in the prior art, the IP address of controller network interface needs after passing into silence
Resetting, reset process is complicated, and searches for, downloads the big problem of IP address cost.
In order to solve the above technical problems, the technical solution of the invention proposes a kind of IP management method based on controller is such as
Under:
S1 sends broadcast frame;
S2, controller receive the broadcast frame by broadcast frame network interface;
S3, controller according in the broadcast frame frame head and postamble judge the broadcast frame whether be IP configuration frame;
S4 if so, controller takes out operational order from the broadcast frame, and is carried out accordingly according to the operational order
Response;
Otherwise, next broadcast frames to be received such as step S2 are executed.
Further, the operational order includes reading order and modification order;
The reading order includes the order of reading broadcast frame network interface and Read Controller network interface order;
The modification order includes modification broadcast frame network interface order and modification controller network interface order.
Further, the step S4 includes:
S41a, if the controller takes out reading broadcast frame network interface order from the broadcast frame;
S42a, then controller reads broadcast frame network interface in the controller according to the reading broadcast frame network interface order
IP;
S43a, controller return to the IP of the broadcast frame network interface.
Further, the step 5 further include:
S41b, if the controller takes out Read Controller network interface order from the broadcast frame;
S42b, then controller reads the IP of corresponding network interface in the controller according to the Read Controller network interface order;
S43b, controller return to the IP address of the corresponding network interface read.
Further, the step 5 further include:
S41c, if the controller takes out modification controller network interface order from the broadcast frame;
S42c, then controller modifies the IP of corresponding network interface in the controller according to the modification controller network interface order;
S43c, controller return to the IP address of the new corresponding network interface of controller.
The IP management system based on controller that the invention also provides a kind of, the system comprises broadcast frame sending module,
Controller, the controller include broadcast frames reception module, broadcast frame judgment module and operational order respond module;
The broadcast frame sending module, for sending broadcast frame;
The broadcast frames reception module, for receiving the broadcast frame by broadcast frame network interface;
The broadcast frame judgment module, for according in the broadcast frame frame head and postamble whether judge the broadcast frame
Frame is configured for IP;
The operational order respond module is ordered for taking out operational order from the broadcast frame, and according to the operation
Order is responded accordingly.
The beneficial effects of the present invention are: can be realized the IP to each network interface of controller by the above method and system
Address is read out and configures operation, so that do not need to be reset after each network interface IP address to controller passes into silence,
It simplifies operating process, save the time.
Detailed description of the invention
Fig. 1 is the flow chart of the method for the present invention;
Fig. 2 is present system structural block diagram.
In attached drawing, parts list represented by the reference numerals are as follows:
1, broadcast frame sending module, 2, controller, 21, broadcast frames reception module, 22, broadcast frame judgment module, 23, operation
Command response module.
Specific embodiment
The principle and features of the present invention will be described below with reference to the accompanying drawings, and the given examples are served only to explain the present invention, and
It is non-to be used to limit the scope of the invention.
In the prior art, controller is usually used for industrial application, for example, being used to control opening for shield door for controller
It closes.Controller is used for data communication field by the present invention, is managed by controller to IP address.
Fig. 1 shows the flow chart of the method for the present invention, comprising:
As shown in Figure 1, step S1, sends broadcast frame.
Step S2, controller receive the broadcast frame by broadcast frame network interface.
Specifically, the network interface on controller generally comprises three classes network interface: the first be to the network interface of I/O communication (be partially with
The form of bus), it is for second the redundancy communication network interface between controller, the third is controller to HMI (Human
The abbreviation of Machine Interface, man-machine interface) etc. host computers communication network interface.
Because the third network interface is the network interface communicated with host computer, it is proposed that directly choose the network interface as broadcast frame of the invention
Network interface, host computer are docked to the broadcast frame network interface by ethernet line, and controller is realized by the broadcast frame network interface and host computer
Communication.
Step S3, controller according in the broadcast frame frame head and postamble judge the broadcast frame whether be IP configure
Frame.
Specifically, table 1 shows the format of broadcast frame:
Table 1:
head | length | command | IP position | information | tail |
The corresponding content in each part is as shown in table 2 in table 1:
Table 2:
Wherein, the data length for having information can be calculated by length.The meter of information data length
Calculation method: length of infortmation (bytes)=length -1 (byte head length) -1 (byte
length length)–1(byte command length)–1(byte IP poison length)–1(byte tail
length)。
Step S4 if so, controller takes out operational order from the broadcast frame, and carries out phase according to the operational order
The response answered;Otherwise, next broadcast frames to be received such as step S2 are executed.
Wherein, the operational order includes reading order and modification order.The reading order includes reading broadcast frame net
Mouth order and the order of Read Controller network interface.The modification order includes modification broadcast frame network interface order and modification controller network interface
Order.
Wherein, the step S4 includes:
S41a, if the controller takes out reading broadcast frame network interface order from the broadcast frame;
S42a, then controller reads broadcast frame network interface in the controller according to the reading broadcast frame network interface order
IP;
The IP address of the broadcast frame network interface is sent to the host computer and shown by S43a, controller.
The step S4 further include:
S41b, if the controller takes out Read Controller network interface order from the broadcast frame;
S42b, then controller reads the IP of corresponding network interface in the controller according to the Read Controller network interface order;
The IP address of the corresponding network interface of the control is sent to the host computer and shown by S43b, controller.
The step S4 further include:
S41c, if the controller takes out modification controller network interface order from the broadcast frame;
S42c, then controller modifies the IP of corresponding network interface in the controller according to the modification controller network interface order;
S43c, controller return to the IP address of the corresponding network interface of the controller.
In addition, if the controller takes out modification controller broadcast frame network interface order, controller from the broadcast frame
After the IP address of the broadcast frame network interface is modified, after the IP address of each network interface for needing to re-read controller, Cai Nengying
Carry out the configuration operation of IP address again in aforementioned manners.
It wherein, can be in replying broadcast frame when replying when controller is responded accordingly according to the operational order
Command order on+0x80, at this moment, receive it is described reply broadcast frame host computer just will recognise that be to which broadcast
The response of frame.
Wherein, the IP address of each network interface is stored in the controller, the IP address is stored in the form of a file
Power down conservation zone, controller can all load this document after restarting every time, in this way when some network interface IP address quilt on controller
After forgetting, directly reading this document can be obtained the IP address of the corresponding network interface, not need to require to match again after forgeing every time
Set the IP address of controller.
By the above method, the present invention, which can be realized, is read out and configures behaviour to the IP address of network interface each on controller
Make, so that not needing to be reset after each network interface IP address to controller passes into silence, simplifies operating process, saves
Time.
Configuration of IP management environment:
Broadcast frame sending module 11 can be the host computer for being equipped with IP configuration software, and the IP configuration software is for reading
The IP address of each network interface in controller.Firstly, guaranteeing that the communication protocol between host computer and controller 2 is unified, i.e., uniformly adopt
With ICP/IP protocol or it is used uniformly udp protocol.
Secondly, configuring a broadcast frame network interface 3 for controller 2, the port of the broadcast frame network interface can be 3001, so as to
In the case where unknown to network interface IP address each on controller, each network interface on controller 2 can be obtained by way of broadcast
IP address.
Network interface on controller generally comprises three classes network interface: it (is partially with bus that the first, which is communication network interface to IO,
Form), it is for second the redundancy communication network interface between controller, the third controller is to HMI (Human Machine
The abbreviation of Interface, man-machine interface) etc. host computers communication network interface.
Because the third network interface is the network interface communicated with host computer, it is proposed that directly choose the network interface as broadcast frame of the invention
Network interface, host computer are docked to the broadcast frame network interface by ethernet line, and controller is realized by the broadcast frame network interface and host computer
Communication.
Finally, obscure the IP address of each network interface of multiple controllers in order to prevent, the present invention is by host computer and controller one
It is connected to one.
Fig. 2 shows system structure diagrams of the invention.
As shown in Fig. 2, the controller 2 connects including broadcast frame the system comprises broadcast frame sending module 1, controller 2
Receive module 21, broadcast frame judgment module 22 and operational order respond module 23.
The broadcast frame sending module 1, for sending broadcast frame.
The broadcast frames reception module 21, for receiving the broadcast frame by broadcast frame network interface.
The broadcast frame judgment module 22, for according in the broadcast frame frame head and postamble judge that the broadcast frame is
It is no to configure frame for IP.
The operational order respond module 23, for taking out operational order from the broadcast frame, and according to the operation
Order is responded accordingly.
The operational order respond module 23, for taking out operational order from the broadcast frame, and according to the operation
Order is responded accordingly.
Wherein, the operational order includes reading order and modification order.The reading order includes reading broadcast frame net
Mouth order and the order of Read Controller network interface.The modification order includes modification broadcast frame network interface order and modification controller network interface
Order.
In addition, if the controller takes out modification controller broadcast frame network interface order, controller from the broadcast frame
After the IP address of the broadcast frame network interface is modified, after the IP address of each network interface for needing to re-read controller, Cai Nengying
Carry out the configuration operation of IP address again in aforementioned manners.
Wherein, the IP address of each network interface is stored in the controller, the IP address is stored in the form of a file
Power down conservation zone, controller can all load this document after restarting every time, in this way when some network interface IP address quilt on controller
After forgetting, directly reading this document can be obtained the IP address of the corresponding network interface, not need to require to match again after forgeing every time
Set the IP address of controller.
By system above, the present invention, which can be realized, is read out and configures behaviour to the IP address of network interface each on controller
Make, so that not needing to be reset after each network interface IP address to controller passes into silence, simplifies operating process, saves
Time.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (7)
1. a kind of IP management method based on controller characterized by comprising
S1 sends broadcast frame;
S2, controller receive the broadcast frame by broadcast frame network interface;
S3, controller according in the broadcast frame frame head and postamble judge the broadcast frame whether be IP configuration frame;
S4 if so, controller takes out operational order from the broadcast frame, and is rung accordingly according to the operational order
It answers;
Otherwise, next broadcast frames to be received such as step S2 are executed;
Wherein, the operational order includes reading order and modification order, and the reading order includes reading broadcast frame network interface life
It enables and the order of Read Controller network interface, the modification order includes modification broadcast frame network interface order and modification controller network interface life
Enable, the Read Controller network interface order and modification the order of controller network interface be in the controller remove broadcast frame network interface it
The operational order of outer network interface.
2. the IP management method according to claim 1 based on controller, which is characterized in that the step S4 includes:
S41a, if the controller takes out reading broadcast frame network interface order from the broadcast frame;
S42a, then controller is according to the reading broadcast frame network interface order, with reading in the controller IP of broadcast frame network interface
Location;
S43a, controller return to the IP address of the broadcast frame network interface.
3. the IP management method according to claim 1 based on controller, which is characterized in that the step S4 further include:
S41b, if the controller takes out Read Controller network interface order from the broadcast frame;
S42b, then controller reads the IP address of corresponding network interface in the controller according to the Read Controller network interface order;
S43b, controller return to the IP address of the corresponding network interface read.
4. the IP management method according to claim 1 based on controller, which is characterized in that the step S4 further include:
S41c, if the controller takes out modification controller network interface order from the broadcast frame;
S42c, then controller modifies the IP address of corresponding network interface in the controller according to the modification controller network interface order;
S43c, controller return to the IP address of the new corresponding network interface of controller.
5. a kind of IP management system based on controller, which is characterized in that the system comprises broadcast frame sending modules (1), control
Device (2) processed, the controller (2) include broadcast frames reception module (21), broadcast frame judgment module (22) and operational order response
Module (23);
The broadcast frame sending module (1), for sending broadcast frame;
The broadcast frames reception module (21), for receiving the broadcast frame by broadcast frame network interface;
The broadcast frame judgment module (22), for according in the broadcast frame frame head and postamble whether judge the broadcast frame
Frame is configured for IP;
The operational order respond module (23) is ordered for taking out operational order from the broadcast frame, and according to the operation
Order is responded accordingly;
The operational order includes reading order and modification order, and the reading order includes the order of reading broadcast frame network interface and reading
Take controller network interface order;The modification order includes modification broadcast frame network interface order and modifies the order of controller network interface, described
The order of Read Controller network interface and modification controller network interface order are for the net in the controller in addition to broadcast frame network interface
The operational order of mouth.
6. the IP management system according to claim 5 based on controller, which is characterized in that be stored in the controller
The IP address of each network interface, the IP address are stored in power down conservation zone in the form of a file.
7. the IP management system according to claim 5 based on controller, which is characterized in that the broadcast frame sending module
(1) IP configuration software is installed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510229766.1A CN104917850B (en) | 2015-01-22 | 2015-05-07 | A kind of IP management method and system based on controller |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510033168 | 2015-01-22 | ||
CN2015100331687 | 2015-01-22 | ||
CN201510229766.1A CN104917850B (en) | 2015-01-22 | 2015-05-07 | A kind of IP management method and system based on controller |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104917850A CN104917850A (en) | 2015-09-16 |
CN104917850B true CN104917850B (en) | 2019-02-22 |
Family
ID=54086545
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510229766.1A Active CN104917850B (en) | 2015-01-22 | 2015-05-07 | A kind of IP management method and system based on controller |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104917850B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101488879A (en) * | 2008-01-15 | 2009-07-22 | 上海贝尔阿尔卡特股份有限公司 | Failure protection method and apparatus in network appliance for Ethernet spanning tree protocol |
CN101500023A (en) * | 2008-02-03 | 2009-08-05 | 北京艾德斯科技有限公司 | Automatic configuration method for network appliance IP address |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2515507A1 (en) * | 2011-04-19 | 2012-10-24 | Siemens Aktiengesellschaft | Auto-configuration of network devices |
-
2015
- 2015-05-07 CN CN201510229766.1A patent/CN104917850B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101488879A (en) * | 2008-01-15 | 2009-07-22 | 上海贝尔阿尔卡特股份有限公司 | Failure protection method and apparatus in network appliance for Ethernet spanning tree protocol |
CN101500023A (en) * | 2008-02-03 | 2009-08-05 | 北京艾德斯科技有限公司 | Automatic configuration method for network appliance IP address |
Also Published As
Publication number | Publication date |
---|---|
CN104917850A (en) | 2015-09-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108156016B (en) | Communication system, communication device, and communication method | |
EP2188953B1 (en) | Real-time industrial ethernet ethercat communication control | |
CN112823493B (en) | Method, system, computer program and computer readable medium for automatically configuring a system | |
WO2017032112A1 (en) | Method for communicating with board having no central processing unit and communication device | |
CN110875847B (en) | Dynamic, endpoint configuration-based deployment of network infrastructure | |
CN104965700A (en) | Method and system for implementing driving on SPI equipment under VxWorks operating system | |
CN102388583B (en) | Series rate allocation method, relative device and system | |
US11997438B2 (en) | Declarative IoT data control | |
CA2913888A1 (en) | Systems and methods for memory map utilization | |
US20190166202A1 (en) | Control device, control method, and non-transitory computer-readable recording medium | |
CN104090519A (en) | System for being in communication with PLC extended module and implementation method thereof | |
EP3439235A1 (en) | Configuring and operating a system with building automation devices | |
JPWO2015190079A1 (en) | Computer system, remote device connection management method and program | |
US11502991B2 (en) | Efficiently collecting and distributing multicast data | |
CN104917850B (en) | A kind of IP management method and system based on controller | |
US20170140046A1 (en) | Electronic component with deterministic response | |
CN114095303B (en) | Communication device, data transmission method and electronic device | |
JP4013250B2 (en) | OPC communication station | |
CN109582379A (en) | Programmable logic controller system, control method based on Mach | |
CN106708701B (en) | Central maintenance device and method based on ARINC659 bus | |
CN113014453B (en) | DPDK-based data packet playback method, system and medium in k8s | |
CN209787189U (en) | Embedded Ethernet communication device | |
CN109962788B (en) | Multi-controller scheduling method, device and system and computer readable storage medium | |
US20210173805A1 (en) | Configuration management device, configuration management system, configuration management method, and configuration management program | |
Luo et al. | Implementation of bootloader based on DoIP |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |