NAME

Net::DNS::DomainController::Discovery - Discover Microsoft Active Directory domain controllers via DNS queries

VERSION

Version 1.00

SYNOPSIS

Issues DNS requests to provide a list of hostnames and IP addresses of the Microsoft Active Directory domain controllers.

use Net::DNS::DomainController::Discovery;

my $foo = Net::DNS::DomainController::Discovery::domain_controllers('fabrikam.com');
...

Multiple domain names can be specified:

my $foo = Net::DNS::DomainController::Discovery::domain_controllers('fabrikam.com', 'contoso.com');

This module works only if the Active Directory domain controllers are registed with the domain name system (DNS).

domain_controllers

Use this function to obtain a list of Active Domain controllers registered in the DNS for the domain names given as arguments.

Returns a nested array of (domain name, hostname, ip address) tuples that contain all the Active Directory domain controllers serving the domain name if registered in the DNS.

If the domain does not contain any Active Domain domain controller service records, no entries for the domain are returned.

No records are returned for the domain controller names which do resolve neither to an IPv4 nor IPv6 address.

INTERNAL SUBROUTINES

srv_to_name

Extract server name from the SRV response.

srv_fqdn_list

Query SRV records and return server names if any.

fqdn_to_ipaddr

Extract IP addresses from the resolver response.

fqdn_ipaddr_list

Resolver server names using the appropriate record for the address family requested. $type parameter should be set A for IPv4, AAAA for IPv6).

dc_to_srv

Validate the domain name and add the magic string for the Active Directory domain controllers.

AUTHOR

Marcin CIESLAK, <saperski at cpan.org>

BUGS

Please report any bugs or feature requests to bug-net-dns-domaincontroller-discovery at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-DNS-DomainController-Discovery. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Microsoft has a documentation how the Active Directory domain controllers should register themselves in the DNS:

Microsoft Active Directory Technical Specifications [MS-ADTS] Section 6.3.2.3 SRV Records Published 14 February 2019 at https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/c1987d42-1847-4cc9-acf7-aab2136d6952

Archived on 23 March 2020: http://archive.today/6NUSR

You can find documentation for this module with the perldoc command.

perldoc Net::DNS::DomainController::Discovery

You can also look for information at:

LICENSE AND COPYRIGHT

This software is Copyright (c) 2020 by Marcin CIESLAK.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)