11.4.1 ProblemYou want to create a subnet. 11.4.2 Solution11.4.2.1 Using a graphical user interface
11.4.2.2 Using a command-line interfaceCreate an LDIF file called create_subnet.ldf with the following contents: dn: cn=<Subnet>,cn=subnets,cn=sites,cn=configuration,<ForestRootDN> changetype: add objectclass: subnet siteObject: cn=<SiteName>,cn=sites,cn=configuration,<ForestRootDN> then run the following command: > ldifde -v -i -f create_subnet.ldf 11.4.2.3 Using VBScript' This code creates a subnet object and associates it with a site. ' ------ SCRIPT CONFIGURATION ------ strSubnet = "<Subnet>" ' e.g. 10.5.3.0/24 strSite = "<SiteName>" ' e.g. Dallas ' ------ END CONFIGURATION --------- set objRootDSE = GetObject("LDAP://RootDSE") set objSubnetsCont = GetObject("LDAP://cn=subnets,cn=sites," & _ objRootDSE.Get("configurationNamingContext") ) set objSubnet = objSubnetsCont.Create("subnet", "cn=" & strSubnet) objSubnet.Put "siteObject", "cn=" & strSite & ",cn=sites," & _ objRootDSE.Get("configurationNamingContext") objSubnet.SetInfo WScript.Echo "Successfully created subnet " & strSubnet 11.4.3 DiscussionSubnet objects reside in the Subnets container (e.g., cn=subnets,cn=sites,cn=configuration,dc=rallencorp,dc=com) in the CNC. The relative distinguished name (RDN) of the subnet should be the subnet address and bit-mask combination (e.g., 10.5.3.0/24). The other important attribute to set is siteObject, which should contain the DN of the site that the subnet is associated with. 11.4.4 See AlsoMS KB 323349 (HOW TO: Configure Subnets in Windows Server 2003 Active Directory) |