|
Author |
Message |
|
|
Posted Jun 04, 2008 at 4:02:01 AM
Subject: a question on resolve.conf and Networking
Hello Everyone,
What is the usage of resolve.conf. I saw that it has two nameservers ips listed in the file. These two ips were put there by the dedicated server provider and I am assuming that they are needed for wan connectivity. Can I change the two ips to the ips of nameservers that I am running on bind for instance ns1.example.com ns2.example.com?
My second question is regarding the networking. At home server,private ip is assigned to the linux server such as 192.168.1.110 and I remember when I installed openvz I was able to assign different private ips within the same subnet however on dedicated server hosted in a datacenter, I have not been given any private ips? Could some one explain why this is different? I am trying to understand this whole networking thing. Thank you for your help
|
Penguin
Joined Mar 28, 2008 Posts: 88
Other Topics
|
Posted:
Jun 04, 2008 10:18:41 AM
Subject: a question on resolve.conf and Networking
Resolve.conf (normally) supplies the computer with the "DNS addresses" - the servers which change www.google.com to 66.249.93.104 (the latter being what the computer will actually use to connect). You can change the server IPs listed in there to whatever you want, but it must be an IP you set it to (or several IPs if you want more DNS' listed) - if you set it as ns1.example.com it wont be able to look it up without a DNS IP (bit recursive there, can't look up the DNS IP without a DNS IP).
Could you clarify what you mean by "have not been given any private IPs" ? Do you mean that you've been given an IP along the lines of 10.242.20.123, or that you haven't been given one at all ?
Penguin
|
Linux-Knight
Joined May 31, 2008 Posts: 6
Other Topics
|
Posted:
Jun 04, 2008 6:36:38 PM
Subject: a question on resolve.conf and Networking
Thank you penguin.
What I understand from your post is that the function of resolve.conf is to provide name to ip resolution. If this is correct then I am even more confused and here is it why
As I mentioned, I have two servers. One is at home and one is at the datacenter. following is the content of the resolve.conf
Server At home (A)
[code=xml]; generated by /sbin/dhclient-script
search gateway.2wire.net
nameserver 192.168.1.254[/code]
Server At datacenter (B)
[code=xml]options rotate
nameserver 65.10.20.252
nameserver 65.10.30.253[/code]
it seems as if resolve.conf (A) is required to [b]connect to the internet[/b] as it has the gateway address of 192.168.1.254 which is my home router. i tried deleting the file and see what happens but it would be recreated by /sbin/dhclient-script. Now the question,is resolve.conf needed for wan connectivity ?
As for your question if i have been given any private ips than No I have not been given any private ips only class A ips such as 65.77.10.11 an so on and by private ips i mean the following
10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255
Thanks again
[Modified by: Linux-Knight on June 04, 2008 06:39 PM]
|
Khabi
Joined Apr 21, 2008 Posts: 121
Other Topics
|
Posted:
Jun 04, 2008 6:54:57 PM
Subject: a question on resolve.conf and Networking
Gah, I'm computer illiterate today, and deleted my post. Basically what I put here before said.
Resolve.conf only points your computer at a dns server to use for hostname lookups. Your home network has the IP of your router because most home routers also have a simple DNS server built into them. They only do lookups however.
You could edit resolv.conf to point to any dns server you want however, just replace the IP address with the ip address of another dns server.
If you're colo'd at a datacenter they will not give you any private IP space, only public IPs. If you want to use internal IPs its up to you to install the necessary router / network equipment to support it.
[Modified by: Khabi on June 04, 2008 07:02 PM]
|
Linux-Knight
Joined May 31, 2008 Posts: 6
Other Topics
|
Posted:
Jun 05, 2008 9:59:20 PM
Subject: a question on resolve.conf and Networking
Thank You Khabi and Penguin :)
|
Penguin
Joined Mar 28, 2008 Posts: 88
Other Topics
|
Posted:
Jun 10, 2008 10:11:35 AM
Subject: a question on resolve.conf and Networking
Khabi: Thanks for giving a more succinct answer to the problem - my brain was a bit fuzzy that day, should've waited to post really...
Apologies to Linux-Knight - my answer wasn't very clear...
|
Khabi
Joined Apr 21, 2008 Posts: 121
Other Topics
|
Posted:
Jun 10, 2008 6:09:18 PM
Subject: a question on resolve.conf and Networking
[quote=Penguin]Khabi: Thanks for giving a more succinct answer to the problem - my brain was a bit fuzzy that day, should've waited to post really...
Apologies to Linux-Knight - my answer wasn't very clear... [/quote]
No problem :)
|