dylibin 发表于 2009-05-12 19:39

关于DHCP的几个不是问题的问题

1、tail -f /var/log/messages

May 12 11:12:41 fsd dhcpd: if Myser.xxx.com IN A rrset doesn't exist add my.xxx.com 300 IN A 192.168.0.217: timed out.
不知道以上信息什么意思?

2、tail -f /var/db/dhcpd/dhcpd.leases

lease 192.168.0.235 {
starts 2 2009/05/12 11:39:06;
ends 2 2009/05/12 11:49:06;
binding state active;
next binding state free;
hardware ethernet 00:02:55:d6:ba:6d;
uid "\001RAS \000\002U\326\272\215\000\000\007\000\000\000";
client-hostname "Myser";
}
lease 192.168.0.240 {
starts 2 2009/05/12 11:39:34;
ends 2 2009/05/12 11:49:34;
binding state active;
next binding state free;
hardware ethernet 00:02:55:d6:ba:6d;
uid "\001RAS \000\002U\326\272\215\000\000\000\000\000\000";
client-hostname "Myser";
}
lease 192.168.0.220 {
starts 2 2009/05/12 11:39:34;
ends 2 2009/05/12 11:49:34;
binding state active;
next binding state free;
hardware ethernet 00:02:55:d6:ba:6d;
uid "\001RAS \000\002U\326\272\215\000\000\011\000\000\000";
client-hostname "Myser";

以上 client-hostname "Myser" 对应的主机是设置了固定IP的机器。难道DHCP也要给固定IP机器预留一个动态IP?为什么还会不断的变化IP?

3、今天修改了dhcpd.conf的以下两个租期参数,重启dhcpd后不断有同事打电话说分不到IP地址,怎么会呢?
default-lease-time 10800; (3小时)
max-lease-time 28800;(8小时)

[ 本帖最后由 dylibin 于 2009-5-13 10:33 编辑 ]

ssffzz1 发表于 2009-05-12 20:11

第一个是DDNS的,可以忽略他。
第二个问题,你帖配置吧。
第三个你明天再观察一下
先逐个解决。

dylibin 发表于 2009-05-13 08:49

这么说第二个问题的确是个问题。配置怎么可能会有问题?我是利用一台dhcpServer通过dhcp中继为多Vlan提供IP的,其中192.168.0.0段的配置如下。Myser本机设置为固定IP192.168.0.5。

shared-network Vlan-0 {
subnet 192.168.0.0 netmask 255.255.255.0 {
    option routers 192.168.0.254;
    range 192.168.0.200 192.168.0.249;
}
}

ssffzz1 发表于 2009-05-13 09:09

1、你清除那个DHCP租约再重新统计一次,结果贴上来。
2、DHCPD的配置贴上来。

dylibin 发表于 2009-05-13 10:32

# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#

# option definitions common to all supported networks...
option domain-name "domain.com";
option domain-name-servers 192.168.0.1;

default-lease-time 3600;
max-lease-time 10800;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# ad-hoc DNS update scheme - set to "none" to disable dynamic DNS updates.
ddns-update-style ad-hoc;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.

shared-network Vlan-0 {
subnet 192.168.0.0 netmask 255.255.255.0 {
    option routers 192.168.0.1;
    range 192.168.0.200 192.168.0.249;
}
}
shared-network Vlan-1 {
subnet 192.168.1.0 netmask 255.255.255.0 {
    option routers 192.168.1.1;
    range 192.168.1.101 192.168.1.249;
}
}
shared-network Vlan-2 {
subnet 192.168.2.0 netmask 255.255.255.0 {
    option routers 192.168.2.1;
    range 192.168.2.101 192.168.2.249;
}
}
shared-network Vlan-3 {
subnet 192.168.3.0 netmask 255.255.255.0 {
    option routers 192.168.3.1;
    range 192.168.3.101 192.168.3.249;
}
}


echo "">/var/db/dhcpd/dhcpd.leases


tail -f /var/db/dhcpd/dhcpd.leases

lease 192.168.0.240 {
starts 3 2009/05/13 02:13:03;
ends 3 2009/05/13 03:13:03;
binding state active;
next binding state free;
hardware ethernet 00:e0:4c:39:02:db;
uid "\001RAS \000\340L9\002\333\000\000\007\000\000\000";
client-hostname "s-k12";
}
lease 192.168.0.239 {
starts 3 2009/05/13 02:13:03;
ends 3 2009/05/13 03:13:03;
binding state active;
next binding state free;
hardware ethernet 00:02:55:d6:ba:6d;
uid "\001RAS \000\002U\326\272\215\000\000\000\000\000\000";
client-hostname "Myser";
}
lease 192.168.1.249 {
starts 3 2009/05/13 02:13:06;
ends 3 2009/05/13 03:13:06;
binding state active;
next binding state free;
hardware ethernet 00:23:4e:db:a6:8b;
uid "\001\000#N\333\246\213";
client-hostname "Lenovo-PC";
}
lease 192.168.0.238 {
starts 3 2009/05/13 02:13:07;
ends 3 2009/05/13 03:13:07;
binding state active;
next binding state free;
hardware ethernet 00:e0:4c:39:02:db;
uid "\001RAS \000\340L9\002\333\000\000\006\000\000\000";
client-hostname "s-k12";
}
lease 192.168.2.243 {
starts 3 2009/05/13 02:13:09;
ends 3 2009/05/13 03:13:09;
binding state active;
next binding state free;
hardware ethernet 00:21:00:b9:db:87;
uid "\001\000!\000\271\333\207";
client-hostname "cic";
}
lease 192.168.0.237 {
starts 3 2009/05/13 02:13:12;
ends 3 2009/05/13 03:13:12;
binding state active;
next binding state free;
hardware ethernet 00:02:55:d6:ba:6d;
uid "\001RAS \000\002U\326\272\215\000\000\006\000\000\000";
client-hostname "Myser";
}
lease 192.168.2.109 {
starts 3 2009/05/13 02:13:12;
ends 3 2009/05/13 03:13:12;
binding state active;
next binding state free;
hardware ethernet 00:11:5b:53:5c:fa;
uid "\001\000\021[S\\\372";
client-hostname "PC-20090108FWCW";
}
lease 192.168.2.142 {
starts 3 2009/05/13 02:13:12;
ends 3 2009/05/13 03:13:12;
binding state active;
next binding state free;
hardware ethernet 00:11:5b:d7:5e:97;
uid "\001\000\021[\327^\227";
client-hostname "WWW-CF8FB9A3E5E";
}
lease 192.168.0.236 {
starts 3 2009/05/13 02:13:15;
ends 3 2009/05/13 03:13:15;
binding state active;
next binding state free;
hardware ethernet 00:e0:4c:39:02:db;
uid "\001RAS \000\340L9\002\333\000\000\001\000\000\000";
client-hostname "s-k12";
}
lease 192.168.0.235 {
starts 3 2009/05/13 02:13:17;
ends 3 2009/05/13 03:13:17;
binding state active;
next binding state free;
hardware ethernet 00:e0:4c:39:02:db;
uid "\001RAS \000\340L9\002\333\000\000\002\000\000\000";
client-hostname "s-k12";
}
lease 192.168.2.115 {
starts 3 2009/05/13 02:13:19;
ends 3 2009/05/13 03:13:19;
binding state active;
next binding state free;
hardware ethernet 00:21:00:c3:a1:9f;
uid "\001\000!\000\303\241\237";
client-hostname "Lenovo-PC";
}
lease 192.168.0.234 {
starts 3 2009/05/13 02:13:21;
ends 3 2009/05/13 03:13:21;
binding state active;
next binding state free;
hardware ethernet 00:e0:4c:39:02:db;
uid "\001RAS \000\340L9\002\333\000\000\010\000\000\000";
client-hostname "s-k12";
}

注:主机s-k12和Myser都是网内固定IP的机器。

[ 本帖最后由 dylibin 于 2009-5-13 10:34 编辑 ]

helon 发表于 2009-05-13 10:48

是这样的:
1、没看到配置中有保留IP配置项
2、试一下在每个shared-network中加入192.168.0.x网段,但地址范围不要冲突。因为你的服务器的地址时192.168.0.1的。

dylibin 发表于 2009-05-13 11:27

原帖由 helon 于 2009-5-13 10:48 发表 http://bbs2.chinaunix.net/images/common/back.gif
是这样的:
1、没看到配置中有保留IP配置项
2、试一下在每个shared-network中加入192.168.0.x网段,但地址范围不要冲突。因为你的服务器的地址时192.168.0.1的。
配置中是没有保留项,因为每个网段分配的地址范围都有保留,固定IP的机器不可能与动态IP有冲突。
不明白“在每个shared-network中加入192.168.0.x网段”是什么意思。

dylibin 发表于 2009-05-13 11:35

starts 3 2009/05/13 02:13:03;
ends 3 2009/05/13 03:13:03;
02:13:03是2点13分03秒吗?为什么不是分配地址的时间,现在明明是上午,我的机器的系统时间没有问题呀。这个2点是凌晨2点吗?一直都没仔细观察过,原来不明白的地方还蛮多。

[ 本帖最后由 dylibin 于 2009-5-13 11:37 编辑 ]

ssffzz1 发表于 2009-05-13 12:38

lease 192.168.0.240 {
starts 3 2009/05/13 02:13:03;
ends 3 2009/05/13 03:13:03;
binding state active;
next binding state free;
hardware ethernet 00:e0:4c:39:02:db;
uid "\001RAS \000\340L9\002\333\000\000\007\000\000\000";
client-hostname "s-k12";
}
lease 192.168.0.239 {
starts 3 2009/05/13 02:13:03;
ends 3 2009/05/13 03:13:03;
binding state active;
next binding state free;
hardware ethernet 00:02:55:d6:ba:6d;
uid "\001RAS \000\002U\326\272\215\000\000\000\000\000\000";
client-hostname "Myser";
}


你核对一下机器的MAC地址是不是和真是的机器是一致的,我咋怀疑有重名的机器呢。
另外机器时间最好调正确,不过这个和DHCP没关系的,仅影响到日志。

dylibin 发表于 2009-05-13 15:04

你核对一下机器的MAC地址是不是和真是的机器是一致的,我咋怀疑有重名的机器呢。
另外机器时间最好调正确,不过这个和DHCP没关系的,仅影响到日志。
s-k12和Myser两台机器的MAC和对应的机器是一致的.我注意到lenovo-pc是有重名的现象,那是因为有一批电脑是经销商安装的系统。我搞不清楚的就是,为什么指定IP的机器,DHCP也要分配租期,而且好像是这个IP还不断的变化。
另外机器的时间是正常的,都定期ntpdate,不存在不正确的问题。
Web# date
Wed May 13 15:08:37 CST 2009

[ 本帖最后由 dylibin 于 2009-5-13 15:08 编辑 ]
页: [1] 2 3
查看完整版本: 关于DHCP的几个不是问题的问题