Date: Sun, 4 Jul 1999 14:18:22 -0400 (EDT) From: "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com> To: bhstech@iname.com Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Assigning sub-domain names Message-ID: <199907041818.OAA07264@cc942873-a.ewndsr1.nj.home.com> In-Reply-To: <19990704095124.UYUO8807.mail.rdc1.sfba.home.com@meatball.genevieve.dhs.org> from Mike Miller at "Jul 4, 89 02:50:06 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Miller wrote, > Hi, I would like to know how to assign sub-domain hostnames. > For example, I want to assign hostnames to inside my network, like > blah.[hostname] It's a breeze if you already have DNS running for your internal network. If you do not yet have DNS up and running, and do not know much about how BIND and DNS work... it's non-trivial, but not impossible. I'll assume you already have DNS for the internal net. Right now, your DNS server has something like, ; type domain source host/file backup file primary yourdomain.org yourdomain.org (Note: I'm using the "old-fashioned" named.boot for BIND; I dunno why, I just am.) And your SOA record looks something like, @ IN SOA yourdomain.org. bhstech.yourdomain.org. ( . . . The simplest, and least elegant way to go, is just to put entries in the DNS record with a subdomain hooked on, ; Subdomain 1 machine1.sub1 IN A 192.168.0.10 machine2.sub1 IN A 192.168.0.11 ; Subdomain 2 machine1.sub2 IN A 192.168.1.10 machine2.sub2 IN A 192.168.1.11 That should work (I _think_ I used to do that), but where's the fun in that? Alternately, you add lines to the named.boot, ; type domain source host/file backup file primary yourdomain.org yourdomain.org primary sub1.yourdomain.org sub1.yourdomain.org primary sub2.yourdomain.org sub2.yourdomain.org And the SOA record for the subdomains looks like, @ IN SOA sub1.yourdomain.org. bhstech.yourdomain.org. ( . . . And the entries in the record look like, ; Subdomain 1 machine1 IN A 192.168.0.10 machine2 IN A 192.168.0.11 Repeat the same for sub2. Now if you really want to get fancy, you can run DNS for the subdomains on different machines, but unless you have a humungous network that has multiple administrators (different individuals responsible for different subnets) and heavy DNS loads, that probably is not necesary. You did not state what version of FreeBSD. By default, the newer version of BIND comes with 3.x and the previous version with 2.2.x. They have different configuration/boot file formats. -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907041818.OAA07264>