WO2018010157A1 - Method and device for automatic allocation of ip addresses - Google Patents
Method and device for automatic allocation of ip addresses Download PDFInfo
- Publication number
- WO2018010157A1 WO2018010157A1 PCT/CN2016/090099 CN2016090099W WO2018010157A1 WO 2018010157 A1 WO2018010157 A1 WO 2018010157A1 CN 2016090099 W CN2016090099 W CN 2016090099W WO 2018010157 A1 WO2018010157 A1 WO 2018010157A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- address
- information
- module
- atca
- interface
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- JEOQACOXAOEPLX-WCCKRBBISA-N (2s)-2-amino-5-(diaminomethylideneamino)pentanoic acid;1,3-thiazolidine-4-carboxylic acid Chemical compound OC(=O)C1CSCN1.OC(=O)[C@@H](N)CCCN=C(N)N JEOQACOXAOEPLX-WCCKRBBISA-N 0.000 claims abstract description 200
- 238000003780 insertion Methods 0.000 claims description 5
- 230000037431 insertion Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 8
- 235000019800 disodium phosphate Nutrition 0.000 description 7
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
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
-
- 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/5046—Resolving address allocation conflicts; Testing of addresses
Definitions
- the present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for automatically allocating an IP address.
- ATCA Advanced Telecom Computing
- the Architecture, Advanced Telecom Computing Platform system is designed for specific application industries and high-density computer environments.
- the basic structure of the ATCA device includes multiple chassis, and multiple boards are inserted in each chassis.
- Each card may have multiple functional modules such as CPU, DSP or FPGA.
- CPU central processing unit
- DSP digital signal processor
- FPGA field-programmable gate array
- IP addresses are generally assigned to individual functional modules of an ATCA device by hand. In this mode, the workload of the ATCA device is large.
- the IP interfaces of the various function modules in the ATCA device are numerous, which may cause IP address mismatches, resulting in overlapping and conflicting IP addresses, thus affecting the normal operation of the device.
- the present invention provides a method and an apparatus for automatically allocating an IP address, and aims to solve the technical problem of IP address conflict caused by an IP allocation error when manually assigning an IP address to each functional module of an ATCA device.
- the present invention provides an automatic IP address allocation method for an advanced telecommunications computing platform ATCA device.
- the automatic IP address allocation method includes the following steps:
- the ATCA device When the ATCA device is initialized, acquiring the first card slot information of the ATCA board in the ATCA device, the first module information of the function module of the ATCA board to be configured with the IP address, and the network interface in the function module An interface information;
- the generated first IP address is configured to an IP address configuration table of a corresponding network interface.
- the present invention further provides an automatic IP address allocation device, which is applied to an advanced telecommunication computing platform ATCA device, and the IP address automatic distribution device includes:
- a first acquiring module configured to acquire, when the ATCA device is initialized, the first card slot information of the ATCA card in the ATCA device, the first module information of the function module of the ATCA card to be configured with an IP address, and the function First interface information of the network interface in the module;
- a first generation module configured to generate a first IP address of each of the network interfaces based on the acquired first card slot information, first module information, and first interface information;
- the first configuration module is configured to configure the generated first IP address to an IP address configuration table of the corresponding network interface.
- the invention acquires the first card slot information of the ATCA board in the ATCA device, the first module information of the function module of the ATCA board to be configured with the IP address, and the network in the function module when the ATCA device is initialized. And generating, by the first interface information of the interface, the first IP address of each of the network interfaces, and the first IP address to be generated, based on the acquired first card slot information, the first module information, and the first interface information.
- the IP address configuration table of the corresponding network interface is configured to automatically allocate the IP address of each network interface in the ATCA device, because the first card slot information, the first module information, and the first interface information corresponding to each network interface Uniquely, the first IP address corresponding to the network interface generated by the physical location information such as the first card slot information, the first module information, and the first interface information corresponding to the network interface is unique, so that IP address overlap and conflict can be avoided.
- the problem is that the workload of manually configuring the IP address is greatly reduced, and the efficiency of assigning an IP address to each network interface in the ATCA device is improved.
- FIG. 1 is a schematic flowchart of a first embodiment of an automatic IP address allocation method according to the present invention
- FIG. 2 is a schematic flowchart of a step of generating an IP address of each of the network interfaces in a second embodiment of the method for automatically assigning an IP address according to the present invention
- FIG. 3 is a schematic flowchart of a step of generating an IP address of each of the network interfaces in a third embodiment of the method for automatically assigning an IP address according to the present invention
- FIG. 4 is a schematic flowchart of a fourth embodiment of an automatic IP address allocation method according to the present invention.
- FIG. 5 is a schematic flowchart diagram of a fifth embodiment of an automatic IP address allocation method according to the present invention.
- FIG. 6 is a schematic diagram of functional modules of a first embodiment of an automatic IP address distribution apparatus according to the present invention.
- FIG. 7 is a schematic diagram of a refinement function module of a first generation module in a second embodiment of an automatic IP address distribution apparatus according to the present invention.
- FIG. 8 is a schematic diagram of a refinement function module of a first generation module in a third embodiment of an automatic IP address distribution apparatus according to the present invention.
- FIG. 9 is a schematic diagram of functional modules of a fourth embodiment of an automatic IP address allocation apparatus according to the present invention.
- FIG. 10 is a schematic diagram of functional modules of a fifth embodiment of an automatic IP address distribution apparatus according to the present invention.
- the invention provides an automatic IP address allocation method.
- FIG. 1 is a schematic flowchart diagram of a first embodiment of an automatic IP address allocation method according to the present invention.
- the automatic IP address allocation method is applied to an advanced telecommunications computing platform ATCA device, and the automatic IP address allocation method includes:
- step S10 when the ATCA device is initialized, the first card slot information of the ATCA board in the ATCA device, the first module information of the function module of the ATCA board to be configured with the IP address, and the network in the function module are acquired.
- the first interface information of the interface
- the IP address automatic allocation device corresponding to the automatic IP address allocation method in this embodiment may be run on the ATCA chassis management module or on the ATCA core switch management control module.
- the ATCA board is installed in or inserted into the card slot of the ATCA device.
- the first card slot information is the slot number of the ATCA device corresponding to each ATCA board; the ATCA board is installed with one or more CPUs and DSPs. , FPGA and other functional modules with IP network interface, the first module information is the number of each functional module such as CPU, DSP, FPGA in each ATCA board, that is, the first module information is the function module number; the same ATCA board
- the CPU, DSP or FPGA function module is provided with one or more IP network interfaces, and the first interface information is the network interface number of the IP network interface in each CPU, DSP or FPGA function module.
- the first card slot information, the first module information, and the first interface information may be set after the ATCA board is inserted into the card slot of the ATCA device, or the default value is adopted according to the corresponding sequence, for example, the ATCA device
- the card slot number of a card slot is 1.
- the first card slot information corresponding to the ATCA board is 1, and the slot number of the second card slot is 2, in the card slot.
- the first card slot information corresponding to the ATCA board is 2, and the remaining card slots are analogously;
- the function modules in the ATCA board can be used according to the function module from top to bottom, bottom to top, and The numbers are sequentially numbered from left to right or from right to left.
- each function module can also be numbered sequentially from top to bottom, bottom to top, left to right or right to left, so that each The first card slot information, the first module information, and the first interface information corresponding to an IP network interface are different from the first card slot information, the first module information, and the first interface information corresponding to each of the other IP network interfaces.
- the first card slot information is different, the first Different information or different from the first module interface information.
- Step S20 Generate a first IP address of each network interface based on the obtained first card slot information, first module information, and first interface information.
- the binary number corresponding to the slot number corresponding to the first card slot information may be used as the third 8-bit binary number in the first IP address of the network interface, and the binary corresponding to the function module number corresponding to the first module information
- the number is the first 4 digits of the fourth 8-bit binary number in the first IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the first interface information is used as the fourth 8-bit of the first IP address of the network interface.
- the last 4 digits of the binary number, the first 8-bit binary number and the second 8-bit binary number in the first IP address of the network interface may adopt a default value or a preset value.
- the binary number corresponding to the slot number corresponding to the first card slot information may be used as the third 8-bit binary number in the first IP address of the network interface, and the function module corresponding to the first module information is used.
- the binary number corresponding to the number is the last 4 digits of the fourth 8-bit binary number in the first IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the first interface information is used as the first IP address in the network interface.
- the first 4 bits of the four-segment 8-bit binary number; or, the binary number corresponding to the card slot number corresponding to the first card slot information is used as the fourth 8-bit binary number in the first IP address of the network interface, and the first module information is used.
- the binary number corresponding to the corresponding function module number is used as the first 4 digits of the third 8-bit binary number in the first IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the first interface information is used as the first network interface.
- the last 8 bits of the third 8-bit binary number in the IP address; or, the binary number corresponding to the slot number corresponding to the first card slot information is used as the fourth 8-bit binary number in the first IP address of the network interface.
- the binary number corresponding to the function module number corresponding to the first module information is used as the third digit of the third 8-bit binary number in the first IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the first interface information The first 4 bits of the third 8-bit binary number in the first IP address of the network interface.
- the IP address generation policy is based on the network interface number corresponding to the IP network interface, the function module number, and the board number of the ATCA board to generate a first IP address corresponding to the network interface, that is, according to the physical location corresponding to the IP network interface, the network is allocated.
- the uniqueness of the physical address number such as the interface number, the function module number, and the board number of the ATCA board ensures the uniqueness of the first IP address of the network interface, thus avoiding IP address overlap and collision problems.
- Step S30 the generated first IP address is configured to an IP address configuration table of the corresponding network interface.
- the automatic allocation of the first IP address of the network interface is implemented by configuring the generated first IP address to the IP address configuration table of the corresponding network interface.
- the first card slot information of the ATCA board in the ATCA device, the first module information of the function module of the ATCA board to be configured with the IP address, and the function module are obtained.
- the IP address is configured to the IP address configuration table of the corresponding network interface, and the IP address of each network interface in the ATCA device is automatically allocated.
- the first card slot information, the first module information, and the first interface corresponding to each network interface are implemented.
- the uniqueness of the information makes the first IP address corresponding to the network interface generated by the physical location information such as the first card slot information, the first module information, and the first interface information corresponding to the network interface unique, so that IP address overlap can be avoided.
- the conflict problem greatly reduces the workload of manually configuring IP addresses and improves the efficiency of assigning IP addresses to various network interfaces in the ATCA device.
- the IP address includes a first 8-bit binary number and a second 8-bit binary number.
- the third segment 8-bit binary number and the fourth segment 8-bit binary number, step S20 includes:
- Step S21 Generate a first 8-bit binary number and a second 8-bit binary number in the first IP address of each of the network interfaces based on the preset network number.
- the first 8-bit binary number and the second 8-bit binary number of the first IP address are generated by using a preset network number.
- the preset network number includes two network number fields, which may be applied according to actual applications.
- the environment requires flexible configuration.
- a network number is configured for the internal network, and a network number is configured for use by the external network. That is, the function module corresponding to the first IP address configured with the network number can be connected to the external network through the IP address.
- the ATCA device only configures an external network IP address, and the IP addresses of other network interfaces are internal IP addresses, which implement data interaction between various functional modules within the device.
- Step S22 generating a third 8-bit binary number of the first IP address of each of the network interfaces based on the first card slot information
- the binary number corresponding to the card slot number corresponding to the first card slot information is used as the third segment 8-bit binary number in the first IP address of the network interface.
- Step S23 generating, according to the first module information, the first four bits of the fourth 8-bit binary number in the first IP address of each of the network interfaces, and generating the first of each of the network interfaces based on the first interface information.
- the binary number corresponding to the function module number corresponding to the first module information is used as the first 4 bits of the fourth 8-bit binary number in the first IP address of the network interface, and the network interface number corresponding to the first interface information is corresponding.
- the binary number is the last 4 bits of the fourth 8-bit binary number in the first IP address of the network interface.
- the first 8-bit binary number and the second 8-bit binary number in the first IP address of each of the network interfaces are generated based on the preset network number, and then generated based on the first card slot information.
- a third 8-bit binary number of the first IP address of each of the network interfaces and then generating, according to the first module information, the first 4 bits of the fourth 8-bit binary number of the first IP address of each of the network interfaces, And generating, according to the first interface information, four bits of the fourth 8-bit binary number of the first IP address of each of the network interfaces, and implementing the preset network number, the first card slot information, the first module information, and
- the first interface information generates a first IP address of each of the network interfaces, further improving the efficiency of assigning an IP address to each network interface in the ATCA device.
- step S20 includes:
- Step S24 Obtain device information of the ATCA device, and generate a network number based on the device information.
- the device information of the ATCA device is the device number of the ATCA device, and the device number can be directly used as the network number, or the number of the preset location in the device number is used as the network number.
- Step S25 Generate a first IP address of each of the network interfaces based on the network number, the first card slot information, the first module information, and the first interface information.
- the ATCA device by acquiring the device information of the ATCA device, generating a network number based on the device information, and then generating each based on the network number, the first card slot information, the first module information, and the first interface information.
- the first IP address of the network interface is configured to generate a first IP address of each network interface according to the device information, the first card slot information, the first module information, and the first interface information, further ensuring the generated first The uniqueness of the IP address, thereby avoiding IP address overlap and conflict, further improving the efficiency of assigning IP addresses to various network interfaces in the ATCA device.
- a fourth embodiment of the method for automatically assigning an IP address of the present invention is provided based on the first embodiment.
- the method for automatically allocating the IP address further includes:
- step S40 when the ATCA board is inserted into the ATCA device, the second card slot information of the inserted ATCA board and the second module information of the function module of the ATCA board to be configured with an IP address are obtained. And second interface information of the network interface in the function module;
- detecting that the ATCA board is inserted into the ATCA device includes inserting a new ATCA board in the ATCA device, inserting a new card slot in the ATCA device, inserting a new card slot, or inserting into a new card slot. If the ATCA board is replaced with a new ATCA board, the ATCA board of one slot in the ATCA equipment is removed, and a new ATCA board is inserted in the slot. The ATCA board needs to be changed after the change. The ATCA board assigns an IP address, so the second card slot information of the inserted ATCA board, the second module information of the function module of the ATCA board to be configured with an IP address, and the function module are obtained.
- the second interface information of the network interface where the second card slot information is the slot number of the ATCA device corresponding to the inserted ATCA board; the second module information is the CPU, DSP, FPGA, etc. in the inserted ATCA board.
- the number of the function module that is, the second module information is the function module number; the second interface information is the network interface number of the IP network interface in each CPU, DSP or FPGA function module of the inserted ATCA board.
- Step S50 Generate a second IP address of each of the inserted network interfaces in the ATCA board based on the second card slot information, the second module information, and the second interface information.
- the binary number corresponding to the slot number corresponding to the second card slot information may be used as the third 8-bit binary number in the second IP address of the network interface, and the binary corresponding to the function module number corresponding to the second module information
- the number is the first 4 digits of the fourth 8-bit binary number in the second IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the second interface information is used as the fourth 8-bit of the second IP address of the network interface.
- the last 4 digits of the binary number, the first 8-bit binary number and the second 8-bit binary number in the second IP address of the network interface may adopt a default value or a preset value.
- the binary number corresponding to the slot number corresponding to the second card slot information may be used as the third 8-bit binary number in the second IP address of the network interface, and the function module corresponding to the second module information is used.
- the binary number corresponding to the number is used as the fourth digit of the fourth 8-bit binary number in the second IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the second interface information is used as the second IP address of the network interface.
- the first 4 bits of the four-segment 8-bit binary number; or, the binary number corresponding to the card slot number corresponding to the second card slot information is used as the fourth 8-bit binary number in the second IP address of the network interface
- the second module information is The binary number corresponding to the corresponding function module number is used as the first 4 digits of the third 8-bit binary number in the second IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the second interface information is used as the second network interface.
- the last 8 bits of the third 8-bit binary number in the IP address; or, the binary number corresponding to the slot number corresponding to the second card slot information is used as the fourth 8-bit binary number in the second IP address of the network interface.
- the binary number corresponding to the function module number corresponding to the second module information is used as the third digit of the third 8-bit binary number in the second IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the second interface information The first 4 bits of the third 8-bit binary number in the second IP address of the network interface.
- Step S60 The generated second IP address is configured to an IP address configuration table of each network interface in the corresponding inserted ATCA board.
- the second card slot information of the inserted ATCA board and the function module of the ATCA board to be configured with an IP address are obtained. And generating, by the second module information, the second interface information of the network interface in the function module, and then generating, according to the second card slot information, the second module information, and the second interface information, each of the network in the inserted ATCA card a second IP address of the interface, and then the generated second IP address is configured to an IP address configuration table of each network interface in the corresponding inserted ATCA board; and the ATCA board inserted in the ATCA device is implemented.
- the automatic allocation of the IP addresses of the network interfaces, the uniqueness of the second card slot information, the second module information, and the second interface information corresponding to each network interface, and the second card slot information, the second module information, and the The combination of the two interface information is different from the combination of the first card slot information, the first module information, and the first interface information, so that the second card slot information, the second module information, and the second corresponding to the network interface are Port information and other physical position information to generate a second IP address corresponding to the network interface is unique, it is possible to avoid overlapping IP addresses, conflict, to further improve the IP address assigned to each network interface ATCA equipment efficiency.
- the fifth embodiment of the method for automatically assigning an IP address of the present invention is provided based on the first embodiment.
- the method for automatically allocating the IP address further includes:
- Step S70 When detecting the ATCA board insertion function module of the ATCA device, acquiring the third card slot information of the inserted ATCA board of the function module, the third module information of the function module, and the function Third interface information of the network interface in the module;
- the ATCA board insertion function module of the ATCA device is detected, and the new function module is inserted into the ATCA board of the ATCA device, or the function module in the ATCA board of the ATCA device is replaced with a new function module, because the ATCA board
- the function module of the card needs to be assigned an IP address to the newly inserted function module after the change, so that the third card slot information of the inserted ATCA board of the function module and the third module of the function module are obtained.
- Information and third interface information of the network interface in the function module wherein the third card slot information is a card slot number of the inserted ATCA board of the function module; the third module information is a number of the function module
- the first interface information is the network interface number of the IP network interface in the inserted function module.
- Step S80 generating a third IP address of the network interface in each of the inserted functional modules based on the third card slot information, the third module information, and the third interface information;
- the binary number corresponding to the slot number corresponding to the third card slot information may be used as the third 8-bit binary number in the third IP address of the network interface, and the binary corresponding to the function module number corresponding to the third module information.
- the number is the first 4 digits of the fourth 8-bit binary number in the third IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the third interface information is used as the fourth 8-bit of the third IP address of the network interface.
- the last 4 digits of the binary number, the first 8-bit binary number and the third 8-bit binary number in the third IP address of the network interface may adopt a default value or a preset value.
- the binary number corresponding to the slot number corresponding to the third card slot information may be used as the third 8-bit binary number in the third IP address of the network interface, and the function module corresponding to the third module information is used.
- the binary number corresponding to the number is used as the fourth digit of the fourth 8-bit binary number in the third IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the third interface information is used as the third IP address of the network interface.
- the first 4 bits of the 4-segment 8-bit binary number; or, the binary number corresponding to the card slot number corresponding to the third card slot information is used as the fourth 8-bit binary number in the third IP address of the network interface
- the third module information is The binary number corresponding to the corresponding function module number is used as the first 4 digits of the third 8-bit binary number in the third IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the third interface information is used as the third interface of the network interface.
- the last 8 bits of the third 8-bit binary number in the IP address; or, the binary number corresponding to the slot number corresponding to the third card slot information is used as the fourth 8-bit binary number in the third IP address of the network interface.
- the binary number corresponding to the function module number corresponding to the third module information is used as the third digit of the third 8-bit binary number in the third IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the third interface information The first 4 bits of the third 8-bit binary number in the third IP address of the network interface.
- Step S90 The generated third IP address is configured to an IP address configuration table of a network interface of the corresponding inserted functional module.
- the function module when the function module is inserted into the ATCA board of the ATCA device, the third card slot information of the inserted ATCA board of the function module, the third module information of the function module, and a third interface information of the network interface in the function module, and then generating, according to the third card slot information, the third module information, and the third interface information, a third IP address of the network interface in each of the inserted function modules, And then the generated third IP address is configured to the IP address configuration table of the network interface of the corresponding inserted functional module; and the IP address of the network interface of the function module inserted in the ATCA board of the ATCA device is automatically implemented.
- the combination of the slot information, the second module information, and the second interface information, and the combination of the first card slot information, the first module information, and the first interface information are different, so that the network is different.
- the third IP address corresponding to the physical location information generation network interface, such as the third card slot information, the third module information, and the third interface information, is unique, so that IP address overlap and conflict problems can be avoided, and the problem is further improved. The efficiency of assigning IP addresses to individual network interfaces in an ATCA device.
- FIG. 6 is a schematic diagram of functional modules of a first embodiment of an automatic IP address distribution apparatus according to the present invention.
- the IP address automatic distribution device is applied to an advanced telecommunication computing platform ATCA device, and the IP address automatic distribution device includes:
- the first obtaining module 10 is configured to acquire, when the ATCA device is initialized, the first card slot information of the ATCA board in the ATCA device, the first module information of the function module of the ATCA board to be configured with the IP address, and the First interface information of the network interface in the function module;
- the first generation module 20 is configured to generate a first IP address of each of the network interfaces based on the acquired first card slot information, the first module information, and the first interface information;
- the first configuration module 30 is configured to configure the generated first IP address to an IP address configuration table of a corresponding network interface.
- the first acquiring module 10 acquires the first card slot information of the ATCA board in the ATCA device, and the first module information of the function module of the ATCA board to be configured with the IP address. And the first interface information of the network interface in the function module, and then the first generation module 20 generates the first of each of the network interfaces based on the acquired first card slot information, the first module information, and the first interface information.
- An IP address, and then the first configuration module 30 configures the generated first IP address to an IP address configuration table of the corresponding network interface, thereby realizing automatic allocation of IP addresses of each network interface in the ATCA device, because each network interface
- the uniqueness of the first card slot information, the first module information, and the first interface information is such that the physical interface information corresponding to the first card slot information, the first module information, and the first interface information corresponding to the network interface is generated.
- the first IP address is unique, so it can avoid overlapping IP addresses and conflicts, greatly reducing the workload of manually configuring IP addresses and improving The efficiency of allocating an IP address for each network interface ATCA equipment.
- the IP address includes a first 8-bit binary number and a second 8-bit binary number.
- the third segment 8-bit binary number and the fourth segment 8-bit binary number, the first generation module 20 includes:
- the first generating unit 21 is configured to generate, according to the preset network number, a first segment 8-bit binary number and a second segment 8-bit binary number in the first IP address of each of the network interfaces;
- a second generating unit 22 configured to generate a third 8-bit binary number of the first IP address of each of the network interfaces based on the first card slot information
- a third generating unit 23 configured to generate, according to the first module information, the first four bits of the fourth 8-bit binary number in the first IP address of each of the network interfaces, and generate each of the foregoing according to the first interface information The fourth bit of the fourth 8-bit binary number in the first IP address of the network interface.
- the first segment 8-bit binary number and the second segment 8-bit binary number in the first IP address of each of the network interfaces are generated by the first generating unit 21 based on the preset network number, and then the second generating unit 22 generating a third segment 8-bit binary number of the first IP address of each of the network interfaces based on the first card slot information, and then generating, by the third generating unit 23, each of the network interfaces based on the first module information
- the first generation module 20 includes:
- the obtaining unit 24 is configured to acquire device information of the ATCA device, and generate a network number based on the device information.
- the fourth generating unit 25 is configured to generate a first IP address of each of the network interfaces based on the network number, the first card slot information, the first module information, and the first interface information.
- the device information of the ATCA device is obtained by the acquiring unit 24, and the network number is generated based on the device information, and then the fourth generating unit 25 is based on the network number, the first card slot information, and the first module.
- the information and the first interface information are used to generate a first IP address of each of the network interfaces, and the first IP address of each of the network interfaces is generated according to the device information, the first card slot information, the first module information, and the first interface information. Further, the uniqueness of the generated first IP address is further ensured, thereby avoiding IP address overlap and conflict, and further improving the efficiency of allocating IP addresses for each network interface in the ATCA device.
- the automatic IP address distribution apparatus further includes:
- the second obtaining module 40 is configured to acquire, when the ATCA board is inserted in the ATCA device, the second card slot information of the inserted ATCA board, and the function module of the ATCA board to be configured with an IP address.
- a second generating module 50 configured to generate, according to the second card slot information, the second module information, and the second interface information, a second IP address of each of the inserted network interfaces in the ATCA card;
- the second configuration module 60 is configured to configure the generated second IP address to an IP address configuration table of each network interface in the corresponding inserted ATCA board.
- the second obtaining module 40 acquires the second card slot information of the inserted ATCA board, and the IP address to be configured in the ATCA board.
- the second module information of the function module and the second interface information of the network interface in the function module, and then the second generation module 50 generates the inserted based on the second card slot information, the second module information, and the second interface information.
- the configuration table is configured to implement automatic allocation of IP addresses of the network interfaces in the ATCA board inserted in the ATCA device, because the second card slot information, the second module information, and the second interface information corresponding to each network interface are unique. And the combination of the second card slot information, the second module information, and the second interface information is different from the combination of the first card slot information, the first module information, and the first interface information, so that the network is connected through the network.
- the second IP address corresponding to the physical location information generation network interface is unique, so that IP address overlap and conflict problems can be avoided, and the ATCA is further improved.
- the efficiency of assigning IP addresses to each network interface in the device is unique, so that IP address overlap and conflict problems can be avoided, and the ATCA is further improved.
- the automatic IP address distribution apparatus further includes:
- the third obtaining module 70 is configured to: when detecting the ATCA board insertion function module of the ATCA device, acquire the third card slot information of the inserted ATCA board of the function module, and the third module of the function module Information and third interface information of the network interface in the function module;
- the third generation module 80 is configured to generate, according to the third card slot information, the third module information, and the third interface information, a third IP address of each of the inserted function modules in the function module;
- the third configuration module 90 is configured to configure the generated third IP address to an IP address configuration table of a network interface of the corresponding inserted function module.
- the third acquiring module 70 acquires the third card slot information of the inserted ATCA board of the function module, and the function module.
- the third module information and the third interface information of the network interface in the function module, and then the third generation module 80 generates the function of each insertion based on the third card slot information, the third module information, and the third interface information.
- a third IP address of the network interface in the module, and then the third configuration module 90 configures the generated third IP address to the IP address configuration table of the network interface of the corresponding inserted functional module; the ATCA of the ATCA device is implemented.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Disclosed is a method for automatic allocation of IP addresses, comprising: obtaining, when an ATCA device is initialized, first card slot information of ATCA cards in the ATCA device, first module information of functional modules having IP addresses to be configured in the ATCA cards, and first interface information of network interfaces in the functional modules; generating first IP addresses of the network interfaces on the basis of the obtained first card slot information, first module information and first interface information; and configuring the generated first IP addresses to an IP address configuration table of corresponding network interfaces. Also disclosed is an apparatus for automatic allocation of IP addresses. The present invention implements automatic allocation of IP addresses of network interfaces in an ATCA device, and can avoid the problems of IP address overlaps and conflicts, thereby greatly reducing the workload of manually configuring IP addresses, and improving the efficiency of allocating the IP addresses to the network interfaces in the ATCA device.
Description
技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种IP地址自动分配方法及装置。The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for automatically allocating an IP address.
背景技术Background technique
ATCA(Advanced Telecom Computing
Architecture,先进电信计算平台)系统是专门为特殊应用行业和高密度计算机环境设计的。ATCA设备基本架构包括多个机框,每个机框上插有多个板卡,每个板卡可能具有CPU、DSP或FPGA等多个功能模块。为实现功能模块之间、板卡之间或者与外部设备之间的通信,需要为各个功能模块分配IP地址。ATCA (Advanced Telecom Computing
The Architecture, Advanced Telecom Computing Platform system is designed for specific application industries and high-density computer environments. The basic structure of the ATCA device includes multiple chassis, and multiple boards are inserted in each chassis. Each card may have multiple functional modules such as CPU, DSP or FPGA. In order to achieve communication between function modules, between boards or with external devices, it is necessary to assign IP addresses to individual function modules.
目前,一般通过手工方式为ATCA设备的各个功能模块分配IP地址,
该方式造成ATCA设备配置的工作量大,ATCA设备内部各个功能模块IP接口较多,容易产生IP分配错误,造成IP地址重叠、冲突,从而影响设备的正常工作。Currently, IP addresses are generally assigned to individual functional modules of an ATCA device by hand.
In this mode, the workload of the ATCA device is large. The IP interfaces of the various function modules in the ATCA device are numerous, which may cause IP address mismatches, resulting in overlapping and conflicting IP addresses, thus affecting the normal operation of the device.
发明内容Summary of the invention
本发明提供一种IP地址自动分配方法及装置,旨在解决通过手工方式为ATCA设备的各个功能模块分配IP地址时因IP分配错误而造成IP地址冲突的技术问题。The present invention provides a method and an apparatus for automatically allocating an IP address, and aims to solve the technical problem of IP address conflict caused by an IP allocation error when manually assigning an IP address to each functional module of an ATCA device.
为实现上述目的,本发明提供的一种IP地址自动分配方法,应用于先进电信计算平台ATCA设备,所述IP地址自动分配方法包括以下步骤:To achieve the above objective, the present invention provides an automatic IP address allocation method for an advanced telecommunications computing platform ATCA device. The automatic IP address allocation method includes the following steps:
在ATCA设备初始化时,获取所述ATCA设备中ATCA板卡的第一卡槽信息、各个ATCA板卡中待配置IP地址的功能模块的第一模块信息及所述功能模块中的网络接口的第一接口信息;When the ATCA device is initialized, acquiring the first card slot information of the ATCA board in the ATCA device, the first module information of the function module of the ATCA board to be configured with the IP address, and the network interface in the function module An interface information;
基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址;Generating, according to the obtained first card slot information, the first module information, and the first interface information, a first IP address of each of the network interfaces;
将生成的所述第一IP地址配置至对应的网络接口的IP地址配置表。The generated first IP address is configured to an IP address configuration table of a corresponding network interface.
此外,为实现上述目的,本发明还提供一种IP地址自动分配装置,应用于先进电信计算平台ATCA设备,所述IP地址自动分配装置包括:In addition, in order to achieve the above object, the present invention further provides an automatic IP address allocation device, which is applied to an advanced telecommunication computing platform ATCA device, and the IP address automatic distribution device includes:
第一获取模块,用于在ATCA设备初始化时,获取所述ATCA设备中ATCA板卡的第一卡槽信息、各个ATCA板卡中待配置IP地址的功能模块的第一模块信息及所述功能模块中的网络接口的第一接口信息;a first acquiring module, configured to acquire, when the ATCA device is initialized, the first card slot information of the ATCA card in the ATCA device, the first module information of the function module of the ATCA card to be configured with an IP address, and the function First interface information of the network interface in the module;
第一生成模块,用于基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址;a first generation module, configured to generate a first IP address of each of the network interfaces based on the acquired first card slot information, first module information, and first interface information;
第一配置模块,用于将生成的所述第一IP地址配置至对应的网络接口的IP地址配置表。The first configuration module is configured to configure the generated first IP address to an IP address configuration table of the corresponding network interface.
本发明通过在ATCA设备初始化时,获取所述ATCA设备中ATCA板卡的第一卡槽信息、各个ATCA板卡中待配置IP地址的功能模块的第一模块信息及所述功能模块中的网络接口的第一接口信息,接着基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址,而后将生成的所述第一IP地址配置至对应的网络接口的IP地址配置表,实现了ATCA设备中各个网络接口的IP地址的自动分配,由于每一个网络接口对应的第一卡槽信息、第一模块信息及第一接口信息的唯一性,使得通过网络接口对应的第一卡槽信息、第一模块信息及第一接口信息等物理位置信息生成网络接口对应的第一IP地址具有唯一性,因此能够避免出现IP地址重叠、冲突问题,大大减少了手工配置IP地址的工作量,提高了为ATCA设备中各个网络接口分配IP地址的效率。The invention acquires the first card slot information of the ATCA board in the ATCA device, the first module information of the function module of the ATCA board to be configured with the IP address, and the network in the function module when the ATCA device is initialized. And generating, by the first interface information of the interface, the first IP address of each of the network interfaces, and the first IP address to be generated, based on the acquired first card slot information, the first module information, and the first interface information. The IP address configuration table of the corresponding network interface is configured to automatically allocate the IP address of each network interface in the ATCA device, because the first card slot information, the first module information, and the first interface information corresponding to each network interface Uniquely, the first IP address corresponding to the network interface generated by the physical location information such as the first card slot information, the first module information, and the first interface information corresponding to the network interface is unique, so that IP address overlap and conflict can be avoided. The problem is that the workload of manually configuring the IP address is greatly reduced, and the efficiency of assigning an IP address to each network interface in the ATCA device is improved.
附图说明DRAWINGS
图1为本发明IP地址自动分配方法第一实施例的流程示意图;1 is a schematic flowchart of a first embodiment of an automatic IP address allocation method according to the present invention;
图2为本发明IP地址自动分配方法第二实施例中生成各个所述网络接口的IP地址步骤的细化流程示意图;2 is a schematic flowchart of a step of generating an IP address of each of the network interfaces in a second embodiment of the method for automatically assigning an IP address according to the present invention;
图3为本发明IP地址自动分配方法第三实施例中生成各个所述网络接口的IP地址步骤的细化流程示意图;3 is a schematic flowchart of a step of generating an IP address of each of the network interfaces in a third embodiment of the method for automatically assigning an IP address according to the present invention;
图4为本发明IP地址自动分配方法第四实施例的流程示意图;4 is a schematic flowchart of a fourth embodiment of an automatic IP address allocation method according to the present invention;
图5为本发明IP地址自动分配方法第五实施例的流程示意图;FIG. 5 is a schematic flowchart diagram of a fifth embodiment of an automatic IP address allocation method according to the present invention; FIG.
图6为本发明IP地址自动分配装置第一实施例的功能模块示意图;6 is a schematic diagram of functional modules of a first embodiment of an automatic IP address distribution apparatus according to the present invention;
图7为本发明IP地址自动分配装置第二实施例中第一生成模块的细化功能模块示意图;FIG. 7 is a schematic diagram of a refinement function module of a first generation module in a second embodiment of an automatic IP address distribution apparatus according to the present invention; FIG.
图8为本发明IP地址自动分配装置第三实施例中第一生成模块的细化功能模块示意图;8 is a schematic diagram of a refinement function module of a first generation module in a third embodiment of an automatic IP address distribution apparatus according to the present invention;
图9为本发明IP地址自动分配装置第四实施例的功能模块示意图;9 is a schematic diagram of functional modules of a fourth embodiment of an automatic IP address allocation apparatus according to the present invention;
图10为本发明IP地址自动分配装置第五实施例的功能模块示意图。FIG. 10 is a schematic diagram of functional modules of a fifth embodiment of an automatic IP address distribution apparatus according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明提供一种IP地址自动分配方法。The invention provides an automatic IP address allocation method.
参照图1,图1为本发明IP地址自动分配方法第一实施例的流程示意图。Referring to FIG. 1, FIG. 1 is a schematic flowchart diagram of a first embodiment of an automatic IP address allocation method according to the present invention.
在本实施例中,IP地址自动分配方法应用于先进电信计算平台ATCA设备,该IP地址自动分配方法包括:In this embodiment, the automatic IP address allocation method is applied to an advanced telecommunications computing platform ATCA device, and the automatic IP address allocation method includes:
步骤S10,在ATCA设备初始化时,获取所述ATCA设备中ATCA板卡的第一卡槽信息、各个ATCA板卡中待配置IP地址的功能模块的第一模块信息及所述功能模块中的网络接口的第一接口信息;In step S10, when the ATCA device is initialized, the first card slot information of the ATCA board in the ATCA device, the first module information of the function module of the ATCA board to be configured with the IP address, and the network in the function module are acquired. The first interface information of the interface;
本实施例的IP地址自动分配方法对应的IP地址自动分配装置可运行在ATCA机箱管理模块上,也可运行在ATCA核心交换管理控制模块上。The IP address automatic allocation device corresponding to the automatic IP address allocation method in this embodiment may be run on the ATCA chassis management module or on the ATCA core switch management control module.
本实施例中,ATCA板卡安装在或插入ATCA设备的卡槽中,第一卡槽信息为各个ATCA板卡对应的ATCA设备的卡槽号;ATCA板卡安装有一个或多个CPU、DSP、FPGA等设有IP网络接口的功能模块,第一模块信息为每一个ATCA板卡中CPU、DSP、FPGA等各个功能模块的编号,即第一模块信息为功能模块号;同一个ATCA板卡中CPU、DSP或FPGA功能模块设有一个或多个IP网络接口,第一接口信息为每一个CPU、DSP或FPGA功能模块中IP网络接口的网络接口号。其中,第一卡槽信息、第一模块信息及第一接口信息均可以在ATCA板卡插入ATCA设备的卡槽后进行相应的设置,或者根据相应的顺序采用默认值,例如,ATCA设备中第一个卡槽的卡槽号为1,在卡槽中插入ATCA板卡后,该ATCA板卡对应的第一卡槽信息为1,第二个卡槽的卡槽号为2,在卡槽中插入ATCA板卡后,该ATCA板卡对应的第一卡槽信息为2,其余卡槽依次类推;ATCA板卡中的功能模块可以采用功能模块的按照由上至下、由下至上、由左至右或由右至左的顺序依次编号,同理,各个功能模块IP网络接口也可以由上至下、由下至上、由左至右或由右至左的顺序依次编号,以使每一个IP网络接口对应的第一卡槽信息、第一模块信息及第一接口信息与其他每一个IP网络接口对应的第一卡槽信息、第一模块信息及第一接口信息中均存在不同,例如,第一卡槽信息不同、第一模块信息不同或者第一接口信息不同。In this embodiment, the ATCA board is installed in or inserted into the card slot of the ATCA device. The first card slot information is the slot number of the ATCA device corresponding to each ATCA board; the ATCA board is installed with one or more CPUs and DSPs. , FPGA and other functional modules with IP network interface, the first module information is the number of each functional module such as CPU, DSP, FPGA in each ATCA board, that is, the first module information is the function module number; the same ATCA board The CPU, DSP or FPGA function module is provided with one or more IP network interfaces, and the first interface information is the network interface number of the IP network interface in each CPU, DSP or FPGA function module. The first card slot information, the first module information, and the first interface information may be set after the ATCA board is inserted into the card slot of the ATCA device, or the default value is adopted according to the corresponding sequence, for example, the ATCA device The card slot number of a card slot is 1. After the ATCA board is inserted into the card slot, the first card slot information corresponding to the ATCA board is 1, and the slot number of the second card slot is 2, in the card slot. After the ATCA board is inserted, the first card slot information corresponding to the ATCA board is 2, and the remaining card slots are analogously; the function modules in the ATCA board can be used according to the function module from top to bottom, bottom to top, and The numbers are sequentially numbered from left to right or from right to left. Similarly, the IP network interfaces of each function module can also be numbered sequentially from top to bottom, bottom to top, left to right or right to left, so that each The first card slot information, the first module information, and the first interface information corresponding to an IP network interface are different from the first card slot information, the first module information, and the first interface information corresponding to each of the other IP network interfaces. For example, the first card slot information is different, the first Different information or different from the first module interface information.
步骤S20,基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址;Step S20: Generate a first IP address of each network interface based on the obtained first card slot information, first module information, and first interface information.
具体地,可以将第一卡槽信息对应的卡槽号对应的二进制数作为网络接口的第一IP地址中的第三段8位二进制数,将第一模块信息对应的功能模块号对应的二进制数作为网络接口的第一IP地址中的第四段8位二进制数前4位,将第一接口信息对应的网络接口号对应的二进制数作为网络接口的第一IP地址中第四段8位二进制数后4位,网络接口的第一IP地址中的第一段8位二进制数及第二段8位二进制数可以采用默认值或预设值。在其他实施例中,还可以将第一卡槽信息对应的卡槽号对应的二进制数作为网络接口的第一IP地址中的第三段8位二进制数,将第一模块信息对应的功能模块号对应的二进制数作为网络接口的第一IP地址中的第四段8位二进制数后4位,将第一接口信息对应的网络接口号对应的二进制数作为网络接口的第一IP地址中第四段8位二进制数前4位;或者,将第一卡槽信息对应的卡槽号对应的二进制数作为网络接口的第一IP地址中的第四段8位二进制数,将第一模块信息对应的功能模块号对应的二进制数作为网络接口的第一IP地址中的第三段8位二进制数前4位,将第一接口信息对应的网络接口号对应的二进制数作为网络接口的第一IP地址中第三段8位二进制数后4位;又或者,将第一卡槽信息对应的卡槽号对应的二进制数作为网络接口的第一IP地址中的第四段8位二进制数,将第一模块信息对应的功能模块号对应的二进制数作为网络接口的第一IP地址中的第三段8位二进制数后4位,将第一接口信息对应的网络接口号对应的二进制数作为网络接口的第一IP地址中第三段8位二进制数前4位。Specifically, the binary number corresponding to the slot number corresponding to the first card slot information may be used as the third 8-bit binary number in the first IP address of the network interface, and the binary corresponding to the function module number corresponding to the first module information The number is the first 4 digits of the fourth 8-bit binary number in the first IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the first interface information is used as the fourth 8-bit of the first IP address of the network interface. The last 4 digits of the binary number, the first 8-bit binary number and the second 8-bit binary number in the first IP address of the network interface may adopt a default value or a preset value. In other embodiments, the binary number corresponding to the slot number corresponding to the first card slot information may be used as the third 8-bit binary number in the first IP address of the network interface, and the function module corresponding to the first module information is used. The binary number corresponding to the number is the last 4 digits of the fourth 8-bit binary number in the first IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the first interface information is used as the first IP address in the network interface. The first 4 bits of the four-segment 8-bit binary number; or, the binary number corresponding to the card slot number corresponding to the first card slot information is used as the fourth 8-bit binary number in the first IP address of the network interface, and the first module information is used. The binary number corresponding to the corresponding function module number is used as the first 4 digits of the third 8-bit binary number in the first IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the first interface information is used as the first network interface. The last 8 bits of the third 8-bit binary number in the IP address; or, the binary number corresponding to the slot number corresponding to the first card slot information is used as the fourth 8-bit binary number in the first IP address of the network interface. And the binary number corresponding to the function module number corresponding to the first module information is used as the third digit of the third 8-bit binary number in the first IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the first interface information The first 4 bits of the third 8-bit binary number in the first IP address of the network interface.
上述IP地址生成策略是基于IP网络接口对应的网络接口号、功能模块号以及ATCA板卡的板卡号生成网络接口对应的第一IP地址,即根据IP网络接口对应的物理位置进行分配,网络接口号、功能模块号以及ATCA板卡的板卡号等物理地址编号的唯一性确保了网络接口的第一IP地址的唯一性,因此能够避免出现IP地址重叠、冲突问题。The IP address generation policy is based on the network interface number corresponding to the IP network interface, the function module number, and the board number of the ATCA board to generate a first IP address corresponding to the network interface, that is, according to the physical location corresponding to the IP network interface, the network is allocated. The uniqueness of the physical address number such as the interface number, the function module number, and the board number of the ATCA board ensures the uniqueness of the first IP address of the network interface, thus avoiding IP address overlap and collision problems.
步骤S30,将生成的所述第一IP地址配置至对应的网络接口的IP地址配置表。Step S30, the generated first IP address is configured to an IP address configuration table of the corresponding network interface.
通过将生成的所述第一IP地址配置至对应的网络接口的IP地址配置表,实现网络接口的第一IP地址的自动分配。The automatic allocation of the first IP address of the network interface is implemented by configuring the generated first IP address to the IP address configuration table of the corresponding network interface.
本实施例,通过在ATCA设备初始化时,获取所述ATCA设备中ATCA板卡的第一卡槽信息、各个ATCA板卡中待配置IP地址的功能模块的第一模块信息及所述功能模块中的网络接口的第一接口信息,接着基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址,而后将生成的所述第一IP地址配置至对应的网络接口的IP地址配置表,实现了ATCA设备中各个网络接口的IP地址的自动分配,由于每一个网络接口对应的第一卡槽信息、第一模块信息及第一接口信息的唯一性,使得通过网络接口对应的第一卡槽信息、第一模块信息及第一接口信息等物理位置信息生成网络接口对应的第一IP地址具有唯一性,因此能够避免出现IP地址重叠、冲突问题,大大减少了手工配置IP地址的工作量,提高了为ATCA设备中各个网络接口分配IP地址的效率。In this embodiment, when the ATCA device is initialized, the first card slot information of the ATCA board in the ATCA device, the first module information of the function module of the ATCA board to be configured with the IP address, and the function module are obtained. First interface information of the network interface, and then generating a first IP address of each of the network interfaces based on the obtained first card slot information, first module information, and first interface information, and then the first The IP address is configured to the IP address configuration table of the corresponding network interface, and the IP address of each network interface in the ATCA device is automatically allocated. The first card slot information, the first module information, and the first interface corresponding to each network interface are implemented. The uniqueness of the information makes the first IP address corresponding to the network interface generated by the physical location information such as the first card slot information, the first module information, and the first interface information corresponding to the network interface unique, so that IP address overlap can be avoided. The conflict problem greatly reduces the workload of manually configuring IP addresses and improves the efficiency of assigning IP addresses to various network interfaces in the ATCA device.
基于第一实施例提出本发明IP地址自动分配方法的第二实施例,参照图2,在本实施例中,所述IP地址包括第一段8位二进制数、第二段8位二进制数、第三段8位二进制数及第四段8位二进制数,步骤S20包括:A second embodiment of the method for automatically assigning an IP address according to the present invention is provided based on the first embodiment. Referring to FIG. 2, in the embodiment, the IP address includes a first 8-bit binary number and a second 8-bit binary number. The third segment 8-bit binary number and the fourth segment 8-bit binary number, step S20 includes:
步骤S21,基于预设网络号生成各个所述网络接口的第一IP地址中的第一段8位二进制数及第二段8位二进制数;Step S21: Generate a first 8-bit binary number and a second 8-bit binary number in the first IP address of each of the network interfaces based on the preset network number.
本实施例中,第一IP地址的第一段8位二进制数及第二段8位二进制数采用预设网络号生成,具体地,预设网络号包括两个网络号字段,可根据实际应用环境要求进行灵活配置,例如一个网络号对应配置给内部网络用,一个网络号配置给外部网络使用,即配置该网络号的第一IP地址对应的功能模块能够通过该IP地址连接外部网络,以供外部设备访问该ATCA设备;一般情况下,ATCA设备只配置一个对外网络IP地址,其它网络接口的IP地址均为内部IP地址,实现设备内部各个功能模块之间的数据交互。In this embodiment, the first 8-bit binary number and the second 8-bit binary number of the first IP address are generated by using a preset network number. Specifically, the preset network number includes two network number fields, which may be applied according to actual applications. The environment requires flexible configuration. For example, a network number is configured for the internal network, and a network number is configured for use by the external network. That is, the function module corresponding to the first IP address configured with the network number can be connected to the external network through the IP address. For the external device to access the ATCA device; in general, the ATCA device only configures an external network IP address, and the IP addresses of other network interfaces are internal IP addresses, which implement data interaction between various functional modules within the device.
步骤S22,基于所述第一卡槽信息生成各个所述网络接口的第一IP地址中第三段8位二进制数;Step S22, generating a third 8-bit binary number of the first IP address of each of the network interfaces based on the first card slot information;
具体地,将第一卡槽信息对应的卡槽号对应的二进制数作为网络接口的第一IP地址中的第三段8位二进制数。Specifically, the binary number corresponding to the card slot number corresponding to the first card slot information is used as the third segment 8-bit binary number in the first IP address of the network interface.
步骤S23,基于所述第一模块信息生成各个所述网络接口的第一IP地址中第四段8位二进制数前4位,并基于所述第一接口信息生成各个所述网络接口的第一IP地址中第四段8位二进制数后4位。Step S23, generating, according to the first module information, the first four bits of the fourth 8-bit binary number in the first IP address of each of the network interfaces, and generating the first of each of the network interfaces based on the first interface information. The last 4 digits of the fourth 8-bit binary number in the IP address.
具体地,将第一模块信息对应的功能模块号对应的二进制数作为网络接口的第一IP地址中的第四段8位二进制数前4位,将第一接口信息对应的网络接口号对应的二进制数作为网络接口的第一IP地址中第四段8位二进制数后4位。Specifically, the binary number corresponding to the function module number corresponding to the first module information is used as the first 4 bits of the fourth 8-bit binary number in the first IP address of the network interface, and the network interface number corresponding to the first interface information is corresponding. The binary number is the last 4 bits of the fourth 8-bit binary number in the first IP address of the network interface.
本实施例中,通过基于预设网络号生成各个所述网络接口的第一IP地址中的第一段8位二进制数及第二段8位二进制数,而后基于所述第一卡槽信息生成各个所述网络接口的第一IP地址中第三段8位二进制数,接着基于所述第一模块信息生成各个所述网络接口的第一IP地址中第四段8位二进制数前4位,并基于所述第一接口信息生成各个所述网络接口的第一IP地址中第四段8位二进制数后4位,实现了根据预设网络号、第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址,进一步提高了为ATCA设备中各个网络接口分配IP地址的效率。In this embodiment, the first 8-bit binary number and the second 8-bit binary number in the first IP address of each of the network interfaces are generated based on the preset network number, and then generated based on the first card slot information. a third 8-bit binary number of the first IP address of each of the network interfaces, and then generating, according to the first module information, the first 4 bits of the fourth 8-bit binary number of the first IP address of each of the network interfaces, And generating, according to the first interface information, four bits of the fourth 8-bit binary number of the first IP address of each of the network interfaces, and implementing the preset network number, the first card slot information, the first module information, and The first interface information generates a first IP address of each of the network interfaces, further improving the efficiency of assigning an IP address to each network interface in the ATCA device.
基于第一实施例提出本发明IP地址自动分配方法的第三实施例,参照图3,在本实施例中,步骤S20包括:A third embodiment of the method for automatically assigning an IP address according to the present invention is provided based on the first embodiment. Referring to FIG. 3, in the embodiment, step S20 includes:
步骤S24,获取所述ATCA设备的设备信息,基于所述设备信息生成网络号;Step S24: Obtain device information of the ATCA device, and generate a network number based on the device information.
具体地,
ATCA设备的设备信息为该ATCA设备的设备号,可以直接将该设备号作为网络号,或者将设备号中预设位置的数字作为网络号。specifically,
The device information of the ATCA device is the device number of the ATCA device, and the device number can be directly used as the network number, or the number of the preset location in the device number is used as the network number.
步骤S25,基于所述网络号、所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址。Step S25: Generate a first IP address of each of the network interfaces based on the network number, the first card slot information, the first module information, and the first interface information.
本实施例中,通过获取所述ATCA设备的设备信息,基于所述设备信息生成网络号,接着基于所述网络号、所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址,实现了根据设备信息、第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址,进一步保证了生成的第一IP地址的唯一性,进而避免出现IP地址重叠、冲突问题,进一步提高了为ATCA设备中各个网络接口分配IP地址的效率。In this embodiment, by acquiring the device information of the ATCA device, generating a network number based on the device information, and then generating each based on the network number, the first card slot information, the first module information, and the first interface information. The first IP address of the network interface is configured to generate a first IP address of each network interface according to the device information, the first card slot information, the first module information, and the first interface information, further ensuring the generated first The uniqueness of the IP address, thereby avoiding IP address overlap and conflict, further improving the efficiency of assigning IP addresses to various network interfaces in the ATCA device.
基于第一实施例提出本发明IP地址自动分配方法的第四实施例,参照图4,在本实施例中,在步骤S30之后,该IP地址自动分配方法还包括:A fourth embodiment of the method for automatically assigning an IP address of the present invention is provided based on the first embodiment. Referring to FIG. 4, in the embodiment, after the step S30, the method for automatically allocating the IP address further includes:
步骤S40,在检测到所述ATCA设备中插入ATCA板卡时,获取插入的所述ATCA板卡的第二卡槽信息、所述ATCA板卡中待配置IP地址的功能模块的第二模块信息及所述功能模块中的网络接口的第二接口信息;In step S40, when the ATCA board is inserted into the ATCA device, the second card slot information of the inserted ATCA board and the second module information of the function module of the ATCA board to be configured with an IP address are obtained. And second interface information of the network interface in the function module;
本实施例中,检测到所述ATCA设备中插入ATCA板卡的情况包括ATCA设备中插入新的ATCA板卡、ATCA设备中的ATCA板卡拔掉后插入新的卡槽、或者ATCA设备中的ATCA板卡更换新的ATCA板卡即拔掉ATCA设备中某一卡槽的ATCA板卡后在该卡槽插入新的ATCA板卡,由于ATCA板卡的变更而需要给变更后的即新插入的ATCA板卡分配IP地址,因此,获取插入的所述ATCA板卡的第二卡槽信息、所述ATCA板卡中待配置IP地址的功能模块的第二模块信息及所述功能模块中的网络接口的第二接口信息,其中,第二卡槽信息为该插入的ATCA板卡对应的ATCA设备的卡槽号;第二模块信息为该插入的ATCA板卡中CPU、DSP、FPGA等各个功能模块的编号,即第二模块信息为功能模块号;第二接口信息为该插入的ATCA板卡中每一个CPU、DSP或FPGA功能模块中IP网络接口的网络接口号。In this embodiment, detecting that the ATCA board is inserted into the ATCA device includes inserting a new ATCA board in the ATCA device, inserting a new card slot in the ATCA device, inserting a new card slot, or inserting into a new card slot. If the ATCA board is replaced with a new ATCA board, the ATCA board of one slot in the ATCA equipment is removed, and a new ATCA board is inserted in the slot. The ATCA board needs to be changed after the change. The ATCA board assigns an IP address, so the second card slot information of the inserted ATCA board, the second module information of the function module of the ATCA board to be configured with an IP address, and the function module are obtained. The second interface information of the network interface, where the second card slot information is the slot number of the ATCA device corresponding to the inserted ATCA board; the second module information is the CPU, DSP, FPGA, etc. in the inserted ATCA board. The number of the function module, that is, the second module information is the function module number; the second interface information is the network interface number of the IP network interface in each CPU, DSP or FPGA function module of the inserted ATCA board.
步骤S50,基于所述第二卡槽信息、第二模块信息及第二接口信息生成插入的所述ATCA板卡中各个所述网络接口的第二IP地址;Step S50: Generate a second IP address of each of the inserted network interfaces in the ATCA board based on the second card slot information, the second module information, and the second interface information.
具体地,可以将第二卡槽信息对应的卡槽号对应的二进制数作为网络接口的第二IP地址中的第三段8位二进制数,将第二模块信息对应的功能模块号对应的二进制数作为网络接口的第二IP地址中的第四段8位二进制数前4位,将第二接口信息对应的网络接口号对应的二进制数作为网络接口的第二IP地址中第四段8位二进制数后4位,网络接口的第二IP地址中的第一段8位二进制数及第二段8位二进制数可以采用默认值或预设值。在其他实施例中,还可以将第二卡槽信息对应的卡槽号对应的二进制数作为网络接口的第二IP地址中的第三段8位二进制数,将第二模块信息对应的功能模块号对应的二进制数作为网络接口的第二IP地址中的第四段8位二进制数后4位,将第二接口信息对应的网络接口号对应的二进制数作为网络接口的第二IP地址中第四段8位二进制数前4位;或者,将第二卡槽信息对应的卡槽号对应的二进制数作为网络接口的第二IP地址中的第四段8位二进制数,将第二模块信息对应的功能模块号对应的二进制数作为网络接口的第二IP地址中的第三段8位二进制数前4位,将第二接口信息对应的网络接口号对应的二进制数作为网络接口的第二IP地址中第三段8位二进制数后4位;又或者,将第二卡槽信息对应的卡槽号对应的二进制数作为网络接口的第二IP地址中的第四段8位二进制数,将第二模块信息对应的功能模块号对应的二进制数作为网络接口的第二IP地址中的第三段8位二进制数后4位,将第二接口信息对应的网络接口号对应的二进制数作为网络接口的第二IP地址中第三段8位二进制数前4位。Specifically, the binary number corresponding to the slot number corresponding to the second card slot information may be used as the third 8-bit binary number in the second IP address of the network interface, and the binary corresponding to the function module number corresponding to the second module information The number is the first 4 digits of the fourth 8-bit binary number in the second IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the second interface information is used as the fourth 8-bit of the second IP address of the network interface. The last 4 digits of the binary number, the first 8-bit binary number and the second 8-bit binary number in the second IP address of the network interface may adopt a default value or a preset value. In other embodiments, the binary number corresponding to the slot number corresponding to the second card slot information may be used as the third 8-bit binary number in the second IP address of the network interface, and the function module corresponding to the second module information is used. The binary number corresponding to the number is used as the fourth digit of the fourth 8-bit binary number in the second IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the second interface information is used as the second IP address of the network interface. The first 4 bits of the four-segment 8-bit binary number; or, the binary number corresponding to the card slot number corresponding to the second card slot information is used as the fourth 8-bit binary number in the second IP address of the network interface, and the second module information is The binary number corresponding to the corresponding function module number is used as the first 4 digits of the third 8-bit binary number in the second IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the second interface information is used as the second network interface. The last 8 bits of the third 8-bit binary number in the IP address; or, the binary number corresponding to the slot number corresponding to the second card slot information is used as the fourth 8-bit binary number in the second IP address of the network interface. And the binary number corresponding to the function module number corresponding to the second module information is used as the third digit of the third 8-bit binary number in the second IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the second interface information The first 4 bits of the third 8-bit binary number in the second IP address of the network interface.
步骤S60,将生成的所述第二IP地址配置至对应的插入的所述ATCA板卡中各个网络接口的IP地址配置表。Step S60: The generated second IP address is configured to an IP address configuration table of each network interface in the corresponding inserted ATCA board.
本实施例中,通过在检测到所述ATCA设备中插入ATCA板卡时,获取插入的所述ATCA板卡的第二卡槽信息、所述ATCA板卡中待配置IP地址的功能模块的第二模块信息及所述功能模块中的网络接口的第二接口信息,接着基于所述第二卡槽信息、第二模块信息及第二接口信息生成插入的所述ATCA板卡中各个所述网络接口的第二IP地址,而后将生成的所述第二IP地址配置至对应的插入的所述ATCA板卡中各个网络接口的IP地址配置表;实现了ATCA设备中插入的所述ATCA板卡中各个网络接口的IP地址的自动分配,由于每一个网络接口对应的第二卡槽信息、第二模块信息及第二接口信息的唯一性,并且第二卡槽信息、第二模块信息及第二接口信息的组合与第一卡槽信息、第一模块信息及第一接口信息的组合存在不同,使得通过网络接口对应的第二卡槽信息、第二模块信息及第二接口信息等物理位置信息生成网络接口对应的第二IP地址具有唯一性,因此能够避免出现IP地址重叠、冲突问题,进一步提高了为ATCA设备中各个网络接口分配IP地址的效率。In this embodiment, when the ATCA board is inserted into the ATCA device, the second card slot information of the inserted ATCA board and the function module of the ATCA board to be configured with an IP address are obtained. And generating, by the second module information, the second interface information of the network interface in the function module, and then generating, according to the second card slot information, the second module information, and the second interface information, each of the network in the inserted ATCA card a second IP address of the interface, and then the generated second IP address is configured to an IP address configuration table of each network interface in the corresponding inserted ATCA board; and the ATCA board inserted in the ATCA device is implemented. The automatic allocation of the IP addresses of the network interfaces, the uniqueness of the second card slot information, the second module information, and the second interface information corresponding to each network interface, and the second card slot information, the second module information, and the The combination of the two interface information is different from the combination of the first card slot information, the first module information, and the first interface information, so that the second card slot information, the second module information, and the second corresponding to the network interface are Port information and other physical position information to generate a second IP address corresponding to the network interface is unique, it is possible to avoid overlapping IP addresses, conflict, to further improve the IP address assigned to each network interface ATCA equipment efficiency.
基于第一实施例提出本发明IP地址自动分配方法的第五实施例,参照图5,在本实施例中,在步骤S30之后,IP地址自动分配方法还包括:The fifth embodiment of the method for automatically assigning an IP address of the present invention is provided based on the first embodiment. Referring to FIG. 5, in the embodiment, after the step S30, the method for automatically allocating the IP address further includes:
步骤S70,在检测到所述ATCA设备的ATCA板卡插入功能模块时,获取插入的所述功能模块所属ATCA板卡的第三卡槽信息、所述功能模块的第三模块信息及所述功能模块中的网络接口的第三接口信息;Step S70: When detecting the ATCA board insertion function module of the ATCA device, acquiring the third card slot information of the inserted ATCA board of the function module, the third module information of the function module, and the function Third interface information of the network interface in the module;
本实施例中,检测到ATCA设备的ATCA板卡插入功能模块包括ATCA设备的ATCA板卡中插入新的功能模块、或者ATCA设备的ATCA板卡中的功能模块更换新的功能模块,由于ATCA板卡中功能模块的变更而需要给变更后的即新插入的功能模块分配IP地址,因此,获取插入的所述功能模块所属ATCA板卡的第三卡槽信息、所述功能模块的第三模块信息及所述功能模块中的网络接口的第三接口信息,其中,第三卡槽信息为该插入的所述功能模块所属ATCA板卡的卡槽号;第三模块信息为该功能模块的编号;第一接口信息为该插入的功能模块中IP网络接口的网络接口号。In this embodiment, the ATCA board insertion function module of the ATCA device is detected, and the new function module is inserted into the ATCA board of the ATCA device, or the function module in the ATCA board of the ATCA device is replaced with a new function module, because the ATCA board The function module of the card needs to be assigned an IP address to the newly inserted function module after the change, so that the third card slot information of the inserted ATCA board of the function module and the third module of the function module are obtained. Information and third interface information of the network interface in the function module, wherein the third card slot information is a card slot number of the inserted ATCA board of the function module; the third module information is a number of the function module The first interface information is the network interface number of the IP network interface in the inserted function module.
步骤S80,基于所述第三卡槽信息、第三模块信息及第三接口信息生成各个插入的所述功能模块中网络接口的第三IP地址;Step S80, generating a third IP address of the network interface in each of the inserted functional modules based on the third card slot information, the third module information, and the third interface information;
具体地,可以将第三卡槽信息对应的卡槽号对应的二进制数作为网络接口的第三IP地址中的第三段8位二进制数,将第三模块信息对应的功能模块号对应的二进制数作为网络接口的第三IP地址中的第四段8位二进制数前4位,将第三接口信息对应的网络接口号对应的二进制数作为网络接口的第三IP地址中第四段8位二进制数后4位,网络接口的第三IP地址中的第一段8位二进制数及第三段8位二进制数可以采用默认值或预设值。在其他实施例中,还可以将第三卡槽信息对应的卡槽号对应的二进制数作为网络接口的第三IP地址中的第三段8位二进制数,将第三模块信息对应的功能模块号对应的二进制数作为网络接口的第三IP地址中的第四段8位二进制数后4位,将第三接口信息对应的网络接口号对应的二进制数作为网络接口的第三IP地址中第四段8位二进制数前4位;或者,将第三卡槽信息对应的卡槽号对应的二进制数作为网络接口的第三IP地址中的第四段8位二进制数,将第三模块信息对应的功能模块号对应的二进制数作为网络接口的第三IP地址中的第三段8位二进制数前4位,将第三接口信息对应的网络接口号对应的二进制数作为网络接口的第三IP地址中第三段8位二进制数后4位;又或者,将第三卡槽信息对应的卡槽号对应的二进制数作为网络接口的第三IP地址中的第四段8位二进制数,将第三模块信息对应的功能模块号对应的二进制数作为网络接口的第三IP地址中的第三段8位二进制数后4位,将第三接口信息对应的网络接口号对应的二进制数作为网络接口的第三IP地址中第三段8位二进制数前4位。Specifically, the binary number corresponding to the slot number corresponding to the third card slot information may be used as the third 8-bit binary number in the third IP address of the network interface, and the binary corresponding to the function module number corresponding to the third module information. The number is the first 4 digits of the fourth 8-bit binary number in the third IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the third interface information is used as the fourth 8-bit of the third IP address of the network interface. The last 4 digits of the binary number, the first 8-bit binary number and the third 8-bit binary number in the third IP address of the network interface may adopt a default value or a preset value. In other embodiments, the binary number corresponding to the slot number corresponding to the third card slot information may be used as the third 8-bit binary number in the third IP address of the network interface, and the function module corresponding to the third module information is used. The binary number corresponding to the number is used as the fourth digit of the fourth 8-bit binary number in the third IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the third interface information is used as the third IP address of the network interface. The first 4 bits of the 4-segment 8-bit binary number; or, the binary number corresponding to the card slot number corresponding to the third card slot information is used as the fourth 8-bit binary number in the third IP address of the network interface, and the third module information is The binary number corresponding to the corresponding function module number is used as the first 4 digits of the third 8-bit binary number in the third IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the third interface information is used as the third interface of the network interface. The last 8 bits of the third 8-bit binary number in the IP address; or, the binary number corresponding to the slot number corresponding to the third card slot information is used as the fourth 8-bit binary number in the third IP address of the network interface. And the binary number corresponding to the function module number corresponding to the third module information is used as the third digit of the third 8-bit binary number in the third IP address of the network interface, and the binary number corresponding to the network interface number corresponding to the third interface information The first 4 bits of the third 8-bit binary number in the third IP address of the network interface.
步骤S90,将生成的所述第三IP地址配置至对应的插入的所述功能模块的网络接口的IP地址配置表。Step S90: The generated third IP address is configured to an IP address configuration table of a network interface of the corresponding inserted functional module.
本实施例中,通过在检测到所述ATCA设备的ATCA板卡插入功能模块时,获取插入的所述功能模块所属ATCA板卡的第三卡槽信息、所述功能模块的第三模块信息及所述功能模块中的网络接口的第三接口信息,接着基于所述第三卡槽信息、第三模块信息及第三接口信息生成各个插入的所述功能模块中网络接口的第三IP地址,而后将生成的所述第三IP地址配置至对应的插入的所述功能模块的网络接口的IP地址配置表;实现了ATCA设备的ATCA板卡中插入的功能模块的网络接口的IP地址的自动分配,由于每一个网络接口对应的第三卡槽信息、第三模块信息及第三接口信息的唯一性,并且第三卡槽信息、第三模块信息及第三接口信息的组合与第二卡槽信息、第二模块信息及第二接口信息的组合及第一卡槽信息、第一模块信息及第一接口信息的组合均存在不同,使得通过网络接口对应的第三卡槽信息、第三模块信息及第三接口信息等物理位置信息生成网络接口对应的第三IP地址具有唯一性,因此能够避免出现IP地址重叠、冲突问题,进一步提高了为ATCA设备中各个网络接口分配IP地址的效率。In this embodiment, when the function module is inserted into the ATCA board of the ATCA device, the third card slot information of the inserted ATCA board of the function module, the third module information of the function module, and a third interface information of the network interface in the function module, and then generating, according to the third card slot information, the third module information, and the third interface information, a third IP address of the network interface in each of the inserted function modules, And then the generated third IP address is configured to the IP address configuration table of the network interface of the corresponding inserted functional module; and the IP address of the network interface of the function module inserted in the ATCA board of the ATCA device is automatically implemented. Assignment, because of the uniqueness of the third card slot information, the third module information, and the third interface information corresponding to each network interface, and the combination of the third card slot information, the third module information, and the third interface information, and the second card The combination of the slot information, the second module information, and the second interface information, and the combination of the first card slot information, the first module information, and the first interface information are different, so that the network is different. The third IP address corresponding to the physical location information generation network interface, such as the third card slot information, the third module information, and the third interface information, is unique, so that IP address overlap and conflict problems can be avoided, and the problem is further improved. The efficiency of assigning IP addresses to individual network interfaces in an ATCA device.
本发明进一步提供一种IP地址自动分配装置。参照图6,图6为本发明IP地址自动分配装置第一实施例的功能模块示意图。The invention further provides an automatic IP address allocation device. Referring to FIG. 6, FIG. 6 is a schematic diagram of functional modules of a first embodiment of an automatic IP address distribution apparatus according to the present invention.
在本实施例中,该IP地址自动分配装置应用于先进电信计算平台ATCA设备,该IP地址自动分配装置包括:In this embodiment, the IP address automatic distribution device is applied to an advanced telecommunication computing platform ATCA device, and the IP address automatic distribution device includes:
第一获取模块10,用于在ATCA设备初始化时,获取所述ATCA设备中ATCA板卡的第一卡槽信息、各个ATCA板卡中待配置IP地址的功能模块的第一模块信息及所述功能模块中的网络接口的第一接口信息;The first obtaining module 10 is configured to acquire, when the ATCA device is initialized, the first card slot information of the ATCA board in the ATCA device, the first module information of the function module of the ATCA board to be configured with the IP address, and the First interface information of the network interface in the function module;
第一生成模块20,用于基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址;The first generation module 20 is configured to generate a first IP address of each of the network interfaces based on the acquired first card slot information, the first module information, and the first interface information;
第一配置模块30,用于将生成的所述第一IP地址配置至对应的网络接口的IP地址配置表。The first configuration module 30 is configured to configure the generated first IP address to an IP address configuration table of a corresponding network interface.
本实施例中,通过在ATCA设备初始化时,第一获取模块10获取所述ATCA设备中ATCA板卡的第一卡槽信息、各个ATCA板卡中待配置IP地址的功能模块的第一模块信息及所述功能模块中的网络接口的第一接口信息,接着第一生成模块20基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址,而后第一配置模块30将生成的所述第一IP地址配置至对应的网络接口的IP地址配置表,实现了ATCA设备中各个网络接口的IP地址的自动分配,由于每一个网络接口对应的第一卡槽信息、第一模块信息及第一接口信息的唯一性,使得通过网络接口对应的第一卡槽信息、第一模块信息及第一接口信息等物理位置信息生成网络接口对应的第一IP地址具有唯一性,因此能够避免出现IP地址重叠、冲突问题,大大减少了手工配置IP地址的工作量,提高了为ATCA设备中各个网络接口分配IP地址的效率。In this embodiment, when the ATCA device is initialized, the first acquiring module 10 acquires the first card slot information of the ATCA board in the ATCA device, and the first module information of the function module of the ATCA board to be configured with the IP address. And the first interface information of the network interface in the function module, and then the first generation module 20 generates the first of each of the network interfaces based on the acquired first card slot information, the first module information, and the first interface information. An IP address, and then the first configuration module 30 configures the generated first IP address to an IP address configuration table of the corresponding network interface, thereby realizing automatic allocation of IP addresses of each network interface in the ATCA device, because each network interface The uniqueness of the first card slot information, the first module information, and the first interface information is such that the physical interface information corresponding to the first card slot information, the first module information, and the first interface information corresponding to the network interface is generated. The first IP address is unique, so it can avoid overlapping IP addresses and conflicts, greatly reducing the workload of manually configuring IP addresses and improving The efficiency of allocating an IP address for each network interface ATCA equipment.
基于第一实施例提出本发明IP地址自动分配装置的第二实施例,参照图7,在本实施例中,所述IP地址包括第一段8位二进制数、第二段8位二进制数、第三段8位二进制数及第四段8位二进制数,第一生成模块20包括:A second embodiment of the automatic IP address allocation apparatus of the present invention is proposed based on the first embodiment. Referring to FIG. 7, in the embodiment, the IP address includes a first 8-bit binary number and a second 8-bit binary number. The third segment 8-bit binary number and the fourth segment 8-bit binary number, the first generation module 20 includes:
第一生成单元21,用于基于预设网络号生成各个所述网络接口的第一IP地址中的第一段8位二进制数及第二段8位二进制数;The first generating unit 21 is configured to generate, according to the preset network number, a first segment 8-bit binary number and a second segment 8-bit binary number in the first IP address of each of the network interfaces;
第二生成单元22,用于基于所述第一卡槽信息生成各个所述网络接口的第一IP地址中第三段8位二进制数;a second generating unit 22, configured to generate a third 8-bit binary number of the first IP address of each of the network interfaces based on the first card slot information;
第三生成单元23,用于基于所述第一模块信息生成各个所述网络接口的第一IP地址中第四段8位二进制数前4位,并基于所述第一接口信息生成各个所述网络接口的第一IP地址中第四段8位二进制数后4位。a third generating unit 23, configured to generate, according to the first module information, the first four bits of the fourth 8-bit binary number in the first IP address of each of the network interfaces, and generate each of the foregoing according to the first interface information The fourth bit of the fourth 8-bit binary number in the first IP address of the network interface.
本实施例中,通过第一生成单元21基于预设网络号生成各个所述网络接口的第一IP地址中的第一段8位二进制数及第二段8位二进制数,而后第二生成单元22基于所述第一卡槽信息生成各个所述网络接口的第一IP地址中第三段8位二进制数,接着第三生成单元23基于所述第一模块信息生成各个所述网络接口的第一IP地址中第四段8位二进制数前4位,并基于所述第一接口信息生成各个所述网络接口的第一IP地址中第四段8位二进制数后4位,实现了根据预设网络号、第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址,进一步提高了为ATCA设备中各个网络接口分配IP地址的效率。In this embodiment, the first segment 8-bit binary number and the second segment 8-bit binary number in the first IP address of each of the network interfaces are generated by the first generating unit 21 based on the preset network number, and then the second generating unit 22 generating a third segment 8-bit binary number of the first IP address of each of the network interfaces based on the first card slot information, and then generating, by the third generating unit 23, each of the network interfaces based on the first module information The first 4 bits of the fourth 8-bit binary number in an IP address, and based on the first interface information, generate 4 bits of the fourth 8-bit binary number in the first IP address of each of the network interfaces, and implement the Setting the network number, the first card slot information, the first module information, and the first interface information to generate the first IP address of each of the network interfaces further improves the efficiency of allocating IP addresses for each network interface in the ATCA device.
基于第一实施例提出本发明IP地址自动分配装置的第三实施例,参照图8,在本实施例中,第一生成模块20包括:A third embodiment of the automatic IP address allocation apparatus of the present invention is proposed based on the first embodiment. Referring to FIG. 8, in the embodiment, the first generation module 20 includes:
获取单元24,用于获取所述ATCA设备的设备信息,基于所述设备信息生成网络号;The obtaining unit 24 is configured to acquire device information of the ATCA device, and generate a network number based on the device information.
第四生成单元25,用于基于所述网络号、所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址。The fourth generating unit 25 is configured to generate a first IP address of each of the network interfaces based on the network number, the first card slot information, the first module information, and the first interface information.
本实施例中,通过获取单元24获取所述ATCA设备的设备信息,基于所述设备信息生成网络号,接着第四生成单元25基于所述网络号、所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址,实现了根据设备信息、第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址,进一步保证了生成的第一IP地址的唯一性,进而避免出现IP地址重叠、冲突问题,进一步提高了为ATCA设备中各个网络接口分配IP地址的效率。In this embodiment, the device information of the ATCA device is obtained by the acquiring unit 24, and the network number is generated based on the device information, and then the fourth generating unit 25 is based on the network number, the first card slot information, and the first module. The information and the first interface information are used to generate a first IP address of each of the network interfaces, and the first IP address of each of the network interfaces is generated according to the device information, the first card slot information, the first module information, and the first interface information. Further, the uniqueness of the generated first IP address is further ensured, thereby avoiding IP address overlap and conflict, and further improving the efficiency of allocating IP addresses for each network interface in the ATCA device.
基于第一实施例提出本发明IP地址自动分配装置的第四实施例,参照图9,在本实施例中,IP地址自动分配装置还包括:The fourth embodiment of the automatic IP address distribution apparatus of the present invention is proposed based on the first embodiment. Referring to FIG. 9, in the embodiment, the automatic IP address distribution apparatus further includes:
第二获取模块40,用于在检测到所述ATCA设备中插入ATCA板卡时,获取插入的所述ATCA板卡的第二卡槽信息、所述ATCA板卡中待配置IP地址的功能模块的第二模块信息及所述功能模块中的网络接口的第二接口信息;The second obtaining module 40 is configured to acquire, when the ATCA board is inserted in the ATCA device, the second card slot information of the inserted ATCA board, and the function module of the ATCA board to be configured with an IP address. The second module information and the second interface information of the network interface in the function module;
第二生成模块50,用于基于所述第二卡槽信息、第二模块信息及第二接口信息生成插入的所述ATCA板卡中各个所述网络接口的第二IP地址;a second generating module 50, configured to generate, according to the second card slot information, the second module information, and the second interface information, a second IP address of each of the inserted network interfaces in the ATCA card;
第二配置模块60,用于将生成的所述第二IP地址配置至对应的插入的所述ATCA板卡中各个网络接口的IP地址配置表。The second configuration module 60 is configured to configure the generated second IP address to an IP address configuration table of each network interface in the corresponding inserted ATCA board.
本实施例中,通过在检测到所述ATCA设备中插入ATCA板卡时,第二获取模块40获取插入的所述ATCA板卡的第二卡槽信息、所述ATCA板卡中待配置IP地址的功能模块的第二模块信息及所述功能模块中的网络接口的第二接口信息,接着第二生成模块50基于所述第二卡槽信息、第二模块信息及第二接口信息生成插入的所述ATCA板卡中各个所述网络接口的第二IP地址,而后第二配置模块60将生成的所述第二IP地址配置至对应的插入的所述ATCA板卡中各个网络接口的IP地址配置表;实现了ATCA设备中插入的所述ATCA板卡中各个网络接口的IP地址的自动分配,由于每一个网络接口对应的第二卡槽信息、第二模块信息及第二接口信息的唯一性,并且第二卡槽信息、第二模块信息及第二接口信息的组合与第一卡槽信息、第一模块信息及第一接口信息的组合存在不同,使得通过网络接口对应的第二卡槽信息、第二模块信息及第二接口信息等物理位置信息生成网络接口对应的第二IP地址具有唯一性,因此能够避免出现IP地址重叠、冲突问题,进一步提高了为ATCA设备中各个网络接口分配IP地址的效率。In this embodiment, when the ATCA board is inserted into the ATCA device, the second obtaining module 40 acquires the second card slot information of the inserted ATCA board, and the IP address to be configured in the ATCA board. The second module information of the function module and the second interface information of the network interface in the function module, and then the second generation module 50 generates the inserted based on the second card slot information, the second module information, and the second interface information. a second IP address of each of the network interfaces in the ATCA board, and then the second configuration module 60 configures the generated second IP address to an IP address of each network interface in the corresponding inserted ATCA board The configuration table is configured to implement automatic allocation of IP addresses of the network interfaces in the ATCA board inserted in the ATCA device, because the second card slot information, the second module information, and the second interface information corresponding to each network interface are unique. And the combination of the second card slot information, the second module information, and the second interface information is different from the combination of the first card slot information, the first module information, and the first interface information, so that the network is connected through the network. The second IP address corresponding to the physical location information generation network interface, such as the second card slot information, the second module information, and the second interface information, is unique, so that IP address overlap and conflict problems can be avoided, and the ATCA is further improved. The efficiency of assigning IP addresses to each network interface in the device.
基于第一实施例提出本发明IP地址自动分配装置的第五实施例,参照图10,在本实施例中,IP地址自动分配装置还包括:The fifth embodiment of the automatic IP address distribution apparatus of the present invention is proposed based on the first embodiment. Referring to FIG. 10, in the embodiment, the automatic IP address distribution apparatus further includes:
第三获取模块70,用于在检测到所述ATCA设备的ATCA板卡插入功能模块时,获取插入的所述功能模块所属ATCA板卡的第三卡槽信息、所述功能模块的第三模块信息及所述功能模块中的网络接口的第三接口信息;The third obtaining module 70 is configured to: when detecting the ATCA board insertion function module of the ATCA device, acquire the third card slot information of the inserted ATCA board of the function module, and the third module of the function module Information and third interface information of the network interface in the function module;
第三生成模块80,用于基于所述第三卡槽信息、第三模块信息及第三接口信息生成各个插入的所述功能模块中网络接口的第三IP地址;The third generation module 80 is configured to generate, according to the third card slot information, the third module information, and the third interface information, a third IP address of each of the inserted function modules in the function module;
第三配置模块90,用于将生成的所述第三IP地址配置至对应的插入的所述功能模块的网络接口的IP地址配置表。The third configuration module 90 is configured to configure the generated third IP address to an IP address configuration table of a network interface of the corresponding inserted function module.
本实施例中,通过在检测到所述ATCA设备的ATCA板卡插入功能模块时,第三获取模块70获取插入的所述功能模块所属ATCA板卡的第三卡槽信息、所述功能模块的第三模块信息及所述功能模块中的网络接口的第三接口信息,接着第三生成模块80基于所述第三卡槽信息、第三模块信息及第三接口信息生成各个插入的所述功能模块中网络接口的第三IP地址,而后第三配置模块90将生成的所述第三IP地址配置至对应的插入的所述功能模块的网络接口的IP地址配置表;实现了ATCA设备的ATCA板卡中插入的功能模块的网络接口的IP地址的自动分配,由于每一个网络接口对应的第三卡槽信息、第三模块信息及第三接口信息的唯一性,并且第三卡槽信息、第三模块信息及第三接口信息的组合与第二卡槽信息、第二模块信息及第二接口信息的组合及第一卡槽信息、第一模块信息及第一接口信息的组合均存在不同,使得通过网络接口对应的第三卡槽信息、第三模块信息及第三接口信息等物理位置信息生成网络接口对应的第三IP地址具有唯一性,因此能够避免出现IP地址重叠、冲突问题,进一步提高了为ATCA设备中各个网络接口分配IP地址的效率。In this embodiment, when the function module is inserted into the ATCA board of the ATCA device, the third acquiring module 70 acquires the third card slot information of the inserted ATCA board of the function module, and the function module. The third module information and the third interface information of the network interface in the function module, and then the third generation module 80 generates the function of each insertion based on the third card slot information, the third module information, and the third interface information. a third IP address of the network interface in the module, and then the third configuration module 90 configures the generated third IP address to the IP address configuration table of the network interface of the corresponding inserted functional module; the ATCA of the ATCA device is implemented. The automatic allocation of the IP address of the network interface of the function module inserted in the card, the uniqueness of the third card slot information, the third module information and the third interface information corresponding to each network interface, and the third card slot information, a combination of the third module information and the third interface information, a combination of the second card slot information, the second module information, and the second interface information, and the first card slot information, the first module information, and The combination of the first interface information is different, so that the third IP address corresponding to the network interface is unique by the physical location information such as the third card slot information, the third module information, and the third interface information corresponding to the network interface, so that the third IP address is unique. Avoid IP address overlap and conflicts, and further improve the efficiency of assigning IP addresses to various network interfaces in ATCA devices.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.
Claims (16)
- 一种IP地址自动分配方法,其特征在于,应用于先进电信计算平台ATCA设备,所述IP地址自动分配方法包括以下步骤: An automatic IP address allocation method is characterized in that it is applied to an advanced telecommunications computing platform ATCA device, and the automatic IP address allocation method comprises the following steps:在ATCA设备初始化时,获取所述ATCA设备中ATCA板卡的第一卡槽信息、各个ATCA板卡中待配置IP地址的功能模块的第一模块信息及所述功能模块中的网络接口的第一接口信息;When the ATCA device is initialized, acquiring the first card slot information of the ATCA board in the ATCA device, the first module information of the function module of the ATCA board to be configured with the IP address, and the network interface in the function module An interface information;基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址;Generating, according to the obtained first card slot information, the first module information, and the first interface information, a first IP address of each of the network interfaces;将生成的所述第一IP地址配置至对应的网络接口的IP地址配置表。The generated first IP address is configured to an IP address configuration table of a corresponding network interface.
- 如权利要求1所述的IP地址自动分配方法,其特征在于,所述IP地址包括第一段8位二进制数、第二段8位二进制数、第三段8位二进制数及第四段8位二进制数,所述基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址的步骤包括:The method for automatically assigning an IP address according to claim 1, wherein said IP address comprises a first segment of 8-bit binary number, a second segment of 8-bit binary number, a third segment of 8-bit binary number, and a fourth segment 8 a bit binary number, the step of generating the first IP address of each of the network interfaces based on the obtained first card slot information, the first module information, and the first interface information includes:基于预设网络号生成各个所述网络接口的第一IP地址中的第一段8位二进制数及第二段8位二进制数;Generating, according to the preset network number, a first segment 8-bit binary number and a second segment 8-bit binary number in the first IP address of each of the network interfaces;基于所述第一卡槽信息生成各个所述网络接口的第一IP地址中第三段8位二进制数;Generating a third 8-bit binary number of the first IP address of each of the network interfaces based on the first card slot information;基于所述第一模块信息生成各个所述网络接口的第一IP地址中第四段8位二进制数前4位,并基于所述第一接口信息生成各个所述网络接口的第一IP地址中第四段8位二进制数后4位。Generating, according to the first module information, the first 4 bits of the fourth 8-bit binary number in the first IP address of each of the network interfaces, and generating the first IP address of each of the network interfaces based on the first interface information The fourth segment of the 8-bit binary number is 4 digits.
- 如权利要求1所述的IP地址自动分配方法,其特征在于,所述基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址的步骤包括:The method for automatically assigning an IP address according to claim 1, wherein the first IP address of each of the network interfaces is generated based on the acquired first card slot information, first module information, and first interface information. The steps include:获取所述ATCA设备的设备信息,基于所述设备信息生成网络号;Obtaining device information of the ATCA device, and generating a network number based on the device information;基于所述网络号、所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址。And generating a first IP address of each of the network interfaces based on the network number, the first card slot information, the first module information, and the first interface information.
- 如权利要求1所述的IP地址自动分配方法,其特征在于,所述将生成的所述第一IP地址存储至对应的网络接口的IP地址配置表的步骤之后,所述IP地址自动分配方法还包括:The method for automatically allocating an IP address according to claim 1, wherein after the step of storing the generated first IP address to an IP address configuration table of a corresponding network interface, the IP address automatic allocation method Also includes:在检测到所述ATCA设备中插入ATCA板卡时,获取插入的所述ATCA板卡的第二卡槽信息、所述ATCA板卡中待配置IP地址的功能模块的第二模块信息及所述功能模块中的网络接口的第二接口信息;Obtaining the second card slot information of the inserted ATCA board, the second module information of the function module of the ATCA board to be configured with an IP address, and the method, when the ATCA board is inserted into the ATCA device Second interface information of the network interface in the function module;基于所述第二卡槽信息、第二模块信息及第二接口信息生成插入的所述ATCA板卡中各个所述网络接口的第二IP地址;Generating, according to the second card slot information, the second module information, and the second interface information, a second IP address of each of the inserted network interfaces in the ATCA card;将生成的所述第二IP地址配置至对应的插入的所述ATCA板卡中各个网络接口的IP地址配置表。And configuring the generated second IP address to an IP address configuration table of each network interface in the corresponding inserted ATCA board.
- 如权利要求1所述的IP地址自动分配方法,其特征在于,所述将生成的所述第一IP地址存储至对应的网络接口的IP地址配置表的步骤之后,所述IP地址自动分配方法还包括:The method for automatically allocating an IP address according to claim 1, wherein after the step of storing the generated first IP address to an IP address configuration table of a corresponding network interface, the IP address automatic allocation method Also includes:在检测到所述ATCA设备的ATCA板卡插入功能模块时,获取插入的所述功能模块所属ATCA板卡的第三卡槽信息、所述功能模块的第三模块信息及所述功能模块中的网络接口的第三接口信息;Obtaining the third card slot information of the ATCA board to which the inserted function module belongs, the third module information of the function module, and the function module in the function module when the ATCA board insertion function module of the ATCA device is detected Third interface information of the network interface;基于所述第三卡槽信息、第三模块信息及第三接口信息生成各个插入的所述功能模块中网络接口的第三IP地址;Generating, according to the third card slot information, the third module information, and the third interface information, a third IP address of each of the inserted function modules in the function module;将生成的所述第三IP地址配置至对应的插入的所述功能模块的网络接口的IP地址配置表。The generated third IP address is configured to an IP address configuration table of a network interface of the corresponding inserted functional module.
- 如权利要求5所述的IP地址自动分配方法,其特征在于,所述IP地址包括第一段8位二进制数、第二段8位二进制数、第三段8位二进制数及第四段8位二进制数,所述基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址的步骤包括:The IP address automatic allocation method according to claim 5, wherein the IP address comprises a first segment of 8-bit binary number, a second segment of 8-bit binary number, a third segment of 8-bit binary number, and a fourth segment 8 a bit binary number, the step of generating the first IP address of each of the network interfaces based on the obtained first card slot information, the first module information, and the first interface information includes:基于预设网络号生成各个所述网络接口的第一IP地址中的第一段8位二进制数及第二段8位二进制数;Generating, according to the preset network number, a first segment 8-bit binary number and a second segment 8-bit binary number in the first IP address of each of the network interfaces;基于所述第一卡槽信息生成各个所述网络接口的第一IP地址中第三段8位二进制数;Generating a third 8-bit binary number of the first IP address of each of the network interfaces based on the first card slot information;基于所述第一模块信息生成各个所述网络接口的第一IP地址中第四段8位二进制数前4位,并基于所述第一接口信息生成各个所述网络接口的第一IP地址中第四段8位二进制数后4位。Generating, according to the first module information, the first 4 bits of the fourth 8-bit binary number in the first IP address of each of the network interfaces, and generating the first IP address of each of the network interfaces based on the first interface information The fourth segment of the 8-bit binary number is 4 digits.
- 如权利要求5所述的IP地址自动分配方法,其特征在于,所述基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址的步骤包括:The method for automatically assigning an IP address according to claim 5, wherein the first IP address of each of the network interfaces is generated based on the acquired first card slot information, first module information, and first interface information. The steps include:获取所述ATCA设备的设备信息,基于所述设备信息生成网络号;Obtaining device information of the ATCA device, and generating a network number based on the device information;基于所述网络号、所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址。And generating a first IP address of each of the network interfaces based on the network number, the first card slot information, the first module information, and the first interface information.
- 如权利要求5所述的IP地址自动分配方法,其特征在于,所述将生成的所述第一IP地址存储至对应的网络接口的IP地址配置表的步骤之后,所述IP地址自动分配方法还包括:The method for automatically allocating an IP address according to claim 5, wherein after the step of storing the generated first IP address to an IP address configuration table of a corresponding network interface, the IP address automatic allocation method Also includes:在检测到所述ATCA设备中插入ATCA板卡时,获取插入的所述ATCA板卡的第二卡槽信息、所述ATCA板卡中待配置IP地址的功能模块的第二模块信息及所述功能模块中的网络接口的第二接口信息;Obtaining the second card slot information of the inserted ATCA board, the second module information of the function module of the ATCA board to be configured with an IP address, and the method, when the ATCA board is inserted into the ATCA device Second interface information of the network interface in the function module;基于所述第二卡槽信息、第二模块信息及第二接口信息生成插入的所述ATCA板卡中各个所述网络接口的第二IP地址;Generating, according to the second card slot information, the second module information, and the second interface information, a second IP address of each of the inserted network interfaces in the ATCA card;将生成的所述第二IP地址配置至对应的插入的所述ATCA板卡中各个网络接口的IP地址配置表。And configuring the generated second IP address to an IP address configuration table of each network interface in the corresponding inserted ATCA board.
- 一种IP地址自动分配装置,其特征在于,应用于先进电信计算平台ATCA设备,所述IP地址自动分配装置包括:An IP address automatic distribution device is characterized in that it is applied to an advanced telecommunication computing platform ATCA device, and the IP address automatic distribution device includes:第一获取模块,用于在ATCA设备初始化时,获取所述ATCA设备中ATCA板卡的第一卡槽信息、各个ATCA板卡中待配置IP地址的功能模块的第一模块信息及所述功能模块中的网络接口的第一接口信息;a first acquiring module, configured to acquire, when the ATCA device is initialized, the first card slot information of the ATCA card in the ATCA device, the first module information of the function module of the ATCA card to be configured with an IP address, and the function First interface information of the network interface in the module;第一生成模块,用于基于获取的所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址;a first generation module, configured to generate a first IP address of each of the network interfaces based on the acquired first card slot information, first module information, and first interface information;第一配置模块,用于将生成的所述第一IP地址配置至对应的网络接口的IP地址配置表。The first configuration module is configured to configure the generated first IP address to an IP address configuration table of the corresponding network interface.
- 如权利要求9所述的IP地址自动分配装置,其特征在于,所述IP地址包括第一段8位二进制数、第二段8位二进制数、第三段8位二进制数及第四段8位二进制数,所述第一生成模块包括:The automatic IP address allocation apparatus according to claim 9, wherein said IP address comprises a first segment of 8-bit binary number, a second segment of 8-bit binary number, a third segment of 8-bit binary number, and a fourth segment 8 a bit binary number, the first generation module includes:第一生成单元,用于基于预设网络号生成各个所述网络接口的第一IP地址中的第一段8位二进制数及第二段8位二进制数;a first generating unit, configured to generate a first segment 8-bit binary number and a second segment 8-bit binary number in the first IP address of each of the network interfaces based on the preset network number;第二生成单元,用于基于所述第一卡槽信息生成各个所述网络接口的第一IP地址中第三段8位二进制数;a second generating unit, configured to generate a third 8-bit binary number of the first IP address of each of the network interfaces based on the first card slot information;第三生成单元,用于基于所述第一模块信息生成各个所述网络接口的第一IP地址中第四段8位二进制数前4位,并基于所述第一接口信息生成各个所述网络接口的第一IP地址中第四段8位二进制数后4位。a third generating unit, configured to generate, according to the first module information, the first four bits of the fourth 8-bit binary number in the first IP address of each of the network interfaces, and generate each of the networks based on the first interface information The 4th digit of the fourth 8-bit binary number in the first IP address of the interface.
- 如权利要求9所述的IP地址自动分配装置,其特征在于,所述第一生成模块包括:The device for automatically assigning an IP address according to claim 9, wherein the first generation module comprises:获取单元,用于获取所述ATCA设备的设备信息,基于所述设备信息生成网络号;An acquiring unit, configured to acquire device information of the ATCA device, and generate a network number based on the device information;第四生成单元,用于基于所述网络号、所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址。And a fourth generating unit, configured to generate a first IP address of each of the network interfaces based on the network number, the first card slot information, the first module information, and the first interface information.
- 如权利要求9所述的IP地址自动分配装置,其特征在于,所述IP地址自动分配装置还包括:The device for automatically assigning an IP address according to claim 9, wherein the automatic IP address distribution device further comprises:第二获取模块,用于在检测到所述ATCA设备中插入ATCA板卡时,获取插入的所述ATCA板卡的第二卡槽信息、所述ATCA板卡中待配置IP地址的功能模块的第二模块信息及所述功能模块中的网络接口的第二接口信息;a second acquiring module, configured to acquire, when the ATCA card is inserted in the ATCA device, the second card slot information of the inserted ATCA card, and the function module of the ATCA card to be configured with an IP address The second module information and the second interface information of the network interface in the function module;第二生成模块,用于基于所述第二卡槽信息、第二模块信息及第二接口信息生成插入的所述ATCA板卡中各个所述网络接口的第二IP地址;a second generating module, configured to generate, according to the second card slot information, the second module information, and the second interface information, a second IP address of each of the inserted network interfaces in the ATCA card;第二配置模块,用于将生成的所述第二IP地址配置至对应的插入的所述ATCA板卡中各个网络接口的IP地址配置表。And a second configuration module, configured to configure the generated second IP address to an IP address configuration table of each network interface in the corresponding inserted ATCA board.
- 如权利要求9所述的IP地址自动分配装置,其特征在于,所述IP地址自动分配装置还包括:The device for automatically assigning an IP address according to claim 9, wherein the automatic IP address distribution device further comprises:第三获取模块,用于在检测到所述ATCA设备的ATCA板卡插入功能模块时,获取插入的所述功能模块所属ATCA板卡的第三卡槽信息、所述功能模块的第三模块信息及所述功能模块中的网络接口的第三接口信息;a third acquiring module, configured to acquire, when the ATCA board is inserted into the function module of the ATCA device, the third card slot information of the inserted ATCA board of the function module, and the third module information of the function module And third interface information of the network interface in the function module;第三生成模块,用于基于所述第三卡槽信息、第三模块信息及第三接口信息生成各个插入的所述功能模块中网络接口的第三IP地址;a third generation module, configured to generate, according to the third card slot information, the third module information, and the third interface information, a third IP address of each of the inserted function modules in the function module;第三配置模块,用于将生成的所述第三IP地址配置至对应的插入的所述功能模块的网络接口的IP地址配置表。And a third configuration module, configured to configure the generated third IP address to an IP address configuration table of a network interface of the corresponding inserted function module.
- 如权利要求13所述的IP地址自动分配装置,其特征在于,所述IP地址包括第一段8位二进制数、第二段8位二进制数、第三段8位二进制数及第四段8位二进制数,所述第一生成模块包括:The IP address automatic distribution apparatus according to claim 13, wherein said IP address comprises a first segment of 8-bit binary number, a second segment of 8-bit binary number, a third segment of 8-bit binary number, and a fourth segment 8 a bit binary number, the first generation module includes:第一生成单元,用于基于预设网络号生成各个所述网络接口的第一IP地址中的第一段8位二进制数及第二段8位二进制数;a first generating unit, configured to generate a first segment 8-bit binary number and a second segment 8-bit binary number in the first IP address of each of the network interfaces based on the preset network number;第二生成单元,用于基于所述第一卡槽信息生成各个所述网络接口的第一IP地址中第三段8位二进制数;a second generating unit, configured to generate a third 8-bit binary number of the first IP address of each of the network interfaces based on the first card slot information;第三生成单元,用于基于所述第一模块信息生成各个所述网络接口的第一IP地址中第四段8位二进制数前4位,并基于所述第一接口信息生成各个所述网络接口的第一IP地址中第四段8位二进制数后4位。a third generating unit, configured to generate, according to the first module information, the first four bits of the fourth 8-bit binary number in the first IP address of each of the network interfaces, and generate each of the networks based on the first interface information The 4th digit of the fourth 8-bit binary number in the first IP address of the interface.
- 如权利要求13所述的IP地址自动分配装置,其特征在于,所述第一生成模块包括:The apparatus for automatically assigning an IP address according to claim 13, wherein the first generation module comprises:获取单元,用于获取所述ATCA设备的设备信息,基于所述设备信息生成网络号;An acquiring unit, configured to acquire device information of the ATCA device, and generate a network number based on the device information;第四生成单元,用于基于所述网络号、所述第一卡槽信息、第一模块信息及第一接口信息生成各个所述网络接口的第一IP地址。And a fourth generating unit, configured to generate a first IP address of each of the network interfaces based on the network number, the first card slot information, the first module information, and the first interface information.
- 如权利要求13所述的IP地址自动分配装置,其特征在于,所述IP地址自动分配装置还包括:The device for automatically assigning an IP address according to claim 13, wherein the automatic IP address distribution device further comprises:第二获取模块,用于在检测到所述ATCA设备中插入ATCA板卡时,获取插入的所述ATCA板卡的第二卡槽信息、所述ATCA板卡中待配置IP地址的功能模块的第二模块信息及所述功能模块中的网络接口的第二接口信息;a second acquiring module, configured to acquire, when the ATCA card is inserted in the ATCA device, the second card slot information of the inserted ATCA card, and the function module of the ATCA card to be configured with an IP address The second module information and the second interface information of the network interface in the function module;第二生成模块,用于基于所述第二卡槽信息、第二模块信息及第二接口信息生成插入的所述ATCA板卡中各个所述网络接口的第二IP地址;a second generating module, configured to generate, according to the second card slot information, the second module information, and the second interface information, a second IP address of each of the inserted network interfaces in the ATCA card;第二配置模块,用于将生成的所述第二IP地址配置至对应的插入的所述ATCA板卡中各个网络接口的IP地址配置表。And a second configuration module, configured to configure the generated second IP address to an IP address configuration table of each network interface in the corresponding inserted ATCA board.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610553916.9 | 2016-07-13 | ||
CN201610553916.9A CN106210169A (en) | 2016-07-13 | 2016-07-13 | IP address automatic allocating method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018010157A1 true WO2018010157A1 (en) | 2018-01-18 |
Family
ID=57475115
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/090099 WO2018010157A1 (en) | 2016-07-13 | 2016-07-15 | Method and device for automatic allocation of ip addresses |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106210169A (en) |
WO (1) | WO2018010157A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117499371A (en) * | 2023-10-27 | 2024-02-02 | 众信方智(苏州)智能技术有限公司 | A method and system for automatically assigning board IDs based on slot locations |
CN118672377A (en) * | 2024-08-20 | 2024-09-20 | 西安麦格米特电气有限公司 | Power supply system management method, power supply system and computer readable storage medium |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112380082A (en) * | 2020-12-07 | 2021-02-19 | 深圳市城市交通规划设计研究中心股份有限公司 | Board card compatibility management system and method based on networking test service node |
CN115955465A (en) * | 2023-03-14 | 2023-04-11 | 苏州清研精准汽车科技有限公司 | Method for automatically writing communication address and cascade equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070127365A1 (en) * | 2005-12-07 | 2007-06-07 | Yong Tae | Method for implementing redundant structure of ATCA (advanced telecom computing architecture) system via base interface and the ATCA system for use in the same |
CN102273178A (en) * | 2011-05-20 | 2011-12-07 | 华为技术有限公司 | Method, platform device and system for setting service single board address |
CN103442095A (en) * | 2013-08-16 | 2013-12-11 | 京信通信系统(中国)有限公司 | Method and system for obtaining addresses of daughter cards on single board |
CN105119739A (en) * | 2015-07-20 | 2015-12-02 | 山东超越数控电子有限公司 | Multi-blade server based automatic network configuration method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101707636B (en) * | 2009-11-20 | 2013-10-16 | 中兴通讯股份有限公司 | IP address allocation method and device for single board of BBU of base station |
US9306901B2 (en) * | 2011-09-26 | 2016-04-05 | Mitsubishi Electric Corporation | IP address distribution system and IP address distribution method |
CN104917635A (en) * | 2015-05-26 | 2015-09-16 | 浪潮电子信息产业股份有限公司 | Data center resource IP address and corresponding physical position statistical method |
-
2016
- 2016-07-13 CN CN201610553916.9A patent/CN106210169A/en active Pending
- 2016-07-15 WO PCT/CN2016/090099 patent/WO2018010157A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070127365A1 (en) * | 2005-12-07 | 2007-06-07 | Yong Tae | Method for implementing redundant structure of ATCA (advanced telecom computing architecture) system via base interface and the ATCA system for use in the same |
CN102273178A (en) * | 2011-05-20 | 2011-12-07 | 华为技术有限公司 | Method, platform device and system for setting service single board address |
CN103442095A (en) * | 2013-08-16 | 2013-12-11 | 京信通信系统(中国)有限公司 | Method and system for obtaining addresses of daughter cards on single board |
CN105119739A (en) * | 2015-07-20 | 2015-12-02 | 山东超越数控电子有限公司 | Multi-blade server based automatic network configuration method |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117499371A (en) * | 2023-10-27 | 2024-02-02 | 众信方智(苏州)智能技术有限公司 | A method and system for automatically assigning board IDs based on slot locations |
CN118672377A (en) * | 2024-08-20 | 2024-09-20 | 西安麦格米特电气有限公司 | Power supply system management method, power supply system and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106210169A (en) | 2016-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018010157A1 (en) | Method and device for automatic allocation of ip addresses | |
WO2019148623A1 (en) | Method capable of automatically assigning device communication address code, circuit breaker, and storage medium | |
WO2013189193A1 (en) | Method and system for automatically configuring parameters of mobile terminal with android system | |
WO2015016627A1 (en) | Method and device for connecting single ap device among multiple ap devices on same network to terminal | |
WO2017171519A1 (en) | Method and apparatus for transmitting control channel and data channel in v2x communication | |
WO2014032262A1 (en) | Implementation method and system for migrating application among platforms<0} | |
WO2015157942A1 (en) | Device and method for accessing wireless network | |
WO2015020471A1 (en) | Method and apparatus for distributing data in hybrid cloud environment | |
WO2015135443A1 (en) | Method and apparatus for simulating sound in virtual scenario, and terminal | |
WO2020224247A1 (en) | Blockchain–based data provenance method, apparatus and device, and readable storage medium | |
WO2019205272A1 (en) | Virtual machine service providing method, device and equipment and computer readable storage medium | |
WO2016080595A1 (en) | Method for providing multi number service | |
WO2019140802A1 (en) | Authorization method and system for service handling on self-service banking terminal, and readable storage medium | |
WO2018076840A1 (en) | Data sharing method, device, storage medium and server | |
WO2017078359A1 (en) | Electronic apparatus, remote control apparatus, contorl method thereof, and electronic system | |
WO2017067375A1 (en) | Video background configuration method and terminal device | |
WO2018201774A1 (en) | Data approval method, apparatus, device, and computer readable storage medium | |
WO2017036204A1 (en) | Focus positioning method and device for application switching | |
WO2017219636A1 (en) | Data exchange method, cloud server, and smart terminal | |
WO2017206867A1 (en) | Sensor shutdown method and apparatus, storage medium, and electronic device | |
WO2020206885A1 (en) | Unlocking method and apparatus | |
WO2016021810A1 (en) | Stamper, and terminal and operation method thereof | |
WO2019132235A1 (en) | Memory apparatus and data processing method thereof | |
WO2019019341A1 (en) | File storage method, terminal and computer readable storage medium | |
WO2017067282A1 (en) | Fingerprint information usage method, apparatus, and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16908483 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16908483 Country of ref document: EP Kind code of ref document: A1 |