• Print
  • Share
  • Dark
    Light

How do I share a dynamic zone between multiple views?

  • Updated on 16 Jan 2019
  • 1 minute to read
  • Contributors

Running BIND versions prior to 9.9?
The method presented here is the recipe to follow.
Running BIND 9.9 or greater?
An alternate method, requiring BIND 9.9.0 or greater, is presented as example 4 in Understanding views in BIND 9, by example.
Running BIND 9.10 or greater?
If you're running BIND 9.10.0 or greater, there is a new zone option "in-view" that allows multiple views to refer to the same instance of the zone in memory.  See the ARM for your release for more details.

You choose one view to be primary and the other secondary, and transfer the zone between views.

Primary 10.0.1.1:

key "external" {
  algorithm hmac-md5;
  secret "xxxxxxxx";
};
key "mykey" {
  algorithm hmac-md5;
  secret "yyyyyyyy";
};
view "internal" {
  match-clients { !key external; 10.0.1/24; };
  server 10.0.1.1 {
    /* Deliver notify messages to external view. */
    keys { external; };
  };
`
`  zone "example.com" {
    type master;
    file "internal/example.db";
    allow-update { key mykey; };
    also-notify { 10.0.1.1; };
  };
};
`
`view "external" {
  match-clients { key external; any; };
  zone "example.com" {
    type slave;
    file "external/example.db";
    masters { 10.0.1.1; };
    transfer-source { 10.0.1.1; };
    // allow-update-forwarding { any; };
    // allow-notify { ... };
  };
};
Was this article helpful?