[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: WLAN router doesn't provide fix IP addresses



Hello,

On 31/10/14 09:45, Karl E. Jorgensen wrote:
On Fri, Oct 31, 2014 at 09:28:33AM +0100, B. M. wrote:
Hi list,

I have a problem with my (w)lan setup.  We use telephone and
internet over the cable network and the company gives us a wlan
modem for free. Unfortunately this modem doesn't allow me to specify
fix IPs in the internal network for all of our machines.

Well - even if it doesn't, surely it allows you to specify which
*range* of IP addresses should be used for DHCP?

There is nothing wrong with configuring a server with a fixed IP
address (=not use DHCP client), as long as you use the correct
network, netmask and default gateway.
That seems the way to go to me.
Nevertheless I setup an owncloud server on one machine (which is
somehow our "server" but not always running), including SSL
encryption with a self-signed certificate for its IP address. That
worked well for a couple of months because the IP addresses didn't
change (although they were not fixed).

Now due to a technical problem our modem got replaced all of the IP
addresses changed. (I did expect that for sometime in the
future... but not so early...)

Since it's impossible to manually define the IP addresses, I've a
problem. Of course I could create a new certificate, put it on all
other machines and adjust all settings (owncloud server address...);
but that's quite an hassle.

Do the machines use avahi (or mdns? I'm actually not sure of the name,
but having libnss-mdns installed and "mdns4" mentioned in
/etc/nsswitch.conf would indicate so).

A quick research suggests you need avahi-daemon for propagation of .local-domains, e.g. for machines that need to be discovered, and libnss-mdns for discovery of the former.

For the name, the description of libnss-mdns says:
"Multicast DNS (using Zeroconf, aka Apple Bonjour / Apple Rendezvous )"
It seems to have many names.

If so, you should be able to use "${hostname}.local" instead of an IP
address, and the multicast DNS resolution would sort things out.

So I wanted to ask if there are other possibilities? I can define
one or two DNS server in the modem's config. Would it work to setup
my main machine (which is not always running) as an internal DNS
server and use the hostnames instead of the IP addresses?

That is also a possibility. But if it is only for facilitating a
single server, then it's overkill.  And it adds a single point of
failure too: you would not be able to resolve IP addresses while the
machine is down.

Maybe I'm mistaken, but wouldn't this just shift the problem to the internal DNS? It will still need a static IP or mDNS. Adding to that, it would need to be the only DNS in the router's config, as you cannot guarantee which one the router will use otherwise and the owncloud server wouldn't be discoverable via the second(public) DNS. And having your only DNS on a machine "which is not always running" seems a bad idea.

If you already own/run a domain, you can also add a A record in the
DNS for this to point to it - e.g. "owncloud.example.com IN A
192.168.0.45".

That would need dynamic DNS if the IP is still obtained via DHCP. And having a public DNS propagating a private IP will make reverse lookups impossible, I think. Correct my if I'm wrong.

Using an entry in /etc/hosts is also an option.

This seems the way to make the machine discoverable by name, but would still need a fixed IP for the owncloud server.

Summarizing, mDNS generally seems to be the easiest way. But if you use a static IP for your owncloud server you will need to change less with your current setup, it seems.

Best wishes,
Simon


Reply to: