Ubuntu fixed IP and DNS configuration and viewing

Source: Internet
Author: User
Tags nameserver

1. View DNS:

Cat/etc/resolv.conf

2, Ubuntu fixed IP

sudo vim/etc/network/interfaces

Modify the following sections:

Auto Eth0
Iface eth0 inet Static
Address 59.77.132.80

Netmask 255.255.255.0
Gateway 192.168.0.1

2. Modify DNS Resolution

DNS server addresses are automatically assigned because they were previously resolved by DHCP

And once the static IP is set, there is no automatic access to the DNS server.

To set a

sudo vim/etc/resolv.conf

Write the DNS on a public network:

NameServer 218.85.157.99
NameServer 210.34.48.34
NameServer 58.22.96.66
Search func.fzu.edu.cn

3. Restart the network card:

Sudo/etc/init.d/network restart

Ubuntu fixed IP and DNS configuration and viewing

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.