How to configure a static IP in a "Linux" VMware virtual machine

Source: Internet
Author: User

Here is a detailed explanation of how to configure a static IP in a VMware virtual machine.


is a sketch that outlines the VMware network situation. A network segment refers to an IP range, such as a community building and another residential building, which is not a network segment.

If you are in a community, your girlfriend in B community, you want to contact her will need to go through the gateway. Hello, your friends live next door, you communicate with him will not need to pass through the gateway. Vmware

We simulated the gateway, so we need to set up the network IP based on the VMware virtual machine when we configure it. We configure Windows and Linux in a network segment.

1. View gateways, and network segments

"Edit"-"Virtual network editor"

We use NAT mode, so choose VMnet8. Cancel the "Use local DHCP" service This option does not tick, this is the dynamic allocation of IP. Click Nat Settings.

Gateway IP need to remember that through this we know that our gateway is 192.168.133.2, the subnet mask is 255.255.255.0. The 192.168.133.0 of the subnet IP means

If you want to add a machine to this network segment, your machine IP can only be within the range of 192.168.133.0~192.168.133.255. In fact, you'll find 192.168.133.2 is

Gateway IP, in general 192.168.133.255 is broadcast IP so do not, 192.168.133.0 is generally network segment IP is not used. That means except for 0 2 255 of these three, the other

Numbers you can set casually.

2. Set the virtual machine IP List of files involved:/etc/sysconfig/network-scripts/ifcfg-eth0 (NIC),/etc/sysconfig/network (host name),/etc/resolv.conf (DNS).
NIC Information modification: Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Onboot: Boot up.

Nm_controlled: Whether the network management component is enabled or not, the Lite version does not have this component. So there's no need to open it.

Bootproto: Network distribution mode, static.

IPPADDR: Specify the IP address manually.

NETMASK: Subnet mask.

Gateway: IP. Edit well to save exit later.


DNS configuration: vi/etc/resolv.conf


NameServer: Here should be filled in the corresponding DNS domain name resolution server IP. But if you don't know what to fill out, fill in the gateway address. Can be connected to something, but

It seems as if Ping www.baidu.com is not responding. I don't know what's going on, because it doesn't affect my networking updates, I don't have any concerns.


Hostname Modification: vi/etc/sysconfig/network

If you need to modify the host name, no need to forget. Configure the above 3 files to restart the machine later.

3, the use of Remote Tools Connection 1, the use of the Xshell tool, the IP address is set up above the IP address, the IP of this machine is him.
2, click OK, the first connection will have this, OK.
3, enter the user name, just installed the machine has only one root user. Log in first with the root user.
4, enter the password, I like all users are the same password, so that after the landing only need to fill in the user name can be. Need to remember the password.
5, after landing can be played casually.
4, Windows IP Settings 1, set up VMware to configure our network adapter, that is the NAT8. Right-click Properties
2. Select IPV4 and click Properties.
3. Set the IP address. After that, Windows is the IP. The IP segment scope needs to be within the scope of the VMware virtual machine to us.
5. Special Tips

If you turn off the VMware virtual machine, you will have an option to hang in the background. So the virtual machine hangs in the background, it feels like connecting a remote machine, super awesome!

Reprinted from ———————— http://blog.csdn.net/readiay/article/details/50866709

How to configure a static IP in a "Linux" VMware virtual machine

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.