dnssec-dsfromkey Command
Purpose
Generates resource records (RRs).
Syntax
dnssec-dsfromkey [ -1 | -2 | -a algorithm ] [ -C ] [-T ttl] [-v level] [-K directory] {keyfile}
dnssec-dsfromkey [ -1 | -2 | -a algorithm ] [ -C ] [-T ttl] [-v level] [-c class] [-A] {-f file} [dnsname]
dnssec-dsfromkey [ -1 | -2 | -a algorithm ] [ -C ] [-T ttl] [-v level] [-c class] [-K directory] {-s} {dnsname}
Description
DS records. The -A option includes zone-signing keys (ZSKs)
that are the keys with 256 flags, for conversion into DS records. Revoked keys are not included for
conversion into DS records. The input keys can be specified by using the following methods: - By default, the dnssec-dsfromkey command reads a key file that has a file
name in the format
Knnnn.+aaa+iiiii.key, as generated by the dnssec-keygen command. - With the -f option, the dnssec-dsfromkey command reads
keys from a zone file or of a partial zone file, which can contain only the
DNSKEYrecords. - With the -s option, the dnssec-dsfromkey command reads a
keyset-file, as generated by thednssec-keygen -Ccommand.
Flags
- -1
- This option is an abbreviation for
-a SHA1algorithm value. - -2
- This option is an abbreviation for
-a SHA-256algorithm value. - -a algorithm
-
Specifies the digest algorithm that must be used for converting
DNSKEYrecords toDSrecords. This option can be used multiple times to create multipleDSrecords for eachDNSKEYrecord.The value of algorithm must be
SHA-1,SHA-256, orSHA-384. These values are case-insensitive, and the hyphen can be omitted. The default value isSHA-256. - -A
- Indicates that ZSKs must be included for generating
DSrecords. Without this option, only keys for which theKSKflag is set are converted toDSrecords and printed. This flag is useful only when the -f flag is also used. - -c class
- Specifies the Domain Name System (DNS) class. The default value is
IN. This flag is useful only when the -f flag or the -s flag is also used. - -C
- Generates
CDSinstead of theDSrecords. - -f file
-
Sets zone file mode, in which the final dnsname argument of the dnssec-dsfromkey command is the DNS domain name of a zone from which the primary file can be read. If the zone name is the same as the file argument value, the file argument can be omitted.
If the value of the file argument is-(hyphen), then the zone data is read from the standard input. You can then use the output of the dig command as an input. For example:dig dnskey example.com | dnssec-dsfromkey -f - example.com - -h
- Prints the usage information.
- -K directory
- Specifies BIND 9 to look for key files or keyset- files in the specified directory.
- -s
- Enables keyset mode, in which the final dnsname argument from the dnssec-dsfromkey command is the DNS domain name that is used to locate a keyset- file.
- -T ttl
- Specifies the time-to-live (TTL) for DS records. By default, the TTL is omitted.
- -v level
- Sets the debugging level.
- -V
- Prints the version information.
Example
SHA-256 DS RR from the Kexample.com.+003+26160
key file, enter the following
command:dnssec-dsfromkey -2 Kexample.com.+003+26160example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94Files
The key file can be designated by the key identification Knnnn.+aaa+iiiii or the
full file name Knnnn.+aaa+iiiii.key, as generated by the
dnssec-keygen command.
The name of the key set is built from the directory name, the string keyset-,
and the dnsname.