|
287.
|
|
|
This method entails defining a pool (sometimes also called a range or scope) of IP addresses from which DHCP clients are supplied their configuration properties dynamically and on a fist come first serve basis. When a DHCP client is no longer on the network for a specified period, the configuration is expired and released back to the address pool for use by other DHCP Clients.
|
|
|
|
该模式需要定义一个 IP 地址池 (有时也叫范围或作用域) ,以便 DHCP 客户端可以被动态提供它们的配置from which DHCP clients are supplied their configuration properties dynamically and on a fist come first serve basis。当一个 DHCP 客户端有段时间不再在网络上时,该配置将过期并释放回地址池以便为其他 DHCP 客户端使用。
|
|
Translated and reviewed by
姚渺波
|
In upstream: |
|
该模式需要定义一个 IP 地址池 (有时也叫范围或作用域) ,以便 DHCP 客户端可以以先到先服务的方式动态获取它们的配置。当一个 DHCP 客户端不在网络上超过一定的时间后,该配置将过期并被释放回地址池以便为其他 DHCP 客户端所使用。
|
|
|
Suggested by
EAdam
|
|
|
|
Located in
serverguide/C/network-config.xml:550(para)
|
|
288.
|
|
|
Ubuntu is shipped with both DHCP server and client. The server is <application>dhcpd</application> (dynamic host configuration protocol daemon). The client provided with Ubuntu is <application>dhclient</application> and should be installed on all computers required to be automatically configured. Both programs are easy to install and configure and will be automatically started at system boot.
|
|
|
|
ubuntu 提供 DHCP 服务器及其客户端。服务器叫 <application>dhcpd</application> (动态主机配置协议守护程序)。Ubuntu 提供的客户端叫 <application>dhclient</application>,应该安装在所有自动配置的计算机上。这两个程序很容易安装和配置,并可在系统引导时自动启用。
|
|
Translated and reviewed by
姚渺波
|
In upstream: |
|
Ubuntu 提供 DHCP 服务器及其客户端。服务器叫 <application>dhcpd</application> (动态主机配置协议守护程序)。Ubuntu 提供的客户端叫 <application>dhclient</application>,应该安装在所有自动配置的计算机上。这两个程序很容易安装和配置,并可在系统引导时自动启用。
|
|
|
Suggested by
Ihnus Qcshz
|
|
|
|
Located in
serverguide/C/network-config.xml:928(para)
|
|
289.
|
|
|
At a terminal prompt, enter the following command to install <application>dhcpd</application>:
|
|
|
|
要安装 <application>dhcpd</application>,可以在终端提示符后输入以下命令:
|
|
Translated and reviewed by
姚渺波
|
|
|
|
Located in
serverguide/C/network-config.xml:938(para)
|
|
290.
|
|
|
sudo apt-get install dhcpd
|
|
|
|
sudo apt-get install dhcpd
|
|
Translated and reviewed by
姚渺波
|
|
|
|
Located in
C/network-applications.xml:923(command)
|
|
291.
|
|
|
You will see the following output, which explains what to do next:
|
|
|
|
您将看到下面的输出,说明接下来做什么:
|
|
Translated and reviewed by
姚渺波
|
|
|
|
Located in
C/network-applications.xml:926(para)
|
|
292.
|
|
|
Please note that if you are installing the DHCP server for the first
time you need to configure. Please stop (/etc/init.d/dhcp
stop) the DHCP server daemon, edit /etc/dhcpd.conf to suit your needs
and particular configuration, and restart the DHCP server daemon
(/etc/init.d/dhcp start).
You also need to edit /etc/default/dhcp to specify the interfaces dhcpd
should listen to. By default it listens to eth0.
NOTE: dhcpd's messages are being sent to syslog. Look there for
diagnostics messages.
Starting DHCP server: dhcpd failed to start - check syslog for diagnostics.
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
represents a space character.
Enter a space in the equivalent position in the translation.
|
|
|
|
Please note that if you are installing the DHCP server for the first
time you need to configure. Please stop (/etc/init.d/dhcp
stop) the DHCP server daemon, edit /etc/dhcpd.conf to suit your needs
and particular configuration, and restart the DHCP server daemon
(/etc/init.d/dhcp start).
You also need to edit /etc/default/dhcp to specify the interfaces dhcpd
should listen to. By default it listens to eth0.
NOTE: dhcpd's messages are being sent to syslog. Look there for
diagnostics messages.
Starting DHCP server: dhcpd failed to start - check syslog for diagnostics.
|
|
Translated and reviewed by
姚渺波
|
|
|
|
Located in
C/network-applications.xml:927(screen)
|
|
293.
|
|
|
The error message the installation ends with might be a little confusing, but the following steps will help you configure the service:
|
|
|
|
安装结束后的错误消息可能会带来小小的困惑,不过下面几步将帮助您配置服务:
|
|
Translated and reviewed by
姚渺波
|
|
|
|
Located in
serverguide/C/network-config.xml:960(para)
|
|
294.
|
|
|
Most commonly, what you want to do is assign an IP address randomly. This can be done with settings as follows:
|
|
|
|
通常,您想做的是随机指定一个 IP 地址。这可以通过以下设置来实现:
|
|
Translated and reviewed by
姚渺波
|
|
|
|
Located in
serverguide/C/network-config.xml:964(para)
|
|
295.
|
|
|
# Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.org";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
represents a space character.
Enter a space in the equivalent position in the translation.
|
|
|
|
# Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.org";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}
|
|
Translated and reviewed by
姚渺波
|
|
|
|
Located in
C/network-applications.xml:948(screen)
|
|
296.
|
|
|
This will result in the DHCP server giving a client an IP address from the range 192.168.1.10-192.168.1.100 or 192.168.1.150-192.168.1.200. It will lease an IP address for 600 seconds if the client doesn't ask for a specific time frame. Otherwise the maximum (allowed) lease will be 7200 seconds. The server will also "advise" the client that it should use 255.255.255.0 as its subnet mask, 192.168.1.255 as its broadcast address, 192.168.1.254 as the router/gateway and 192.168.1.1 and 192.168.1.2 as its DNS servers.
|
|
|
|
这将导致 DHCP 服务器从 192.168.1.10-192.168.1.100 或 192.168.1.150-192.168.1.200 范围中分配客户端一个 IP 地址。如果客户端没有要求一个特定的时间帧的话它将租用 600秒的 IP 地址。否则最大 (允许) 租用时间为 7200 秒。服务器也 "建议" 客户端使用 255.255.255.0 做为它的子网掩码,192.168.1.255 作为它的广播地址,192.168.1.254 作为路由器/网关,同时将 192.168.1.1 和 192.168.1.2 作为它的 DNS 服务器。
|
|
Translated and reviewed by
姚渺波
|
|
|
|
Located in
serverguide/C/network-config.xml:984(para)
|