对于DHCP服务,可以在很多平台上进行设置。那么这里我们就主要讲解一下在Linux DHCP服务器上通过option
43实现H3C的AP自动联系AC注册的相关内容。原来的DHCP
Server是放在交换机上的,但因为近期准备改动一下网络拓扑,所以要把DHCP
Server迁移,操作系统用的是RHEL5.3,DHCP版本3.05
打H3C的800电话,二线工程师说没有在Linux下的DHCP配过,要我去看文档,文档里有交换机做dhcp
server和windows做dhcp server的配置实例,还发了一个Linux下的向cisco AP下发option
43的例子,要我对照改一下,
以下为cisco配置
option serverip code 43 =ip-address;然后在subnet里面定义option
serverip x.x.x.x;但是测试的时候是不成功的.
没办法,自己看文档,发现H3C的文档里用的是十六进制的数据,和二线提供的配置文档即定义为IP地址是完全不同的。以下为H3C的在交换机内置DHCP上的配置。
其中 hex表示是十六进制,80为选项类型,0B为选项长度,表示后面内容的长度,0000为Server
Type,固定为0000,02为后面AC的IP地址的个数,12010701和12010702则分别为两个AC的IP地址的十六进制,也就是说在配置
时只需把自己的AC地址X.X.X.X换算成十六进制替换掉即可。
再接下来,在Linux DHCP服务器下查文档,找到这么一段
option new-name code new-code = string ; An option whose type
is a data string is essentially just a collection of bytes, and can
be specified either as quoted text, like the text type, or as a
list of hexadecimal contents separated by colons whose values must
be between 0 and FF. For example: option sql-identification-token
code 195 = string; option sql-identification-token
17:23:19:a6:42:ea:99:7c:22;
如是在dhcpd.conf里修改配置
option serverip code 43 = string; #office,wireless AP subnet
10.20.3.0 netmask 255.255.255.0 { option routers 10.20.3.1; option
subnet-mask 255.255.255.0; option serverip
80:0B:00:00:01:0B:45:13:01:0B:45:14; pool { failover peer
"dhcp-failover"; range 10.20.3.120 10.20.3.254; deny dynamic bootp
clients; } }
经测试,Linux
DHCP服务器中AP可以成功在AC上注册,遇到问题还是得靠自己细心去看配置和文档,只要找到方向,问题还是会解决的。