How to set up static IP access for Linux virtual machines in VMware

Source: Internet
Author: User

how to set up static IP access for Linux virtual machines in VMwareTags: vmwarelinux virtual machine securecrt static IP Internet2016-05-18 02:30 702 people read Comments (0) favorite reports Classification:Linux

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Directory (?) [+]

Most people now have a home network environment that provides Internet access to their home computers and mobile phones through a wireless router.

After installing Linux with VMware, the DHCP connection network is used by default.

However, if you use a similar securecrt SSH connection to the Linux machine on the virtual machine, because each time the IP address is different, this need to be manually modified, in addition to build Hadoop cluster, compute nodes sometimes need to static IP access to the external network, So you want to set up the Linux machine as a static IP. The following are the specific setup steps:

1. Configure DNS

Use command: vi/etc/resolv.conf

where nameserver and the second step of the DNS1, DNS2 can be seen from the control interface of the router

Enter http://192.168.1.1 in the browser (take Tp-link as an example)

2. Set the fixed IP

Use command: Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Note that this must be ifcfg-eth0.

where IPADDR must and the host's IP address in the same network segment, or later use SECURECRT will connect not.

3. Restart the network

Use command:/etc/init.d/network restart

You can also use the command: Service network restart

4. Set VMnet8

(1) The network adapter of the virtual machine is set to NAT mode.

(2) In the VMware menu, choose Edit > Virtual Network Editor to enter the dialog box, set VMnet8 "Subnet IP" to the same network segment as the host, as mine is 192.168.1.0.

Now that the setup is complete, the virtual machine can surf the Internet.

Reference: http://blog.sina.com.cn/s/blog_716844910100ofcm.html

How to set up static IP access for Linux virtual machines in VMware

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.