Address Ubuntu under resolv.conf lost domain, search config

Source: Internet
Author: User
Tags nameserver

Ubuntu uses the 10.04 TLS version and the NIC uses DHCP to obtain the IP.

The original configuration of the resolv.conf under Ubuntu:

NameServer 128.224.160.11
NameServer 147.11.57.128
NameServer 147.11.57.133
Domain wrs.com
Search Wrs.com windriver.com


However, the configuration of domain and search will be lost every time the computer restarts.

Google is related to the situation, ubuntu12.04 because Netwok-manager will automatically generate and overwrite resolv.conf, there will be similar problems, but not my current ubuntu10.04 should exist problems.

Combined with some google results, and then look at the Dhclient,dhcp-options man document, the conclusion should be that the DHCP protocol itself will exist options ' domain ', ' search ' configuration, thus covering the original relevant configuration.

The workaround is to include the appropriate configuration in the Dhcp-client configuration document so that no configuration is lost;

$ vim/etc/dhcp3/dhclient.conf

To join the configuration:

Supersede Domain-name "wrs.com";
Prepend domain-search "wrs.com", "windriver.com";


Then restart your computer and find that/etc/resolv.conf has added a new entry:

Domain wrs.com
Search Wrs.com windriver.com

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.