Installing and Configuring DHCP Server (DHCPd) on FreeBSD Instalēšana un konfigurēšana DHCP Server (DHCPd) par 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, tad Dynamic Host konfigurācijas protokols, kas nosaka līdzekļus, ar kuriem sistēmu var izveidot savienojumu ar tīklu un iegūt nepieciešamo informāciju, paziņojumu par šo tīklu.
When dhclient, the DHCP client, is executed on the client machine, it begins broadcasting requests for configuration information. Kad dhclient, tad DHCP klients, tiek izpildīts uz klienta mašīnas, tā sākas apraides pieprasījumiem informāciju par konfigurācijām. By default, these requests are on UDP port 68. Pēc noklusējuma, ir šo pieteikumu par UDP porta 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. Servera atbildes uz UDP 67, kas nodrošina klienta IP adresi un citu attiecīgo tīkla informāciju, piemēram, netmask, maršrutētāju, un DNS serverus. All of this information comes in the form of a DHCP ?lease? Visi šī informācija iegūta, veicot DHCP? Nomas? and is only valid for a certain time (configured by the DHCP server maintainer). un ir tikai derīgai noteiktu laiku (konfigurēts ar DHCP serveri uzturētāju). In this manner, stale IP addresses for clients no longer connected to the network can be automatically reclaimed. Šādā veidā mīzali IP adreses klientiem vairs nav saistīti ar tīklu var automātiski reģenerēti.
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 serveris (vai DHCPd) ir serveris, kas nodrošina DHCP klienta informāciju, kas ir nepieciešams, un tas ir servera daļu no suite nav paredzēts kā daļa no FreeBSD, un tāpēc tas ir nepieciešams instalēt no net/isc-dhcp3-server ostas, lai nodrošinātu šo pakalpojumu.
FreeBSD comes with ISC DHCP, and it comes with FreeBSD as ports net/isc-dhcp3-server. FreeBSD nāk ar ISC DHCP, un tas nāk ar FreeBSD, kā ostas net/isc-dhcp3-server.
To install it, change to ports net/isc-dhcp3-server directory and execute the following command: Lai varētu instalēt, mainīt uz ostām net/isc-dhcp3-server directory izpildot komandu:
# make install clean # Padarīt instalēt tīru
DHCPd is configured by using a configuration file, normally dhcpd.conf located at /usr/local/etc directory. DHCPd ir konfigurēta, izmantojot konfigurācijas failu, parasti dhcpd.conf atrodas / usr / local / etc direktoriju. Normally there is an example configuration file which is dhcpd.conf.example at the directory. Parasti tur ir piemērs konfigurācijas failu, kas ir dhcpd.conf.example pēc kataloga. Copy dhcpd.conf.example to dhcpd.conf or create a new dhcpd.conf before proceeding to make changes on DHCP Server. Copy dhcpd.conf.example, lai dhcpd.conf vai izveidojiet jaunu dhcpd.conf pirms veikt izmaiņas par DHCP Server.
dhcpd.conf is comprised of declarations regarding subnets and hosts, and is perhaps most easily explained using an example : dhcpd.conf sastāv no deklarācijas attiecībā subnets un saimniekiem, un tā ir iespējams visvieglāk izskaidrot, izmantojot piemēram:
option domain-name “example.com”; (1) iespēju domēna nosaukuma "example.com"; (1)
option domain-name-servers 192.168.4.100; (2) iespēju domēna nosaukuma-serveriem 192.168.4.100; (2)
option subnet-mask 255.255.255.0; (3) iespēja 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 { subnet 192.168.4.0 netmask 255.255.255.0 (
range 192.168.4.129 192.168.4.254; (7) diapazons 192.168.4.129 192.168.4.254; (7)
option routers 192.168.4.1; (8) iespēju maršrutētāju 192.168.4.1, (8)
} )
host mailhost { uzņēmējas 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) noteiktu adresi mailhost.example.com; (10)
} )
(1) This option specifies the domain that will be provided to clients as the default search domain. (1) Šī iespēja precizē domēna kas tiks nodrošināta klientiem kā noklusēto meklēšanas jomā.
(2) This option specifies a comma separated list of DNS servers that the client should use. (2) Šī iespēja paredzēta komatu atdalīti saraksts DNS serveriem, ka klientam ir jāizmanto.
(3) The netmask that will be provided to clients. (3) netmask, kas tiks sniegti klientiem.
(4) A client may request a specific length of time that a lease will be valid. (4) A klients var pieprasīt konkrētu laiku, ka noma būs derīga. Otherwise the server will assign a lease with this expiry value (in seconds). Pretējā servera piešķirs nomas ar šo termiņa beigu vērtību (sekundēs).
(5) This is the maximum length of time that the server will lease for. (5) Šī ir maksimālo periodu ka serveris iznomās par. Should a client request a longer lease, a lease will be issued, although it will only be valid for max-lease-time seconds. Ja klients pieprasa vairs nomaksu, nomu tiks izdots, lai gan tas būs tikai derīgas 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) Šī iespēja precizē, vai DHCP serveri jāmēģina update DNS, ja noma ir pieņemts vai atmaksā. In the ISC implementation, this option is required. Attiecībā ISC īstenošanai, šī iespēja ir nepieciešams.
(7) This denotes which IP addresses should be used in the pool reserved for allocating to clients. (7) Tas nozīmē, kas IP adreses jāizmanto portfeļa rezervēts piešķirot klientiem. IP addresses between, and including, the ones stated are handed out to clients. IP adreses, starp, un tai skaitā, tiem paziņoja, nodod, lai klientiem.
(8) Declares the default gateway that will be provided to clients. (8) pasludinājusi noklusējuma vārteja kas tiks nodrošināta klientiem.
(9) The hardware MAC address of a host (so that the DHCP server can recognize a host when it makes a request). (9) aparatūras MAC adrese uzņēmējā (tā, ka DHCP serveris var atzīt uzņēmēja, kad tas veic pieprasījumu).
(10) Specifies that the host should always be given the same IP address. (10) precizē, ka uzņēmējas vienmēr būtu tikpat IP adresi. Note that using a hostname is correct here, since the DHCP server will resolve the hostname itself before returning the lease information. Ievērojiet, ka, izmantojot resursdatora ir pareizs šeit, jo DHCP serveri atrisināt resursdatora pati pirms atgriešanās nomas informāciju.
Once you have finished writing your dhcpd.conf, you can proceed to start the server by issuing the following command: Kad esat beidzis rakstveidā savu dhcpd.conf, varat rīkoties, lai palaistu serveri, izdodot šādu komandu:
# /usr/local/etc/rc.d/isc-dhcpd.sh start # / Usr / local / etc / rc.d / ISC-dhcpd.sh sākums
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. Ja jums nepieciešams veikt izmaiņas, kas konfigurācijas serveri arī nākotnē, ir svarīgi atzīmēt, ka nosūtot SIGHUP signāls dhcpd nerada konfigurācijas pārkraušanas, kā tā to dara ar vairumu daemons. A SIGTERM signal to stop the process, and then restart it using the command above. A SIGTERM signāls, lai apturētu šo procesu, un pēc tam restartējiet to, izmantojot komandu iepriekš. For example: Piemēram:
# ps wax | grep dhcpd # Ps vasks | grep dhcpd
pid of dhcpd will be shown pid no dhcpd būs redzams
# kill -15 (pid of dhcpd) # Nogalināt -15 (pid no dhcpd)
IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: Šī lapa ir mašīna tulkoto un ar nosacījumu ", kas ir" bez garantijas. Machine translation may be difficult to understand. Machine translation var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.
Related Articles Saistītie raksti
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 2 Instalēšana Web serveri FreeBSD 6,0 ar Apache 2.2, MySQL 5.0 un PHP 5 - 2.daļa
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 Instalēšana Web serveri FreeBSD 6,0 ar Apache 2.2, MySQL 5.0 un PHP 5 - 5.daļa
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 Instalēšana Web serveri FreeBSD 6,0 ar Apache 2.2, MySQL 5.0 un PHP 5 - 3.daļa
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Instalēšana Web serveri FreeBSD 6,0 ar Apache 2.2, MySQL 5.0 un PHP 5 - 4.daļa
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 1 Instalēšana Web serveri FreeBSD 6,0 ar Apache 2.2, MySQL 5.0 un PHP 5 - 1.daļa
- Tips of How to Switch between DHCP and Static IP Network Automatically in Windows Ieteikumi par to, kā pārslēgties starp DHCP un statiska IP Network Automātiski Windows
- FreeBSD 6.0 on VMware Server Time and Clock Slow Down FreeBSD 6,0 par VMware Server Laiks un Pulkstenis palēnināt
- Missing CD/DVD Device Driver Problem While Installing Vista on VMWare Server/ESX Missing CD / DVD Device Driver Problēma Kaut instalēšana Vista par VMWare Server / ESX
- Checking Free Disk Space on FreeBSD Server Pārbaudes Free Disk Space par FreeBSD Server
- Using Portsnap to Update FreeBSD Ports Tree Collection Izmantojot Portsnap atjaunināt FreeBSD Ports Tree Collection









































