Multi-Nic bridging transformation of VMware in Linux

Source: Internet
Author: User
Article title: Multi-Nic bridging transformation for VMware in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

VMware, the most famous virtual machine software, doesn't anyone know? Of course, using virtual machine software in Linux does not necessarily require VMWare. Xen is also a very good choice. many evaluations suggest that XEN is superior to VMware. unfortunately, Xen does not support Windows and other operating systems.

In VMware, the customer's operating system (Guest operating system) supports the following network connection methods: Bridged network and NAT network ), host only and custom mode.

The bridging method is equivalent to directly connecting the operating system on the virtual machine to the switch of your local network. you can bind an IP address to its Nic, it can also be obtained through DHCP in your network. This is the most common method. In this way, a virtual machine is a real machine in the LAN.

In the address translation mode, the customer's operating system is also allowed to access the external network. different from the above method, in this mode, the host machine and the virtual machine constitute a separate local network, the virtual machine accesses the actual network that the host machine is exposed to through the NAT provided by the host machine. For the network where hosts are located, they cannot see the existence of virtual machines.

The network connection method is not described in this article. In fact, this article only introduces a simple method. when our virtual machine uses the "bridging" method and there are multiple NICs on the host machine, how to bridge a virtual machine to an external network.

When installing VMWare, we run:

SuSE-Brooks:/# vmware-config.pl

This command configures each step in sequence by asking questions, including the network type to be used by the host machine. When we select the "bridge" mode, it requires us to provide the Nic of the host machine used for the bridge. In my notebook, there are two Nics: eth0 and eth1. with lo, there are three NICs. If you dial PPP, there will be four. Eth0 is a M local Nic, and eth1 is an 802.11g Wireless NIC. At home, I use eth1; at home, I use the network cable provided on the desktop to connect to eth0. if we specify one of the network cards when configuring vmware, such as eth0, so when I get home and use eth1, how can I bridge the virtual machine on my vmware? Let's take a look at what/etc/init. d/vmware has started, and the script will not be read. let's look at what is in the memory.

SuSE-Brooks:/# ps aux | grep vmnet

Root 3548 0.0 0.0 1564 188? Ss Oct11 0: 00/usr/bin/vmnet-bridge-d/var/run/vmnet-bridge-0.pid/dev/vmnet0 eth0

Root 5566 0.0 0.0 2864 736 pts/0 S + grep vmnet

Obviously, vmware uses the/usr/bin/vmnet-bridge command to specify the NIC used for bridging. The above result is that eth0. it is easy to know this. if we want to use eth1, then:

SuSE-Brooks:/# kill 3548

SuSE-Brooks: // usr/bin/vmnet-bridge-d/var/run/vmnet-bridge-0.pid/dev/vmnet0 eth1

You can. Try to see if you can access the network where eth1 is located? Do not forget to restart the network of the VM.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.