免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1904 | 回复: 1
打印 上一主题 下一主题

dhcp的困惑 (谢谢) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-01-15 10:52 |只看该作者 |倒序浏览
我的dhcp服务器已经配置好,也已经用了一段时间。现在我的问题是:

我的ip地址池只有22个地址,可是我在/var/lib/dhcp/dhcpd.leases里却能看到超过22个地址被分配,并且一个ip地址有多行记录。而且,我有一个固定的mac绑定到一台机器,现在也被占用了。

所以,我想:

1、明确知道有哪些机器被分配了地址?
2、如何将己被占用的固定地址再分配给某个mac地址?

我的dhcpd.conf及dhcpd.leases文件如下:

#### dhcpd.conf ####

ddns-update-style interim;
ignore client-updates;

subnet 192.168.100.0 netmask 255.255.252.0 {

# --- default gateway
        option routers                        192.168.100.1;
        option subnet-mask                255.255.252.0;

        option nis-domain                "njfiat.com";
        option domain-name                "njfiat.com";
        option domain-name-servers        192.168.100.112,192.168.100.230;

        option time-offset                -18000;        # Eastern Standard Time
#        option ntp-servers                192.168.1.1;
#        option netbios-name-servers        192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
#        option netbios-node-type 2;

        range dynamic-bootp 192.168.100.142 192.168.100.142;
        default-lease-time 86400;
        max-lease-time 172800;

        range dynamic-bootp 192.168.103.202 192.168.103.222;
        default-lease-time 43200;
        max-lease-time 86400;

        # we want the nameserver to appear at a fixed address
        host rliu {
                next-server rliu.njfiat.com;
                hardware ethernet 000:59:39:EA:C6;
                fixed-address 192.168.100.142;
        }
#        host ns {
#                next-server marvin.redhat.com;
#                hardware ethernet 12:34:56:78:AB:CD;
#                fixed-address 207.175.42.254;
#        }
}

subnet 192.168.44.0 netmask 255.255.255.0 {
}



#### dhcpd.leases ####

# All times in this file are in UTC (GMT), not your local timezone.   This is
# not a bug, so please don't ask about it.   There is no portable way to
# store leases in the local timezone, so please don't request this as a
# feature.   If this is inconvenient or confusing to you, we sincerely
# apologize.   Seriously, though - don't ask.
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-V3.0pl1

lease 192.168.103.207 {
  starts 3 2004/01/14 07:21:07;
  ends 3 2004/01/14 19:21:07;
  tstp 3 2004/01/14 19:21:07;
  binding state free;
  hardware ethernet 00:09:6b:7c:17:25;
  uid "\001\000\011k|\027%";
  client-hostname "sc";
}
lease 192.168.103.206 {
  starts 3 2004/01/14 08:00:16;
  ends 3 2004/01/14 20:00:16;
  tstp 3 2004/01/14 20:00:16;
  binding state free;
  hardware ethernet 00:10:5c:dd:f9:78;
  uid "\001\000\020\\\335\371x";
  client-hostname "ny-f6ac8f5db706";
}
lease 192.168.103.203 {
  starts 3 2004/01/14 08:05:47;
  ends 3 2004/01/14 20:05:47;
  tstp 3 2004/01/14 20:05:47;
  binding state free;
  hardware ethernet 00:10:5c:de:35:3c;
  uid "\001\000\020\\\3365<";
  client-hostname "ny-20c97491fd2c";
}
lease 192.168.103.210 {
  starts 3 2004/01/14 08:13:18;
  ends 3 2004/01/14 20:13:18;
  tstp 3 2004/01/14 20:13:18;
  binding state free;
  hardware ethernet 00:06:1b:d3:ca:27;
  uid "\001\000\006\033\323\312'";
  client-hostname "drizzlewang";
}
lease 192.168.103.220 {
  starts 3 2004/01/14 09:35:18;
  ends 3 2004/01/14 21:35:18;
  tstp 3 2004/01/14 21:35:18;
  binding state free;
  hardware ethernet 00:05:5d:05:ac:b6;
  uid "\001\000\005]\005\254\266";
  client-hostname "Y";
}
lease 192.168.103.218 {
  starts 3 2004/01/14 09:59:06;
  ends 3 2004/01/14 21:59:06;
  tstp 3 2004/01/14 21:59:06;
  binding state free;
  hardware ethernet 00:05:5d:05:ac:b6;
  uid "\001RAS \000\005]\005\254\266\000\000\000\000\000\000";
  client-hostname "Y";
}
lease 192.168.103.205 {
  starts 3 2004/01/14 09:59:07;
  ends 3 2004/01/14 21:59:07;
  tstp 3 2004/01/14 21:59:07;
  binding state free;
  hardware ethernet 00:05:5d:05:ac:b6;
  uid "\001RAS \000\005]\005\254\266\000\000\001\000\000\000";
  client-hostname "Y";
}
lease 192.168.103.202 {
  starts 3 2004/01/14 20:16:46;
  ends 4 2004/01/15 08:16:46;
  binding state active;
  next binding state free;
  hardware ethernet 00:10:5c:c4:8f:1a;
  uid "\001\000\020\\\304\217\032";
  client-hostname "biserver";
}
lease 192.168.103.215 {
  starts 4 2004/01/15 00:48:14;
  ends 4 2004/01/15 12:48:14;
  binding state active;
  next binding state free;
  hardware ethernet 00:01:02:94:a5:7e;
  uid "\001RAS \000\001\002\224\245~\000\000\000\000\000\000";
  client-hostname "shyan";
}
lease 192.168.103.217 {
  starts 4 2004/01/15 00:48:15;
  ends 4 2004/01/15 12:48:15;
  binding state active;
  next binding state free;
  hardware ethernet 00:01:02:94:a5:7e;
  uid "\001RAS \000\001\002\224\245~\000\000\001\000\000\000";
  client-hostname "shyan";
}
lease 192.168.103.204 {
  starts 4 2004/01/15 00:50:33;
  ends 4 2004/01/15 12:50:33;
  binding state active;
  next binding state free;
  hardware ethernet 52:41:53:20:d0:f5:d4:06:3d:3f:c2:01:01:00:00:00;
  uid "\001RAS \320\365\324\006=?\302\001\001\000\000\000";
  client-hostname "CGH";
}
lease 192.168.103.211 {
  starts 4 2004/01/15 00:58:55;
  ends 4 2004/01/15 12:58:55;
  binding state active;
  next binding state free;
  hardware ethernet 00:00:b4:c2:33:db;
  uid "\001\000\000\264\3023\333";
  client-hostname "prod18";
}
lease 192.168.103.221 {
  starts 4 2004/01/15 01:13:59;
  ends 4 2004/01/15 13:13:59;
  binding state active;
  next binding state free;
  hardware ethernet 00:05:5d:f5:6d:22;
  uid "\001\000\005]\365m\"";
  client-hostname "body14";
}
lease 192.168.103.209 {
  starts 4 2004/01/15 01:15:19;
  ends 4 2004/01/15 13:15:19;
  binding state active;
  next binding state free;
  hardware ethernet 00:06:1b:cb:db:a8;
  uid "\001RAS \000\006\033\313\333\250\000\000\000\000\000\000";
}
lease 192.168.103.219 {
  starts 4 2004/01/15 01:15:23;
  ends 4 2004/01/15 13:15:23;
  binding state active;
  next binding state free;
  hardware ethernet 00:06:1b:cb:db:a8;
  uid "\001RAS \000\006\033\313\333\250\000\000\001\000\000\000";
}
lease 192.168.103.216 {
  starts 4 2004/01/15 01:35:34;
  ends 4 2004/01/15 13:35:34;
  binding state active;
  next binding state free;
  hardware ethernet 00:00:b4:c2:87:24;
  uid "\001RAS \000\000\264\302\207$\000\000\000\000\000\000";
}
lease 192.168.103.212 {
  starts 4 2004/01/15 01:35:35;
  ends 4 2004/01/15 13:35:35;
  binding state active;
  next binding state free;
  hardware ethernet 00:00:b4:c2:87:24;
  uid "\001RAS \000\000\264\302\207$\000\000\001\000\000\000";
}
lease 192.168.103.208 {
  starts 4 2004/01/15 02:11:19;
  ends 4 2004/01/15 14:11:19;
  binding state active;
  next binding state free;
  hardware ethernet 00:60:08:5d:66:52;
  uid "\001\000`\010]fR";
  client-hostname "yuanl";
}
lease 192.168.103.222 {
  starts 2 2004/01/13 06:01:34;
  ends never;
  binding state bootp;
  next binding state free;
  hardware ethernet 00:20:84:01:40:df;
}
lease 192.168.103.214 {
  starts 0 2003/12/28 03:22:05;
  ends never;
  binding state bootp;
  next binding state free;
  hardware ethernet 00:ab:00:00:00:00;
}
lease 192.168.103.202 {
  starts 4 2004/01/15 02:16:47;
  ends 4 2004/01/15 14:16:47;
  binding state active;
  next binding state free;
  hardware ethernet 00:10:5c:c4:8f:1a;
  uid "\001\000\020\\\304\217\032";
  client-hostname "biserver";
}
lease 192.168.103.208 {
  starts 4 2004/01/15 02:23:09;
  ends 4 2004/01/15 14:23:09;
  binding state active;
  next binding state free;
  hardware ethernet 00:60:08:5d:66:52;
  uid "\001\000`\010]fR";
  client-hostname "yuanl";
}

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2004-01-15 11:27 |只看该作者

dhcp的困惑 (谢谢)

你的配置文件有一点我不太理解,既然192.168.100.142已经用mac地址绑定了,为什么还要设一个rang?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP