Eu não tenho experiência em enviar uma subzona de uma zona para outro servidor dns, mas em teoria sua lógica está certa:
Entrada em /etc/named.conf
para domain.com
:
zone "domain.com" {
type master;
file "/var/name/domain.com.zone";
};
domain.com
arquivo de zona /var/name/domain.com.zone
:
; zone fragment for domain.com
; name servers in the same zone
$TTL 2d ; default TTL is 2 days
$ORIGIN domain.com.
@ IN SOA ns1.domain.com. hostmaster.domain.com. (
2010101801 ; serial number
2h ; refresh = 2 hours
15M ; update retry = 15 minutes
3W12h ; expiry = 3 weeks + 12 hours
2h20M ) ; minimum = 2 hours + 20 minutes
; main domain name servers
IN NS ns1.domain.com.
IN NS ns2.domain.com.
; main domain mail servers
IN MX 10 mail.domain.com.
; A records for name servers above
ns1 IN A 10.0.0.1
ns2 IN A 10.0.0.2
; A record for mail server above
mail IN A 10.0.0.3
; Subdomain of domain.com
foo IN A 10.0.0.100
Entrada em 10.0.0.100 servidor dns /etc/named.conf
para foo.domain.com
no outro servidor dns:
zone "foo.domain.com" {
type master;
file "/var/name/foo.domain.com.zone";
};
foo.domain.com
arquivo de zona /var/name/foo.domain.com.zone
em 10.0.0.100:
; zone fragment for domain.com
; name servers in the same zone
$TTL 2d ; default TTL is 2 days
$ORIGIN foo.domain.com.
@ IN SOA ns1.foo.domain.com. hostmaster.foo.domain.com. (
2010101811 ; serial number
2h ; refresh = 2 hours
15M ; update retry = 15 minutes
3W12h ; expiry = 3 weeks + 12 hours
2h20M ) ; minimum = 2 hours + 20 minutes
; main domain name servers
IN NS ns1.foo.domain.com.
; main domain mail servers
IN MX 10 mail.foo.domain.com.
; A records for name servers above
ns1 IN A 10.0.0.100
; A record for mail server above
mail IN A 10.0.0.3
Então, pelo que eu vejo, ele enviaria foo.domain.com para ele, dado ip no DNS A, onde seria reconhecido como um domínio no DNS B e resolveria quaisquer novas entradas que possuísse.