dhcp 服务配置 启动失败
靓仔湘 2013-04-22 07:34:51 好久没有上来这里闲逛了, 今天做 dhcp 服务实验出了一点小问题, 哪位帅哥美女耐心的帮我看一下,
找出问题在哪里, 感激不尽啊. 有兴趣的也可以挑战一下告诉我你的答案...
某公司管理部门 15 人, 后期新进员工最多 8 人. 现在需要配置一个 dhcp 服务器, 采用 192.168.1.0 网段. 公司为节约 ip 地址使用和增强部门管理, 给管理部门分配 30 个可用的 ip 地址.
# ipcalc -bmn 192.168.1.0/27
NETMASK=255.255.255.224
BROADCAST=192.168.1.31
NETWORK=192.168.1.0
#
根据上述要求计算可以得到:
网络号为 192.168.1.0, 子网掩码为 255.255.255.224, 广播地址为 192.168.1.31
则有效地址为 192.168.1.1 ~ 192.168.1.30 刚刚好满足上述要求
下面是我自己设置的 ip 地址(设置略),
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:78:E2:A0
inet addr:192.168.1.33 Bcast:192.168.1.255 Mask:
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:98 errors:0 dropped:0 overruns:0 frame:
TX packets:74 errors:0 dropped:0 overruns:0 carrie
collisions:0 txqueuelen:100
RX bytes:13582 (13.2 Kb) TX bytes:11442 (11.1 Kb)
Interrupt:10 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:
TX packets:14 errors:0 dropped:0 overruns:0 carrie
collisions:0 txqueuelen:0
RX bytes:1156 (1.1 Kb) TX bytes:1156 (1.1 Kb)
#
下面是我修改好的配置文件(也许是这个错了...)
# cat /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.224 {
# --- default gateway
option routers 192.168.1.254;
option subnet-mask 255.255.255.224;
option nis-domain "domain.org";
option domain-name "manage.com";
option domain-name-servers 192.168.1.32;
option time-offset -28800; # 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.1.1 192.168.1.30;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
# host ns {
# next-server marvin.redhat.com;
# hardware ethernet 12:34:56:78:AB:CD;
# fixed-address 207.175.42.254;
# }
}
#
下面是 dhcp 启动接口
# cat /etc/sysconfig/dhcpd
# Command line options here
DHCPDARGS="eth0"
#
下面是 dhcp 网卡地址
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.33
NETMASK=255.255.255.0
#
重启 network 没有问题, 但是重启 dhcpd 出现下面的信息提示:
# service dhcpd start
No subnet declaration for eth0 (192.168.1.33).
** Ignoring requests on eth0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface eth0 is attached. **
Not configured to listen on any interfaces!
If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.
If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.
Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.
exiting.
对于提示信息, 大概读了一下, 没有找到解决办法, 然后我又认真读了一遍, 还是不知道问题出在哪里啊???
真的好纠结, 我对这个挺感兴趣的, 是我以后的饭碗呢...
谁来帮我解决一下???
还需要什么信息的话联系我, 我会尽快回复的...
谢谢那位大神