Install and Setup DHCP Server on Ubuntu Linux - 通達人驛站

Install and Setup DHCP Server on Ubuntu Linux

I had installed and setup DHCP Server on Ubuntu by below steps.

Install dhcp packages

At a terminal prompt, enter the following command to install dhcpd:
sudo apt-get install isc-dhcp-server

Config dhcp server

  1. Config dhcp server as below step
    sudo vim /etc/dhcp/dhcpd.conf
    # Sample /etc/dhcpd.conf
    default-lease-time 600;
    max-lease-time 7200;
    option subnet-mask;
    option broadcast-address;
    option routers;
    option domain-name-servers,;
    option domain-name "mydomain.example";

    subnet netmask {

  2. Config dhcp server network interface
    sudo vim /etc/network/interfaces
    auto eth1
    iface eth1 inet static

  3. Select Interface card of dhcp server
    sudo vim /etc/default/isc-dhcp-server

Restart dhcp service

sudo service isc-dhcp-server restart
sudo service isc-dhcp-server start
sudo service isc-dhcp-server stop

Modify and test interface on Client site

  1. Modify dhcp ethernet interface
    vim /etc/network/interface
    auto eth1
    iface eth1 inet dhcp

  2. Down and up dhcp ethernet interface
    ifdown eth1
    ifup eth1

  3. Check dhcp ethernet interface getting IP

ubuntu documentation -《isc-dhcp-server

0 意見 :


Related Posts with Thumbnails