dns_install_config (Misc)
This code can be found in
Chapter 13 of DNS on Windows Server 2003
Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.
Find out how to download all of the Misc code from this site.
:: Install the DNS Server service and set up a secondary name server
:: ---------------------------------------------------------------
:: From the book "DNS on Windows Server 2003"
:: By Cricket Liu, Matt Larson & Robbie Allen
:: Publisher: O'Reilly and Associates
:: ISBN: 0-596-00562-8
:: Book web site: http://rallenhome.com/books/dnsonw2k3/toc.html
:: ---------------------------------------------------------------
@echo off
:: IP address of primary master server
set PRIMARY_MASTER_IP=64.10.57.21
:: Forward-mapping zone to add to this server
set FWD_ZONE=fx.movie.edu
:: IP address of this server
set SERVER_IP=10.50.23.7
echo Installing the DNS Server service...
sysocmgr /i:%windir%\inf\sysoc.inf /u:c:\dns_install.txt
:: The sleep command is part of the Resource Kit
sleep 5
echo Adding a zone...
dnscmd /zoneadd %FWD_ZONE% /Secondary %PRIMARY_MASTER_IP%
sleep 5
echo Configuring this server to use a forwarder...
dnscmd /resetforwarders %PRIMARY_MASTER_IP%
sleep 5
echo Adding an A record for this server in %FWD_ZONE%
dnscmd %PRIMARY_IP% /recordadd %FWD_ZONE% %COMPUTERNAME% A %SERVER_IP%
sleep 5
echo Performing a zone transfer
dnscmd /zonerefresh %FWD_ZONE%
echo Done
|
This code has been viewed 1423 times.
|
New from the creators of TechTasks.com:
StatSheet.com
|