Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

The Unofficial Ubuntu Starter Guide
Prev Home Next

Q: How to install DHCP Server for automatic IP addresses assignment?

  1. Read General Notes
  2. Read How to add extra repositories?
  3. e.g. Assumed that "eth0" is the interface for network card
         IP Address Range: 192.168.0.100 to 192.168.0.200
         Subnet Mask: 255.255.255.0
         DNS Servers: 202.188.0.133, 202.188.1.5
         Domains: tm.net.my
         Gateway Address: 192.168.0.1
  4. sudo apt-get install dhcp3-server
    sudo cp /etc/default/dhcp3-server /etc/default/dhcp3-server_backup
    sudo gedit /etc/default/dhcp3-server
  5. Find this line
    ...
    INTERFACES=""
  6. Replace with the following line
    INTERFACES="eth0"
  7. Save the edited file (sample)
  8. sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_backup
    sudo gedit /etc/dhcp3/dhcpd.conf
  9. Find this section
    ...
    # option definitions common to all supported networks...
    option domain-name "example.org";
    option domain-name-servers ns1.example.org, ns2.example.org;
    
    default-lease-time 600;
    max-lease-time 7200;
    ...
  10. Replace with the following lines
    # option definitions common to all supported networks...
    #option domain-name "example.org";
    #option domain-name-servers ns1.example.org, ns2.example.org;
    
    #default-lease-time 600;
    #max-lease-time 7200;
  11. Find this section
    ...
    # A slightly different configuration for an internal subnet.
    #subnet 10.5.5.0 netmask 255.255.255.224 {
    #  range 10.5.5.26 10.5.5.30;
    #  option domain-name-servers ns1.internal.example.org;
    #  option domain-name "internal.example.org";
    #  option routers 10.5.5.1;
    #  option broadcast-address 10.5.5.31;
    #  default-lease-time 600;
    #  max-lease-time 7200;
    #}
    ...
  12. Replace with the following lines
    # A slightly different configuration for an internal subnet.
    subnet 192.168.0.0 netmask 255.255.255.0 {
      range 192.168.0.100 192.168.0.200;
      option domain-name-servers 202.188.0.133, 202.188.1.5;
      option domain-name "tm.net.my";
      option routers 192.168.0.1;
      option broadcast-address 192.168.0.255;
      default-lease-time 600;
      max-lease-time 7200;
    }
  13. Save the edited file (sample)
  14. sudo /etc/init.d/dhcp3-server restart


Database Server


The Unofficial Ubuntu Starter Guide
Prev Home Next

 
 
  Published under the terms of the GNU General Public License Design by Interspire