Use computer name instead of ip address in heterogeneous environment

1

I have got a few machines all connected to a ISP supplied router; a Netgear CGD24G. I added a 1Gb switch because I have too many computers. Otherwise, machines connect to the home network either via wireless or the ethernet.

The problem I'm trying to solve now is if I am on my Mac and I want to access the Linux box, I have to do ssh 192.168.0.45 and I really want to just do ssh linuxbox1.

Similarly, if I am on my Mac and use remote desktop, I want to enter the Windows machine’s name and not have to look up the ip address. Same situation from Windows - I would like to ssh linuxbox1 or ssh macbook.

The IP addresses change so after a while and I’m starting to build up ESXi server which will bring a lot more Linux images. The situation will get crazy very fast.

What are my options?

stewart99

Posted 2015-03-14T05:21:57.667

Reputation: 821

Can you please edit your question to provide details on what the make/model of your ISP supplied modem is? In general what you are looking for is a Zero-configuration networking setup which Macs and Windows handle my default. Some Linux distros as well.

– JakeGould – 2015-03-14T05:24:47.237

It it a Netgear CGD24G – stewart99 – 2015-03-14T05:29:15.407

On linux zeroconf is called avahi. Bonjour is the apple equivilent and works on windows as well. Not sure about the configuration bits tho – Journeyman Geek – 2015-03-14T12:15:22.167

@JakeGould Normally I’d agree on mDNS, but some devices cannot support it, like the ESXi host. – Daniel B – 2015-03-14T12:39:15.383

Answers

2

A quick read of the manual suggests this router has no way for you to manage local hostnames

This is surprising. Usually a router that provides DHCP service also provides a means for you to use computer-names from their DHCP requests or to administratively assign new names that the router then includes in it's DNS service.

The router does have a way to disable it's DHCP service (hat tip to Daniel B. for noticing what I had missed)

enter image description here

So I'd click that (*) No option and set up a better DHCP + DDNS service on another computer - ideally an appliance that is always turned on (or at least turned on before anything else).


Another, moderately disagreeable, option with this setup would be to configure all the computers names and addresses manually and use one of them to host a local DNS service which forwards non-local resolution via your router. This gets tiresome as the number of computers increases.

RedGrittyBrick

Posted 2015-03-14T05:21:57.667

Reputation: 70 632

He could just use another machine for DHCP and DNS services. Because different DHCP clients have different opinions on when and what to provide for the host name, this whole DHCP/DDNS thing isn’t reliable, though. – Daniel B – 2015-03-14T11:51:19.513

@Daniel, I couldn't see a way to disable the router's DHCP service, it is usually a bad idea to have two DHCP servers on one LAN, particularly if you can't configure them to have distinct IP-ranges in their pools. If the router's DHCP can be disabled, I agree. – RedGrittyBrick – 2015-03-14T11:54:35.703

It’s on page 69 in the manual you linked. ;) – Daniel B – 2015-03-14T12:03:55.193

@Daniel: Doh! I stared at that page and missed that. Updating answer. – RedGrittyBrick – 2015-03-14T12:12:14.323

This is a good answer. Thank you. I also looked at the admin webpage and the closest thing I could find is a MAC to IP address table that I could edit. I could enter all the values in this table and have some sort of centralized hostname file that take the now static ips to hostname. This just sucks though. Any suggestions on networking equipment that I could buy that can do what you suggested for me? I just want something that just works. – stewart99 – 2015-03-14T18:51:47.660

1@doorfly The cheapest solution would be OpenWrt on an MR3020 or similar. dnsmasq (included in most OpenWrt images) can serve as an all-in-one DHCP/DNS/DDNS server. – Daniel B – 2015-03-14T19:08:38.090