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

This is a discussion on How do I configure domain names for my locally-networked computers? - Networking ; 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 ...

+ Reply to Thread
Results 1 to 13 of 13

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

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

    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."
    %%%% % '21st Century Man', *Time*, ELO
    http://home.earthlink.net/~yatescr

  2. Re: How do I configure domain names for my locally-networkedcomputers?

    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

  3. Re: How do I configure domain names for my locally-networked computers?

    On 2007-07-21, Randy Yates 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@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


  4. Re: How do I configure domain names for my locally-networked computers?

    Keith Keller writes:

    > On 2007-07-21, Randy Yates 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..."
    %%%% % 'One Summer Dream', *Face The Music*, ELO
    http://home.earthlink.net/~yatescr

  5. Re: How do I configure domain names for my locally-networked computers?

    On Sat, 21 Jul 2007 15:17:59 -0400, Randy Yates rearranged some electrons
    to form:

    > Keith Keller writes:
    >
    >> On 2007-07-21, Randy Yates 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



  6. Re: How do I configure domain names for my locally-networked computers?

    > 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

  7. Re: How do I configure domain names for my locally-networked computers?

    David M writes:

    > On Sat, 21 Jul 2007 15:17:59 -0400, Randy Yates rearranged some electrons
    > to form:
    >
    >> Keith Keller writes:
    >>
    >>> On 2007-07-21, Randy Yates 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 %
    %%%% % 'Shangri-La', *A New World Record*, ELO
    http://home.earthlink.net/~yatescr

  8. Re: How do I configure domain names for my locally-networked computers?

    On 2007-07-22, Randy Yates wrote:
    > David M writes:
    >
    >> On Sat, 21 Jul 2007 15:17:59 -0400, Randy Yates rearranged some electrons
    >> to form:
    >>
    >>> Keith Keller 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-usenet@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


  9. Re: How do I configure domain names for my locally-networked computers?

    On Sat, 21 Jul 2007 23:38:27 -0400, Randy Yates rearranged some electrons
    to form:

    > David M writes:
    >
    >> On Sat, 21 Jul 2007 15:17:59 -0400, Randy Yates rearranged some electrons
    >> to form:
    >>
    >>> Keith Keller writes:
    >>>
    >>>> On 2007-07-21, Randy Yates 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


  10. Re: How do I configure domain names for my locally-networked computers?

    Stefan Monnier 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'
    %%%% % *El Dorado*, Electric Light Orchestra
    http://home.earthlink.net/~yatescr

  11. Re: How do I configure domain names for my locally-networked computers?

    On 2007-07-23, Randy Yates wrote:
    > Stefan Monnier 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@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


  12. Re: How do I configure domain names for my locally-networked computers?

    > 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 "";


    -- Stefan

  13. Re: How do I configure domain names for my locally-networked computers?

    Stefan Monnier 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 "";


    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..."
    %%%% % 'Waterfall', *Face The Music*, ELO
    http://home.earthlink.net/~yatescr

+ Reply to Thread