이상한 문제가 발생했습니다. 어쩌면 누군가가 답을 알고 있을지도 모릅니다. named-checkzone
내 영역 파일을 확인하는 데 사용합니다 .
다음 영역 파일이 표시됩니다지역 외부 데이터 무시정규화된 도메인 이름을 사용하는 경우:
$TTL 30
@ IN SOA localhost. admin.example.com. (
2017072702 ; serial
3 ; refresh
1 ; retry
2 ; expire
1M) ; negative TTL
IN NS localhost.;
www.example.com. IN A 192.168.111.45
www.example.com. IN AAAA fe80::22c9:d0ff:1ecd:c0ef
foo.example.com. IN A 192.168.121.11
bar.example.com. IN CNAME www.example.com.
;generate 100 hosts
$GENERATE 1-100 host$.example.com. IN A 10.20.45.$
그러나 상대 이름의 경우 다음 영역 파일과 같은 메시지가 표시되지 않습니다.
$TTL 30
@ IN SOA localhost. admin.example.com. (
2017072702 ; serial
3 ; refresh
1 ; retry
2 ; expire
1M) ; negative TTL
IN NS localhost.;
www IN A 192.168.111.45
www IN AAAA fe80::22c9:d0ff:1ecd:c0ef
foo IN A 192.168.121.11
bar IN CNAME www.example.com.
;generate 100 hosts
$GENERATE 1-100 host$ IN A 10.20.45.$
왜 이런 일이 일어나는지 설명해 줄 수 있나요?
내가 입력한 명령은 다음과 같습니다 sudo named-checkzone www.example.com /var/named/example.com.zone
.
FQDN(정규화된 도메인 이름)이 포함된 파일의 출력은 다음과 같습니다.
/var/named/example.com.zone:11: ignoring out-of-zone data (foo.example.com)
/var/named/example.com.zone:12: ignoring out-of-zone data (bar.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host1.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host2.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host3.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host4.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host5.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host6.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host7.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host8.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host9.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host10.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host11.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host12.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host13.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host14.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host15.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host16.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host17.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host18.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host19.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host20.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host21.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host22.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host23.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host24.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host25.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host26.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host27.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host28.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host29.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host30.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host31.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host32.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host33.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host34.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host35.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host36.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host37.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host38.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host39.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host40.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host41.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host42.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host43.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host44.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host45.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host46.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host47.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host48.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host49.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host50.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host51.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host52.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host53.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host54.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host55.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host56.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host57.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host58.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host59.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host60.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host61.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host62.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host63.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host64.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host65.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host66.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host67.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host68.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host69.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host70.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host71.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host72.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host73.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host74.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host75.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host76.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host77.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host78.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host79.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host80.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host81.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host82.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host83.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host84.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host85.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host86.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host87.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host88.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host89.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host90.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host91.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host92.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host93.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host94.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host95.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host96.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host97.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host98.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host99.example.com)
/var/named/example.com.zone:14: ignoring out-of-zone data (host100.example.com)
zone www.example.com/IN: loaded serial 2017072702
OK
상대 도메인 이름이 포함된 파일의 출력은 다음과 같습니다.
zone www.example.com/IN: loaded serial 2017072702
OK
답변1
명령 오류입니다. 첫 번째 매개변수는 FQDN이 아닌 영역이어야 합니다.
sudo named-checkzone example.com /var/named/example.com.zone