Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 416543 - DNS entries in /etc/conf.d/net not explained, resolv.conf overwritten at boot.
Summary: DNS entries in /etc/conf.d/net not explained, resolv.conf overwritten at boot.
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Installation Handbook (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Vermeulen (RETIRED)
URL: https://forums.gentoo.org/viewtopic-t...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-18 18:02 UTC by Steve Garcia
Modified: 2012-06-29 15:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Garcia 2012-05-18 18:02:03 UTC
The handbook should add a line in section D.1a, listing 1.2 under "static IP" demonstrating the DNS entries:

# For static IP using CIDR notation
config_eth0="192.168.0.7/24"
routes_eth0="default via 192.168.0.1"
dns_servers_eth0="192.168.0.19 192.168.0.1"

# For static IP using netmask notation
config_eth0="192.168.0.7 netmask 255.255.255.0"
routes_eth0="default via 192.168.0.1"
dns_servers_eth0="192.168.0.19 192.168.0.1"

Reproducible: Always

Steps to Reproduce:
1.Configure /etc/conf.d/net according to handbook
2.Reboot
3.Try to access network
Actual Results:  
Non-working DNS. 

resolv.conf truncated:

# Generated by net-scripts for interface lo
domain localnet


Expected Results:  
Working DNS

resolv.conf as originally created:

domain localnet
nameserver 192.168.0.19
nameserver 192.168.0.1
Comment 1 nm (RETIRED) gentoo-dev 2012-05-19 07:08:13 UTC
it should be done for you by the livecd's resolv.conf, assuming you remembered to copy it to your installed system.

furthermore:

"A fully commented example that covers many different configurations is available in /usr/share/doc/openrc-*/net.example.bz2."

note also the section that talks about not overwriting conf.d/net -- the "nodns" and similar options.

also, read code listing 4.1:

"Code Listing 4.1: override network settings per ESSID"

this already has the dns_servers option.
Comment 2 Steve Garcia 2012-05-22 21:37:01 UTC
In section 8.b. Networking Information, it suggests putting the line 

dns_domain_lo="homenetwork"

if you are not using DHCP.  That apparently triggers automatic overwriting of resolv.conf, so if you do remember to copy the resolv.conf over from the live cd, it will be overwritten at the next boot.  

If you are configuring a static IP on a wired connection (this is *not* an edge case) the configuration suggested is *incomplete*.  It will break.  Every time.

You are correct that if you explore Advanced Settings about wireless or DHCP configuration you will find the answers, but correctly setting DNS is part of a *basic* configuration.  It should be listed as part of the basic configuration.

The "nodns" option is listed as part of setting up DHCP.  Unless you are actually setting up DHCP it's unlikley you would even look there, and if you did, it's not obvious from that section that it pertains to a static setup.

If you are setting up a wired connection, you would be unlikely to examine code listing 4.1 under overriding settings per ESSID, because you would not be setting up using ESSID.
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2012-06-29 15:32:36 UTC
Fixed in CVS. Thanks for reporting