BMR (Basic Mapping Rule)
Basic Mapping Rule (BMR) is a set of principles and rules that guide the creation and maintenance of domain name system (DNS) zones. DNS is a hierarchical naming system that maps domain names to IP addresses, enabling users to access resources on the internet using human-readable names. BMR is used to ensure that DNS zones are consistent, efficient, and easy to manage.
The DNS system consists of a hierarchy of domains, with the root domain at the top, followed by top-level domains (TLDs), second-level domains, and subdomains. Each domain is managed by a domain name registrar or a DNS hosting provider, and its DNS zone contains a set of resource records (RRs) that map the domain name to one or more IP addresses or other information.
BMR defines how the resource records in a DNS zone should be organized and structured. The following are the key principles of BMR:
- Each domain should have a separate DNS zone: BMR recommends that each domain should have its own DNS zone, even if it only has a single resource record. This makes it easier to manage and update the domain's DNS information without affecting other domains.
- Use CNAME records only for aliases: BMR recommends using canonical name (CNAME) records only for creating aliases for a domain name. CNAME records map a domain name to another domain name, and are used to create aliases such as "www.example.com" for "example.com". BMR advises against using CNAME records for other purposes, such as mapping a domain name to an IP address, as this can cause issues with DNS caching and resolution.
- Use A records to map domain names to IP addresses: BMR recommends using address (A) records to map domain names directly to IP addresses. A records are the most common type of resource record in a DNS zone, and are used to map a domain name to one or more IP addresses. BMR advises against using CNAME records or other types of resource records for this purpose.
- Use MX records for email servers: BMR recommends using mail exchange (MX) records to specify the email servers for a domain. MX records identify the mail servers that should receive email messages for a domain, and specify their priority. BMR advises against using A records or CNAME records for this purpose.
- Use NS records to specify DNS servers: BMR recommends using name server (NS) records to specify the DNS servers that are authoritative for a domain. NS records specify the DNS servers that are responsible for providing DNS information for a domain, and are used to delegate control of subdomains to other DNS servers. BMR advises against using A records or CNAME records for this purpose.
- Use TXT records for additional information: BMR recommends using text (TXT) records to store additional information about a domain, such as SPF records for email authentication, DKIM records for email signing, or verification records for domain ownership. TXT records can be used for a wide range of purposes, and are often used to store metadata or configuration information.
- Use SRV records for service discovery: BMR recommends using service (SRV) records to enable service discovery for a domain. SRV records specify the location of services, such as LDAP or SIP servers, and are used by client applications to locate the appropriate service. BMR advises against using A records or CNAME records for this purpose.
By following these principles, BMR helps to ensure that DNS zones are consistent, efficient, and easy to manage. However, it is important to note that BMR is a guideline, not a strict rule, and that there may be situations where other types of resource records are appropriate. For example, some DNS hosting providers use special resource records for load balancing or failover, which may be necessary in certain scenarios.
In addition to the principles outlined above, BMR also includes rules for the structure and syntax of DNS resource records. These rules help to ensure that DNS zones are structured in a way that is easy to understand and manage. Some of the key rules include:
- Each resource record should have a type, a name, and a value: Every resource record in a DNS zone should have a type, which identifies the purpose of the record (such as A, MX, NS, or TXT), a name, which specifies the domain name that the record applies to, and a value, which contains the data associated with the record.
- Resource record names should be fully qualified domain names (FQDNs): Resource record names should be specified using fully qualified domain names (FQDNs), which include the domain name and all of its parent domains.
- Resource record values should be specified using the appropriate format: The format of the data associated with a resource record depends on the type of record. For example, A records should contain one or more IP addresses, MX records should specify the hostname of the email server and its priority, and TXT records should contain arbitrary text data.
- Resource records should be organized into logical groups: Resource records in a DNS zone should be organized into logical groups, based on their purpose and function. For example, all of the A records for a domain should be grouped together, followed by the MX records, NS records, and so on.
- Resource record TTLs should be specified: Time-to-live (TTL) values should be specified for all resource records in a DNS zone. TTLs determine how long a DNS resolver should cache a particular resource record before checking for updates. Shorter TTLs can help to ensure that changes to DNS information are propagated quickly, but can also increase DNS traffic and server load.
In summary, BMR is a set of guidelines and rules that help to ensure that DNS zones are structured in a way that is consistent, efficient, and easy to manage. By following the principles and rules outlined in BMR, DNS administrators can create and maintain DNS zones that are easy to understand and update, and that provide reliable and accurate DNS resolution for users.