Usually after $TTL and $ORIGIN there is a line starting with @ and IN in zone name then email address of admin, what does @ mean here and in the next entries?
Asked
Active
Viewed 1.4k times
12
Radu Rădeanu
- 166,822
- 48
- 327
- 400
Hojat Taheri
- 5,309
- 6
- 21
- 26
1 Answers
11
$ORIGIN is used in two contexts during zone file processing:
- The symbol @ forces substitution of the current (or synthesized) value of $ORIGIN. The @ symbol is replaced with the current value of $ORIGIN.
- The current value of
$ORIGINis added to any 'unqualified' name (any name which does not end in a 'dot').
Example of @ symbol replacement:
; example.com zone file fragment
; no $ORIGIN present and is synthesized from the
; zone name in named.conf
....
@ IN NS ns1.example.com.
; ns1.example.com is the name server for example.com
....
$ORIGIN uk.example.com.
@ IN NS ns2.example.com.
; functionally identical to
; uk.example.com. IN NS ns2.example.com.
; ns2.example.com is the name server for uk.example.com
Radu Rădeanu
- 166,822
- 48
- 327
- 400
-
2if `$ORIGIN` is missing then `@` refers to the [name of the zone](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-bind). – Bob Stein Aug 17 '18 at 17:07