Adding a Domain Name in a Subdomain Without Creating a New Zone

2.9.1 Problem

You want to add a domain name in a subdomain of your zone, but don't want to create a new zone and delegate it from your current zone.

2.9.2 Solution

Just add the records associated with the new domain name, specifying the subdomain in the domain name. For example, to add the domain name a.b.foo.example to the foo.example zone, you could add this record to the foo.examplezone data file:

a.b.foo.example. IN A 10.0.0.4

Doing this implicitly creates the subdomain b.foo.example and the domain name a.b.foo.example. The subdomain b.foo.example is part of the foo.example zone (as is the domain name a.b.foo.example), and will be included in transfers of the zone to slave name servers.

If the origin in the zone data file is foo.example, the default, you can also write the record as:

a.b IN A 10.0.0.4

2.9.3 Discussion

Sometimes the solution to a problem is just the most obvious of the possibilities. That's the case both with setting up round robin and with this problem. But many administrators -- even the very experienced -- aren't accustomed to adding domain names to their zones that have multiple labels to the left of their zones' domain names. They think of the domain names in their zones as always having the format host.domain-name-of-zone, rather than any number of labels ending in the domain name of the zone.

2.9.4 See Also

For more on intrazone subdomains, see "Creating a Subdomain in the Parent's Zone" in Chapter 9 of DNS and BIND. If you do want to delegate the subdomain and create a new zone, see Section 6.2.

Getting Started

Zone Data

BIND Name Server Configuration

Electronic Mail

BIND Name Server Operations

Delegation and Registration

Security

Interoperability and Upgrading

Resolvers and Programming

Logging and Troubleshooting

IPv6



DNS & BIND Cookbook
DNS & BIND Cookbook
ISBN: 0596004109
EAN: 2147483647
Year: 2005
Pages: 220
Authors: Cricket Liu

Similar book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net