Ubuntu Server Guide Changes, errors and bugs
Download 1.27 Mb. Pdf ko'rish
|
ubuntu-server-guide
Installation
At a terminal prompt, enter the following command to install dhcpd: sudo apt i n s t a l l i s c −dhcp−s e r v e r NOTE: dhcpd’s messages are being sent to syslog. Look there for diagnostics messages. Configuration You will probably need to change the default configuration by editing /etc/dhcp/dhcpd.conf to suit your needs and particular configuration. Most commonly, what you want to do is assign an IP address randomly. This can be done with settings as follows: # minimal sample / e t c / dhcp / dhcpd . c o n f d e f a u l t −l e a s e −time 6 0 0 ; max−l e a s e −time 7 2 0 0 ; s u b n e t 1 9 2 . 1 6 8 . 1 . 0 netmask 2 5 5 . 2 5 5 . 2 5 5 . 0 { r a n g e 1 9 2 . 1 6 8 . 1 . 1 5 0 1 9 2 . 1 6 8 . 1 . 2 0 0 ; o p t i o n r o u t e r s 1 9 2 . 1 6 8 . 1 . 2 5 4 ; o p t i o n domain−name−s e r v e r s 1 9 2 . 1 6 8 . 1 . 1 , 1 9 2 . 1 6 8 . 1 . 2 ; o p t i o n domain−name ”mydomain . example ” ; } This will result in the DHCP server giving clients an IP address from the range 192.168.1.150-192.168.1.200. It will lease an IP address for 600 seconds if the client doesn’t ask for a specific time frame. Otherwise the maximum (allowed) lease will be 7200 seconds. The server will also “advise” the client to use 192.168.1.254 as the default-gateway and 192.168.1.1 and 192.168.1.2 as its DNS servers. You also may need to edit /etc/default/isc−dhcp−server to specify the interfaces dhcpd should listen to. INTERFACESv4=”e t h 4 ” After changing the config files you have to restart the dhcpd service: sudo s y s t e m c t l r e s t a r t i s c −dhcp−s e r v e r . s e r v i c e 58 References • The dhcp3-server Ubuntu Wiki page has more information. • For more /etc/dhcp/dhcpd.conf options see the dhcpd.conf man page. • ISC dhcp-server Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling