Installing and Configuring DHCP Server (DHCPd) on FreeBSD Установка та настройка DHCP-сервера (DHCPd) на FreeBSD
DHCP, the Dynamic Host Configuration Protocol, describes the means by which a system can connect to a network and obtain the necessary information for communication upon that network. DHCP, Dynamic Host Configuration Protocol, описуються за допомогою якого система може підключитися до мережі і отримати необхідну інформацію для роботи з цієї мережі.
When dhclient, the DHCP client, is executed on the client machine, it begins broadcasting requests for configuration information. Коли dhclient, клієнт DHCP, виконується на клієнтської машині, то він починає мовлення прохання про конфігурацію. By default, these requests are on UDP port 68. За замовчуванням ці запити робляться на UDP-порту 68. The server replies on UDP 67, giving the client an IP address and other relevant network information such as netmask, router, and DNS servers. Сервер відповідає на UDP 67, видаючи клієнту IP адреса та іншу відповідну інформацію мережі, такі, як маска, маршрутизатор і DNS-сервери. All of this information comes in the form of a DHCP ?lease? Вся ця інформація надходить у вигляді DHCP? Оренди? and is only valid for a certain time (configured by the DHCP server maintainer). і дійсні лише протягом певного часу (налаштовується адміністратором сервера DHCP). In this manner, stale IP addresses for clients no longer connected to the network can be automatically reclaimed. Таким чином, застарілі адреси IP для клієнтів, не підключених до мережі можуть бути автоматично відновлено.
DHCP Server (or DHCPd) is the server that provides the DHCP client the information it needed, and it's the server portion of the suite is not provided as part of FreeBSD, and so it needs to install from the net/isc-dhcp3-server port to provide this service. DHCP-сервер (або DHCPd) є сервером, який надає клієнту DHCP необхідну йому інформацію, і це серверна частина пакета є не передбачені в рамках FreeBSD, і тому необхідно встановити з net/isc-dhcp3-server Порт надавати цю послугу.
FreeBSD comes with ISC DHCP, and it comes with FreeBSD as ports net/isc-dhcp3-server. FreeBSD поставляється з ISC DHCP, і він приходить з FreeBSD як net/isc-dhcp3-server порти.
To install it, change to ports net/isc-dhcp3-server directory and execute the following command: Щоб встановити його, перейдіть у каталог з портами net/isc-dhcp3-server і виконати наступну команду:
# make install clean # Зробити нове встановлення системи
DHCPd is configured by using a configuration file, normally dhcpd.conf located at /usr/local/etc directory. DHCPd налаштовується за допомогою файлу конфігурації, як правило, розташовані в dhcpd.conf / USR / місцеві / i т.д. каталогу. Normally there is an example configuration file which is dhcpd.conf.example at the directory. Звичайно є приклад файлу конфігурації, яка є dhcpd.conf.example в каталозі. Copy dhcpd.conf.example to dhcpd.conf or create a new dhcpd.conf before proceeding to make changes on DHCP Server. Копія dhcpd.conf.example в dhcpd.conf або створити нову dhcpd.conf перед тим як продовжити вносити зміни в DHCP-сервер.
dhcpd.conf is comprised of declarations regarding subnets and hosts, and is perhaps most easily explained using an example :
option domain-name “example.com”; (1) опції доменних імен "example.com"; (1)
option domain-name-servers 192.168.4.100; (2) опції доменних імен сервера 192.168.4.100; (2)
option subnet-mask 255.255.255.0; (3) опцією-маска підмережі 255.255.255.0; (3)
default-lease-time 3600; (4) Default-оренда часу 3600; (4)
max-lease-time 86400; (5) Макс-ліз часу 86400; (5)
ddns-update-style none; (6) DDNS-Update-стилю немає; (6)
subnet 192.168.4.0 netmask 255.255.255.0 { 192.168.4.0 маска підмережі 255.255.255.0 (
range 192.168.4.129 192.168.4.254; (7) Діапазон 192.168.4.129 192.168.4.254; (7)
option routers 192.168.4.1; (8) опції маршрутизатори 192.168.4.1; (8)
} )
host mailhost { приймає поштовий сервер (
hardware ethernet 02:03:04:05:06:07; (9) апаратного Ethernet 02:03:04:05:06:07; (9)
fixed-address mailhost.example.com; (10) фіксованого адреси mailhost.example.com, (10)
} )
(1) This option specifies the domain that will be provided to clients as the default search domain. (1) Цей параметр задає домен, який буде надаватися клієнтам як домену пошуку за замовчуванням.
(2) This option specifies a comma separated list of DNS servers that the client should use. (2) Цей параметр задає список розділених комами серверів DNS, що клієнт повинен використовувати.
(3) The netmask that will be provided to clients. (3) маска, які будуть надаватися клієнтам.
(4) A client may request a specific length of time that a lease will be valid. (4) клієнт може вимагати певного часу, що оренда буде дійсним. Otherwise the server will assign a lease with this expiry value (in seconds). В іншому випадку сервер буде призначити оренди із закінченням цього значення (в секундах).
(5) This is the maximum length of time that the server will lease for. (5) Це максимальне час, що сервер буде оренду. Should a client request a longer lease, a lease will be issued, although it will only be valid for max-lease-time seconds. Якщо клієнтський запит про продовження терміну оренди, оренди буде опублікований, хоча він буде мати сенс тільки для макс-лізинг-секундного.
(6) This option specifies whether the DHCP server should attempt to update DNS when a lease is accepted or released. (6) Цей параметр визначає, чи буде сервер DHCP повинен намагатися оновити DNS при оренді приймається або звільнені. In the ISC implementation, this option is required. В реалізації ISC, необхідно цей параметр.
(7) This denotes which IP addresses should be used in the pool reserved for allocating to clients. (7) Це означає Які IP адреси не повинні використовуватися в басейні, відведені для виділення клієнтам. IP addresses between, and including, the ones stated are handed out to clients. IP адрес між ними, і в тому числі, ті заявили, видаються клієнтам.
(8) Declares the default gateway that will be provided to clients. (8) заявляє, шлюз за замовчуванням, які будуть надаватися клієнтам.
(9) The hardware MAC address of a host (so that the DHCP server can recognize a host when it makes a request). (9) апаратна адреса МАС-хоста (щоб сервер DHCP може розпізнавати господаря коли він робить запит).
(10) Specifies that the host should always be given the same IP address. (10) вказує, що хост повинен завжди мати ту ж адресу. Note that using a hostname is correct here, since the DHCP server will resolve the hostname itself before returning the lease information. Зауважимо, що використання хоста є правильним тут, оскільки сервер DHCP буде дозволити ім'я хоста сама, перш ніж повернутися відомостей про оренду.
Once you have finished writing your dhcpd.conf, you can proceed to start the server by issuing the following command: Після того як ви закінчили написання dhcpd.conf, ви можете приступити до запуску сервера, видаючи наступну команду:
# /usr/local/etc/rc.d/isc-dhcpd.sh start # / USR / місцеві / ETC / rc.d / ISC-dhcpd.sh початок
Should you need to make changes to the configuration of your server in the future, it is important to note that sending a SIGHUP signal to dhcpd does not result in the configuration being reloaded, as it does with most daemons. Якщо Вам необхідно внести зміни в конфігурацію сервера в майбутньому, важливо зазначити, що передача сигналу SIGHUP для DHCPd не приводить в конфігурації час Reloaded, як це відбувається з більшістю демонів. A SIGTERM signal to stop the process, and then restart it using the command above. Сигнал SIGTERM для зупинки процесу, а потім запустити його за допомогою команди вище. For example: Наприклад:
# ps wax | grep dhcpd # PS віск | Grep DHCPd
pid of dhcpd will be shown PID з DHCPd буде показаний
# kill -15 (pid of dhcpd) # Вбити -15 (PID з DHCPd)
IMPORTANT : The page is machine translated and provided "as is" without warranty. ВАЖЛИВО: Сторінка машина переведена і надаються "як є" без гарантії. Machine translation may be difficult to understand. Машинний переклад може бути важким для розуміння. Please refer to Будь ласка, зверніться до original English article оригінальний англійська статтю whenever possible. коли це можливо.
Related Articles Статті за Темі
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 2 Установка веб-сервера в FreeBSD 6.0 з Apache 2.2, MySQL 5.0 та PHP 5 - Частина 2
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 5 Установка веб-сервера в FreeBSD 6.0 з Apache 2.2, MySQL 5.0 та PHP 5 - Частина 5
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 3 Установка веб-сервера в FreeBSD 6.0 з Apache 2.2, MySQL 5.0 та PHP 5 - Частина 3
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 4 Установка веб-сервера в FreeBSD 6.0 з Apache 2.2, MySQL 5.0 та PHP 5 - Частина 4
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 1 Установка веб-сервера в FreeBSD 6.0 з Apache 2.2, MySQL 5.0 та PHP 5 - Частина 1
- Tips of How to Switch between DHCP and Static IP Network Automatically in Windows Поради, як перемикатися між DHCP і статичні IP-мережу автоматично в Windows
- FreeBSD 6.0 on VMware Server Time and Clock Slow Down FreeBSD 6.0 на VMware Server Час та години Slow Down
- Could Not Find Valid System Volume Error When Installing Windows Server 2008 (R2) Не вдається знайти справді System Volume помилка при установці Windows Server 2008 (R2)
- Missing CD/DVD Device Driver Problem While Installing Vista on VMWare Server/ESX Відсутній CD / DVD пристрої драйвер Проблема при установці Vista на VMWare Служити / ESX
- Checking Free Disk Space on FreeBSD Server Безкоштовна перевірка дискового простору на сервері FreeBSD









































