Adding a new Resource Record (RR) Class to BIND 9

Evan Hunt each at isc.org
Fri Jan 3 01:46:10 UTC 2020


On Thu, Jan 02, 2020 at 02:47:21PM +0000, David M Walker wrote:
> I want to add a class PAY. To this end I have created a directory under
> data as pay_65280 and added the appropriate files in this directory

Just as a general note, I think you may find this isn't a great idea.
Classes are barely used for anything, and so are not very well tested.
Interoperability can be problematic, firewalls are likely to block them.
You're on much more solid ground if you use class IN.

However...

> The choice of 65280 is covered by RFC6895 -
> https://tools.ietf.org/html/rfc6895#page-11
> <https://tools.ietf.org/html/rfc6895#page-11> - as a private class number
> Bind9 fails to build this because the line for pay_65280 comes after the
> any_255 line in ./lib/dns/include/dns/enumclass.h  and is therefore
> missing a comma.

Well spotted, we should add a comma there.

> Part 2 - Possible developer fail
> 
> The code now complies cleanly (we tested the code previously in class
> IN_1 to break the problem down into smaller chunks, but then made the
> approrpaiet class changes and moved it into the new directory)
>
> Starting with named -g gets
> 
> 02-Jan-2020 14:44:43.745 db.example.com:26: unknown RR type 'PAY'
> 02-Jan-2020 14:44:43.745 zone example.com/IN: loading from master file db.example.com failed: unknown class/type
> 02-Jan-2020 14:44:43.745 zone example.com/IN: not loaded due to errors.
> 
> This implies there is somewhere else that PAY needs to e added for this
> to work
> 
> Any suggestions where to look please?

The full zone has to be of class PAY, and it has to be loaded into a view of
class PAY, so named.conf should look something like this:

        options { ... };

        view payzone pay {
            zone "example.com" {
                type master;
                file "db.example.com";
            };
        };

... and db.example.com should look like:

	$TTL 3600
	@	PAY	SOA	ns1 hostmaster 1 2000 2000 1814400 3600
			NS	ns1.example.com.
	txt		TXT	"test"

Note that the first record in the zone file must specify class PAY, and
none of the subsequent records may contradict it. Also note that type A
records must be omitted because they are not defined for class PAY.

(I really think you'll be happier using IN.)

-- 
Evan Hunt -- each at isc.org
Internet Systems Consortium, Inc.


More information about the bind-workers mailing list