Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with /etc/resolv.conf
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Fissile
Guru
Guru


Joined: 23 Nov 2003
Posts: 470

PostPosted: Fri Dec 28, 2007 10:23 pm    Post subject: Problem with /etc/resolv.conf Reply with quote

Hi guys, just got gentoo up and running and everything is perfect for the most part. I am running into a slight problem with getting the internet working every time I reboot. It would seem my /etc/resolv.conf file only contain one uncommented line that is:
Code:
domain <mydomainname>
and that is it. Everytime I reboot i have to
Code:
echo nameserver 192.168.0.1 >> /etc/resolv.conf (x 2)

Is there any way to make this change permanent?

Thank you.


Muq
_________________
The Only Thing Necessary for The Triumph of evil is for Good Men To do Nothing!...
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Fri Dec 28, 2007 10:56 pm    Post subject: Reply with quote

You probably set dns_domain or dns_search in conf.d/net
You should also set dns_servers there as well.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Fissile
Guru
Guru


Joined: 23 Nov 2003
Posts: 470

PostPosted: Fri Dec 28, 2007 11:02 pm    Post subject: Reply with quote

HI,

Alright so my conf.d/net is:
Code:
dns_domain_lo="universe"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"

so i should do what exactly? I am kind of new at this.
_________________
The Only Thing Necessary for The Triumph of evil is for Good Men To do Nothing!...
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Fri Dec 28, 2007 11:14 pm    Post subject: Reply with quote

Fissile wrote:
HI,

Alright so my conf.d/net is:
Code:
dns_domain_lo="universe"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"

so i should do what exactly? I am kind of new at this.


I'd say, try this first, you probably don't need the other lines if you "borrowed" them from someone else
Code:
#dns_domain_lo="universe"
config_eth0=( "dhcp" )
#dhcp_eth0="nodns nontp nonis"

_________________
The End of the Internet!
Back to top
View user's profile Send private message
Fissile
Guru
Guru


Joined: 23 Nov 2003
Posts: 470

PostPosted: Sat Dec 29, 2007 12:16 am    Post subject: Reply with quote

Humm, I am sorry. Now i am confused. That is what I have
Code:
dns_domain_lo="universe"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"


I guess all i need to know is how do I prevent my /etc/resolv.conf from being reseted to just "domain universe" and not have to manually add "nameserver 192.168.0.1" everytime I reboot.
_________________
The Only Thing Necessary for The Triumph of evil is for Good Men To do Nothing!...
Back to top
View user's profile Send private message
MostAwesomeDude
Guru
Guru


Joined: 12 Aug 2007
Posts: 373

PostPosted: Sat Dec 29, 2007 1:43 am    Post subject: Reply with quote

Fissile wrote:
Humm, I am sorry. Now i am confused. That is what I have
Code:
dns_domain_lo="universe"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"


I guess all i need to know is how do I prevent my /etc/resolv.conf from being reseted to just "domain universe" and not have to manually add "nameserver 192.168.0.1" everytime I reboot.


Comment out the domain and dhcp options:
Code:
# dns_domain_lo="universe"
config_eth0=( "dhcp" )
# dhcp_eth0="nodns nontp nonis"


The domain option is screwing up your /etc/resolv.conf, and the dhcp custom options are keeping it from regenerating correctly.
Back to top
View user's profile Send private message
Apopatos
Guru
Guru


Joined: 17 Oct 2004
Posts: 512
Location: Hellas

PostPosted: Sat Jan 12, 2008 5:44 pm    Post subject: Reply with quote

I have the same problem but my conf.d/net file says:
Code:
dns_domain_lo="gentoo"

config_eth0=( "10.0.0.139 netmask 255.255.255.0" )
routes_eth0=( "default via 10.0.0.138" )

is it something wrong with it and it changes my resolv.conf every time I boot?
Back to top
View user's profile Send private message
crauley
n00b
n00b


Joined: 13 Jan 2008
Posts: 1

PostPosted: Sun Jan 13, 2008 9:41 am    Post subject: Reply with quote

Fissile wrote:
HI,

Alright so my conf.d/net is:
Code:
dns_domain_lo="universe"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"

so i should do what exactly? I am kind of new at this.


Try adding this to conf.d/net:
Code:

dhcpcd_eth0="-R"

From the man page:
Code:

       -R     Prevents dhcpcd from replacing /etc/resolv.conf or using resolv-
              conf.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Jan 14, 2008 11:15 am    Post subject: Reply with quote

Maybe someone could donate better documentation :roll:

But if you specify dns_domain then it will overwrite /etc/resolv.conf with the options you have specified.
So if you only specify dns_domain_lo="foo" and restart the lo interface it will put "domain foo" in /etc/resolv.conf and remove everything else.

Let me put it another way - you probably don't need to specify a domain there. Ask yourself why you need it and what it's for.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
sing_ecgroup
n00b
n00b


Joined: 09 Aug 2007
Posts: 22

PostPosted: Mon Jan 14, 2008 2:55 pm    Post subject: Reply with quote

Have you tried to add these 2 lines to conf.d/net
dns_servers_ESSID=( "192.168.0.1" "192.168.0.2" )
dns_domain_ESSID="some.domain"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum