LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   How does Slackware send a resolvable name to a ddns (http://www.linuxquestions.org/questions/slackware-14/how-does-slackware-send-a-resolvable-name-to-a-ddns-4175479393/)

coldbeer 10-02-2013 08:10 PM

How does Slackware send a resolvable name to a ddns
 
Sorry if this is a stupid question. I'm just trying to understand it.

I have Slackware 14 configured for DHCP. When I restart inet1 and look at the messages with wireshark I see the hostname sent on the dhcp discover, but not the fully qualified domain name.

So how does a ddns get a domain name that it can resolve to my box?

dog.fred.com
dog.barney.com

it only sends "dog" so how does it determine the rest?

/etc/HOSTNAME:
dog.fred.com

/etc/hosts:
127.0.0.1 localhost
192.168.1.103 dog.fred.com dog

/etc/dhcpcd.conf and /etc/rc.d/rc.inet1.conf are untouched.

NoStressHQ 10-02-2013 08:58 PM

Hi

Do you own the name "fred.com" bound to 93.188.173.198 ? Or is it just a name you chose on Slackware setup ?

Z038 10-02-2013 10:06 PM

DDNS is mechanism for your DHCP server to update your nameserver with information about dynamic IP addresses it has assigned. It is a communication method between a DHCP server and a nameserver. You need to be running a nameserver such as bind or dnsmasq somewhere on your network, and a DHCP server that assigns dynamic IP addresses to hosts on your network.

You define a zone file in your nameserver for your domain name. You define static hosts in the zone file with their fixed IP addresses. DDNS doesn't come into play for them. For the hosts with dynamic IP addresses, your DHCP server must inform your nameserver what IP address to add to the zone file.

Most home router/gateway appliances have a built in DHCP server to assign dynamic IP addresses on the local LAN, but they usually don't have a DNS nameserver, so they don't use DDNS.

Stuferus 10-03-2013 04:19 AM

dont use domainnames you may not own in your local network setup.

i think hes asking how dns aka the internet works?!? if so, there are root dns servers.. some else may cont. on that.

coldbeer 10-03-2013 05:50 AM

Quote:

Originally Posted by NoStressHQ (Post 5038952)
Hi

Do you own the name "fred.com" bound to 93.188.173.198 ? Or is it just a name you chose on Slackware setup ?

Quote:

Originally Posted by Stuferus (Post 5039136)
dont use domainnames you may not own in your local network setup.

i think hes asking how dns aka the internet works?!? if so, there are root dns servers.. some else may cont. on that.

The domainnames are hypothetical.

coldbeer 10-03-2013 06:12 AM

Where I work, I'm not sure of what they have running but I think its a combo of unix and windows systems for dns and ddns (win/dns?).

But anyways, at work, I can set up my slackware with netconfig for DHCP, and set the hostname to anything I want with the company's domain name. I can then use that url that I picked in a browser on another computer and it is resolved to my slackware box.

It is not a static IP and nobody is typing the url I picked into any system. I can change the hostname, reboot my box and the new url is immediately available to resolve to my slackware box again.

I don't want to post the actual URLs on a global forum for obvious reasons, but the url's are like: abc22.dog.nebraska.mycompany.net, where the "abc22.dog.nebraska" part is made-up and only the abc22 is the hostname. So the /etc/hosts looks like:

/etc/hosts:
127.0.0.1 localhost
192.168.1.103 abc22.dog.nebraska.mycompany.net abc22

I can change it so its zzz44.cat.florida.mycompany.net and after reboot, that url is resolvable on any computer to my slackware box.

So I don't understand how this is being done when on wireshark, I only see the 'zzz44' part being sent out.

NoStressHQ 10-03-2013 09:13 AM

Anyway, it's not Slackware specific somehow... Slackware use "vanilla" packages, so the answer to your question might be to look into the official DDNS system doc... Have you looked at this:

http://www.linuxquestions.org/linux/...em_DDNS_Server

?

It might be a bit old but it's still relevant I guess.

I'm not a specialist in this "domain" (huhuhu), so I can't help you in depth.

Also, sorry if my previous post seemed to be intrusive, it was a clumsy way to ask you if you used an officially registered domain name or were just using an already existing name incidentally, I guess it might change the behavior.

Bests.

Z038 10-03-2013 12:25 PM

Quote:

Originally Posted by coldbeer (Post 5039186)
But anyways, at work, I can set up my slackware with netconfig for DHCP, and set the hostname to anything I want with the company's domain name. I can then use that url that I picked in a browser on another computer and it is resolved to my slackware box.

It is not a static IP and nobody is typing the url I picked into any system. I can change the hostname, reboot my box and the new url is immediately available to resolve to my slackware box again.

Quote:

Originally Posted by coldbeer (Post 5039186)
So I don't understand how this is being done when on wireshark, I only see the 'zzz44' part being sent out.

It's like I said. Your company runs its own DNS servers and its own DHCP server. The DHCP server hands out dynamic IP addresses on the local network, and whenever it does so, it uses a DDNS key that is known to it and to the DNS server to tell the DNS server about the new host name and IP address. The DNS server updates its zone file accordingly. The zone file in the nameserver is what knows about the fqdn and keeps track of the hosts within it. Now when anyone on the local network tries to resolve your host name, the DNS server finds it in its zone file.

If you want to set up something like that on your home network, you need to configure either BIND (named) or dnsmasq as your name server (DNS server), and dhcpd as your DHCP server. A system running Slackware is perfect for that, since bind, dnsmasq, and dhcpd are already installed and waiting for you to configure them and turn them on. Setup can be a bit tricky the first time you go through it, especially with BIND.

Most home router/gateway devices have a built-in DHCP server that hands out dynamic IP addresses, but they don't usually have a DNS server, so there is no nameserver to get DDNS updates. If you make your Slackware-based DHCP server authoritative for your network, then you can turn off the one that runs in your router. Or you could leave it running as a backup in case the system hosting your own DHCP server is down.

I would suggest you pick a system that is active 24x7 on your network to run your primary nameserver and your DHCP server.

Does any of that make sense, or have I misunderstood what you are trying to do?

Look at /etc/rc.d/rc.dhcpd, /etc/rc.d/rc.bind, and /etc/rc.d/rc.dnsmasq, and their related config files in /etc. You'll need one or the other of bind or dnsmasq, but not both.

coldbeer 10-03-2013 03:00 PM

Yes, I'm starting to understand it now.

I also now see in the wireshark traces that the DHCP Discover message has the hostname and the DHCP Offer message has the remainder of the FQDN.

Thank you all for your help and patience! :)


All times are GMT -5. The time now is 08:01 AM.