Assigning a fixed IP to a VMware virtual machine running under Windows 7 and NAT

Source: Internet
Author: User

The virtual machine has an Oracle server installed, each time VMware restarts or resume to assign a new IP address, so you have to modify the client configuration under Windows, so you need to find a way to secure the IP address.

The DHCP service can give a "fixed" IP based on the MAC address when the client requests the IP.

First step: Modify the DHCP server configuration file:

In the C:\ProgramData\VMware under the vmnetdhcp.conf, add the following line at the end:

Host thel6_64 {
Hardware Ethernet 00:0c:29:08:c5:7f;
Fixed-address 192.168.189.129;
}

host Specifies the hostname, the name can be specified arbitrarily. Hardware Ethernet Specifies the ethernet0.generatedaddress in the virtual machine file (*.vmx file). Fixed-address Specify the address that you want, and note that the address should be within the scope assigned by the DHCP server. The scope of its allocation can be seen in vmnetdhcp.conf:

# Virtual Ethernet Segment 8
# Added at 04/25/14 09:16:48
Subnet 192.168.189.0 netmask 255.255.255.0 {
Range192.168.189.128 192.168.189.254;# Default allows up to VM ' s
Option broadcast-address 192.168.189.255;
Option Domain-name-servers 192.168.189.2;
Option Domain-name "Localdomain";
Option Netbios-name-servers 192.168.189.2;
Option routers 192.168.189.2;
Default-lease-time 1800;
Max-lease-time 7200;
}
Host VMnet8 {
Hardware Ethernet 00:50:56:c0:00:08;
Fixed-address 192.168.189.1;
Option domain-name-servers 0.0.0.0;
Option Domain-name "";
Option routers 0.0.0.0;
}
# End

Step Two: Restart the DHCP service


Step Three: Restart the virtual machine to assign to the specified IP.



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.