Ubuntu14.04 set static IP

Source: Internet
Author: User

1. Find the file and make the following changes:

Sudo Vim/etc/Network/interfaces

Modify the following parts:

Auto eth0
Iface eth0 Inet static
Address 192.168.0.117
Gateway 192.168.0.1 # Check whether the gateway address is the IP address.
Netmask 255.255.255.0
Network 192.168.0.0
Broadcast 192.168.0.255

2. Modify DNS resolution

The DNS server address is automatically assigned because DHCP resolution is used in the past.

Once set to a static IP address, no DNS server is automatically obtained.

Set

Sudo Vim/etc/resolv. conf

Write the DNS of the previous public network

Nameserver 202.96.128.86

(Note: 8.8.8.8 is Google's DNS server, but the resolution speed is slow. You can find a Chinese DNS server)

3. Restart the NIC:

Sudo/etc/init. d/network restart

 

Ubuntu14.04 set static 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.