DNS 관리자 GUI 에서 A/AAAA 레코드를 지우려 하면 "The zone is locked for zone transfer or update" 가 난다. 영역은 Active Directory-Integrated · Running 이고 복제 범위도 정상이다. 다른 DC(AD02) 에서는 같은 레코드가 지워지는데 AD01 에는 반영되지 않는다. AD01 의 이벤트 로그에는 DNS Event ID 4004/4016 이 반복된다.
4016: The DNS server timed out attempting an Active Directory service operation ...
4004: The DNS server was unable to complete directory service enumeration of zone <zone>.
This DNS server is configured to use information obtained from Active Directory for this zone
and is unable to load the zone without it.
# 영역 타입 — Secondary 나 RODC 면 그 서버에서는 수정 불가
Get-DnsServerZone -Name "<zone>" | Select ZoneName, ZoneType, IsDsIntegrated, IsReadOnly, MasterServers
Resolve-DnsName -Name "<zone>" -Type SOA
# AD 복제 상태 (Domain Admin 권한으로)
repadmin /showrepl
repadmin /replsummary
dcdiag /v /test:dns /test:replications /test:advertising
# 이 DC 의 DNS 클라이언트 설정
Get-DnsClientServerAddress -AddressFamily IPv4
# 시간 동기화
w32tm /query /status
repadmin /showrepl 에서 DomainDnsZones · ForestDnsZones 파티션이 모두 successful 이고 replsummary 의 fail 이 0 이면 복제는 정상이며, DNS 서버 프로세스가 AD 에서 영역을 읽어 오는(enumerate) 단계만 실패하는 것이다. 하단의 DsReplicaGetInfo() failed with status 8453 Replication access was denied 는 명령을 실행한 계정에 조회 권한이 없다는 뜻이지 복제 실패가 아니다.
Get-DnsClientServerAddress 결과 AD01 의 인터페이스 DNS 서버가 {127.0.0.1} 하나뿐이었다. DNS 서비스가 AD 통합 영역을 로드하려면 AD(LDAP) 를 조회해야 하는데 그 조회를 자기 자신으로 보내고, 자기 DNS 는 아직 영역을 올리지 못한 상태라 응답이 막혀 enumeration 타임아웃 → 영역 로드 실패가 반복되는 전형적인 DNS island 현상이다.
관리자 권한 PowerShell 에서 1순위 DNS 를 다른 DC 로, 2순위를 자기 자신으로 바꾼다.
Set-DnsClientServerAddress -InterfaceIndex <idx> -ServerAddresses ("<AD02_IP>","127.0.0.1")
ipconfig /flushdns
ipconfig /registerdns
Restart-Service DNS -Force # 비관리자 세션에서는 "Cannot open DNS service" 로 실패한다
repadmin /syncall /AdeP
Get-DnsServerZone -Name "<zone>"
4004/4016 이 멈추면 DNS 관리자에서 영역을 Reload 한다. AD02 에서 지운 레코드가 AD01 에 반영된다.
Get-DnsServerResourceRecord -ZoneName "<zone>" -Name "<host>"
Remove-DnsServerResourceRecord -ZoneName "<zone>" -RRType "A" -Name "<host>" -RecordData "<IP>" -Force -ComputerName "<AD02>"
ap-northeast-2.compute.internal 같은 영역의 ip-10-... 레코드는 EC2 인스턴스가 동적 등록한 것이라, 인스턴스가 살아 있으면 지워도 다시 등록된다. 영구 제거는 인스턴스 쪽 동적 DNS 등록이나 DHCP 옵션의 domain-name 을 함께 끊어야 한다.