Installing and Configuring DHCP Server (DHCPd) on FreeBSD Inštalácia a konfigurácia DHCP server (dhcpd) na 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, opisuje prostriedky, ktorými systém môže pripojiť k sieti a získať potrebné informácie pre komunikáciu na tejto sieti.
When dhclient, the DHCP client, is executed on the client machine, it begins broadcasting requests for configuration information. Keď dhclient, DHCP klient sa vykonáva na klientskom počítači, začne vysielanie žiadostí o informácie o konfigurácii. By default, these requests are on UDP port 68. V predvolenom nastavení sú tieto žiadosti na UDP porte 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. Odpovede na server UDP 67, ktorá klientovi IP adresu a ďalšie dôležité informácie o sieti, ako masku siete, router a DNS servery. All of this information comes in the form of a DHCP ?lease? Všetky tieto informácie prichádza v podobe DHCP? Leasingu? and is only valid for a certain time (configured by the DHCP server maintainer). a je platný iba po určitú dobu (nakonfigurovať správca DHCP servera). In this manner, stale IP addresses for clients no longer connected to the network can be automatically reclaimed. Týmto spôsobom môže byť zatuchnutá IP adresy pre klientov už pripojený k sieti automaticky regenerované.
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 Server (alebo úpravách) je server, ktorý poskytuje svojim klientom DHCP informácie, ktoré potreboval, a to serverom časť apartmáne nie je poskytovaná ako súčasť FreeBSD, a tak sa musia nainštalovať z net/isc-dhcp3-server port na poskytovanie tejto služby.
FreeBSD comes with ISC DHCP, and it comes with FreeBSD as ports net/isc-dhcp3-server. FreeBSD prichádza s ISC DHCP, a dodáva sa s FreeBSD ako prístavy net/isc-dhcp3-server.
To install it, change to ports net/isc-dhcp3-server directory and execute the following command: Ak chcete nainštalovať, zmena portov net/isc-dhcp3-server adresára a spustite nasledujúci príkaz:
# make install clean # Make install čistej
DHCPd is configured by using a configuration file, normally dhcpd.conf located at /usr/local/etc directory. Dhcpd je nakonfigurovaný pomocou konfiguračného súboru dhcpd.conf sa zvyčajne nachádza v / usr / local / etc. Normally there is an example configuration file which is dhcpd.conf.example at the directory. Normálne je príklad konfiguračného súboru, ktorý je dhcpd.conf.example v adresári. Copy dhcpd.conf.example to dhcpd.conf or create a new dhcpd.conf before proceeding to make changes on DHCP Server. Kopírovať dhcpd.conf.example do dhcpd.conf, alebo vytvoriť novú dhcpd.conf, ako pristúpi na vykonanie zmien na DHCP servera.
dhcpd.conf is comprised of declarations regarding subnets and hosts, and is perhaps most easily explained using an example : dhcpd.conf sa skladá z vyhlásenia týkajúce podsietí a hostiteľov, a je možno najviac ľahko vysvetliť pomocou príkladu:
option domain-name “example.com”; (1) option domain-name "example.com"; (1)
option domain-name-servers 192.168.4.100; (2) option domain-name-servers 192.168.4.100; (2)
option subnet-mask 255.255.255.0; (3) option subnet-mask 255.255.255.0; (3)
default-lease-time 3600; (4) default-lease-time 3600; (4)
max-lease-time 86400; (5) max-lease-time 86400; (5)
ddns-update-style none; (6) DDNS-update-style none; (6)
subnet 192.168.4.0 netmask 255.255.255.0 { podsiete 192.168.4.0 netmask 255.255.255.0 (
range 192.168.4.129 192.168.4.254; (7) Rozsah 192.168.4.129 192.168.4.254; (7)
option routers 192.168.4.1; (8) option routers 192.168.4.1; (8)
} )
host mailhost { host mailhost (
hardware ethernet 02:03:04:05:06:07; (9) hardware ethernet 02:03:04:05:06:07; (9)
fixed-address mailhost.example.com; (10) fixed-address mailhost.example.com; (10)
} )
(1) This option specifies the domain that will be provided to clients as the default search domain. (1) Táto voľba určuje doménu, ktorá bude poskytnutá klientom ako predvolené doménu vyhľadávanie.
(2) This option specifies a comma separated list of DNS servers that the client should use. (2) Táto voľba určuje čiarkou oddelený zoznam serverov DNS, ktoré klient by sa mal používať.
(3) The netmask that will be provided to clients. (3), masku siete, ktoré budú poskytovať klientom.
(4) A client may request a specific length of time that a lease will be valid. (4) Klient môže požiadať o určitú dobu, že nájomné zmluvy budú platné. Otherwise the server will assign a lease with this expiry value (in seconds). V opačnom prípade server priradí ukončení nájomnej zmluvy s touto hodnotou (v sekundách).
(5) This is the maximum length of time that the server will lease for. (5) Toto je maximálny čas, počas ktorej bude server prenájmu. Should a client request a longer lease, a lease will be issued, although it will only be valid for max-lease-time seconds. By mal klient požiadať o dlhšie prenájom, nájom bude vydané, aj keď to bude platné len pre max-lease-time sekúnd.
(6) This option specifies whether the DHCP server should attempt to update DNS when a lease is accepted or released. (6) Táto voľba určuje, či DHCP servera by sa mali pokúsiť o aktualizáciu DNS, ak je prijatý alebo lízing prepustený. In the ISC implementation, this option is required. Pri vykonávaní ISC, je nutné túto voľbu.
(7) This denotes which IP addresses should be used in the pool reserved for allocating to clients. (7) Toto označuje IP adresy, ktoré by mali byť použité v bazéne vyhradené pre prideľovanie klientom. IP addresses between, and including, the ones stated are handed out to clients. IP adresy od nich, a tiež uviedla, tie sú odovzdané klientom.
(8) Declares the default gateway that will be provided to clients. (8) vyhlasuje, predvolenú bránu, ktorá bude poskytnutá klientom.
(9) The hardware MAC address of a host (so that the DHCP server can recognize a host when it makes a request). (9) hardware MAC adresa počítača (tak, že server DHCP môže rozpoznať počítača, keď to robí vyžiadanie).
(10) Specifies that the host should always be given the same IP address. (10) Určuje, že hosť by mal vždy mať rovnakú IP adresu. Note that using a hostname is correct here, since the DHCP server will resolve the hostname itself before returning the lease information. Všimnite si, že používate správny názov hostiteľa je tu, pretože DHCP server vyrieši sám názov hostiteľa, ako sa vráti prenájmu informácie.
Once you have finished writing your dhcpd.conf, you can proceed to start the server by issuing the following command: Po dokončení písania dhcpd.conf, môžete pristúpiť na spustenie servera vydaním nasledujúci príkaz:
# /usr/local/etc/rc.d/isc-dhcpd.sh start # / Usr / local / etc / rc.d / isc-dhcpd.sh štart
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. Ak potrebujete vykonať zmeny v konfigurácii servera v budúcnosti, je dôležité si uvedomiť, že vyslanie signálu SIGHUP dhcpd nevedie v konfigurácii boli znovu nabité, ako to robí väčšina démonov. A SIGTERM signal to stop the process, and then restart it using the command above. SIGTERM signál na zastavenie tohto procesu, a potom ju znova spustite pomocou príkazu vyššie. For example: Napríklad:
# ps wax | grep dhcpd # Ps vosk | grep dhcpd
pid of dhcpd will be shown pid o úpravách budú zobrazené
# kill -15 (pid of dhcpd) # Kill -15 (pid zo dhcpd)
IMPORTANT : The page is machine translated and provided "as is" without warranty. Upozornenie: stránka je stroje preložené a za predpokladu, "ako je" bez záruky. Machine translation may be difficult to understand. Strojový preklad môže byť ťažké pochopiť. Please refer to Nájdete na original English article originál Anglicky artikl whenever possible. ak je to možné.
Related Articles Súvisiace články
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 2 Inštalácia webového servera vo FreeBSD 6.0 s Rýchlo 2.2, MySQL 5.0 a PHP 5 - časť 2
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 5 Inštalácia webového servera vo FreeBSD 6.0 s Rýchlo 2.2, MySQL 5.0 a PHP 5 - 5. časť
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 3 Inštalácia webového servera vo FreeBSD 6.0 s Rýchlo 2.2, MySQL 5.0 a PHP 5 - 3. časť
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 4 Inštalácia webového servera vo FreeBSD 6.0 s Rýchlo 2.2, MySQL 5.0 a PHP 5 - 4. časť
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 1 Inštalácia webového servera vo FreeBSD 6.0 s Rýchlo 2.2, MySQL 5.0 a PHP 5 - časť 1
- Tips of How to Switch between DHCP and Static IP Network Automatically in Windows Tipy, ako Prepínanie medzi DHCP a statickú IP sieť automaticky v systéme Windows
- FreeBSD 6.0 on VMware Server Time and Clock Slow Down FreeBSD 6.0 na VMware Server Čas a Hodiny Spomaliť
- Could Not Find Valid System Volume Error When Installing Windows Server 2008 (R2) Nemohol nájsť Valid System Volume Chyba pri inštalácii systému Windows Server 2008 (R2)
- Missing CD/DVD Device Driver Problem While Installing Vista on VMWare Server/ESX Chýbajúce CD / DVD s ovládačmi zariadení problém pri inštalácii Vista na VMWare Server / ESX
- Checking Free Disk Space on FreeBSD Server Kontrola voľného miesta na disku servera FreeBSD









































