Installing and Configuring DHCP Server (DHCPd) on FreeBSD Installazione e configurazione di server DHCP (DHCPd) su 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, descrive i mezzi tramite i quali un sistema in grado di connettersi a una rete e ottenere le informazioni necessarie per la comunicazione su tale rete.
When dhclient, the DHCP client, is executed on the client machine, it begins broadcasting requests for configuration information. Quando dhclient, il client DHCP, viene eseguito sulla macchina client, inizia la trasmissione richieste di informazioni di configurazione. By default, these requests are on UDP port 68. Per impostazione predefinita, queste richieste sono sulla porta 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. Il server risponde a UDP 67, dando il client un indirizzo IP e le altre informazioni di rete come ad esempio netmask, router e server DNS. All of this information comes in the form of a DHCP ?lease? Tutte queste informazioni entra sotto forma di un protocollo DHCP? Affitto? and is only valid for a certain time (configured by the DHCP server maintainer). e sono valide solo per un certo periodo di tempo (configurato dal server DHCP manutentore). In this manner, stale IP addresses for clients no longer connected to the network can be automatically reclaimed. In questo modo, stantio indirizzi IP per i clienti non sono più collegati alla rete possono essere automaticamente rigenerati.
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. Server DHCP (o DHCPd) è il server che fornisce il client DHCP le informazioni necessarie, ed è anche la parte server della suite non viene fornita come parte di FreeBSD, e così è necessario installare dal net/isc-dhcp3 - porta del server per fornire questo servizio.
FreeBSD comes with ISC DHCP, and it comes with FreeBSD as ports net/isc-dhcp3-server. FreeBSD viene fornito con ISC DHCP, e viene fornito con FreeBSD come porti net/isc-dhcp3-server.
To install it, change to ports net/isc-dhcp3-server directory and execute the following command: Per installarlo, porti a cambiare directory e net/isc-dhcp3-server eseguire il seguente comando:
# make install clean # Make install clean
DHCPd is configured by using a configuration file, normally dhcpd.conf located at /usr/local/etc directory. DHCPd è configurato utilizzando un file di configurazione, di norma dhcpd.conf trova in / usr / local / etc directory. Normally there is an example configuration file which is dhcpd.conf.example at the directory. Normalmente vi è un esempio del file di configurazione che è dhcpd.conf.example a directory. Copy dhcpd.conf.example to dhcpd.conf or create a new dhcpd.conf before proceeding to make changes on DHCP Server. Copia dhcpd.conf.example a dhcpd.conf o creare un nuovo dhcpd.conf prima di procedere ad apportare modifiche sul server DHCP.
dhcpd.conf is comprised of declarations regarding subnets and hosts, and is perhaps most easily explained using an example : dhcpd.conf è composto di dichiarazioni riguardanti sottoreti e host, ed è forse più facilmente spiegato con un esempio:
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 { subnet 192.168.4.0 netmask 255.255.255.0 (
range 192.168.4.129 192.168.4.254; (7) gamma 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) Questa opzione specifica il dominio che verrà fornito ai clienti, come il motore di ricerca predefinito di dominio.
(2) This option specifies a comma separated list of DNS servers that the client should use. (2) Questa opzione specifica un elenco separato da virgole dei server DNS che il client deve utilizzare.
(3) The netmask that will be provided to clients. (3) La netmask che sarà fornito ai clienti.
(4) A client may request a specific length of time that a lease will be valid. (4) Un client può chiedere uno specifico periodo di tempo che un contratto di locazione sarà valido. Otherwise the server will assign a lease with this expiry value (in seconds). Altrimenti il server assegnerà un contratto di locazione con scadenza il valore (in secondi).
(5) This is the maximum length of time that the server will lease for. (5) Questa è la lunghezza massima di tempo che il server di locazione. Should a client request a longer lease, a lease will be issued, although it will only be valid for max-lease-time seconds. Un client deve richiedere un più lungo leasing, di locazione devono essere rilasciati, anche se è valido solo per max-lease-time secondi.
(6) This option specifies whether the DHCP server should attempt to update DNS when a lease is accepted or released. (6) Questa opzione specifica se il server DHCP dovrebbe tentativo di aggiornare il DNS quando un contratto di affitto è accettata o divulgati. In the ISC implementation, this option is required. In attuazione di ISC, questa opzione è obbligatorio.
(7) This denotes which IP addresses should be used in the pool reserved for allocating to clients. (7) Questo denota che gli indirizzi IP deve essere usato nel pool riservato per l'assegnazione ai clienti. IP addresses between, and including, the ones stated are handed out to clients. Tra gli indirizzi IP, tra cui, quelli indicati sono distribuiti ai clienti.
(8) Declares the default gateway that will be provided to clients. (8) dichiara il gateway predefinito che verrà fornito ai clienti.
(9) The hardware MAC address of a host (so that the DHCP server can recognize a host when it makes a request). (9) L'hardware indirizzo MAC di un host (in modo che il server DHCP in grado di riconoscere un host quando fa una richiesta).
(10) Specifies that the host should always be given the same IP address. (10) di specificare che il conduttore deve essere sempre dato lo stesso indirizzo IP. Note that using a hostname is correct here, since the DHCP server will resolve the hostname itself before returning the lease information. Nota che l'utilizzo di un hostname è corretto, in quanto il server DHCP risolverà il nome stesso prima di restituire il contratto di locazione informazioni.
Once you have finished writing your dhcpd.conf, you can proceed to start the server by issuing the following command: Una volta che hai finito di scrivere il tuo dhcpd.conf, si può procedere per avviare il server di rilascio il seguente comando:
# /usr/local/etc/rc.d/isc-dhcpd.sh start # / Usr / local / etc / rc.d / ISC-dhcpd.sh iniziare
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. Se avete bisogno di apportare modifiche alla configurazione del server in futuro, è importante notare che l'invio di un segnale SIGHUP a dhcpd non comporti la configurazione di essere ricaricati, come fa con la maggior parte dei demoni. A SIGTERM signal to stop the process, and then restart it using the command above. Un segnale SIGTERM per fermare il processo e riavviarlo con il comando di cui sopra. For example: Per esempio:
# ps wax | grep dhcpd # Ps cera | grep dhcpd
pid of dhcpd will be shown pid di dhcpd verrà visualizzato
# kill -15 (pid of dhcpd) # Kill -15 (pid di dhcpd)
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Questa è una pagina tradotta macchina che è fornito "così com'è" senza alcuna garanzia. Machine translation may be difficult to understand. Traduzione automatica può essere difficile da capire. Please refer to Si prega di fare riferimento a original English article articolo originale inglese whenever possible. quando possibile.
Share and contribute or get technical support and help at Condividere e contribuire o ottenere supporto tecnico e assistenza in My Digital Life Forums La mia vita digitale Forum .
Related Articles Articoli correlati
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 L'installazione di server Web in FreeBSD 6,0 con Apache 2,2, 5,0 MySQL e PHP 5 - Parte 4
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 L'installazione di server Web in FreeBSD 6,0 con Apache 2,2, 5,0 MySQL e PHP 5 - Parte 3
- Checking Free Disk Space on FreeBSD Server Controllo di spazio libero su disco su FreeBSD server
- FreeBSD 6.0 on VMware Server Time and Clock Slow Down FreeBSD 6,0 a VMware server orologio tempo e rallentare
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 2 L'installazione di server Web in FreeBSD 6,0 con Apache 2,2, 5,0 MySQL e PHP 5 - Parte 2
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 L'installazione di server Web in FreeBSD 6,0 con Apache 2,2, 5,0 MySQL e PHP 5 - Parte 5
- FreeBSD Apache HTTP Accept Filter Error FreeBSD HTTP Apache accettare filtro errore
- Update FreeBSD Ports Collection Up to Date and Latest Aggiornamento di FreeBSD Ports Collection aggiornati e più tardi
- Lindy Mini NAS Enclosure Lindy Mini NAS recinto
- Update FreeBSD Ports Collection to Latest Version with Security Update with Portmanager and Portaudit Aggiornamento di FreeBSD Ports Collection alla versione più recente aggiornamento di sicurezza con Portmanager e Portaudit
































