Networking Forums

Networking Forums > Computer Networking > Linux Networking > How do I configure domain names for my locally-networked computers?

Reply
Thread Tools Display Modes

How do I configure domain names for my locally-networked computers?

 
 
Randy Yates
Guest
Posts: n/a

 
      07-21-2007, 06:06 PM
I'm using Fedora Core 6.

I have not be using any DNS so far for systems on my local home
network, instead just using the local private network IP address
directly (192.168.x.y).

I also have a Linksys router configured to dynamically assign
my home network IP address via DHCP. I have two FC4 and one FC6
computers on the network.

However, this is a pain since, occasionally, maybe once every 6 months
or so, my IP addresses get shuffled. Then I have to go modify
everything that relies on the IP addresses.

I considered starting the named service on one of my systems and
then modifying the /etc/resolv.conf files, as suggested in a book,
but then I still have to update the IP address in the /etc/resolv.conf
files for every non-nameserver system when the IP addresses change.

Is there a better way that's still easy and local (i.e., I don't
want to have to go buy a domain name)?
--
% Randy Yates % "Though you ride on the wheels of tomorrow,
%% Fuquay-Varina, NC % you still wander the fields of your
%%% 919-577-9882 % sorrow."
%%%% <(E-Mail Removed)> % '21st Century Man', *Time*, ELO
http://home.earthlink.net/~yatescr
 
Reply With Quote
 
 
 
 
Jack Snodgrass
Guest
Posts: n/a

 
      07-21-2007, 06:23 PM
On Sat, 21 Jul 2007 14:06:05 -0400, Randy Yates wrote:

> I'm using Fedora Core 6.
>
> I have not be using any DNS so far for systems on my local home network,
> instead just using the local private network IP address directly
> (192.168.x.y).
>
> I also have a Linksys router configured to dynamically assign my home
> network IP address via DHCP. I have two FC4 and one FC6 computers on the
> network.
>
> However, this is a pain since, occasionally, maybe once every 6 months
> or so, my IP addresses get shuffled. Then I have to go modify everything
> that relies on the IP addresses.
>
> I considered starting the named service on one of my systems and then
> modifying the /etc/resolv.conf files, as suggested in a book, but then I
> still have to update the IP address in the /etc/resolv.conf files for
> every non-nameserver system when the IP addresses change.
>
> Is there a better way that's still easy and local (i.e., I don't want to
> have to go buy a domain name)?


I really, really like pdns - http://www.phys.uu.nl/~rombouts/pdnsd.html

You run it as your 'DNS' server. It lets you have your private stuff in
/etc/hosts and then it goes to a 'real' dns if it doesn't find a match in
your /etc/hosts file. PLUS... if you have a DNS that is there under
certain conditions ( my VPN is enabled for instance... ) then it will use
the DNS when it's available.

So... with my setup I have all of my local 'private.net' machines
listed in my /etc/hosts file... things like www.yahoo.com get resolved
from my verizon DNS that pdnsd.conf points to and IF my VPN link is
active, www.work.net resolves using the 'ns.work.net'... other wise
www.work.net does not resolve... and since I can't get there without the
VPN active.. I don't need to resovle the work.net addresses....

pdnsd is great....

jack




--
D.A.M. - Mothers Against Dyslexia

see http://www.jacksnodgrass.com for my contact info.

jack - Grapevine/Richardson
 
Reply With Quote
 
Keith Keller
Guest
Posts: n/a

 
      07-21-2007, 06:35 PM
On 2007-07-21, Randy Yates <(E-Mail Removed)> wrote:
>
> I also have a Linksys router configured to dynamically assign
> my home network IP address via DHCP. I have two FC4 and one FC6
> computers on the network.
>
> However, this is a pain since, occasionally, maybe once every 6 months
> or so, my IP addresses get shuffled. Then I have to go modify
> everything that relies on the IP addresses.


If you're able to do so, configure the DHCP server on the Linksys to
map a given MAC address to a given IP. Then, whenever machine X needs
to renew, it will be given the same address.

Do you even need DHCP at all? If you need the names to be static, make
them static, don't even have them ask for an IP. You should be able to
configure the Linksys to reserve a range of IPs that are not DHCP, then
use IPs in that range as static IPs on your home machines. Then, you
can either run named, or you can simply configure /etc/hosts on each
machine (with only three machines, this wouldn't be too hard). This
way, your machines are static, but you still have the DHCP server for
when people bring over their laptops.

--keith



--
kkeller-(E-Mail Removed)
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

 
Reply With Quote
 
Randy Yates
Guest
Posts: n/a

 
      07-21-2007, 07:17 PM
Keith Keller <kkeller-(E-Mail Removed)> writes:

> On 2007-07-21, Randy Yates <(E-Mail Removed)> wrote:
>>
>> I also have a Linksys router configured to dynamically assign
>> my home network IP address via DHCP. I have two FC4 and one FC6
>> computers on the network.
>>
>> However, this is a pain since, occasionally, maybe once every 6 months
>> or so, my IP addresses get shuffled. Then I have to go modify
>> everything that relies on the IP addresses.

>
> If you're able to do so, configure the DHCP server on the Linksys to
> map a given MAC address to a given IP. Then, whenever machine X needs
> to renew, it will be given the same address.
>
> Do you even need DHCP at all? If you need the names to be static, make
> them static, don't even have them ask for an IP. You should be able to
> configure the Linksys to reserve a range of IPs that are not DHCP, then
> use IPs in that range as static IPs on your home machines. Then, you
> can either run named,


If I ran named (I like this idea since I like the performance advantage
it offers for all locally-connect machines), and I disabled DHCP, then
how do I assign a specific IP address to each machine?

Also, if I did run named (i.e., if I ran a "local caching
nameserver"), then is it true that all I'd have to do is edit the
/etc/resolv.conf to add 127.0.0.1 and comment out any other (ISP)
nameservers? That's what is stated in "Red Hat Fedora 4 Unleashed"
by Paul Hudson et al.

If I did that then how would my local caching nameserver know where
to go when it can't resolve a name?

Also, if I disabled DHCP, wouldn't I also have the negative side-effect
of losing dynamic nameserver updates? I.e., if a nameserver address
changes at my ISP, I'd have to go in and manually update it somewhere,
right?

Otherwise it's OK with me to disable DHCP - there are no Windoze machines
on this network, and there never will be.
--
% Randy Yates % "Bird, on the wing,
%% Fuquay-Varina, NC % goes floating by
%%% 919-577-9882 % but there's a teardrop in his eye..."
%%%% <(E-Mail Removed)> % 'One Summer Dream', *Face The Music*, ELO
http://home.earthlink.net/~yatescr
 
Reply With Quote
 
David M
Guest
Posts: n/a

 
      07-22-2007, 01:16 AM
On Sat, 21 Jul 2007 15:17:59 -0400, Randy Yates rearranged some electrons
to form:

> Keith Keller <kkeller-(E-Mail Removed)> writes:
>
>> On 2007-07-21, Randy Yates <(E-Mail Removed)> wrote:
>>>
>>> I also have a Linksys router configured to dynamically assign
>>> my home network IP address via DHCP. I have two FC4 and one FC6
>>> computers on the network.
>>>
>>> However, this is a pain since, occasionally, maybe once every 6 months
>>> or so, my IP addresses get shuffled. Then I have to go modify
>>> everything that relies on the IP addresses.

>>
>> If you're able to do so, configure the DHCP server on the Linksys to
>> map a given MAC address to a given IP. Then, whenever machine X needs
>> to renew, it will be given the same address.
>>
>> Do you even need DHCP at all? If you need the names to be static, make
>> them static, don't even have them ask for an IP. You should be able to
>> configure the Linksys to reserve a range of IPs that are not DHCP, then
>> use IPs in that range as static IPs on your home machines. Then, you
>> can either run named,

>
> If I ran named (I like this idea since I like the performance advantage
> it offers for all locally-connect machines), and I disabled DHCP, then
> how do I assign a specific IP address to each machine?
>
> Also, if I did run named (i.e., if I ran a "local caching
> nameserver"), then is it true that all I'd have to do is edit the
> /etc/resolv.conf to add 127.0.0.1 and comment out any other (ISP)
> nameservers? That's what is stated in "Red Hat Fedora 4 Unleashed"
> by Paul Hudson et al.
>
> If I did that then how would my local caching nameserver know where
> to go when it can't resolve a name?
>
> Also, if I disabled DHCP, wouldn't I also have the negative side-effect
> of losing dynamic nameserver updates? I.e., if a nameserver address
> changes at my ISP, I'd have to go in and manually update it somewhere,
> right?
>
> Otherwise it's OK with me to disable DHCP - there are no Windoze machines
> on this network, and there never will be.


You're making this way too hard.

1) Assign fixed IP addresses for each computer on your network.
2) Add each name & IP to /etc/hosts

Done.


--
David M (dmacchiarolo)
http://home.triad.rr.com/redsled


 
Reply With Quote
 
Stefan Monnier
Guest
Posts: n/a

 
      07-22-2007, 03:30 AM
> I'm using Fedora Core 6.
> I have not be using any DNS so far for systems on my local home
> network, instead just using the local private network IP address
> directly (192.168.x.y).


> I also have a Linksys router configured to dynamically assign
> my home network IP address via DHCP. I have two FC4 and one FC6
> computers on the network.


The best solution I know of is to use the dnsmasq server, which combines
DHCP and DNS, so you get dynamically allocated IP addresses, but the DNS
server knows them and can associate them with the host name (provided by
the DHCP request).

So, my laptop's name being "alfajor", when the dnsmasq server returns IP
192.168.6.28 it also adds to the DNS server an entry that says "alfajor.home
has IP 192.168.6.28".

You can use the dnsmasq server on your router if you install a third party
firmware such as OpenWRT.


Stefan
 
Reply With Quote
 
Randy Yates
Guest
Posts: n/a

 
      07-22-2007, 03:38 AM
David M <(E-Mail Removed)> writes:

> On Sat, 21 Jul 2007 15:17:59 -0400, Randy Yates rearranged some electrons
> to form:
>
>> Keith Keller <kkeller-(E-Mail Removed)> writes:
>>
>>> On 2007-07-21, Randy Yates <(E-Mail Removed)> wrote:
>>>>
>>>> I also have a Linksys router configured to dynamically assign
>>>> my home network IP address via DHCP. I have two FC4 and one FC6
>>>> computers on the network.
>>>>
>>>> However, this is a pain since, occasionally, maybe once every 6 months
>>>> or so, my IP addresses get shuffled. Then I have to go modify
>>>> everything that relies on the IP addresses.
>>>
>>> If you're able to do so, configure the DHCP server on the Linksys to
>>> map a given MAC address to a given IP. Then, whenever machine X needs
>>> to renew, it will be given the same address.
>>>
>>> Do you even need DHCP at all? If you need the names to be static, make
>>> them static, don't even have them ask for an IP. You should be able to
>>> configure the Linksys to reserve a range of IPs that are not DHCP, then
>>> use IPs in that range as static IPs on your home machines. Then, you
>>> can either run named,

>>
>> If I ran named (I like this idea since I like the performance advantage
>> it offers for all locally-connect machines), and I disabled DHCP, then
>> how do I assign a specific IP address to each machine?
>>
>> Also, if I did run named (i.e., if I ran a "local caching
>> nameserver"), then is it true that all I'd have to do is edit the
>> /etc/resolv.conf to add 127.0.0.1 and comment out any other (ISP)
>> nameservers? That's what is stated in "Red Hat Fedora 4 Unleashed"
>> by Paul Hudson et al.
>>
>> If I did that then how would my local caching nameserver know where
>> to go when it can't resolve a name?
>>
>> Also, if I disabled DHCP, wouldn't I also have the negative side-effect
>> of losing dynamic nameserver updates? I.e., if a nameserver address
>> changes at my ISP, I'd have to go in and manually update it somewhere,
>> right?
>>
>> Otherwise it's OK with me to disable DHCP - there are no Windoze machines
>> on this network, and there never will be.

>
> You're making this way too hard.
>
> 1) Assign fixed IP addresses for each computer on your network.
> 2) Add each name & IP to /etc/hosts
>
> Done.


Hi David,

I hear you. But what if I get a new (linux) laptop next week? Then
I need to update three computers' /etc/hosts file plus initialize
the one on the laptop. And if the IP addresses change, etc., etc.

OK OK. It's not a big deal. I guess I wanted a more "elegant" method.

--Randy

PS: I lived on Howard AFB near the Panama Canal from 65 to 68 - Dad
was stationed there.

PSS: I had a 1969 Ford Fairlane 500 for over 10 years when I was in
CA. I loved that car's styling.
--
% Randy Yates % "My Shangri-la has gone away, fading like
%% Fuquay-Varina, NC % the Beatles on 'Hey Jude'"
%%% 919-577-9882 %
%%%% <(E-Mail Removed)> % 'Shangri-La', *A New World Record*, ELO
http://home.earthlink.net/~yatescr
 
Reply With Quote
 
Keith Keller
Guest
Posts: n/a

 
      07-22-2007, 05:00 AM
On 2007-07-22, Randy Yates <(E-Mail Removed)> wrote:
> David M <(E-Mail Removed)> writes:
>
>> On Sat, 21 Jul 2007 15:17:59 -0400, Randy Yates rearranged some electrons
>> to form:
>>
>>> Keith Keller <kkeller-(E-Mail Removed)> writes:
>>>
>>>> Do you even need DHCP at all? If you need the names to be static, make
>>>> them static, don't even have them ask for an IP. You should be able to
>>>> configure the Linksys to reserve a range of IPs that are not DHCP, then
>>>> use IPs in that range as static IPs on your home machines. Then, you
>>>> can either run named,
>>>
>>> If I ran named (I like this idea since I like the performance advantage
>>> it offers for all locally-connect machines), and I disabled DHCP, then
>>> how do I assign a specific IP address to each machine?


Just configure it. I believe RedHat/CentOS has a network configuration
utility; don't recall the name off the top of my head.

>>> Also, if I did run named (i.e., if I ran a "local caching
>>> nameserver"), then is it true that all I'd have to do is edit the
>>> /etc/resolv.conf to add 127.0.0.1 and comment out any other (ISP)
>>> nameservers? That's what is stated in "Red Hat Fedora 4 Unleashed"
>>> by Paul Hudson et al.


More or less, yes. You would configure your named to query your ISP's
nameserver when needed. I would only run one named at your site,
though, and let the other machines query it, instead of localhost or
your ISP's DNS.

>>> Also, if I disabled DHCP, wouldn't I also have the negative side-effect
>>> of losing dynamic nameserver updates? I.e., if a nameserver address
>>> changes at my ISP, I'd have to go in and manually update it somewhere,
>>> right?


You're conflating two networks into one. Your home network, with
192.168.* IP addresses, is completely private, should never be on the
Internet directly, and so you have complete control over them. I'm
guessing your Linksys is connected to your dsl modem/cable modem or
equivalent, and it still *receives* its IP from your ISP via DHCP. I'm
suggesting you turn off the feature where it *gives out* IPs to your
home machines.

>> 1) Assign fixed IP addresses for each computer on your network.
>> 2) Add each name & IP to /etc/hosts

>
> I hear you. But what if I get a new (linux) laptop next week? Then
> I need to update three computers' /etc/hosts file plus initialize
> the one on the laptop. And if the IP addresses change, etc., etc.
>
> OK OK. It's not a big deal. I guess I wanted a more "elegant" method.


In some cases the fastest method is the most elegant. That being
said, I do run a local named for my boxes at home, and it's not that
complicated (though I need named for my external DNS, or I might just do
/etc/hosts). But if you wanted to do /etc/hosts, you'd pick one machine
as the ''master'', and when changes are needed, do something like

for host in host2 host3 host4
do
scp /etc/hosts root@$host:/etc/hosts
done

Easy peasy. Almost definitely easier than named, though if you wanted
to learn named this would be a good (and straightforward, and not
critical to someone else's DNS) time to try.

--keith

--
kkeller-(E-Mail Removed)
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

 
Reply With Quote
 
David M
Guest
Posts: n/a

 
      07-22-2007, 11:43 AM
On Sat, 21 Jul 2007 23:38:27 -0400, Randy Yates rearranged some electrons
to form:

> David M <(E-Mail Removed)> writes:
>
>> On Sat, 21 Jul 2007 15:17:59 -0400, Randy Yates rearranged some electrons
>> to form:
>>
>>> Keith Keller <kkeller-(E-Mail Removed)> writes:
>>>
>>>> On 2007-07-21, Randy Yates <(E-Mail Removed)> wrote:
>>>>>
>>>>> I also have a Linksys router configured to dynamically assign
>>>>> my home network IP address via DHCP. I have two FC4 and one FC6
>>>>> computers on the network.
>>>>>
>>>>> However, this is a pain since, occasionally, maybe once every 6 months
>>>>> or so, my IP addresses get shuffled. Then I have to go modify
>>>>> everything that relies on the IP addresses.
>>>>
>>>> If you're able to do so, configure the DHCP server on the Linksys to
>>>> map a given MAC address to a given IP. Then, whenever machine X needs
>>>> to renew, it will be given the same address.
>>>>
>>>> Do you even need DHCP at all? If you need the names to be static, make
>>>> them static, don't even have them ask for an IP. You should be able to
>>>> configure the Linksys to reserve a range of IPs that are not DHCP, then
>>>> use IPs in that range as static IPs on your home machines. Then, you
>>>> can either run named,
>>>
>>> If I ran named (I like this idea since I like the performance advantage
>>> it offers for all locally-connect machines), and I disabled DHCP, then
>>> how do I assign a specific IP address to each machine?
>>>
>>> Also, if I did run named (i.e., if I ran a "local caching
>>> nameserver"), then is it true that all I'd have to do is edit the
>>> /etc/resolv.conf to add 127.0.0.1 and comment out any other (ISP)
>>> nameservers? That's what is stated in "Red Hat Fedora 4 Unleashed"
>>> by Paul Hudson et al.
>>>
>>> If I did that then how would my local caching nameserver know where
>>> to go when it can't resolve a name?
>>>
>>> Also, if I disabled DHCP, wouldn't I also have the negative side-effect
>>> of losing dynamic nameserver updates? I.e., if a nameserver address
>>> changes at my ISP, I'd have to go in and manually update it somewhere,
>>> right?
>>>
>>> Otherwise it's OK with me to disable DHCP - there are no Windoze machines
>>> on this network, and there never will be.

>>
>> You're making this way too hard.
>>
>> 1) Assign fixed IP addresses for each computer on your network.
>> 2) Add each name & IP to /etc/hosts
>>
>> Done.

>
> Hi David,
>
> I hear you. But what if I get a new (linux) laptop next week? Then
> I need to update three computers' /etc/hosts file plus initialize
> the one on the laptop. And if the IP addresses change, etc., etc.


Ummm, the IP addresses won't change if you assign them.

Ummm, changing /etc/hosts isn't hard. All it takes is a text editor.


--
David M (dmacchiarolo)
http://home.triad.rr.com/redsled

 
Reply With Quote
 
Randy Yates
Guest
Posts: n/a

 
      07-23-2007, 11:54 AM
Stefan Monnier <(E-Mail Removed)> writes:

>> I'm using Fedora Core 6.
>> I have not be using any DNS so far for systems on my local home
>> network, instead just using the local private network IP address
>> directly (192.168.x.y).

>
>> I also have a Linksys router configured to dynamically assign
>> my home network IP address via DHCP. I have two FC4 and one FC6
>> computers on the network.

>
> The best solution I know of is to use the dnsmasq server, which combines
> DHCP and DNS, so you get dynamically allocated IP addresses, but the DNS
> server knows them and can associate them with the host name (provided by
> the DHCP request).
>
> So, my laptop's name being "alfajor", when the dnsmasq server returns IP
> 192.168.6.28 it also adds to the DNS server an entry that says "alfajor.home
> has IP 192.168.6.28".
>
> You can use the dnsmasq server on your router if you install a third party
> firmware such as OpenWRT.


Hi Stefan,

Sorry for the delay in responding.

This looks like exactly the sort of function I am looking for. But
I'm curious: if not by IP address, how does dnsmasq map names to
computers? By MAC address?
--
% Randy Yates % "Midnight, on the water...
%% Fuquay-Varina, NC % I saw... the ocean's daughter."
%%% 919-577-9882 % 'Can't Get It Out Of My Head'
%%%% <(E-Mail Removed)> % *El Dorado*, Electric Light Orchestra
http://home.earthlink.net/~yatescr
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
networked computers not recognizing each other Dennis Wireless Networks 2 09-10-2008 04:54 PM
Can I configure multiple domain names to dhcpd.conf "optiondomain-name"? tek Linux Networking 1 01-13-2008 05:32 AM
Communication between networked computers Mike Wireless Networks 1 10-02-2006 09:42 PM
how to keep using my locally stored domain user profile while loggingon to different network OM Windows Networking 6 11-03-2005 04:29 PM
last names displayed in AD Uses & Computers =?Utf-8?B?VFI=?= Windows Networking 0 04-27-2004 03:26 PM



1 2 3 4 5 6 7 8 9 10 11