DHCP 配置文件定制
定制 DHCP 配置文件中涉及各种因子。
许多网络包含多种客户机类型; 例如,单个网络可能包含运行各种操作系统的计算机,例如 Windows , OS/2, Java™ 操作系统和 UNIX。 每一个都需要唯一的供应商标识符(用于给 DHCP 服务器识别机器类型的字段)。 Java 操作系统客户机和 IBM® 瘦客户机机器可能需要独特的参数 (例如,引导文件) 以及需要专门为它们定制的配置选项。 Windows 95 计算机无法很好地处理特定于 Java 的选项。
如果某些机器的主要用途基于那些机器的用户类型,特定机器选项就可以封装于供应商容器中。 例如,开发人员可能使用此操作系统的客户机进行编程,市场营销人员可能使用 OS/2 客户机,销售人员可能使用 Java 操作系统客户机和 IBM 瘦客户机,记帐可能使用 Windows 95 机器。 这些用户系列的每一个可能需要 不同的配置选项(不同的打印机、名称服务器或缺省 Web 服务器等等)。 在此例子中,这些选项可能包含在供应商容器中,因为每个组使用一个不同的机器类型。
如果多个组使用相同的机器类型,将选项放进一个从属类标识符中作为替代,将会允许市场部经理,例如,使用一个特定的其他雇员不能访问的打印机集合。
注: 以下虚构示例表示配置文件的一部分。 注释以一个磅字符(#)开始并描述了
每行是如何定义安装的。
vendor "AIX_CLIENT"
{
# No specific options, handles things based on class
}
vendor "OS/2 Client"
{
# No specific options, handles things based on class
}
vendor "Windows 95"
{ option 44 9.3.150.3 # Default NetBIOS Nameserver
}
vendor "Java OS"
{ bootstrapserver 9.3.150.4 # Default TFTP server for the Java OS boxes
option 67 "javaos.bin" # The bootfile of the Java OS box
}
vendor "IBM Thin Client"
{ bootstrapserver 9.3.150.5 # Default TFTP server for Thin Client boxes
option 67 "thinos.bin" # Default bootfile for the Thin Client boxes
}
subnet 9.3.149.0 255.255.255.0
{ option 3 9.3.149.1 # The default gateway for the subnet
option 6 9.3.150.2 # This is the nameserver for the subnet
class accounting 9.3.149.5-9.3.149.20
{ # The accounting class is limited to address range 9.3.149.5-9.3.149.20
# The printer for this group is also in this range, so it is excluded.
exclude 9.3.149.15
option 9 9.3.149.15 # The LPR server (print server)
vendor "Windows 95"
{
option 9 deny # This installation of Windows 95 does not support
# this printer, so the option is denied.
}
}
. . .
}