Skip to content

Latest commit

 

History

History
77 lines (59 loc) · 4.03 KB

static_dns.rst

File metadata and controls

77 lines (59 loc) · 4.03 KB

Configuring Static DNS Entries

Static DNS records (historically "entries") can be configured within the DNS subdomain of a given :term:`Delivery Service`. In a typical scenario, the :term:`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 :ref:`ciab` default environment, the "demo1" :term:`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 :term:`Delivery Service`'s subdomain. That is, one could not create an A record for foo.bar.mycdn.ciab.test on the :ref:`ciab` :term:`Delivery Service` "demo1", since "demo1"'s subdomain is demo1.mycdn.ciab.test.

.. seealso:: This guide covers how to set up static DNS records using Traffic Portal. It's also possible to do so directly using the :ref:`to-api` endpoint :ref:`to-api-staticdnsentries`.

Example

To set up the aforementioned rule, follow these steps.

  1. In Traffic Portal, expand the :ref:`tp-services` sidebar menu and select :guilabel:`Delivery Services`.

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

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

    The static DNS entries table page

    The Static DNS Entries Table Page

  4. Click on the blue :guilabel:`+` 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 :ref:`ciab` 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 :abbr:`TTL (Time To Live)` 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

    An Example Static DNS Entry Form

  6. Click on the green :guilabel:`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 :term:`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.

    $ 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