... | @@ -8,19 +8,64 @@ even though experienced DNS admins may need some time to get used to |
... | @@ -8,19 +8,64 @@ even though experienced DNS admins may need some time to get used to |
|
some aspects.
|
|
some aspects.
|
|
|
|
|
|
The data model currently consists of two YANG modules:
|
|
The data model currently consists of two YANG modules:
|
|
|
|
|
|
- [iana-dns-parameters][]: data types corresponding to
|
|
- [iana-dns-parameters][]: data types corresponding to
|
|
DNS-related IANA registries (classes, RR types, enumerations that
|
|
DNS-related IANA registries (classes, RR types, enumerations that
|
|
are used in RR data);
|
|
are used in RR data);
|
|
- [dns-zones][]: data model for configuration of DNS zones.
|
|
- [dns-zones][]: data model for configuration of DNS zones.
|
|
|
|
|
|
The
|
|
## Zones
|
|
[data tree](https://gitlab.labs.nic.cz/llhotka/zone-data-yang/raw/master/model.tree)
|
|
|
|
represents configurations of any number of *complete* zones. Every
|
|
The [data tree][] represents configurations of any number of
|
|
zone is uniquely identified by its (domain) name.
|
|
*complete* zones. The `zone` list has two keys: `name` (domain name)
|
|
|
|
and `class`. It is expected that RRs of the `IN` class and
|
|
|
|
class-agnostic records will be configured in one entry. RRs of other
|
|
|
|
classes (if there are any) would then need a separate list entry.
|
|
|
|
|
|
|
|
Every zone contains the `default-ttl` parameter that is intended to be
|
|
|
|
used for RRSets in the zone entry that don't specify an explicit `ttl`
|
|
|
|
value.
|
|
|
|
|
|
|
|
## RRSets
|
|
|
|
|
|
|
|
Resource records are grouped into RRSets. The advantage of this
|
|
|
|
organisation is that each RRSet can be uniquely identified by its
|
|
|
|
owner and type. Hence the `rrset` list has two keys: `owner` and
|
|
|
|
`type`.
|
|
|
|
|
|
|
|
TTL is specified at the RRSet level because [RFC 2181][] says that
|
|
|
|
“the TTLs of all RRs in an RRSet must be the same”. The data model
|
|
|
|
offers no means for specifying different TTL for a RR.
|
|
|
|
|
|
|
|
## RDATA
|
|
|
|
|
|
|
|
Each RRSet has the `rdata` child, which is list of RDATA for all
|
|
|
|
records in the RRSet. There is no natural key that could be used for
|
|
|
|
this list, but since YANG requires all config lists to have a key, the
|
|
|
|
data model defines a dummy key named `id`. It is of the `string` type
|
|
|
|
and can contain essentially anything as long as these keys are unique
|
|
|
|
withing a RRSet. It is recommended that ascending integers 1, 2, … be
|
|
|
|
used. However, these keys *do not imply any order* of RR entries – the
|
|
|
|
list is “ordered-by system” (see [Sec. 7.7.5][ordered-by] in [RFC 6020][]).
|
|
|
|
|
|
|
|
## Field Values
|
|
|
|
|
|
Resource records are organised into RRSet
|
|
The data model uses existing standard YANG data types where
|
|
|
|
possible. So, for example, `signature-expiration` and
|
|
|
|
`signature-inception` fields in the RRSIG record use ISO 8601 date and
|
|
|
|
time format because it is used by the standard `yang:date-and-time` type
|
|
|
|
[RFC 6991][]. On the other hand, it was impossible to use the standard
|
|
|
|
`inet:domain-name` type (also defined in [RFC 6991][]) because it is
|
|
|
|
essentially limited to host names, so wildcards and CIDR-style reverse
|
|
|
|
domain names would be rejected. That's why [dns-zones][] module
|
|
|
|
defines a new `domain-name` type.
|
|
|
|
|
|
[Daley et al.]: https://www.ietf.org/archive/id/draft-daley-dnsxml-00.txt
|
|
[Daley et al.]: https://www.ietf.org/archive/id/draft-daley-dnsxml-00.txt
|
|
[iana-dns-parameters]:
|
|
[iana-dns-parameters]:
|
|
https://gitlab.labs.nic.cz/llhotka/zone-data-yang/blob/master/iana-dns-parameters.yang
|
|
https://gitlab.labs.nic.cz/llhotka/zone-data-yang/blob/master/iana-dns-parameters.yang
|
|
[dns-zones]: https://gitlab.labs.nic.cz/llhotka/zone-data-yang/blob/master/dns-zones.yang
|
|
[dns-zones]: https://gitlab.labs.nic.cz/llhotka/zone-data-yang/blob/master/dns-zones.yang
|
|
|
|
[data tree]: (https://gitlab.labs.nic.cz/llhotka/zone-data-yang/raw/master/model.tree)
|
|
|
|
[RFC 2181]: https://tools.ietf.org/html/rfc2181
|
|
|
|
[RFC 6020]: https://tools.ietf.org/html/rfc6020
|
|
|
|
[RFC 6991]: https://tools.ietf.org/html/rfc6991
|
|
|
|
[ordered-by]: https://tools.ietf.org/html/rfc6020#section-7.7.5 |