-3

Is it possible to do something like what /etc/hosts does for one computer, for all computers on a local network?

I'm using a D-Link DIR-655 B1. If necessary I'd be fine installing new firmware, but I'm having a hard time finding documentation about this kind of thing-- Google really wants to tell me how to set up Dynamic DNS, which I've already got running.

In case it matters: I've got a media server on a static IP on my LAN, and I'd like to be able to tell guests "go to carsonella.local" instead of "go to 192.168.0.32", since that freaks people out.

quodlibetor
  • 277
  • 2
  • 4
  • 11

1 Answers1

5

Yes, you can do this. It's called DNS. Set up a DNS server in your LAN and configure your client machines to use it.

MDMarra
  • 100,183
  • 32
  • 195
  • 326
  • This would require me to ask my guests to modify their network settings and use my DNS server instead of the one assigned by DHCP? I would probably do this with the server that I'm using to host media, so unless I'm misunderstanding you, I would go from telling people "Check out my music, go to 192.168.0.32" to "Check out my music, go to (OS-dependent settings screen) and use 192.168.0.32 as your DNS server, okay, now go to carsonella.local". Also: I use "DNS" in my question title, AND it's tagged "dns", don't you think I know what it is? I'm asking for specific help with my situation. – quodlibetor Mar 11 '12 at 01:18
  • 8
    Don't be mad at me because you don't have a fundamental understanding of how DNS and DHCP work. You can configure DHCP to assign whatever DNS server you want to the clients. Have it assign the one that you set up internally. You asked a poor question. I answered it. Google and entry level SA books are your friend. – MDMarra Mar 11 '12 at 01:22
  • I wasn't mad at you because I don't understand how things work, I was pointing out that your answer of "Use DNS and configure your clients to use it" is obviously not helpful to someone who uses "DNS" three places in their question, two of them very prominent. I've *heard* of DNS, I've configured DDNS, I understand the relationship between DHCP and DNS, I explicitly asked how to configure my network's DNS they way I want it, and I'd spent nearly an hour googling my situation. – quodlibetor Mar 11 '12 at 14:02
  • 1
    We're a site for IT professionals. It says so in the very first line of the [faq]. We assume that you are capable of basic tasks. If you were to ask something like "How do I create a zone in BIND for internal lookups?" you might get a detailed answer. Just saying "I have this gear, solve my problem." isn't going to get you anywhere, especially considering the solution to your question should be painfully obvious to any professional Systems Administrator. – MDMarra Mar 11 '12 at 14:37
  • Right, so I should have asked on SuperUser. Flagging to move this question would, I think, have been more helpful than "DNS -> Wikipedia." – quodlibetor Mar 11 '12 at 14:43
  • I'm still not sure what your issue with my answer is. Your question is `Is it possible to do something like what /etc/hosts does for one computer, for all computers on a local network?` the answer is `"Yes, use DNS."` the only time that you mention DNS is to say that you've set up DDNS, which is **not** the same as having your own internal name server. I'm not a mind reader and I don't know your level of expertise, but judging by the contents/quality of the question, my answer is both correct and appropriate. If you disagree, flag it as offensive and let a mod decide. – MDMarra Mar 11 '12 at 14:49
  • I don't think your answer was offensive, I just thought you hadn't read my question: paraphrasing, here's what I thought I said: "I would like to configure DNS to override some names on my local network (Details of my situation)". To which you responded: "Use DNS." – quodlibetor Mar 11 '12 at 15:00
  • 1
    You don't "override some names". That's not how that works. Those names are resolved somehow, whether it's NetBIOS, Bonjour, DNS, WINS, etc. if you want clients to resolve something that's fully-qualified without using the hosts file, you **must** use DNS. You can't selectively say "use one method for this server and another for that server". I think the disconnect between us is that you are either asking for something that doesn't exist, or you don't understand how name resolution works. Either way, the complete and correct answer is "Use DNS internally" – MDMarra Mar 11 '12 at 15:29
  • Thanks, I eventually got that. If you had said "set up a DNS server and tell your router to use that instead of what it's currently using" I would have been able to figure it out. Once I *did* understand what you were saying I got it worked out. If you care, I documented my setup on my blog: http://wp.me/p7Rar-52 . – quodlibetor Mar 12 '12 at 02:37
  • FWIW, I found this question (2 years late) looking for an answer to OP's question. My last wifi router before my move was ISP provided, it allowed me to say, hey, "resolve 'share' to 192.168.0.51". This made it really simple for me to point anyone on my network, using router provided DNS to automatically connect to "share" (unless they had weird custom DNS or custom HOSTS file). While setting up a DNS server on the LAN is certainly a way of doing things, it's a really big hammer for a really small nail - one address resolution. – Ikai Lan Aug 31 '14 at 02:46
  • Getting this discussion back on track - it's too bad the DIR-655 doesn't let you do this. If you want clients on your network to resolve a specific address, yes, you do need to set up a DNS server. Go to the OP's link and go to step 3: http://blog.quodlibetor.com/2012/03/my-extremely-specific-dns-settings/ – Ikai Lan Aug 31 '14 at 02:50