LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 856|回复: 0

debian 4.0下的dhcpd租约记录的差异问题

[复制链接]
发表于 2007-10-5 17:39:01 | 显示全部楼层 |阅读模式
在Debian 4.0平台,运行dhcpd server,如下:

  1. debian:/var/lib/dhcp# ps aux|grep 'dhcpd'|grep -v 'grep'
  2. root      2293  0.0  0.2   1756   584 ?        Ss   Oct04   0:00 /usr/sbin/dhcpd -q eth1

复制代码


有如下租约记录:

  1. debian:/var/lib/dhcp# cat /var/lib/dhcp/dhcpd.leases
  2. # All times in this file are in UTC (GMT), not your local timezone.   This is
  3. # not a bug, so please don't ask about it.   There is no portable way to
  4. # store leases in the local timezone, so please don't request this as a
  5. # feature.   If this is inconvenient or confusing to you, we sincerely
  6. # apologize.   Seriously, though - don't ask.
  7. # The format of this file is documented in the dhcpd.leases(5) manual page.

  8. lease 192.168.2.19 {
  9.         starts 5 2007/10/05 09:14:28;
  10.         ends 5 2007/10/05 09:24:28;
  11.         hardware ethernet 00:e0:06:09:12:67;
  12.         uid 01:00:e0:06:09:12:67;
  13.         client-hostname "liang";
  14. }
  15. lease 192.168.2.13 {
  16.         starts 5 2007/10/05 09:12:31;
  17.         ends 5 2007/10/05 09:22:31;
  18.         hardware ethernet 00:17:31:0d:4c:42;
  19.         uid 01:00:17:31:0d:4c:42;
  20.         client-hostname "Admin";
  21. }
  22. lease 192.168.2.23 {
  23.         starts 5 2007/10/05 09:11:16;
  24.         ends 5 2007/10/05 09:21:16;
  25.         hardware ethernet 00:0b:6a:88:7c:cb;
  26.         uid 01:00:0b:6a:88:7c:cb;
  27.         client-hostname "hmjt-ad43d8e3bb";
  28. }

  29. ~

复制代码

问题是,在RH发行版下,租约记录为如下格式:

  1. [root@Routed-Server ~]# less /var/lib/dhcp/dhcpd.leases
  2. # All times in this file are in UTC (GMT), not your local timezone.   This is
  3. # not a bug, so please don't ask about it.   There is no portable way to
  4. # store leases in the local timezone, so please don't request this as a
  5. # feature.   If this is inconvenient or confusing to you, we sincerely
  6. # apologize.   Seriously, though - don't ask.
  7. # The format of this file is documented in the dhcpd.leases(5) manual page.
  8. # This lease file was written by isc-dhcp-V3.0.1

  9. lease 192.168.2.125 {
  10.   starts 2 2007/06/26 07:02:29;
  11.   ends 2 2007/06/26 07:04:29;
  12.   tstp 2 2007/06/26 07:04:29;
  13.   binding state free;
  14.   hardware ethernet 00:c0:9f:4e:16:67;
  15. }
  16. lease 192.168.2.121 {
  17.   starts 2 2007/07/10 01:58:25;
  18.   ends 2 2007/07/10 02:00:25;
  19.   tstp 2 2007/07/10 02:00:25;
  20.   binding state free;
  21.   hardware ethernet 00:11:09:ec:f6:a6;
  22. }
  23. lease 192.168.2.143 {
  24.   starts 6 2007/09/01 07:56:37;
  25.   ends 6 2007/09/01 08:54:10;
  26.   tstp 6 2007/09/01 08:54:10;
  27.   binding state free;
  28.   hardware ethernet 00:04:5a:a7:13:36;
  29. }
  30. lease 192.168.2.164 {
  31.   starts 5 2007/10/05 09:15:45;
  32.   ends 2 2038/01/19 03:14:06;
  33.   [color=Red]binding state active;[/color]
  34.   [color=Red]next binding state free;[/color]
  35.   hardware ethernet 00:13:d4:f0:78:2c;
  36.   uid "\001\000\023\324\360x,";
  37. }
  38. ~

复制代码


# 如上图中红色所示,有什么在Debian的发行版下没有这些字段呢?另,在Debain下man dhcpd.leases ,man dhcpd.conf与RH发行版下也有差异,在RH下能用的一些参数在Debian下不能用了,比喻ddns-update-style
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表