Skip to content
Smarter by Design.Simpler for Business

gtm dns-domain ​

The gtm dns-domain command manages the domain names a DNS service publishes: the domain name itself, the operating mode, the data center groups in which the records will be kept and the zone settings. Its panel equivalent is the Domains screen.

A domain name lives inside a service

This command does not create an independent record: every operation first asks in which DNS service it will run (dnsId). The service is created with gtm service and is selected from the list with Tab.

Command Summary ​

TR7 WEB-CLI · gtm dns-domain
admin@TR7LBWAF01> gtm dns-domain list dnsId <service> # list them all
admin@TR7LBWAF01> gtm dns-domain show dnsId <service> <id> # show one
admin@TR7LBWAF01> gtm dns-domain add dnsId <service> name <domain-name> …
admin@TR7LBWAF01> gtm dns-domain update dnsId <service> id <id> … # change
admin@TR7LBWAF01> gtm dns-domain delete dnsId <service> <id> # delete
admin@TR7LBWAF01>  

Required Fields ​

OrderFieldStatusValue
1dnsIdRequiredThe DNS service to which the domain name will be added
2nameRequiredThe domain name, for example kurum.com.tr. A second record with the same name cannot be opened

The list, show, update and delete commands also ask for dnsId first: in the show and delete commands the identifier is written after this without the field name, and in the update command it is in the id <id> form.

After the domain name is created, it cannot be changed; for a different name a new record is opened.

The Operating Mode ​

FieldWhat it doesWhat is written after it
--defaultModeDetermines how all the records of the domain name will be resolvedstandalone (the default) · dr · dc

The behavior of the three modes:

ValueThe panel nameThe number of data centersBehavior
standaloneStandaloneOne (local)The answers are produced from a single group; the records taking part in the answer can be bound to the health scenarios. The default mode
drDisaster RecoveryTwoAn active-passive switch between the main and the backup center; when the condition disappears, it is returned to the main center by itself
dcDatacenterThree and aboveThe data centers are sorted according to a metric and the answer is selected accordingly

For the detailed behavior of the mode and for which one will be selected in which case, the Operating Modes section can be looked at.

The Data Center Groups ​

In which data center the records will be kept and how they will be managed is written with the --defaultRecordConfig.N. fields. The number of groups changes according to the selected mode: standalone uses a single group, dr two groups, and dc three or more groups. The groups are written in order starting from zero: without .0 being given, the CLI does not accept the .1 index.

FieldDefaultValue
--defaultRecordConfig.0.dcIdThe local data centerThe data center of the group
--defaultRecordConfig.0.recordMgmtEmptyThe express profile that provides that the records of the group are pulled from an external DNS server; if it is left empty, the records are managed manually on TR7

The express profiles are created with gtm express-profile.

The Zone Settings ​

FieldDefaultValue
--slaveIps.0EmptyThe addresses of the slave DNS servers that are allowed to do a zone transfer from the domain name; every address with its own index
--dnssecfalseTurns on the DNS answers being signed
--soaEditDEFAULTThe SOA serial number format
--metaData.0.key · --metaData.0.valueEmptyThe key and value pairs attached to the domain name

The values of the --soaEdit field:

ValueMeaning
DEFAULTA date-based serial number
INCREASEIt is increased by one at every change
EPOCHThe Unix time stamp is used
OFFThe automatic update is off

Examples ​

TR7 WEB-CLI · A) A domain name with a single center
admin@TR7LBWAF01> gtm service list # find the identifier of the service
admin@TR7LBWAF01> gtm dns-domain add dnsId <service> name kurum.com.tr
admin@TR7LBWAF01>  
TR7 WEB-CLI · B) A domain name with a main and a backup center
admin@TR7LBWAF01> gtm dns-domain add dnsId <service> name kritik.kurum.com.tr \
--defaultMode dr --defaultRecordConfig.0.dcId <main-center> --defaultRecordConfig.1.dcId <backup-center>
admin@TR7LBWAF01>  
TR7 WEB-CLI · C) The slave server, DNSSEC and the SOA format
admin@TR7LBWAF01> gtm dns-domain update dnsId <service> id <id> \
--slaveIps.0 10.0.0.53 --slaveIps.1 10.0.1.53 --dnssec true --soaEdit EPOCH
admin@TR7LBWAF01>  

Updating and Deleting ​

TR7 WEB-CLI · update and delete
admin@TR7LBWAF01> gtm dns-domain update dnsId <service> id <id> --defaultMode dc
admin@TR7LBWAF01> gtm dns-domain update dnsId <service> id <id> --slaveIps.delete # empty the slave list
admin@TR7LBWAF01> gtm dns-domain delete dnsId <service> <id>
admin@TR7LBWAF01>  

Things to Know ​

  • The domain name cannot be changed afterwards. If the name has been entered wrongly, the record is deleted and created again.
  • The mode is applied to all the records. The operating mode assigned to the domain name is valid for all the records in that domain name.
  • The records are written with a separate command. After the domain name is created, the records are added with gtm dns-record.
  • The metric and switch settings are made not here but in the record. The settings such as the sorting metric in the Datacenter mode and the switch-to-backup scenario are written while the DNS record is being defined.