Method for implementing two-wire access through virtual machine with single network card

A virtual machine and virtual network interface technology, which is applied in the field of dual-line access to a virtual machine with a single network card, can solve the problems of high cost, increase the difficulty of maintenance work for application managers, increase the workload of virtual machine managers, etc., and achieve saving Effects of cost and workload reduction

Active Publication Date: 2015-03-11
G CLOUD TECH
View PDF5 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The technical problem solved by the present invention is to provide a method for a virtual machine with a single network card to realize two-line access, which solves the problem that the telecommunications network and the Netcom network cannot be well interconnect

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for implementing two-wire access through virtual machine with single network card
  • Method for implementing two-wire access through virtual machine with single network card
  • Method for implementing two-wire access through virtual machine with single network card

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] See attached figure 1 , 2 As shown, the present invention first: configure the operating system kernel parameters of the host computer, and set it to allow IP forwarding. The specific configuration is as follows:

[0026] Configure the / etc / sysctl.conf file:

[0027] net.ipv4.ip_forward=1

[0028] After configuration, execute the sysctl-p command to take effect immediately

[0029] Step 2: Configure two network cards in the host machine, one network card is bridged to the bridge br1, br1 is configured with a private IP, and a virtual machine is created with br1; the other network card is connected to the switch of the external network, and bridged to br0, but br0 No IP is configured, which is used to assign the public IP of the virtual machine;

[0030] Step 3: After creating the virtual machine, assign it a private IP. To set the intranet IP of the virtual machine, a private IP and a MAC address are bound and stored in the DNSmasq configuration file. The DNSmasq ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to the field of cloud computing technologies, in particular to a method for implementing two-wire access through a virtual machine with a single network card. The method comprises the following steps that firstly, kernel parameters of an operating system are configured in a host machine and IP (Internet Protocol) forwarding is allowed; secondly, two network cards are configured in the host machine, one network card is in bridge connection with a network bridge br1 and is provided with a private IP for creating the virtual machine; thirdly, the other network card is connected to a switch of an outer network and is in bridge connection with br0 for distributing a public IP of the virtual machine, and the IP is not configured; fourthly, after the virtual machine is created successfully, one private IP is distributed to the virtual machine; fifthly, when the virtual machine needs two-wire access, a pair of public IPs is configured on the network bridge br0, a virtual network interface of the br0 is marked through id of the virtual machine, and the pair of public IPs is respectively mapped to the private IP of the virtual machine by utilizing an NAT (Network Address Translation) mapping rule; lastly, when the two-wire access is not needed, the NAT mapping rule corresponding to the virtual machine is deleted. According to the method, access of a two-wire network of the virtual machine is implemented under the environment of the single network card, and the method can be used for network access of the virtual machine.

Description

technical field [0001] The invention relates to the technical field of cloud computing, in particular to a method for realizing dual-line access of a virtual machine with a single network card. Background technique [0002] In China, it is a real problem that the telecommunications network and Netcom network cannot be well interconnected, and the cost of setting up a mirror server is relatively high. Therefore, usually the host will use a two-line access method to implement Dual-line access generally adopts dual-network card and double-bridge mode. The dual-line access achieved by this method has the following disadvantages: [0003] 1. The two network cards installed on the host are used on the virtual network, and the third network card must be installed for internal management, which will increase the hardware cost of the cloud platform; [0004] 2. The data forwarding of the two network cards of the virtual machine needs to be managed by the user of the virtual machine ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/455
Inventor 莫佩红杨松莫展鹏季统凯
Owner G CLOUD TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products