Install DHCP server on Debian and Ubuntu.

[Category: Debian] Share: Bookmark and Share


The Dynamic Host Configuration Protocol (DHCP) is an autoconfiguration protocol used on IP networks. Computers that are connected to IP networks must be configured before they can communicate with other computers on the network. DHCP allows a computer to be configured automatically, eliminating the need for intervention by a network administrator. It also provides a central database for keeping track of computers that have been connected to the network. This prevents two computers from accidentally being configured with the same IP address.

In the absence of DHCP, hosts may be manually configured with an IP address. Alternatively IPv6 hosts may use stateless address autoconfiguration to generate an IP address. IPv4 hosts may use link-local addressing to achieve limited local connectivity.

In addition to IP addresses, DHCP also provides other configuration information, particularly the IP addresses of local caching DNS resolvers. Hosts that do not use DHCP for address configuration may still use it to obtain other configuration information.

There are two versions of DHCP, one for IPv4 and one for IPv6. While both versions bear the same name and perform much the same purpose, the details of the protocol for IPv4 and IPv6 are sufficiently different that they can be considered separate protocols.

Technical overview

Dynamic Host Configuration Protocol automates network-parameter assignment to network devices from one or more DHCP servers. Even in small networks, DHCP is useful because it makes it easy to add new machines to the network.

When a DHCP-configured client (a computer or any other network-aware device) connects to a network, the DHCP client sends a broadcast query requesting necessary information from a DHCP server. The DHCP server manages a pool of IP addresses and information about client configuration parameters such as default gateway, domain name, the name servers, other servers such as time servers, and so forth. On receiving a valid request, the server assigns the computer an IP address, a lease (length of time the allocation is valid), and other IP configuration parameters, such as the subnet mask and the default gateway. The query is typically initiated immediately after booting, and must complete before the client can initiate IP-based communication with other hosts.

Depending on implementation, the DHCP server may have three methods of allocating IP-addresses:

dynamic allocation: A network administrator assigns a range of IP addresses to DHCP, and each client computer on the LAN is configured to request an IP address from the DHCP server during network initialization. The request-and-grant process uses a lease concept with a controllable time period, allowing the DHCP server to reclaim (and then reallocate) IP addresses that are not renewed.

automatic allocation: The DHCP server permanently assigns a free IP address to a requesting client from the range defined by the administrator. This is like dynamic allocation, but the DHCP server keeps a table of past IP address assignments, so that it can preferentially assign to a client the same IP address that the client previously had.

static allocation: The DHCP server allocates an IP address based on a table with MAC address/IP address pairs, which are manually filled in (perhaps by a network administrator). Only requesting clients with a MAC address listed in this table will be allocated an IP address. This feature (which is not supported by all DHCP servers) is variously called Static DHCP Assignment (by DD-WRT), fixed-address (by the dhcpd documentation), Address Reservation (by Netgear), DHCP reservation or Static DHCP (by Cisco/Linksys), and IP reservation or MAC/IP binding (by various other router manufacturers).

Anta att du har ett LAN och du behöver installera en DHCP server för ditt nätverk. Nu ska jag lära er hur man enkelt kan installera DHCP server på en Debian eller Ubuntu server.

Step 1:

Install dhcp server

apt-get install dhcp3-server

Step 2:

The configuration file for DHCP server is: /etc/default/dhcp3-server. Open this file.

Before you edit this file do not forget to take a backup of the file.

cp /etc/default/dhcp3-server /etc/default/dhcp3-server.yourbackup
nano /etc/default/dhcp3-server
option domain-name "changethisdhcp.domain.com";
option domain-name-servers 192.168.1.1, 192.168.1.2;
option routers 192.168.1.254;
default-lease-time 3700;
max-lease-time 8700;
option broadcast-address 192.168.1.255;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.230;
}

Client computers will get IP addresses from 192.168.1.10 to 192.168.1.230. subnet mask will be 255.255.255.0.

Step 3:

Now it's time to restart dhcp server

sudo /etc/init.d/dhcp3-server restart

Step 4:

How to configure DHCP on client computers?

sudo vi /etc/network/interfaces
auto lo eth0
iface eth0 inet dhcp
iface lo inet loopback

Step 5:

Restart network by using this command:

sudo /etc/init.d/networking restart
thx to en.wikipedia.org.


See also

Cool-Linux.com

Recent posts

Cool-Linux.com

Randomized posts

Cool-Linux.com

install dhcp, setup dhcp, set up dhcp, configure dhcp, dhcp installation, dhcp linux, dhcp server, dhcp client, installieren DHCP, DHCP-Setup, bis DHCP eingestellt, DHCP-, DHCP-Installation, DHCP Linux, DHCP Server, DHCP-Client, instalar DHCP, configuración, configurar dhcp, configurar dhcp, instalación dhcp, linux dhcp, servidor DHCP, cliente DHCP, установить DHCP, настройке DHCP, настроить DHCP, настройке DHCP, DHCP установки, DHCP Linux, DHCP сервер, DHCP-клиент, nainštalovať dhcp, nastaviť dhcp, nastaviť dhcp, nastaviť DHCP, DHCP inštalácia, linux dhcp, dhcp server, DHCP klient, dhcp napeljati, setup dhcp, ustanovljen dhcp, konfigurirati DHCP, DHCP namestitev, dhcp linux, DHCP server, DHCP Client, instalar o dhcp, dhcp instalação, configurar dhcp, configurar dhcp, dhcp instalação, linux dhcp, servidor e do cliente DHCP, نصب dhcp ، dhcp نصب ، راه اندازی dhcp ، dhcp پیکربندی ، نصب و راه اندازی dhcp ، dhcp لینوکس ، سرور dhcp ، dhcp مشتری, install dhcp, dhcp setup, menetapkan dhcp, dhcp menyediakan, pemasangan dhcp, linux dhcp, dhcp server, pelanggan dhcp, DHCP를, DHCP를 설치, DHCP를 리눅스, DHCP 서버, DHCP 클라이언트를 구성, DHCP를 설정 DHCP를 설치 DHCP를 설치, 安装DHCP,DHCP的设置,设置的DHCP,配置DHCP,DHCP的安装,Linux上的DHCP,DHCP服务器,DHCP客户端, DHCPのは、dhcpのインストールは、dhcpのlinux、DHCPサーバ、DHCPクライアントを設定するには、DHCPを設定dhcpを、セットアップのdhcpのインストール, डीएचसीपी, स्थापना डीएचसीपी, स्थापित करने के लिए डीएचसीपी सेट, डीएचसीपी, dhcp स्थापना, dhcp लिनक्स, DHCP सर्वर, DHCP क्लाइंट कॉन्फ़िगर, install dhcp, dhcp setup, mengatur dhcp, dhcp mengkonfigurasi, instalasi dhcp, linux dhcp, dhcp server, klien dhcp, تثبيت دتب ، دتب الإعداد ، إعداد دتب ، دتب تكوين وتركيب دتب ، لينكس دتب ، دتب الخادم ، العميل دتب, installer dhcp, configuration DHCP, mettre en place dhcp, configurer dhcp, installation dhcp, linux DHCP, serveur DHCP, client DHCP, Debian, linux, LINUX, unix, Unix, UNIX

Categories



Tell a friend!


Your e-mail:


Your friend's e-mail:




Add CoolLinux to your favorites


apache log files, find log files, apache log files, change hostname, change host name, hostname, host name, change name, hostname file, hostname path, host name path, host path, path host, change hostname, change host name, hostname, host name, change name, hostname file, hostname path, host name path, host path, path host, install lighttpd, lighttpd, web server, lighttpd web server, lighttpd installation, lighttpd debian install, lighttpd debian installation, FreeBSD, SUSE Linux distributions, Red Hat Enterprise, Kubuntu, Fedora Core, Fedora, Edubuntu, ubuntu, Debian, CentOS, game, linux game, unix game, sauerbraten, cube, game, linux game, unix game, OpenArena, game, GPL, linux game, unix game, text login, new mail, warning, message, system message, notice, terminal, text terminal, install, remove, uninstall, Apache, apache, delete, CentOS, Red Hat, Fedora, install apache, remove apache, uninstall apache,, remove, uninstall, Apache, apache, apache debian, apache ubuntu, debian, ubuntu, remove apache, uninstall apache, delete, start, stop, restart, start apache, stop apache, restart apache, Apache, apache, list contents, directory, list directory, PHP, php, contents, content, php list, display date, display time, visitor, PHP, php, date, time, php date, php time, display php, display IP, IP, ip, ip address, IP address, visitor, PHP, php, ip php, word processors, text editor, editor, install, nano, , change, changing, timezone, time zone, reboot, , Learn Persian online!Englisch lernen online kostenlos