User Tools

Site Tools


сервис_dhcp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_dhcp [2024/06/04 14:10]
val [Отказоустойчивая конфигурация]
сервис_dhcp [2026/07/20 15:39] (current)
val [isc-kea]
Line 111: Line 111:
 } }
  
-host node3 {hardware ethernet 08:​00:​27:​12:​34:​53;​fixed-address 192.168.X.3;​} +#host node3 {hardware ethernet 08:​00:​27:​12:​34:​53;​fixed-address 192.168.X.3;​} 
-host node4 {hardware ethernet 08:​00:​27:​12:​34:​54;​fixed-address 192.168.X.4;​} +#host node4 {hardware ethernet 08:​00:​27:​12:​34:​54;​fixed-address 192.168.X.4;​} 
-host node5 {hardware ethernet 08:​00:​27:​12:​34:​54;​fixed-address 192.168.X.5;​} +#host node5 {hardware ethernet 08:​00:​27:​12:​34:​55;​fixed-address 192.168.X.5;​} 
-host node6 {hardware ethernet 08:​00:​27:​12:​34:​54;​fixed-address 192.168.X.6;​} +#host node6 {hardware ethernet 08:​00:​27:​12:​34:​56;​fixed-address 192.168.X.6;​} 
-host node7 {hardware ethernet 08:​00:​27:​12:​34:​54;​fixed-address 192.168.X.7;​}+#host node7 {hardware ethernet 08:​00:​27:​12:​34:​57;​fixed-address 192.168.X.7;​}
 </​code>​ </​code>​
  
Line 195: Line 195:
 </​code>​ </​code>​
  
 +===== Сообщение от клиента,​ что кто-то уже занял IP =====
 +<​code>​
 +gate# journalctl -f
 +...
 +Mar 29 11:15:21 gate.corp13.un dhcpd[711]: Abandoning IP address 192.168.13.107:​ declined.
 +Mar 29 11:15:21 gate.corp13.un dhcpd[711]: DHCPDECLINE of 192.168.13.107 from 08:​00:​27:​d5:​6c:​15 (client1) via eth0: abandoned
 +</​code>​
 ===== Мониторинг выданных адресов ===== ===== Мониторинг выданных адресов =====
  
 +  * [[https://​stackoverflow.com/​questions/​2142824/​parse-a-dhcpd-lease-file-with-bash|Parse a dhcpd.lease File with Bash]]
 ==== Debian/​Ubuntu ==== ==== Debian/​Ubuntu ====
 <​code>​ <​code>​
Line 247: Line 255:
 <​code>​ <​code>​
 gate# apt install kea gate# apt install kea
 +...
 +... Do Nothing
 +...
  
 gate# cat /​etc/​kea/​kea-dhcp4.conf gate# cat /​etc/​kea/​kea-dhcp4.conf
Line 300: Line 311:
             "​id":​ 1,             "​id":​ 1,
             "​subnet":​ "​192.168.100+X.0/​24",​             "​subnet":​ "​192.168.100+X.0/​24",​
-            "​pools":​ [ { "​pool":​ "​192.168.100+X.100 - 192.168.100+X.109"​ } ],+            "​pools":​ [ { "​pool":​ "​192.168.100+X.101 - 192.168.100+X.109"​ } ],
             "​option-data":​ [             "​option-data":​ [
                 {                 {
Line 326: Line 337:
 </​code><​code>​ </​code><​code>​
 # kea-dhcp4 -t /​etc/​kea/​kea-dhcp4.conf # kea-dhcp4 -t /​etc/​kea/​kea-dhcp4.conf
 +  или
 +# sudo -u _kea kea-dhcp4 -t /​etc/​kea/​kea-dhcp4.conf
  
 # service kea-dhcp4-server restart # service kea-dhcp4-server restart
сервис_dhcp.1717499448.txt.gz · Last modified: 2024/06/04 14:10 by val