- 论坛徽章:
- 0
|
本帖最后由 besro 于 2010-03-23 10:57 编辑
最近在研究基于LDAP管理的ISC DHCPd系统,在一个服务器中安装了OpenLDAP以及isc-dhcp-ldap-3.0.5。
LDAP配置好了,dhcpd也正确连接ldap数据启动成功,使用Arris C3作为试验设备,接了:
一个懒猫CM803
一个宏想WM102
一个Cisco/SA EPC2100
一个摩托罗拉SB5100E
结果EPC2100和SB5100E总是停留在init(d)阶段,就是说无法获得DHCP服务器分配IP:
DS/US Prim Online Timing Rec CPE IP address MAC address DOC
Interface SID state offset power
C1/0/U3.0 4 init(d) 804 12.0 0/1 0.0.0.0 0022.ceff.1ce2 D1.0
C1/0/U3.0 5 online 509 11.8 1/5 10.197.95.253 001a.92a7.7a56 D2.0A
C1/0/U3.0 6 online 507 12.0 0/5 10.197.94.254 000f.8ac1.1285 D2.0A
C1/0/U3.0 7 init(d) 816 12.0 0/1 0.0.0.0 0013.71d8.c5be D1.0
在dhcp服务器使用tcpdump 67端口,发现:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
15:28:21.160031 IP 10.***.4.163.bootps > 10.***.255.11.bootps: BOOTP/DHCP, Request from 00:0f:8a:c1:12:85, length: 978
15:28:22.000368 IP 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302
15:28:22.099094 IP 10.***.4.163.bootps > 10.***.255.11.bootps: BOOTP/DHCP, Request from 00:1a:92:a7:7a:56, length: 978
15:28:23.000212 IP 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302
15:28:23.009433 IP 10.***.4.163.bootps > 10.***.255.11.bootps: BOOTP/DHCP, Request from 00:0f:8a:c1:12:85, length: 978
15:28:23.011788 IP 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302
15:28:23.024761 IP 10.***.4.163.bootps > 10.***.255.11.bootps: BOOTP/DHCP, Request from 00:1a:92:a7:7a:56, length: 978
15:28:23.026782 IP 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302
15:28:47.535662 IP 10.***.4.163.bootps > 10.***.255.11.bootps: BOOTP/DHCP, Request from 00:13:71:d8:c5:be, length: 442
15:28:48.000418 IP 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302
15:28:50.533984 IP 10.***.4.163.bootps > 10.***.255.11.bootps: BOOTP/DHCP, Request from 00:13:71:d8:c5:be, length: 442
15:28:50.535089 IP 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302
15:28:57.534056 IP 10.***.4.163.bootps > 10.***.255.11.bootps: BOOTP/DHCP, Request from 00:13:71:d8:c5:be, length: 442
15:28:57.535198 IP 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302
15:29:12.534230 IP 10.***.4.163.bootps > 10.***.255.11.bootps: BOOTP/DHCP, Request from 00:13:71:d8:c5:be, length: 442
15:29:12.535344 IP 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302
15:29:21.542336 IP 10.***.4.163.bootps > 10.***.255.11.bootps: BOOTP/DHCP, Request from 00:22:ce:ff:1c:e2, length: 453
15:29:22.000248 IP 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302
15:29:26.540791 IP 10.***.4.163.bootps > 10.***.255.11.bootps: BOOTP/DHCP, Request from 00:22:ce:ff:1c:e2, length: 453
15:29:26.541858 IP 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302
15:29:35.540904 IP 10.***.4.163.bootps > 10.***.255.11.bootps: BOOTP/DHCP, Request from 00:22:ce:ff:1c:e2, length: 453
15:29:35.541989 IP 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302
上述红色的能获得IP,蓝色的就不能了……
10.***.255.11 dhcp服务器
10.***.4.163 CMTS IP
10.***.88.1 CMTS中CM的路由IP
以前测试过使用不带LDAP的ISC DHCPd,发现只有3.0.1及以下的版本才没有这类问题,经过进一步分析3.0.1与3.0.5版本之间在响应dhcp请求时的数据差别,发现:
3.0.1
________________________________
17:01:34.000416 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto 17, length: 330) 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302, hops:1, xid:0x308c400, flags: [Broadcast]
Your IP: 10.197.95.253
Server IP: 10.***.255.11 ←更高的版本没有这项了
Gateway IP: 10.***.88.1
Client Ethernet Address: 00:1a:92:a7:7a:56 [|bootp]
3.0.5
________________________________
17:36:01.000229 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto 17, length: 330) 10.***.255.11.bootps > 10.***.88.1.bootps: BOOTP/DHCP, Reply, length: 302, hops:1, xid:0x36403d40, flags: [Broadcast]
Your IP: 10.197.95.253
Gateway IP: 10.***.88.1
Client Ethernet Address: 00:1a:92:a7:7a:56 [|bootp]
初步怀疑就是没有ReplyServer IP: 10.***.255.11导致,盼望高手分析。
--------------------
原因在于3.0.1版本后,必须指定启动文件服务器next-server参数……之前的版本不需要设置,默认是本机……哎……误导了 |
|