CN103475526A - IP setting and detecting method supporting multi-VLAN virtual machine - Google Patents
IP setting and detecting method supporting multi-VLAN virtual machine Download PDFInfo
- Publication number
- CN103475526A CN103475526A CN2013104294777A CN201310429477A CN103475526A CN 103475526 A CN103475526 A CN 103475526A CN 2013104294777 A CN2013104294777 A CN 2013104294777A CN 201310429477 A CN201310429477 A CN 201310429477A CN 103475526 A CN103475526 A CN 103475526A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- dnsmasq
- detection method
- host
- file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to the field of Cloud computing, in particular to an IP setting and detecting method supporting a multi-VLAN virtual machine. According to the method, firstly, environment of the virtual machine and a host machine is correctly allocated; then on the host machine, a virtual machine IP configuration file is prepared, an IP setting callback function is programmed, an operation log file is assigned, and network bridges corresponding to all VLANs on the host machine are obtained; then a DNSmasq monitoring service process is operated for each VLAN; virtual machine IP information is managed through sending a signal to the DNSmasq monitoring service processes; finally, the log file assigned by the callback function is read to verify whether IP management is successful. The method solves the complex problems that network allocation and detection of the virtual machine is long in time, large in load and difficult to manage, can be applied to IP allocation and detection of the virtual machine in the multi-VLAN environment, and can also be used in a non-VLAN environment.
Description
Technical field
The present invention relates to the cloud computing field, particularly a kind of IP setting and detection method of supporting the virtual machine of multi-VLAN.
Background technology
Under cloud computing environment, virtual machine need to carry out correct network configuration by outside, connected or externally to provide service, cloud computing management software also to need regularly to detect the service condition with the statistics virtual network.Configuration and the address detected of virtual machine network have two kinds of methods at present.
The first is that the agent software that does not rely on network is installed in virtual machine, such as the virtual serial port instrument, by agent software, is called the command set of VME operating system and is obtained network configuration and turn back to the cloud computing management software.This method has following problem: 1, need to be in virtual machine installation agent software, the expense when operation agent software can additionally increase the virtual machine operation; 2, the cloud computing management software need to call different orders according to operating system, and method does not have versatility;
The second is IP and the MAC Address that arp-scan tool scans all-network main frame is installed in host, and the address that obtains virtual machine from scanning information, this method has following problem: the information that 1, in the information of scanning, comprises the all-network main frame, comprise and need to be filtered physical machine and virtual machine in addition; 2, only comprise IP address and MAC Address in the information of scanning, the information such as mask, gateway, dns can't obtain; 3, this method is not supported network is configured.
Summary of the invention
The technical problem that the present invention solves is to provide a kind of and supports the IP of the virtual machine of multi-VLAN to arrange and detection method, has solved in the cloud computing field in multi-VLAN environment and non-vlan environment the virtual machine network configuration and has detected of long duration, the challenges such as load large, unmanageable that exist.
The technical scheme that the present invention solves the problems of the technologies described above is:
Comprise the steps:
Step 1: guarantee after virtual machine activation that virtual machine internal environment and virtual machine place host machine system environment correctly configure;
Step 2: the configuration file that is ready to virtual machine IP planning on host;
Step 3: the readjustment script when writing IP and arranging, and specify the script operation journal file;
Step 4: obtain above host the bridge information that each available VLAN is corresponding;
Step 5: according to ready IP planning and configuration file, IP, readjustment script and bridge corresponding to multi-VLAN are set, be a DNSmasq monitor process of each bridge operation on host;
Step 6: revise IP planning and configuration file, to DNSmasq monitoring service process transmitted signal, carry out the information management of virtual machine IP network;
Step 7: read readjustment script operation daily record and verified.
The correct configuration of described assurance virtual machine internal environment refers to and guarantees that the inner network interface card of virtual machine is automatic acquisition, guarantees that dummy machine system time and host machine system time are consistent;
Described assurance virtual machine place host machine system environment correctly mainly refers to and guarantees the correct Dynamic Host Configuration Protocol server program DNSmasq of lightweight and the environment that its operation relies on installed on host.
Described virtual machine IP planning and configuration file refer to recorded remain to be arranged the text of " mac address, IP value, virtual machine network name " information of the virtual machine of IP.
Described readjustment script refers to virtual machine is carried out to the python script called after the IP management feedback, specified the preservation file of Operation Log in script.
After the DNSmasq service processes starts, the keeper can pass through to revise virtual machine IP information with the form to this service processes transmitted signal, and can automatically process number be saved in the file of appointment.
Described checking be point to DNSmasq process transmitted signal after, can by the journal file that reads the call back function appointment check signal send after whether successful process virtual machine IP retouching operation
Method of the present invention, can be without installation agent software, and can the synchronization gain mask, the information such as gateway, dns and without being filtered in addition.Solved in the cloud computing field in multi-VLAN environment and non-vlan environment the virtual machine network configuration and detected of long duration, the challenges such as load large, unmanageable that exist.
The accompanying drawing explanation
Below in conjunction with accompanying drawing, the present invention is further described:
Accompanying drawing is flow chart of the present invention.
Embodiment
Please refer to accompanying drawing, the network configuration of the virtual machine of the support multi-VLAN that the present invention proposes and address detection method come for the local distributing IP of host address with DNSmasq.
DNSmasq be one small and exquisite and be advantageously used in configuring the instrument of DNS and DHCP, be applicable to mininet, it provides DNS function and selectable DHCP function.It serves those domain names applicable in this locality.Dynamic Host Configuration Protocol server and dns server combination, and the address that allows DHCP to distribute can normally be resolved in DNS, and address and related command that these DHCP distribute can be configured in every main frame, also can be configured in a nucleus equipment (such as router), DNSmasq supports two kinds of DHCP configuration modes of Static and dynamic.
Configuration host and dummy machine system environment, at first DNSmasq program dnsmasq-2.48-13.e16.x86_64 is installed on host, starting virtual machine and the inner network interface card of virtual machine is set is automatic acquisition IP, configuring virtual machine built-in system time and host machine system time consistency.
Prepare virtual machine IP configuration file/etc/network.conf, form and theing contents are as follows:
52:54:00:25:8c:16,test-xp6,192.168.6.243
52:54:00:f5:80:11,test5,192.168.6.250
52:54:00:f5:79:33,ubuntu,192.168.6.251
Prepare callback script (adjusting back script), by following python script be saved in the NC node /mnt/damon/update2db.py, the contents are as follows:
Suppose that the bridge that under the host current environment, some VLAN are corresponding is br0, carry out as issue orders as the br0 bridge starts DNSmasq monitoring service process, the DNSmasq service processes is according to IP configuration file management virtual machine IP:
#/usr/sbin/dnsmasq--strict-order--bind-interfaces--conf-file=--domain=local--pid-file=/var/run/test.pid--listen-address=192.168.6.23--interface?br0--except-interface=lo--dhcp-range=192.168.6.1,static,120s--dhcp-lease-max=256--dhcp-hostsfile=/etc/network.conf--dhcp-script=/mnt/damon/update2db.py--leasefile-ro
Annotate:--pid-file=/var/run/test.pid//will order in the be saved in/var/run/test.pid of dnsmasq process ID started
--what listen-address=192.168.6.23--interface br0//appointment was monitored is the br0 interface
--dhcp-range=192.168.6.1, static, 120s--dhcp-lease-max=256//generally specify gateway to get final product
--dhcp-hostsfile=/etc/network.conf//prior artificial virtual machine IP that will need setting and mac address configuration thereof are in this file.
Revise virtual machine IP planning and configuration file/etc/network.conf, and carry out planning again and the management of virtual machine IP to DNSmasq service processes transmitted signal.
Cat/var/run/test.pid obtains DNSmasq service processes number, is assumed to be 16060, fill order kill-116060 transmitted signal then, and the DNSmasq service processes can read IP planning and configuration file modification virtual machine IP information after receiving signal again.
Read call back function journal file/home/zyk/db.info the result:
add?52:54:00:25:8c:16192.168.6.249
del?52:54:00:25:8c:16192.168.6.249
add?52:54:00:25:8c:16192.168.6.242
del?52:54:00:25:8c:16192.168.6.242
add?52:54:00:25:8c:16192.168.6.242
del?52:54:00:25:8c:16192.168.6.242
add?52:54:00:25:8c:1610.0.3.22
del?52:54:00:25:8c:1610.0.3.22
add?52:54:00:25:8c:16.10.0.3.33?。
Claims (10)
1. support the IP of the virtual machine of multi-VLAN to arrange and detection method for one kind, it is characterized in that:
Comprise the steps:
Step 1: guarantee after virtual machine activation that virtual machine internal environment and virtual machine place host machine system environment correctly configure;
Step 2: the configuration file that is ready to virtual machine IP planning on host;
Step 3: the readjustment script when writing IP and arranging, and specify the script operation journal file;
Step 4: obtain above host the bridge information that each available VLAN is corresponding;
Step 5: according to ready IP planning and configuration file, IP, readjustment script and bridge corresponding to multi-VLAN are set, be a DNSmasq monitor process of each bridge operation on host;
Step 6: revise IP planning and configuration file, to DNSmasq monitoring service process transmitted signal, carry out the information management of virtual machine IP network;
Step 7: read readjustment script operation daily record and verified.
2. IP according to claim 1 arranges and detection method, it is characterized in that: the correct configuration of described assurance virtual machine internal environment refers to and guarantees that the inner network interface card of virtual machine is automatic acquisition, guarantees that dummy machine system time and host machine system time are consistent;
Described assurance virtual machine place host machine system environment correctly mainly refers to and guarantees the correct Dynamic Host Configuration Protocol server program DNSmasq of lightweight and the environment that its operation relies on installed on host.
3. IP according to claim 1 arranges and detection method, it is characterized in that: described virtual machine IP planning and configuration file refers to the text of " mac address, IP value, virtual machine network name " information of the virtual machine that has recorded remain to be arranged IP.
4. IP according to claim 2 arranges and detection method, it is characterized in that: described virtual machine IP planning and configuration file refers to the text of " mac address, IP value, virtual machine network name " information of the virtual machine that has recorded remain to be arranged IP.
5. according to the described IP of claim 1 to 4 any one, arrange and detection method, it is characterized in that: described readjustment script refers to virtual machine is carried out to the python script called after the IP management feedback, specified the preservation file of Operation Log in script.
6. according to the described IP of claim 1 to 4 any one, arrange and detection method, it is characterized in that: after the DNSmasq service processes starts, the keeper can pass through to revise virtual machine IP information with the form to this service processes transmitted signal, and can automatically process number be saved in the file of appointment.
7. IP according to claim 5 arranges and detection method, it is characterized in that: after the DNSmasq service processes starts, the keeper can pass through to revise virtual machine IP information with the form to this service processes transmitted signal, and can automatically process number be saved in the file of appointment.
8. according to claim, ask the described IP of 1 to 4 any one to arrange and detection method, it is characterized in that: described checking be point to DNSmasq process transmitted signal after, can by the journal file that reads the call back function appointment check signal send after whether successful process virtual machine IP retouching operation.
9. according to claim, ask 5 described IP to arrange and detection method, it is characterized in that: described checking be point to DNSmasq process transmitted signal after, can by the journal file that reads the call back function appointment check signal send after whether successful process virtual machine IP retouching operation.
10. according to claim, ask 7 described IP to arrange and detection method, it is characterized in that: described checking be point to DNSmasq process transmitted signal after, can by the journal file that reads the call back function appointment check signal send after whether successful process virtual machine IP retouching operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013104294777A CN103475526A (en) | 2013-09-18 | 2013-09-18 | IP setting and detecting method supporting multi-VLAN virtual machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013104294777A CN103475526A (en) | 2013-09-18 | 2013-09-18 | IP setting and detecting method supporting multi-VLAN virtual machine |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103475526A true CN103475526A (en) | 2013-12-25 |
Family
ID=49800236
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013104294777A Pending CN103475526A (en) | 2013-09-18 | 2013-09-18 | IP setting and detecting method supporting multi-VLAN virtual machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103475526A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103888316A (en) * | 2014-03-28 | 2014-06-25 | 宋磊 | Automatic monitoring method of computer network with multiple network segments and multiple VLANs |
CN105573817A (en) * | 2015-12-11 | 2016-05-11 | 北京奇虎科技有限公司 | Virtual input control method, device and system |
CN106781122A (en) * | 2016-11-29 | 2017-05-31 | 山东浪潮商用***有限公司 | A kind of tax control Method of printing and all-in-one with routing function |
CN106899444A (en) * | 2015-12-21 | 2017-06-27 | 北京奇虎科技有限公司 | A kind of end-probing method and device for many LANs |
CN103747115B (en) * | 2013-12-30 | 2017-08-01 | 武汉邮电科学研究院 | Virtual machine IP address based on Microsoft Loopback Adapter finds method |
CN107332945A (en) * | 2017-07-02 | 2017-11-07 | 郑州云海信息技术有限公司 | A kind of virtual machine IP address acquisition methods and device |
CN108156262A (en) * | 2018-02-13 | 2018-06-12 | 中国联合网络通信集团有限公司 | A kind of method and device for the validity for checking DNS configuration files |
CN109218462A (en) * | 2018-09-14 | 2019-01-15 | 山东浪潮云投信息科技有限公司 | A kind of IP distribution method of cloud data center physical host |
CN109656687A (en) * | 2018-12-21 | 2019-04-19 | 合肥时代智慧高新投资管理有限公司 | A kind of host to client computer information transferring method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7706267B2 (en) * | 2007-03-06 | 2010-04-27 | Hewlett-Packard Development Company, L.P. | Network service monitoring |
CN102710814A (en) * | 2012-06-21 | 2012-10-03 | 奇智软件(北京)有限公司 | Method and device for controlling Internet protocol (IP) address of virtual machine |
CN103152256A (en) * | 2013-02-22 | 2013-06-12 | 浪潮电子信息产业股份有限公司 | Virtual routing network design method based on cloud computing data center |
-
2013
- 2013-09-18 CN CN2013104294777A patent/CN103475526A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7706267B2 (en) * | 2007-03-06 | 2010-04-27 | Hewlett-Packard Development Company, L.P. | Network service monitoring |
CN102710814A (en) * | 2012-06-21 | 2012-10-03 | 奇智软件(北京)有限公司 | Method and device for controlling Internet protocol (IP) address of virtual machine |
CN103152256A (en) * | 2013-02-22 | 2013-06-12 | 浪潮电子信息产业股份有限公司 | Virtual routing network design method based on cloud computing data center |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103747115B (en) * | 2013-12-30 | 2017-08-01 | 武汉邮电科学研究院 | Virtual machine IP address based on Microsoft Loopback Adapter finds method |
CN103888316A (en) * | 2014-03-28 | 2014-06-25 | 宋磊 | Automatic monitoring method of computer network with multiple network segments and multiple VLANs |
CN105573817A (en) * | 2015-12-11 | 2016-05-11 | 北京奇虎科技有限公司 | Virtual input control method, device and system |
CN105573817B (en) * | 2015-12-11 | 2019-02-12 | 北京奇虎科技有限公司 | The method, apparatus and system of virtual input control |
CN106899444A (en) * | 2015-12-21 | 2017-06-27 | 北京奇虎科技有限公司 | A kind of end-probing method and device for many LANs |
CN106781122A (en) * | 2016-11-29 | 2017-05-31 | 山东浪潮商用***有限公司 | A kind of tax control Method of printing and all-in-one with routing function |
CN107332945A (en) * | 2017-07-02 | 2017-11-07 | 郑州云海信息技术有限公司 | A kind of virtual machine IP address acquisition methods and device |
CN108156262A (en) * | 2018-02-13 | 2018-06-12 | 中国联合网络通信集团有限公司 | A kind of method and device for the validity for checking DNS configuration files |
CN109218462A (en) * | 2018-09-14 | 2019-01-15 | 山东浪潮云投信息科技有限公司 | A kind of IP distribution method of cloud data center physical host |
CN109218462B (en) * | 2018-09-14 | 2022-06-10 | 浪潮云信息技术股份公司 | IP distribution method of physical host of cloud data center |
CN109656687A (en) * | 2018-12-21 | 2019-04-19 | 合肥时代智慧高新投资管理有限公司 | A kind of host to client computer information transferring method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103475526A (en) | IP setting and detecting method supporting multi-VLAN virtual machine | |
CN101141422B (en) | Method and system to access family gateway and family gateway | |
CN105703938B (en) | Equipment configuration method, configuration device and management equipment | |
CN110879712B (en) | Cloud data center physical host installation method and related device | |
CN106533753A (en) | Role configuration method of distributed system and role configuration device | |
CN109284140B (en) | Configuration method and related equipment | |
US20150026322A1 (en) | Configuring a network device | |
TWI638553B (en) | Method for detecting internet protocol address and media access control address | |
CN105117263B (en) | A kind of unix environment software system updating method | |
CN102984015B (en) | A kind of gateway device identifies the method for access device type and Optimized Service automatically | |
CN101369933A (en) | Automatic test method and system | |
CN103067445A (en) | Method and device of software upgrading of distributed system | |
CN103905232A (en) | Virtual-machine management system and method | |
CN107623598A (en) | A kind of method of server examining system automatically dispose | |
CN106708573A (en) | System and method used for automatic installation of Hadoop cluster | |
CN109446036A (en) | A method of novel maintenance is carried out by webpage | |
CN105653408A (en) | Test method for POWER CYCLE startup and shutdown based on BMC IPMITOOL command single-node batch control | |
CN108040131A (en) | Method for automatically configuring network port address of node management module by whole cabinet server | |
CN104618474A (en) | Equipment information storing method and device | |
US9949046B2 (en) | Automating repairs to audio systems | |
CN105373477B (en) | Capacity testing method | |
CN104092590A (en) | Creation method and system for testing environment | |
CN112040027B (en) | Data processing method and device, electronic equipment and storage medium | |
US20050021310A1 (en) | System for testing network devices | |
CN113535571A (en) | Method, device, equipment and storage medium for testing microservice based on sandbox |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20131225 |
|
RJ01 | Rejection of invention patent application after publication |