You are not logged in.

#1 2007-04-11 08:52:07

STiAT
Member
From: Vienna, Austria
Registered: 2004-12-23
Posts: 606

DNS / Name Resolving in a local network

Hello,

I've a little question about something i did never mess about. It's time to think some more about this topic, so i simply decided to first ask and then think big_smile. No, of course i used google, but could not find any answers which fit, so i might simply searched for the wrong things.

I want to reach my machines in my local network using a name instead of an IP Address. Now, that usually is configured using DNS, as i know. My local router does acutally get the DNS Servers from my internet provider, who actually does not have my local computers in their name resolving.

I now thought about which configuration i could do to have my local network addresses being resolved, so i can in example do http://oneofmypcs/rest_of_uri

I do have a server machine, and could configure this as a DNS server as well. I could enter as a 2nd DNS on my router.

The question is now: how to do such a configuration? Where to start?

Kind regards,
STi


Ability is nothing without opportunity.

Offline

#2 2007-04-11 09:05:09

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: DNS / Name Resolving in a local network

How big is your network? If it's small, you could just edit /etc/hosts on each machine.

Personally, I use dnsmasq, provided by my IPCop box.

Offline

#3 2007-04-11 09:09:59

STiAT
Member
From: Vienna, Austria
Registered: 2004-12-23
Posts: 606

Re: DNS / Name Resolving in a local network

dnsmasq shouldnt be a problem to install on arch either (my server / webserver / svn box runs arch).

My network currently has:
3 server pcs, 7 workstations, 4 mobile devices (laptops). It's just my network at home.

The problem is some of them are running Windows (pc of my girlfriend, laptop of the girlfriend, ...), and without a proper name resolution i wouldn't get it to run that easily by editing the hosts file (i know windows also has something as a hosts file .. but i hate windows and since i run linux as main system for more than 9 years now, i don't have a real clue of windows).

I edited my local /etc/hosts (of my main machine), but that's just the configuration of my computer to find the others, others won't find me therefore as i know.

Last edited by STiAT (2007-04-11 09:12:38)


Ability is nothing without opportunity.

Offline

#4 2007-04-11 09:36:10

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: DNS / Name Resolving in a local network

STiAT, the easiest solution would be to argue your girlfriend into using arch just as I did... smile

Joking aside, I'd go for dnsmasq as well....

Last edited by dw (2007-04-11 09:36:27)

Offline

#5 2007-04-11 09:37:13

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: DNS / Name Resolving in a local network

The usual case is that you set the hostnames in /etc/hosts of the box running dnsmasq - and point those other boxes to it (resolv.conf). In your case - as it doesn't seem the box running dnsmasq is your router - you could point the boxes to dnsmasq box and that box to your router. That way you could even set up DNS caching - if your router doesn't support that.

Last edited by lucke (2007-04-11 09:37:32)

Offline

#6 2007-04-11 09:38:14

Purch
Member
From: Finland
Registered: 2006-02-23
Posts: 229

Re: DNS / Name Resolving in a local network

I have arch server as gateway/NAT running dnsmasq for LAN. I got name resolution working in the LAN. Hima domain is just for local dns and nothing real actually.

/etc/hosts

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>   <hostname.domain.org>   <hostname>
#127.0.0.1      SERVO
127.0.0.1       localhost
192.168.1.1     servo.hima      servo
#192.168.1.3    peli.hima       peli
#192.168.1.4    xbox.hima       xbox
192.168.1.98    bridge.hima     bridge
192.168.1.99    wlan.hima       wlan

# End of file

/etc/resolv.conf

nameserver 192.168.1.1
nameserver isp-dns-#1
nameserver isp-dns-#2

/etc/dnsmasq.conf

bogus-priv
local=/hima/
interface=eth1
expand-hosts
domain=hima
dhcp-range=192.168.1.10,192.168.1.90,12h
dhcp-host=xx:xx:xx:xx:xx:xx,xbox,48h
dhcp-host=xx:xx:xx:xx:xx:xx,peli,48h
dhcp-option=42,0.0.0.0
dhcp-authoritative
cache-size=1500

/etc/conf.d/dhcpcd

#
# Arguments to be passed to the DHCP client daemon
#

#DHCPCD_ARGS=""
DHCPCD_ARGS="-R -t 30 -h $HOSTNAME"

-R prevents resolv.conf being overwriten, so the 192.168.1.1(dnsmasq) is the first to solve names. This should be done some other way. or I get /etc/resolv.conf as

nameserver isp-dns-#1
nameserver isp-dns-#2
search isp.domain

Last edited by Purch (2007-05-22 04:19:54)

Offline

#7 2007-04-11 09:55:17

STiAT
Member
From: Vienna, Austria
Registered: 2004-12-23
Posts: 606

Re: DNS / Name Resolving in a local network

No, my router is there to connect to the net, it's a hardware router / firewall / content filter for our planned kids etc.

Anyway, i can bypass another way, setting the DNS of one of my servers, who actually holds the local addresses (dnsmasq) as well as the dns servers from my provider, and configuring the router to use my server as dns.

It's with the cross around the church but could work tongue

No, i won't convince my girlfriend to use arch... i already can hear her voice shouting my name when something won't work out as expected tongue.


Ability is nothing without opportunity.

Offline

#8 2007-04-11 10:02:45

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: DNS / Name Resolving in a local network

Don't you like when she shouts your name?

Offline

#9 2007-04-11 11:20:14

STiAT
Member
From: Vienna, Austria
Registered: 2004-12-23
Posts: 606

Re: DNS / Name Resolving in a local network

Not that i dislike my name, but that always means some kind of work... at least when it's her shouting... generally i'm rarely called since someone wants to give me something, rather they want something ...


Ability is nothing without opportunity.

Offline

#10 2007-04-11 16:13:02

briest
Member
From: Katowice, PL
Registered: 2006-05-04
Posts: 468

Re: DNS / Name Resolving in a local network

Leaving DNS and girlfriend problems aside, I'd suggest using Samba. More precisely, nmbd to make your Linux machines "visible" to Win ones, and nss_wins for resolving names in the opposite direction (change "hosts: files dns" in /etc/nsswitch.conf to "hosts: files wins dns").

Offline

Board footer

Powered by FluxBB