Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Enthusiast Zone > Networking > Difference Between Hostname and IP Routing on LAN

Difference Between Hostname and IP Routing on LAN
Thread Tools
ghporter
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Sep 25, 2023, 02:02 PM
 
So what is the difference? Is it just an entry in a hosts file, in a routing table, or something else?

Glenn -----OTR/L, MOT, Tx
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Sep 25, 2023, 06:34 PM
 
IP routing: enter 192.168.1.33 and you are sent to 192.168.1.33
LAN hostname routing: enter 'printer.local' (or whatever you've called it) and you are sent to 192.168.1.33

ie - allows you to give plain-language names to your LAN addresses. So you don't have to remember the numbers. To do this, you need a router that can set local DNS entries. Cheap routers won't be able - you'll need a fancy router, or a business-class router.

I've never tried to do this - but it shouldn't be hard. Just don't create a local override that conflicts with an address on the wider internet. Pointing 'google.com' to your media server, will force you to use alternative search engines on the wider internet. Since google wouldn't be reachable. That, or watch a movie every time you want to search for something. When the movie's over, you may have forgotten what you'd planned to search for. Problem solved.
     
ghporter  (op)
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Sep 26, 2023, 05:12 PM
 
“Glenns-iMac.local” works across my LAN, which is based on a (very old, 4th gen) Airport Extreme. I don’t see any entries in my iPad’s routing table for that hostname. Is Apple using some special magic in my old router, or is this Apple stuff “just working,” or what?

Full disclosure: I DID try to research this. I got stuff about finding hosts on Vanderbilt’s LAN and similar results, but nothing about a small-scale LAN.

Glenn -----OTR/L, MOT, Tx
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Sep 26, 2023, 06:00 PM
 
Sorry, I don't have those answers. Never owned an Apple router. It does sound like Apple added a local DNS entry to the AE, so things "just work".
     
Waragainstsleep
Posting Junkie
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Sep 27, 2023, 02:48 AM
 
Glenns-iMac.local is set within that iMac, you can edit it by changing the computer name under the Sharing pane of the System Prefs or its equivalent under Ventura or later. The fact that other devices on the network can resolve it is down to the Bonjour local network discovery protocol which is indeed a case of Apple stuff "just working".

You can edit the hosts file on each Mac if you wish but its probably not the best bet. The other way to do it is to set up your own DNS server. I've only ever done that with Mac OS Server (you're gonna want an old one, probably Snow Leopard) or you could do it with a any box running a BIND service I think. Then you set the IP of your internal DNS server as the network DNS server issued via DHCP by your router.
( Last edited by Waragainstsleep; Oct 5, 2023 at 08:13 PM. Reason: typo)
I have plenty of more important things to do, if only I could bring myself to do them....
     
ghporter  (op)
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Sep 27, 2023, 09:50 AM
 
Ahhh. Bonjour does it! That’s the missing piece of the puzzle. Thanks!

Glenn -----OTR/L, MOT, Tx
     
Brien
Professional Poster
Join Date: Jun 2002
Location: Southern California
Status: Offline
Reply With Quote
Sep 30, 2023, 04:27 PM
 
Originally Posted by Waragainstsleep View Post
Glenns-iMac.local is set within that iMac, you can edit it by changing the computer name under the Shamring pane of the System Prefs or its equivalent under Ventura or later. The fact that other devices on the network can resolve it is down to the Bonjour local network discovery protocol which is indeed a case of Apple stuff "just working".

You can edit the hosts file on each Mac if you wish but its probably not the best bet. The other way to do it is to set up your own DNS server. I've only ever done that with Mac OS Server (you're gonna want an old one, probably Snow Leopard) or you could do it with a any box running a BIND service I think. Then you set the IP of your internal DNS server as the network DNS server issued via DHCP by your router.
Wonder if it’d work with a PiHole.
     
ghporter  (op)
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Sep 30, 2023, 06:23 PM
 
My Linux machine, in which I installed a Linux-flavor of Bonjour to connect to networked printers, also sees my Macs as “Glens-iMac.local”, etc. So if the computer has a Bonjour app/implementation, I think it should work.

Glenn -----OTR/L, MOT, Tx
     
Waragainstsleep
Posting Junkie
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Oct 5, 2023, 08:16 PM
 
Originally Posted by Brien View Post
Wonder if it’d work with a PiHole.
I've never used one but I assume they are running as local DNS servers in order to intercept ad traffic.

Originally Posted by ghporter View Post
My Linux machine, in which I installed a Linux-flavor of Bonjour to connect to networked printers, also sees my Macs as “Glens-iMac.local”, etc. So if the computer has a Bonjour app/implementation, I think it should work.
It got installed on Windows machines alongside iTunes.
I have plenty of more important things to do, if only I could bring myself to do them....
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:45 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,