Help!

How do I configure domain names for my locally-networked c..


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Networking RSS
Next:  NetGear WAG511 Most Linux Friendly PCMCIA Wireles..  
Author Message
Randy Yates
External


Since: Sep 07, 2006
Posts: 159



PostPosted: Sat Jul 21, 2007 2:06 pm    Post subject: How do I configure domain names for my locally-networked computers?
Archived from groups: comp>os>linux>networking (more info?)

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."
%%%% <yates DeleteThis @ieee.org> % '21st Century Man', *Time*, ELO
http://home.earthlink.net/~yatescr
Back to top
Keith Keller
External


Since: Jun 21, 2006
Posts: 458



PostPosted: Sat Jul 21, 2007 2:06 pm    Post subject: Re: How do I configure domain names for my locally-networked computers? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2007-07-21, Randy Yates <yates.TakeThisOut@ieee.org> 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-usenet.TakeThisOut@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
Back to top
Randy Yates
External


Since: Sep 07, 2006
Posts: 159



PostPosted: Sat Jul 21, 2007 3:17 pm    Post subject: Re: How do I configure domain names for my locally-networked computers? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Keith Keller <kkeller-usenet DeleteThis @wombat.san-francisco.ca.us> writes:

> On 2007-07-21, Randy Yates <yates DeleteThis @ieee.org> 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. Smile
--
% Randy Yates % "Bird, on the wing,
%% Fuquay-Varina, NC % goes floating by
%%% 919-577-9882 % but there's a teardrop in his eye..."
%%%% <yates DeleteThis @ieee.org> % 'One Summer Dream', *Face The Music*, ELO
http://home.earthlink.net/~yatescr
Back to top
Jack Snodgrass
External


Since: Jan 12, 2007
Posts: 10



PostPosted: Sat Jul 21, 2007 6:23 pm    Post subject: Re: How do I configure domain names for my locally-networked [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
Back to top
David M
External


Since: Jun 07, 2006
Posts: 98



PostPosted: Sat Jul 21, 2007 9:16 pm    Post subject: Re: How do I configure domain names for my locally-networked computers? [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Stefan Monnier
External


Since: Mar 31, 2005
Posts: 68



PostPosted: Sat Jul 21, 2007 11:30 pm    Post subject: Re: How do I configure domain names for my locally-networked computers? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> 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
Back to top
Randy Yates
External


Since: Sep 07, 2006
Posts: 159



PostPosted: Sat Jul 21, 2007 11:38 pm    Post subject: Re: How do I configure domain names for my locally-networked computers? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

David M <NOSPAM.RemoveThis@nospam.com> writes:

> On Sat, 21 Jul 2007 15:17:59 -0400, Randy Yates rearranged some electrons
> to form:
>
>> Keith Keller <kkeller-usenet.RemoveThis@wombat.san-francisco.ca.us> writes:
>>
>>> On 2007-07-21, Randy Yates <yates.RemoveThis@ieee.org> 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. Smile
>
> 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 %
%%%% <yates.RemoveThis@ieee.org> % 'Shangri-La', *A New World Record*, ELO
http://home.earthlink.net/~yatescr
Back to top
Keith Keller
External


Since: Jun 21, 2006
Posts: 458



PostPosted: Sat Jul 21, 2007 11:38 pm    Post subject: Re: How do I configure domain names for my locally-networked computers? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2007-07-22, Randy Yates <yates DeleteThis @ieee.org> wrote:
> David M <NOSPAM DeleteThis @nospam.com> writes:
>
>> On Sat, 21 Jul 2007 15:17:59 -0400, Randy Yates rearranged some electrons
>> to form:
>>
>>> Keith Keller <kkeller-usenet DeleteThis @wombat.san-francisco.ca.us> 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. Smile 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-usenet DeleteThis @wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
Back to top
David M
External


Since: Jun 07, 2006
Posts: 98



PostPosted: Sun Jul 22, 2007 7:43 am    Post subject: Re: How do I configure domain names for my locally-networked computers? [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Randy Yates
External


Since: Sep 07, 2006
Posts: 159



PostPosted: Mon Jul 23, 2007 7:54 am    Post subject: Re: How do I configure domain names for my locally-networked computers? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Stefan Monnier <monnier.TakeThisOut@iro.umontreal.ca> 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'
%%%% <yates.TakeThisOut@ieee.org> % *El Dorado*, Electric Light Orchestra
http://home.earthlink.net/~yatescr
Back to top
Keith Keller
External


Since: Jun 21, 2006
Posts: 458



PostPosted: Mon Jul 23, 2007 10:21 am    Post subject: Re: How do I configure domain names for my locally-networked computers? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2007-07-23, Randy Yates <yates DeleteThis @ieee.org> wrote:
> Stefan Monnier <monnier DeleteThis @iro.umontreal.ca> writes:
>>
>> 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).
>
> 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?

It is exactly what Stefan described: it uses the hostname provided by
the client. So if host1 asks for an IP, and provides the name 'donut',
dnsmasq will answer donut.yourdomain for requests for that IP (and
vice versa). dnsmasq trusts that every client is providing a name
acceptable to the network admin. (At some sites, you might see
donut.dhcp.blah..... to distinguish machines that get their IP from
the DHCP server as opposed to a true static IP assigned by the network
group.)

--keith


--
kkeller-usenet DeleteThis @wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
Back to top
Stefan Monnier
External


Since: Mar 31, 2005
Posts: 68



PostPosted: Mon Jul 23, 2007 3:57 pm    Post subject: Re: How do I configure domain names for my locally-networked computers? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> 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?

The DHCP protocol allows the client to send some additional info, such as
its own hostname (not DNS name, just some random name you decided to give
to the machine). The DHCP server is free to ignore it, but can use it just
as well. E.g. it can be used to give out "static" IPs, or it can be used
(as is done by dnsmasq) to automatically build a DNS map.

Of course, if two machines connect with the same hostname, you may not
always get the result you want. I think the behavior is tailored to the
case where the same machine sometimes connects via different interfaces (so
the mac address may change, but dnsmasq assumes it's really the same
machine).

Note that the dhcp client that comes by default under Debian does not send
a hostname by default and doesn't even seem to provide a way to tell it to
"send the machine's hostname", so instead you have to manually add to the
/etc/dhclient.conf the machine's name with

send host-name "<myhostname>";


-- Stefan
Back to top
Randy Yates
External


Since: Sep 07, 2006
Posts: 159



PostPosted: Mon Jul 23, 2007 4:15 pm    Post subject: Re: How do I configure domain names for my locally-networked computers? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Stefan Monnier <monnier.TakeThisOut@iro.umontreal.ca> writes:

>> 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?
>
> The DHCP protocol allows the client to send some additional info, such as
> its own hostname (not DNS name, just some random name you decided to give
> to the machine). The DHCP server is free to ignore it, but can use it just
> as well. E.g. it can be used to give out "static" IPs, or it can be used
> (as is done by dnsmasq) to automatically build a DNS map.
>
> Of course, if two machines connect with the same hostname, you may not
> always get the result you want. I think the behavior is tailored to the
> case where the same machine sometimes connects via different interfaces (so
> the mac address may change, but dnsmasq assumes it's really the same
> machine).
>
> Note that the dhcp client that comes by default under Debian does not send
> a hostname by default and doesn't even seem to provide a way to tell it to
> "send the machine's hostname", so instead you have to manually add to the
> /etc/dhclient.conf the machine's name with
>
> send host-name "<myhostname>";

Excellent information. Thanks much, Stefan.
--
% Randy Yates % "So now it's getting late,
%% Fuquay-Varina, NC % and those who hesitate
%%% 919-577-9882 % got no one..."
%%%% <yates.TakeThisOut@ieee.org> % 'Waterfall', *Face The Music*, ELO
http://home.earthlink.net/~yatescr
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Networking All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can 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