computers:dhcp_server_configuration
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
computers:dhcp_server_configuration [2011/08/24 23:29] – chkuo | computers:dhcp_server_configuration [2020/08/16 00:52] (current) – chkuo | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Installation ===== | ===== Installation ===== | ||
- | Download and install the dhcp3-server | + | Download and install the package |
<code bash> | <code bash> | ||
- | sudo apt-get install | + | sudo apt-get install |
</ | </ | ||
===== Configuration ===== | ===== Configuration ===== | ||
- | Specify the interfaces dhcpd should listen to in ''/ | + | Specify the interfaces dhcpd should listen to in ''/ |
<code bash> | <code bash> | ||
- | INTERFACES="eth1" | + | INTERFACESv4="eno1np0" |
</ | </ | ||
- | Configure the interface used in ''/ | + | Edit ''/ |
<code bash> | <code bash> | ||
- | auto eth1 | + | # / |
- | iface eth1 inet static | + | ddns-update-style none; |
- | | + | log-facility local7; |
- | netmask 255.255.255.0 | + | option domain-name-servers |
- | | + | default-lease-time 86400; |
+ | max-lease-time 86400; | ||
+ | |||
+ | subnet 192.168.1.0 | ||
+ | option routers | ||
+ | option subnet-mask | ||
+ | option broadcast-address | ||
+ | |||
+ | range 192.168.1.200 192.168.1.250; | ||
+ | } | ||
+ | |||
+ | # printer | ||
+ | host poplar { | ||
+ | hardware ethernet XX: | ||
+ | fixed-address 192.168.1.11; | ||
+ | } | ||
+ | |||
+ | # server | ||
+ | host oak { | ||
+ | hardware ethernet XX: | ||
+ | fixed-address 192.168.1.21; | ||
+ | } | ||
+ | |||
+ | # workstation | ||
+ | host sage { | ||
+ | hardware ethernet XX: | ||
+ | fixed-address 192.168.1.101; | ||
+ | } | ||
</ | </ | ||
- | Edit '' | + | ===== Activation ===== |
+ | To start/stop/restart the service: | ||
+ | <code bash> | ||
+ | sudo service isc-dhcp-server start | ||
+ | sudo service isc-dhcp-server stop | ||
+ | sudo service isc-dhcp-server restart | ||
+ | </ | ||
- | To start/ | + | ===== Monitoring ===== |
+ | To check dhcpd status: | ||
<code bash> | <code bash> | ||
- | sudo / | + | sudo service isc-dhcp-server |
- | sudo /etc/ | + | </code> |
- | sudo /etc/init.d/dhcp3-server restart | + | |
- | sudo /etc/init.d/ | + | To see the leases: |
+ | <code bash> | ||
+ | more /var/lib/dhcp/dhcpd.leases | ||
</ | </ | ||
Line 35: | Line 71: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | * [[http:// | ||
+ | |||
+ |
computers/dhcp_server_configuration.1314199797.txt.gz · Last modified: 2011/08/24 23:29 by chkuo