한 서버가 도메인 및 하위 도메인에 대해 DNS를 수행 할 수 있습니까?


11

abc 및 bc 모두의 네임 서버를 교체 해야하는 상황이 있습니다. 차라리 두 대의 기계를 사용할 필요는 없습니다.

멀티 호밍에 대해 읽었지만 예제는 모두 도메인과 동일한 하위 도메인이 아닌 * .bc 에 대한 것 같습니다.

이 시나리오는 단일 머신에서 가능합니까?


그래, 그래 할 수없는 유일한 것은 "수평 위임"으로 알려진 것입니다. 이것은 이미 위임 된 것을 다시 위임하려는 시도입니다. ( sub1.example.com당신에게 위임 된 경우 sub1.example.com다른 사람에게 위임 할 수 없습니다 )
— Andrew B

답변:


19

예, 문제없이 완벽하게 지원됩니다.

동일한 머신에서 완전히 다른 도메인을 호스팅 할 수도 있습니다.

예를 들어 BIND9를 DNS 서버로 사용하면 다음과 같이 입력해야합니다 named.conf.

zone "example.com" {
        type master;
        file "/usr/local/etc/namedb/static/example.com";
        notify yes;
        allow-transfer { nameservers; }
        };
};

zone "subzone.example.com" {
        type master;
        file "/usr/local/etc/namedb/static/subzone.example.com";
        notify yes;
        allow-transfer { nameservers; }
        };
};

영역 파일로 영역 파일을 채우십시오. 메인 존 파일에서 메일 링을위한 MX 레코드도 포함하여 서브 존을 적절하게 지정할 수 있습니다. 파일에 대한 다음 예제를 살펴보십시오 example.com.

; Nameservers records
ns.example.com.         IN      A       192.168.0.10
ns1.example.com.        IN      A       192.168.0.3
ns2.example.com.        IN      A       192.168.0.4

; Delegated internal zones
local.example.com.      IN      NS      ns.example.com.
mgmt.example.com.       IN      NS      ns.example.com.

; Delegated external zones
subzone.example.com.    IN      NS      ns.example.com.
whatever.example.com.   IN      NS      ns.example.com.

; Delegated external zone with its own nameservers (and glue records)
fnord.example.com.      IN      NS      ns1.fnord.example.com.
fnord.example.com.      IN      NS      ns2.fnord.example.com.
ns1.fnord.example.com.  IN      A       198.51.100.1
ns2.fnord.example.com.  IN      A       198.51.100.2

; Mailing zones
lists.example.com.      IN      A       192.168.0.13
                        IN      MX      0 lists.example.com.
                        IN      TXT     "v=spf1 mx ~all"
                        IN      SPF     "v=spf1 mx ~all"

이것이 모든 것을 명확히하기를 바랍니다.


6
자체 네임 서버 (및 거기에 접착제 레코드)가있는 하위 영역 위임의 예를 들었습니다. 사람들이 나중에 더 빨리 노출되는 것이 좋습니다.
— Andrew B

좋은. 따라서 동일한 IP 주소를 가진 '상위 도메인'과 '하위 도메인'은 문제가되지 않습니까? 아니면 여러 개의 IP에 응답하는 동일한 NIC가 필요합니까?
— ethrbunny 2014 년

@ethrbunny 아니오, DNS 관점에서 문제가 없습니다.
— Andrew B

@ethrbunny 당신은 Windows Sysadmin입니까? 이러한 질문은 Windows 세계에서 일반적이기 때문에. DC는 서로 다른 IP 주소, 다른 기계의 요구 사항 등이있어
— 비니 Ferrão
당사 사이트를 사용함과 동시에 당사의 쿠키 정책과 개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.