12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Configuring the Server 321Chapter 3, “Operating System Updates.” The DHCP server can allow any system on thenetwork to retrieve an IP address, assign systems the same IP address each time one isrequested, or a combination of the two.The DHCP service uses the /etc/dhcpd.conf configuration file. A file without any configurationoptions is installed at this location with the dhcp package, and a sample file isprovided in /usr/share/doc/dhcp-/dhcpd.conf.sample.NOTEBecause brackets and curly brackets are used to define statement groupings and relationships,blank lines and extra spacing including tabs can be used to format the fileso it is easier to read. Lines that begin with # are considered comments.In older versions of DHCP, the ad-hoc DNS update scheme was available. In the currentversion, it is depreciated and does not work. Thus, the interim scheme is highly recommended.For more details, refer to the dhcpd.conf man page with the command mandhcpd.conf. As you can see from the sample configuration file /usr/share/doc/dhcp-/dhcpd.conf.sample, the first line of /etc/dhcpd.conf should define the DNSupdate scheme:14ddns-update-style interim;Listing 14.1 contains an example DHCP configuration file. In this example, three subnetsare defined, two of which are on the same physical network. In the 192.168.0.0 subnetdeclaration, several options including the gateway, subnet mask, and DNS server areconfigured for all clients in the subnet. Clients in the subnet who request an IP addressare leased an IP address in the 192.168.0.128 to 192.168.0.254 range with the exceptionof the system defined in the host statement. If the system with the MAC address listed inthe host statement connects, it is leased the 192.168.0.4 IP address each and every time.TIPTo obtain the MAC address of a network interface card in a <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong>client, use the command ifconfig , where isthe device name for the NIC such as eth0.LISTING 14.1Example DHCP Configuration Fileddns-update-style interim;authoritative;subnet 192.168.0.0 netmask 255.255.255.0 {#global parameters for the subnetoption routers 192.168.0.1;option subnet-mask 255.255.255.0;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!