... | @@ -26,17 +26,22 @@ Every zone contains the `default-ttl` parameter that is intended to be |
... | @@ -26,17 +26,22 @@ 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`
|
|
used for RRSets in the zone entry that don't specify an explicit `ttl`
|
|
value.
|
|
value.
|
|
|
|
|
|
|
|
The SOA RR is handled separately, i.e. every `zone` has a `SOA`
|
|
|
|
container as its direct child and SOA parameters are specified inside
|
|
|
|
it.
|
|
|
|
|
|
## RRSets
|
|
## RRSets
|
|
|
|
|
|
Resource records are grouped into RRSets. The advantage of this
|
|
All resource records except SOA are grouped into RRSets. The advantage
|
|
organisation is that each RRSet can be uniquely identified by its
|
|
of this organisation is that each RRSet can be uniquely identified by
|
|
owner and type. Hence the `rrset` list has two keys: `owner` and
|
|
its owner and type. Hence the `rrset` list has two keys: `owner` and
|
|
`type`.
|
|
`type`.
|
|
|
|
|
|
TTL is specified at the RRSet level because [RFC 2181][] says that
|
|
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
|
|
“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.
|
|
offers no means for specifying different TTL for a RR.
|
|
|
|
|
|
|
|
|
|
## RDATA
|
|
## RDATA
|
|
|
|
|
|
Each RRSet has the `rdata` child, which is list of RDATA for all
|
|
Each RRSet has the `rdata` child, which is list of RDATA for all
|
... | @@ -45,9 +50,21 @@ this list, but since YANG requires all config lists to have a key, the |
... | @@ -45,9 +50,21 @@ 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
|
|
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
|
|
and can contain essentially anything as long as these keys are unique
|
|
withing a RRSet. It is recommended that ascending integers 1, 2, … be
|
|
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
|
|
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][]).
|
|
list is “ordered-by system” (see [Sec. 7.7.5][ordered-by] in [RFC 6020][]).
|
|
|
|
|
|
|
|
RDATA fields are wrapped in a container whose name is the same as the
|
|
|
|
type of the RRSet. So, for example, RDATA for an A RR looks like this
|
|
|
|
(in JSON encoding):
|
|
|
|
|
|
|
|
```
|
|
|
|
"A": {
|
|
|
|
"address": "192.0.2.5"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Field Values
|
|
## Field Values
|
|
|
|
|
|
The data model uses existing standard YANG data types where
|
|
The data model uses existing standard YANG data types where
|
... | @@ -64,7 +81,7 @@ defines a new `domain-name` type. |
... | @@ -64,7 +81,7 @@ defines a new `domain-name` type. |
|
[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)
|
|
[data tree]: https://gitlab.labs.nic.cz/llhotka/zone-data-yang/raw/master/model.tree
|
|
[RFC 2181]: https://tools.ietf.org/html/rfc2181
|
|
[RFC 2181]: https://tools.ietf.org/html/rfc2181
|
|
[RFC 6020]: https://tools.ietf.org/html/rfc6020
|
|
[RFC 6020]: https://tools.ietf.org/html/rfc6020
|
|
[RFC 6991]: https://tools.ietf.org/html/rfc6991
|
|
[RFC 6991]: https://tools.ietf.org/html/rfc6991
|
... | | ... | |