Вставка mx записывает во вперед зоне

Каков корректный путь (и почему), чтобы добавить, что MX записывает к вперед зона с помощью bind9?

Опция A

@   IN MX 10 mx1.example.com.
@   IN MX 20 mx2.example.com.
mx1.example.com. IN A a.b.c.d
mx2.example.com. IN A a.b.c.d

Опция B

example.com.    IN MX 10 mx1.example.com.
example.com.    IN MX 20 mx2.example.com.
mx1.example.com. IN A a.b.c.d
mx2.example.com. IN A a.b.c.d

Или есть ли другая альтернатива?

0
задан 7 August 2015 в 09:11
1 ответ

$ ORIGIN определяет базовое значение, из которого "неквалифицированные" имена (без завершающей точки) заменяются при обработке файла зоны. Символ @ - это сокращение от $ ORIGIN в файлах зон.

Использование сокращенного имени @ или полного имени example.com. поэтому эквивалентен.

$ ORIGIN может быть явно указан в файле зоны, но часто подразумевается из имени зоны, как указано в файле конфигурации привязки:

// named.conf file fragment

zone "example.com" in{
    type master;
    file "example.com.zone";
}; 

и

; example.com.zone file fragment 
; no $ORIGIN present and is synthesized from the zone name in named.conf ==> example.com
....
@          IN      NS     ns1.example.com. 
; ns1.example.com. is the name server for example.com.
@          IN      MX 10  mx1.example.com. 
; mx1.example.com. is the primary mailserver name for example.com.    
....
$ORIGIN uk.example.com.
; explicitly define or "reset" $ORIGIN to uk.example.com.
; doing this mid-way in a zone-file is not common practice anymore (if it ever was) 
; but it will keep a large single zone-file somewhat more readable.
@          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.

Третий вариант - это строка в файл зоны, который не начинается ни с имени хоста, ни с имени зоны, ни с сокращения @ для источника зоны, становится продолжением записи выше.

@   IN MX 10 mx1.example.com.
    IN MX 20 mx2.example.com.  ; another record for the @ record above
    IN NS    ns1.example.com.  ; yet another record for the @ record above
    IN NS    ns2.example.com.  ; and a 3rd continuation for the @ record above

также эквивалентен:

@              IN MX 10 mx1.example.com.
example.com.   IN MX 20 mx2.example.com.
               IN NS    ns1.example.com. ; NS record for the example.com. record above
                                         ; the continuation can be to set different 
                                         ; record types for the same resource record name
example.com.   IN NS    ns2.example.com.

www            IN A     10.9.8.7
               IN A     192.168.0.1      ; or set multiple (round-robin) records when 
                                         ; continuing with the same record type.
5
ответ дан 4 December 2019 в 11:27

Теги

Похожие вопросы