Page 192 - DCAP106_OPERATING_SYSTEM_TOOLS
P. 192

Unit 10: Servers




                                                                                                Notes
                  Example: Let us consider a statement: host ns { hardware ethernet 12:34:56:78:AB:CD;
          fixed_address 192.168.1.5;}
          This statement defines the host name, Ethernet address, and IP address of the client. Using this
          statement, any time the client with the matching Ethernet address connects to the server, the
          server will return the defined host name and the defined static IP address.


                 Example:  Let us  consider  a subnet statement:  subnet 192.168.1.0  netmask
          255.255.255.0 {range 192.168.1.10 192.168.1.200;}
          This statement describes the network we are providing DHCP service for, in this case 192.168.1.0.
          It also says that the IP addresses it is allowed to lease are from 192.168.1.10 to 192.168.1.200.
          The range clause defines the low and high values of the IP addresses the DHCP server is allowed
          to lease.
               !
             Caution  Range clause  must always be used  within a subnet statement, and the range
             defined must be within the address space of the defined subnet.
          Usually if you have a cable modem or DSL, you get your home PC’s IP address dynamically
          assigned  from  your service  provider. If you install a home  cable/DSL  router between your
          modem and home network, your PC will most likely get its IP address at boot time from the
          home router instead. You can choose to disable the DHCP server feature on your home router
          and set up a Linux box as the DHCP server.

          Configuration Problems

          There  are  a  few  uncertain  blocks  you  may  encounter  after  your  DHCP  server  is  configured
          and running. Primarily, if you provide DHCP services to Microsoft Windows clients, you may
          encounter problems with the limited broadcast address. If Windows clients do not see DHCP
          messages from the server while other clients, such as Linux clients, do, you may need to define a
          specific route for the limited broadcast address on your Linux server. To do so, add the following
          to your /etc/hosts file:
          255.255.255.255 lim_broad
          Then, add a route for the limited broadcast address by using this command:
          route add _host lim_broad dev eth0
          To make this a more permanent change, add the preceding command to your /etc/rc.d/rc.local
          file. For Red Hat and Caldera users, the above commands have been added for you in the stock
          DHCP init script, /etc/rc.d/init.d/dhcpd.
          If you have problems running dhcpd on numerous network interfaces, you most likely have
          an older kernel. Be sure you are using a kernel version of 2.0.31 or higher. If you get a Protocol
          Not Configured error, be sure that your kernel was compiled with the CONFIG_PACKET and
          CONF_FILTER options turned on.

          DHCP Configuration Options

          There are a lot of configuration options available to you in the /etc/dhcpd.conf file. All of these
          options can be specified within a host or subnet statement or within a group statement. The group
          statement can be used to supply configuration options to a group of host or subnet statements.
          Also, you can use options outside of group, subnet, or host statements if you wish to apply
          those options to every single system and network you define. Because of this flexibility, you can
          completely tailor your configuration to your specific needs.


                                           LOVELY PROFESSIONAL UNIVERSITY                                   185
   187   188   189   190   191   192   193   194   195   196   197