they are booted. You can also force them to contact the DHCP server at any time:

? On a Fedora Core 4 or later system, use dhclient to configure an Ethernet port using DHCP:

? # dhclient eth0  

? In this case, the port being configured is eth0 , the first Ethernet connection. On other Linux systems, you may need to use dhcpcd or pump in place of dhclient .

? On a Windows system, you can use ipconfig to obtain or renew a DHCP lease:

? C:> ipconfig /renew

?

? Windows IP Configuration

?

? Ethernet adapter 1:

?

? Connection-specific DNS Suffix . : fedorabook.com

? IP Address. . . . . . . . . . . . : 192.168.1.207

? Subnet Mark . . . . . . . . . . . : 255.255.255.0

? Default Gateway . . . . . . . . . : 192.168.1.254

7.2.2. How Does It Work?

Table 7-4 shows the sequence of messages that flow between a DHCP client and a DHCP server during initial negotiation and during lease renewal.

Table 7-4. DHCP messages.

Context Message type Origin Description
Initial negotiation Lease renewal      
*   DHCPDISCOVER Client Client tries to discover the DHCP server.
*   DHCPOFFER Server The DHCP server offers its location and possible lease details.
* * DHCPREQUEST Client The client requests a lease.
* * DHCPACK/DHCPNACK Server The server acknowledges (approves) or negatively acknowledges (rejects) the lease request.

Early DHCP messages are sent using UDP to the broadcast address 255.255.255.255. This is necessary because the client does not have an IP address at the start of the negotiation.

dhcpd stores lease information in the file /var/lib/dhcpd/dhcpd.leases so that if it is stopped and restarted, it still has an idea of what leases are outstanding. In a similar way, dhclient stores its lease information in /var/lib/dhcp/dhclient-<eth0>.leases (where <eth0> is the interface name).

7.2.3. What About...

7.2.3.1. ...older clients that use the bootp protocol?

The DHCP server, dhcpd , can also manage clients that use the Bootstrap Protocol (BOOTP). However, BOOTP does not use leases, so once an IP address is assigned, it stays assigned even if the computer using that address is removed from the network . IP assignments from an address pool are therefore called automatic assignments instead of dynamic assignments.

To enable dhcpd to assign BOOTP addresses, add the dynamic-bootp option to the range statement in /etc/dhcpd.conf :

range dynamic-bootp 192.168.1.128 192.168.1.191

Вы читаете Fedora Linux
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату