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