Alias Record- Implementing DNS

Closely related to the host record is the alias record, or canonical name (CNAME) record. The syntax of an alias record is as follows: aliasoptional_TTL  IN  CNAME  hostname

Aliases are used to point more than one DNS record toward a host for which an A record already exists. For example, if the hostname of your web server was actually chaos, you would likely have an A record such as this:

chaos IN A 192.168.1.10

Then you could make an alias or CNAME for the record so that www.example.com would point to chaos:

www IN CNAME chaos.example.com.

Note the trailing dot (.) on the end of the CNAME record. This means the root domain is not appended to the entry.

Pointer Record

A or AAAA records are probably the most visible component of the DNS database because Internet users depend on them to turn FQDNs like www.microsoft.com into the IP addresses that browsers and other components require to find Internet resources. However, the host record has a lesser- known but still important twin: the pointer (PTR) record. The format of a PTR record appears as follows:

reversed_address.in- addr.arpa. optional_TTL IN PTR targeted_domain_name

The A or AAAA record maps a hostname to an IP address, and the PTR record does just the opposite— mapping an IP address to a hostname through the use of the in- addr.arpa  zone.

The PTR record is necessary because IP addresses begin with the least- specific portion first (the network) and end with the most- specific portion (the host), whereas hostnames begin with the most- specific portion at the beginning and the least- specific portion at the end.

Consider the example 192.168.1.10 with a subnet mask 255.255.255.0. The portion 192.168.1 defines the network and the final .10 defines the host, or the most specific portion of the address. DNS is just the opposite: The hostname www.example.com. defines the most- specific portion, www, at the beginning and then traverses the DNS tree to the least- specific part, the dot (.), at the root of the tree.

Reverse DNS records, therefore, need to be represented in this most-s pecific- to- least- specific manner. The PTR record for mapping 192.168.1.10 to www.example.com would look like this:

10.1.168.192.in- addr.arpa. IN PTR www.example.com.

Now a DNS query for that record can follow the logical DNS hierarchy from the root of the DNS tree all the way to the most specific portion.

Mail Exchanger Record

The mail exchanger (MX) record is used to specify which servers accept mail for this domain. Each MX record contains two parameters— a preference and a mail server, as shown in the following example:

domain IN MX preference mailserver_host

The MX record uses the preference value to specify which server should be used if more than one MX record is present. The preference value is a number. The lower the number, the more preferred the server. Here’s an example: example.com.    IN  MX  0  mail.example.com. example.com.    IN  MX  10 backupmail.example.com.

In the example, mail.example.com is the default mail server for the domain. If that server goes down for any reason, the backupmail.example.com mail server is used by emailers.

Service Record

Windows Server 2022 depends on some other services, like the Lightweight Directory Access Protocol (LDAP) and Kerberos. Using a service record, which is another type of DNS record, a Windows 2000, XP, Vista, Windows 7, Windows 8 / 8.1, or Windows 10/11 client can query DNS servers for the location of a domain controller. This makes it much easier (for both the client and the administrator) to manage and distribute logon traffic in large- scale networks. For this approach to work, Microsoft has to have some way to register the presence of a service in DNS. Enter the service (SRV) record.

Service (SRV) records tie together the location of a service (like a domain controller) with information about how to contact the service. SRV records provide seven items of information. Let’s review an example to help clarify this powerful concept. (Table 5.4 explains the fields in the following example.)

ldap.tcp.example.com.  86400 IN SRV  10  100  389  hsv.example.com ldap.tcp.example.com.  86400 IN SRV  20  100  389  msy.example.com

TABLE 5.4 The SRV record structure

FieldMeaning
Domain nameDomain for which this record is valid (ldap.tcp.example.com.).
TTLTime to live (86,400 seconds).
ClassThis field is always IN, which stands for Internet.
Record typeType of record (SRV).
PrioritySpecifies a preference, similar to the Preference field in an MX record. The SRV record with the lowest priority is used first (10).
WeightService records with equal priority are chosen according to their weight (100).
Port numberThe port where the server is listening for this service (389).
TargetThe FQDN of the host computer (hsv.example.com and msy .example.com).

You can define other types of service records. If your applications support them, they can query DNS to find the services they need.

Configuring DNS

In this section, you’ll begin to learn about the actual DNS server. You will start by installing DNS. Then I will talk about different zone configuration options and what they mean. Finally, you’ll complete an exercise that covers configuring Dynamic DNS, delegating zones, and manually entering records.

Leave a Reply

Your email address will not be published. Required fields are marked *