Configuring Static DNS Entries

Static DNS records (historically “entries”) can be configured within the DNS subdomain of a given Delivery Service. In a typical scenario, the Delivery Service will have DNS records automatically generated based on its “xml_id” and “routing name”, and the name and subdomain of the CDN to which it belongs. For example, in the CDN in a Box default environment, the “demo1” Delivery Service has an automatically generated DNS record for video.demo1.mycdn.ciab.test. Configuring a static DNS record allows for further extension of this, for example, one could create an A record that enforces lookups of the name foo.demo1.mycdn.ciab.test resolve to the IPv4 address 192.0.2.1.

Note

It’s only possible to create static DNS records within a Delivery Service’s subdomain. That is, one could not create an A record for foo.bar.mycdn.ciab.test on the CDN in a Box Delivery Service “demo1”, since “demo1“‘s subdomain is demo1.mycdn.ciab.test.

See also

This guide covers how to set up static DNS records using Traffic Portal. It’s also possible to do so directly using the Traffic Ops API endpoint staticdnsentries.

Example

To set up the aforementioned rule, follow these steps.

  1. In Traffic Portal, expand the Services sidebar menu and select Delivery Services.

  2. From the now-displayed table of Delivery Services, select the desired one for static DNS record configuration.

  3. From the More drop-down menu, select Static DNS Entries. The displayed table will probably be empty.

    The static DNS entries table page

    Fig. 40 The Static DNS Entries Table Page

  4. Click on the blue + button to add a new static DNS Entry

  5. Fill in all of the fields.

    Host

    This is the lowest-level DNS label that will be used in the DNS record. In the CDN in a Box scenario, for example, entering foo here will result in a full DNS name of foo.demo1.mycdn.ciab.test.

    Type

    Indicates the type of DNS record that will be created. The available types are

    • A
    • AAAA
    • CNAME
    • TXT
    TTL

    The TTL of the DNS record, after which clients will be expected to re-request name resolution.

    Address

    The meaning of this field depends on the value of the “Type” field.

    • If the “Type” is A, this must be a valid IPv4 address
    • If the “Type” is AAAA, this must be a valid IPv6 address
    • If the “Type” is CNAME, this must be a valid DNS name - not an IP address at all
    • If the “Type” is TXT, no restrictions are placed on the content whatsoever
    An example static DNS entry form

    Fig. 41 An Example Static DNS Entry Form

  6. Click on the green Create button to finalize the changes.

  7. At this point, although the static DNS record has been created, it will have no effect until a new CDN Snapshot is taken. Once that is done (and enough time has passed for Traffic Router to poll for the changes), the new DNS record should be usable through the CDN’s designated Traffic Router.

    #79 Example DNS Query to Test a New Static DNS Entry within CDN in a Box
    $ docker exec cdninabox_enroller_1 dig +noall +answer foo.demo1.mycdn.ciab.test
    foo.demo1.mycdn.ciab.test. 42   IN      A       192.0.2.1