running multiple daemonized instances of BIND9.2 on Windows 2000

Danny Mayer mayer at gis.net
Tue Nov 4 03:40:48 UTC 2003


At 05:29 PM 11/3/03, Nick wrote:
>Here's the answer you've all been waiting for with baited breath!=20
>Please be careful with line breaks if you're cutting/pasting this into
>one of your own systems.
>
>To run multiple instances of BIND9.2 on a win32 platform, you will
>need a few tools from the Windows 2000 resource kit.  Specifically,
>you will need reg.exe, instsrv.exe, and srvany.exe.  Copy these three
>files to the c:\winnt\system32\dns\bin folder on your primary and
>secondary name servers.
>
>Create the services on each name server with these commands.  Please
>note that the names shown below are for example purposes only - you
>can call your services whatever you want.
>    instsrv named_dmz1 c:\winnt\system32\dns\bin\srvany.exe
>    instsrv named_dmz2 c:\winnt\system32\dns\bin\srvany.exe
>    instsrv named_dmz3 c:\winnt\system32\dns\bin\srvany.exe
>    instsrv named_dmz4 c:\winnt\system32\dns\bin\srvany.exe
>
>Run these commands on each name server to perform the necessary
>registry updates for the services you just created.  This example uses
>four different services, with the names named_dmz1, named_dmz2,
>named_dmz3, and named_dmz4.  Adjust as necessary for your situation.
>
>reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz1\Parameters
>reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz1\Parameters
>/v Application   /t REG_SZ /d "c:\winnt\system32\dns\bin\named.exe"
>reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz1\Parameters
>/v AppParameters /t REG_SZ /d "-c
>c:\winnt\system32\dns\etc\named_dmz1.conf -f"
>
>reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz2\Parameters
>reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz2\Parameters
>/v Application   /t REG_SZ /d "c:\winnt\system32\dns\bin\named.exe"
>reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz2\Parameters
>/v AppParameters /t REG_SZ /d "-c
>c:\winnt\system32\dns\etc\named_dmz2.conf -f"
>
>reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz3\Parameters
>reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz3\Parameters
>/v Application   /t REG_SZ /d "c:\winnt\system32\dns\bin\named.exe"
>reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz3\Parameters
>/v AppParameters /t REG_SZ /d "-c
>c:\winnt\system32\dns\etc\named_dmz3.conf -f"
>
>reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz4\Parameters
>reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz4\Parameters
>/v Application   /t REG_SZ /d "c:\winnt\system32\dns\bin\named.exe"
>reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz4\Parameters
>/v AppParameters /t REG_SZ /d "-c
>c:\winnt\system32\dns\etc\named_dmz4.conf -f"
>
>You have now completed the necessary registry modifications to make
>each of services live together in harmony.  Please note that since
>you're now running multiple versions of BIND, each instance will need
>a unique config file, which is why the "AppParameters" registry value
>you created with the above commands specifies a unique config file for
>each instance of BIND.
>
>Here's another gotcha: since there a four instances of BIND running on
>the same machine, you need to have four unique IP addresses on the
>name server, and each instance of BIND must be listening on a
>different IP address.  Here's a snipped of a config file that shows
>you how to force BIND to listen on a specific IP address:
>
>options {
>      directory "c:\winnt\system32\dns\etc\namedb";           # Working
>directory
>      pid-file "named_dmz2.pid";         # Put pid file in working dir
>(must be unique if multiple BIND instances are running)
>      listen-on {192.168.2.202;};        # listen on this IP address only
>};
>
>
>
>In this example, you can start/stop the services using the GUI
>interface, or the command-line equivalents would be:
>net stop  named_dmz1
>net start named_dmz1
>
>
>Ta-daa!  You now have multiple instances of BIND running in a win32
>environment.

Not to mention interesting problems with the application event log (you did
look, right?), lack of control (win32 doesn't support signals) and can be
easily solved using views and a single instance of BIND 9. This is not a
supportable method. It may work (for now) but I wouldn't want to try and
support it and can easily break in the future just by changing one line in
named.

Why don't we solve the real problem?

Danny

Danny



More information about the bind-users mailing list