by Jack Chen, Taos Senior Technical Consultant
CNAME is a canonical name resource record that creates an alias for a specified FQDN. The most popular use for CNAME is that we can use more than one name to map to a single computer FQDN. This makes it easier to manage multiple applications, such as FTP server, POP server and IIS server, which are hosted on the same server. For example, the internal web portal applications (such as, www.taoslab.local, ftp.taoslab.local, crl.taoslab.local) are registered using CNAME that maps to a computer FQDN.
Another use for CNAME is that you can use alias names to hide the details of your network from the clients who connect to it. For example, if you create an application named CRL, on the IIS server named web1.toaslab.local on the taoslab.local AD integrated DNS domain, and you know that you will need to move it in the near future to move to another computer named web2.taoslab.local but you do not want clients to be aware of this change. You can just create an alias named CRL that maps to web1.taoslab.local and later when you move your computer you just need to modify the CRL on MS DNS to map to www2.taoslab.local.
How to create CNAME: You can refer to the following methods, either using dnsmgmt.msc or using dnscmd
Run dnsmgmt.msc – open specific DNS – expand the zone files – add a CNAME record, Or
Run CMD – dnscmd <ServerName>/RecordAdd <ZoneName> <NodeName> [/Aging] [/OpenAcl] [<Ttl>] CNAME <HostName>|<DomainName>
Run CMD -dnscmd /info
Now you may probably ask, what’s the matter with A record in this picture? When a client queries for the CRL.taoslab.local, the MS DNS server acts as SOA finds the CNAME, resolves the query for the A record for web1.taoslab.local, and returns both the A and CNAME records to the client.
An example: allinone-vm01:~ tester$ nslookup – 22.214.171.124
> set type=mx
Non-authoritative answer: (NONE SOA)
taos.com mail exchanger = 10 relay-boi.taos.com.
taos.com mail exchanger = 10 relay.taos.com.
As you can see from the above output, only mail/or exchange servers use MX records,they process or forward emails for the DNS domain name. if we have to use multiple email exchange servers in a dns domain, we need multiple MX records for that domain which just likeTaos.com.
You provided a good point that MX record is not the type that CANME can benefit it, and cannot be used either as per 5.2.2 of RFC 1123, since the payload information of an MX record is the FQDN of a mail host and a preference value (listed above as Taos.com), therefore the host name must map to one or more address A/AAAA record in DNS.
Additionally, the Cname does not apply to exchange CAS Array which has a pool of Cas servers as Nlb cluster, thus you need to create A/aaaa record and map to its VIP of Cas array.