The "@" Notation?

phn at icke-reklam.ipsec.nu phn at icke-reklam.ipsec.nu
Thu Dec 5 22:02:36 UTC 2002


Si <swalker at metrowerks.com> wrote:

> Hi All,

> Another person who is new to DNS.

> I am looking at BIND 8/9

> I have just read the 4th Chapter in the 4th Ed of DNS and BIND from
> O'reilly.

> It mentions shortcuts and one of them in the "@" notation.

> As I have read the @ is replaced in the zone file by the origin, which c=
omes
> from the zone statement in named.conf? The main question is do I need to
> have a trailing period (.) in the zone statement so that @ is complete w=
hen
> it is replaced in the zone file.

See '@' as a simple macro substitution for the current value of $ORIGIN

> So should named.conf be like so?

> zone "xyz.com."{
> type master;
> file "bxyz.com.";
> };

No, traling blanks in the named.conf file is ignored. ( but does not harm =
)


> With the trailing period (.) or can I leave it off as BIND would know th=
is
> is complete.

> I think this quite important as if I get it wrong all my hosts listed in=
 the
> zone file without the domain attached (like so) would then fail?



> localhost   IN A 127.0.0.1

> host-a      IN A 192.168.10.1

> host-b      IN A 192.168.10.2

> host-c      IN A 192.168.10.3

In the above example the value of $ORIGIN is appended to all names, thus=20
if $ORIGIN is "foo.biz." the the above reads :
localhost.foo.biz.	IN A 127.0.0.1
host-a.foo.biz.		IN A 192.168.10.1

etc




> I hope I have explained this ok..

> Regards,

> Si


--=20
Peter H=E5kanson=20=20=20=20=20=20=20=20=20
        IPSec  Sverige      ( At Gothenburg Riverside )
           Sorry about my e-mail address, but i'm trying to keep spam out,
	   remove "icke-reklam" if you feel for mailing me. Thanx.


More information about the bind-users mailing list