Gentoo Forums
Gentoo Forums
Quick Search: in
What should the "/etc/resolv.conf" file contain? [SOLVED]
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
MasterX
Veteran
Veteran


Joined: 26 Jun 2003
Posts: 1157

PostPosted: Mon Nov 19, 2007 4:27 pm    Post subject: What should the "/etc/resolv.conf" file contain? [ Reply with quote

Until today I thought that the /etc/resolv.conf file holds the DNS addresses of the ISP. I have a 2Mbps connection, and I know that I am connected at that speed because I am able to download files at the speed of ~150KB/s. But, when I am trying to visit a web page or use to emerge command to fetch a file things get pretty slow.
I believe that this is because the /etc/resolv.conf does not contain the right information. I have contacted the ISP customer support and they have given me their DNS addresses, which I copied them in this file. At the end of the file, I have the ip address of the router.

Is there something else that I need to add in this file?


Last edited by MasterX on Sat Nov 24, 2007 3:58 am; edited 1 time in total
Back to top
View user's profile Send private message
Hopeless
Veteran
Veteran


Joined: 05 Aug 2004
Posts: 3041
Location: Ariel

PostPosted: Mon Nov 19, 2007 4:34 pm    Post subject: Reply with quote

It should be "nameserver ip address", however you can set this in /etc/conf.d/net and it'll automatically generate resolve.conf.

For example, you could just set dns_servers_eth0="192.168.1.254" in the net conf file.
_________________
"They took Christmas away
Came downstairs for the shiny presents
They took the tree and the stockings, nothing left but coal
Dont look in the closet either, its greedy
Its not in the spirit of the holiday"
Back to top
View user's profile Send private message
MasterX
Veteran
Veteran


Joined: 26 Jun 2003
Posts: 1157

PostPosted: Tue Nov 20, 2007 5:39 am    Post subject: Reply with quote

@Hopeless, thank you for your reply. I am using the syntax that you mentioned. I did not know that I could set the DNS from the /etc/conf.d/net file. I will give it a try...

I just can not understand how is it possible to download a file with 150KB/s and emerge can not fetch some files (these files do exist on the server, because if I copy paste their URL to Kget, they will be downloaded in a couple of seconds).

If this is not a problem with the DNS address, then what else could cause this behavior..

BTW, I am using a wifi modem/router
Back to top
View user's profile Send private message
Dagger
Developer
Developer


Joined: 11 Jun 2003
Posts: 673
Location: UK

PostPosted: Tue Nov 20, 2007 8:05 am    Post subject: Reply with quote

to speed it up you might want to install some light dns cache. dnsmasq should do just fine. It's working pretty good for me on a mail server which is bombarded with over 15k emails per hour, and needs to SPF check every single one.
_________________
95% of all computer errors occur between chair and keyboard (TM)
Join the FSF as an Associate Member!
Post under CC license.
Back to top
View user's profile Send private message
MasterX
Veteran
Veteran


Joined: 26 Jun 2003
Posts: 1157

PostPosted: Tue Nov 20, 2007 3:05 pm    Post subject: Reply with quote

Dagger wrote:
to speed it up you might want to install some light dns cache. dnsmasq should do just fine. It's working pretty good for me on a mail server which is bombarded with over 15k emails per hour, and needs to SPF check every single one.


I will give it a try. Do I need to configure it?
All I did was to emerge the program and run dnsmaq


EDIT: I restarted the net.eth1 script, but the /etc/resolv.conf file contains only the modem ip address. Should not dnsmaq have acquired the ISP's dns address?
Back to top
View user's profile Send private message
Dagger
Developer
Developer


Joined: 11 Jun 2003
Posts: 673
Location: UK

PostPosted: Wed Nov 21, 2007 7:37 am    Post subject: Reply with quote

By default dns is requested from DHCP server and overwrites your resolv.conf

You might also take a look on net-dns/resolvconf-gentoo and reemerge dnsmasq with resolv.conf
It sorted my problems with overwriting resolv.conf from VPN.
(thanks UberLord!)
_________________
95% of all computer errors occur between chair and keyboard (TM)
Join the FSF as an Associate Member!
Post under CC license.
Back to top
View user's profile Send private message
MasterX
Veteran
Veteran


Joined: 26 Jun 2003
Posts: 1157

PostPosted: Sat Nov 24, 2007 3:58 am    Post subject: Reply with quote

Dagger wrote:
By default dns is requested from DHCP server and overwrites your resolv.conf

You might also take a look on net-dns/resolvconf-gentoo and reemerge dnsmasq with resolv.conf
It sorted my problems with overwriting resolv.conf from VPN.
(thanks UberLord!)


Thanks, these two programs helped a lot
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 - 5 Hours
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