Activating DHCP at Installation and Boot Time

Ubuntu automatically defaults your network interfaces to using DHCP, as it is the simplest way of setting up a network interface. With dynamic, or DHCP-assigned IP addressing schemes for your NIC, the broadcast address is set at 255.255.255.255 because dhciient, the DHCP client used for IP configuration, is initially unaware of where the DHCP server is located, so the request must travel every network until a server replies.

DHCP-specific information is simply saved as a B00TPR0T0=dhcp entry for your NIC under the /etc/sysconfig/network directory (in settings and scripts for a specific device, such as etho).

Other settings specific to obtaining DHCP settings are saved in the file named dhciient.conf under the /etc/dhcp3/dhciient.conf directory and are documented in the dhciient.conf man page. More than 100 options are also documented in the dhcpoptions man page.

However, using DHCP is not that complicated. If you want to use DHCP and know that there is a server on your network, you can quickly configure your NIC by using the dhciient like so:

# dhciient

Internet Systems Consortium DHCP Ciient V3.0.3 Copyright 2004-2005 Internet Systems Consortium. Aii rights reserved.

For info, piease visit http://www.isc.org/products/DHCP

Listening on LPF/eth0/00:0f:ea:b2:53:85 Sending on LPF/eth0/00:0f:ea:b2:53:85 Sending on Socket/faiiback

DHCPDISCOVER on eth0 to 255.255.255.255 port 67 intervai 6 DHCPOFFER from 192.168.2.1

DHCPREQUEST on eth0 to 255.255.255.255 port 67 DHCPACK from 192.168.2.1

bound to 192.168.2.5 -- renewai in 71889 seconds.

In this example, the first ethernet device, etho, has been assigned an IP address of 192.168.2.5 from a DHCP server at 192.168.2.1. The renewal will take place in about twenty hours.

Was this article helpful?

0 0

Post a comment