ubuntu12.04 Static IP Setup Issues

Source: Internet
Author: User
Tags nameserver

Since Linux knowledge is not very deep, it is only a summary of my own settings.

The first step is to set the/etc/network/interfaces

Add static IP Settings

Auto Eth0
Iface eth0 inet Static #配置为静态IP
Address 192.168.1.70 #静态IP为192.168.1.70
netmask 255.255.255.0 #子网掩码
#network 192.168.1.0 #所在网络
#broadcast 192.168.1.255 #广播地址
Gateway 192.168.1.1 #网关

Dns-nameserver 192.168.1.1

The Ps:brodcast and network can be calculated by the system and do not need to be set by yourself.

So the question is, how are these numbers determined?

The answer is that we can view the virtual machine by clicking on the Edit>virtual Network editor menu to enter the virtual NIC parameter settings interface. Select the VMnet8 entry and click the NAT Settings button to see our VMware Workstation default gateway for NAT-connected virtual machines, see, and click the DHCP Settings button You can see VMnet8 the available subnet IP ranges assigned to the virtual machine.

Problem solving ...

Step Two (optional): If the first step is unsuccessful, you need to set up DNS, modify/etc/resolvconf/resolv.conf.d/base

Add NameServer 192.168.1.1

Step three: Restart the NIC

sudo/etc/init.d/networking restart

ubuntu12.04 Static IP Setup Issues

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.