Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1

are optional. Many can have multiple entries. The most critical and commonly
used ones are listed here, but there are many more available, and there are
also many more options available that are listed here.


A

The A record maps a hostname to a 32-bit IPv4 address, as in this example:


Click here to view code image
example.com IN A 192.0.2.0


The hostname comes first. IN indicates Internet. A indicates that this is an A
record. The IPv4 address comes last.


AAAA

The AAAA record maps a hostname to a 128-bit IPv6 address, as in this
example:


Click here to view code image
example.com AAAA 2001:db8::/32


The hostname comes first, followed by four As because 128-bit IPv6
addresses are four times larger than 32-bit IPv4 addresses. (See Chapter 18,
“Networking,” for more about IPv4 and IPv6 addresses.) The IPv6 address
comes last.


CNAME

The CNAME record maps one or more aliases to the canonical name of a
machine. The aliased domain receives all the subdomains and DNS records of
the original, canonical name it is matched with. For example, if you have a
machine named weirdname.example.com that is set up to be an email
server, but you want to use a different URL, you can set up an alias so it also
uses mail.example.com, as in this example:


Click here to view code image
mail.example.com CNAME weirdname.example.com


The alias comes first. CNAME indicates that the alias is being mapped to the
canonical name that comes next. The server that has an A record is listed last.
CNAME records never point to IP addresses, only to other domain names that
are already defined using A or AAAA records.


One neat trick is that you can create a CNAME record for every subdomain

Free download pdf