You are not logged in.

#1 2010-09-08 23:10:44

choogi
Member
Registered: 2009-10-06
Posts: 60

[SOLVED] Question about resolv.conf

I successfully configured my Arch box with a static IP by following the instructions on the Arch wiki page here but had a couple of questions about configuring /etc/resolv.conf:

1) What is the proper way to obtain the domain name that should be inserted into resolv.conf?
2) What exactly is this domain name used for?  I read the man page but still don't really understand it.  Why do I need a domain name if I already have a working set of nameservers to resolve IP addresses?

EDIT: @ewaller Yes I edited the OP because I realized that my original problem was that I just hadn't added a domain name in my resolv.conf file.  I edited my original post because 1) the instructions are already posted clearly on Arch Wiki so my post really wouldn't be beneficial and 2) so I could ask my real question without making other people waste their time reading through my other nonsense

Last edited by choogi (2010-09-09 04:06:45)

Offline

#2 2010-09-08 23:25:05

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,803

Re: [SOLVED] Question about resolv.conf

Can you check the output of route just to be sure of your gateway?
Are you sure your gateway is at 192.168.1.1 and not 192.168.1.0?
Are you sure your LAN is set up for subnet 1?
Can you ping your router?
Can you ping 192.168.1.2 (yourself)?

Edit: never mind, I see the OP was edited away.

Last edited by ewaller (2010-09-08 23:26:02)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2010-09-08 23:35:22

yejun
Member
Registered: 2009-10-21
Posts: 66

Re: [SOLVED] Question about resolv.conf

You can just use public dns like 8.8.8.8 or 4.2.2.1. There's no other way to get dnsserver besides dhcp.

Last edited by yejun (2010-09-08 23:35:34)

Offline

#4 2010-09-08 23:59:08

choogi
Member
Registered: 2009-10-06
Posts: 60

Re: [SOLVED] Question about resolv.conf

yejun wrote:

You can just use public dns like 8.8.8.8 or 4.2.2.1. There's no other way to get dnsserver besides dhcp.

Yes, I know how to get a nameserver, but I'm asking about the domain name that goes in resolv.conf.  The Arch wiki tutorial for setting up static IP uses the following resolv.conf as an example:

nameserver 61.23.173.5
nameserver 61.95.849.8
search example.com

My question has to do with what the "search example.com" does.  I don't have a domain name associated with my machine, but if I remove that line, then I get "web page unavailable" when I try to load any web site, which suggests that I'm not connecting to any nameservers right?

Offline

#5 2010-09-09 00:15:05

choogi
Member
Registered: 2009-10-06
Posts: 60

Re: [SOLVED] Question about resolv.conf

Okay I've got things figured out now.  I don't actually have to have the "search example.com" in my resolv.conf--it works fine with just the nameservers.

The reason why I thought things didn't work without it was because I added it in at the same time I disabled dhcpcd from updating the resolv.conf.  Whenever I rebooted, my resolv.conf was getting cleared by dhcpcd, and that's why I wasn't able to connect to any nameservers.

However, if someone still wants to answer my question about what the domain is used for then I'd still really appreciate it smile

Last edited by choogi (2010-09-09 00:15:40)

Offline

#6 2010-09-09 02:30:04

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Question about resolv.conf

This thread. It is confusing.

(With the OP edited to totally different content neutral)

Offline

#7 2010-09-09 02:33:31

yejun
Member
Registered: 2009-10-21
Posts: 66

Re: [SOLVED] Question about resolv.conf

man resolv.conf

Offline

Board footer

Powered by FluxBB