Configure static IP (NAT mode) for Ubuntu12.04.1 under vmwarevm)

Source: Internet
Author: User
Background operating systems, especially Linux systems, are already very common in virtual machines. Sometimes you want to build a (simulated) server under a virtual machine for host access, such as setting up a telnet/ssh server. At this point, you will find that every time you start a virtual machine, VMWare assigns a dynamic IP address to the virtual machine system, which makes it inconvenient to connect to the virtual machine through telnet every time. Set static IP addresses. VMnet8 and NAT if your VM is connected to the Internet through NAT, the IP address of the VM is not

Background

Running an operating system under a virtual machine, especially a Linux system, is already a very common practice. Sometimes you want to build a (simulated) server under a virtual machine for host access, such as setting up a telnet/ssh server. At this point, you will find that every time you start a virtual machine, VMWare assigns a dynamic IP address to the virtual machine system, which makes it inconvenient to connect to the virtual machine through telnet every time. Set static IP addresses.

VMnet8 and NAT

If your virtual machine is connected to the Internet through NAT, the IP address of the virtual machine is not configured, And the gateway and Internet access permissions are provided by the VMnet8 virtual network card provided by VMWare. All settings related to static IP settings can be found here. With the VMnet8 virtual Nic, the host can access the IP address of the virtual machine, and the virtual machine can connect to the Internet of the host to connect to the Internet.

Make sure VMnet8 is enabled

By default, VMWare Workstation has enabled the VMnet8 virtual nic. in Windows 7, go to Control Panel> network and Internet> network and sharing center> change adapter settings to view the status of the virtual network card. 1-1.

-1

Obtain the available IP range, gateway, and subnet mask.

On the VMWare main interface, click the Edit> Virtual Network Editor menu to go to the Virtual Nic parameter settings page (-2 ). Select the VMnet8 entry, click the NAT Settings button, and we can see that our VMWare Workstation is the default gateway set for the virtual machine connected to the NAT, 192.168.91.2 and subnet mask, 255.255.255.0, 1-3.

-2

-3

Click the DHCP Settings button to view the available subnet IP ranges allocated to the VM by VMnet8, as shown in figure 1-4.

-4

Here, our subnet IP available range is 192.168.91.128 ~ 192.168.91.254

OK. Now, all the information we need has been obtained. Here, we will summarize it,

-Available subnet IP addresses: 192.168.91.128 ~ 192.168.91.254

-Subnet mask: 255.255.255.0

-Gateway: 192.168.91.2

Next, enter the Ubuntu Virtual Machine to set the static IP address.

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.