|
Author |
Message |
t121anf |
This post is not being displayed .
|
 t121anf World Chat Champion

Joined: 23 Feb 2007 Karma :     
|
 Posted: 00:06 - 22 Jan 2015 Post subject: (Home) Network Advise - DNS |
 |
|
I'm having problems communicating between various devices via name.
For example from my Windows 7 VM, I can ping my server by name (server) however to do so from my Mac I need to use server.local.
My iPad talks (for rdp) to the server using server.local but my android phone won't.
I have 2 HTPCs which I would prefer to communicate with by name rather than IP, and assume I'll have the same problem as with my server.
My current setup is
Virgin Superhub (modem mode) --> Router (Asus RT-AC68u)
Router --> Server
Router --> NAS
Router --> Front Room switch
Router --> Rest of house switch
Front Room Switch --> Tivo
Front Room Switch --> HTPC
Front Room Switch --> PS3
Rest of house Switch --> Bedroom HTPC
before I had the Router, server.local never worked, so getting that has fixed my issue in part.
Thje router has an option under LAN-DHCP to add an IP for a DNS server, I guess my question is do I need to setup a DNS server?
This degree of networking is beyond my IT knowledge, we have a corporate IT team who handle all of this on our behalf (not asking them they'll over complicate things)
Alternatively I can stick to using IPs but they aren't as intuitive as names.
Thoughts?
ps any recommendations on improving my network in general are welcome but may be ignored  |
|
Back to top |
|
You must be logged in to rate posts |
|
 |
UrbanRacer |
This post is not being displayed .
|
 UrbanRacer World Chat Champion

Joined: 26 Jul 2005 Karma :     
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
CaNsA |
This post is not being displayed .
|
 CaNsA Super Spammer

Joined: 02 Jan 2008 Karma :   
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
barrkel |
This post is not being displayed .
|
 barrkel World Chat Champion
Joined: 30 Jul 2012 Karma :   
|
 Posted: 01:30 - 22 Jan 2015 Post subject: |
 |
|
Names under the .local domain are not like other names; .local means that the name is to be looked up using mDNS, a peer to peer UDP broadcast based protocol. Apple supports mDNS under the name Bonjour; Windows typically supports it after you install iTunes. If your networks are partitioned such that UDP broadcast packets can't reach all over it, then host name lookup across the network boundaries will fail.
Virtual machines are often configured using a separate network with NAT or bridging. NAT, for example, will not forward broadcast packets to the wider network.
Linux supports mDNS when Avahi is installed and configured via nsswitch.conf. Linux name resolution via glibc (linked to by most programs) consults nsswitch.conf's hosts entry to determine how to convert names to addresses. This is how Avahi gets into the mix.
However, your Android probably does not come with Avahi installed. I expect you'd need to root it to get it to work with mDNS correctly.
If you have any sophisticated requirements, I recommend running a small DNS server like dnsmasq on a Linux box. That's what I run at home; I disable my router's DHCP server, and use dnsmasq for DHCP as well. I use 8.8.8.8 / 8.8.4.4 as upstream DNS in dnsmasq. An additional advantage is that dnsmasq acts as a local DNS cache.
DD-WRT comes with dnsmasq, it is the DNS (and DHCP) server it uses. dnsmasq is far easier to configure than bind, and can do a lot of neat stuff.
Obviously, if you're using a DNS server, all machines on the network should be using it. It should be the configured DNS server via DHCP. When you use dnsmasq for both, it mostly just works.
If installing dnsmasq (either separately or via DD-WRT etc.) is too much of a PITA, configure things with static IP addresses (whatever you're using for DHCP, typically a router, can usually be taught to give the same IP address to the same machine). And then use the hosts file (/etc/hosts on Linux / OS X, c:\windows\system32\drivers\etc\hosts on Windows) to map names to IP addresses. The hosts file is checked before DNS is consulted. This won't really help you with Android devices though.
The name to IP address resolution system on most operating systems is pluggable. Obviously OS X and Windows have mDNS support plugged in, but Windows also has crufty old mechanisms like NetBIOS, used on LANs (typically over IPX) before TCP/IP was more popular. This means that Windows can sometimes resolve names that non-Windows devices can't. To be sure that Windows can use DNS (and not NetBIOS or mDNS) to resolve a name, use nslookup on the command line. You can use nslookup for the same purpose on OS X and Linux too. ____________________ Bikes: S1000R, SH350; Exes: Vity 125, PS125, YBR125, ER6f, VFR800, Brutale 920, CB600F, SH300x4
Best road ever ridden: www.youtube.com/watch?v=s2MhNxUEYtQ |
|
Back to top |
|
You must be logged in to rate posts |
|
 |
t121anf |
This post is not being displayed .
|
 t121anf World Chat Champion

Joined: 23 Feb 2007 Karma :     
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
b422063 |
This post is not being displayed .
|
 b422063 Crazy Courier

Joined: 14 Oct 2014 Karma :     
|
 Posted: 09:52 - 22 Jan 2015 Post subject: |
 |
|
Just edit your hosts file. I'm not sure about Windows, but in Linux it's under /etc/hosts
Edit it so it looks a little like:
Code: |
127.0.0.1 localhost
127.0.1.1 laptop
192.168.0.2 desktop
<ip> <name>
|
Then you can just "ping desktop" |
|
Back to top |
|
You must be logged in to rate posts |
|
 |
t121anf |
This post is not being displayed .
|
 t121anf World Chat Champion

Joined: 23 Feb 2007 Karma :     
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
UrbanRacer |
This post is not being displayed .
|
 UrbanRacer World Chat Champion

Joined: 26 Jul 2005 Karma :     
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
b422063 |
This post is not being displayed .
|
 b422063 Crazy Courier

Joined: 14 Oct 2014 Karma :     
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
Old Thread Alert!
The last post was made 10 years, 266 days ago. Instead of replying here, would creating a new thread be more useful? |
 |
|
|