Jump to content
Калькуляторы

странность с dhcp 2 dhcp mac binding

Щас заметил что DHCPD перестал выдавать адрес, который присвоен по маку. И не могу понять что случилось.

Конфиг не менял, dhcpd не перезапускал. Выдавал 172.17.12.20, а стал выдавать 172.17.12.150 .

Вот что в логе :

Feb  3 13:39:34 ibm dhcpd: DHCPOFFER on 172.17.12.20 to c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:39:35 ibm dhcpd: DHCPDISCOVER from c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:39:35 ibm dhcpd: DHCPOFFER on 172.17.12.20 to c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:39:35 ibm dhcpd: DHCPREQUEST for 172.17.12.20 (172.17.1.6) from c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:39:35 ibm dhcpd: DHCPACK on 172.17.12.20 to c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:42:05 ibm dhcpd: DHCPREQUEST for 172.17.12.20 from c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:42:05 ibm dhcpd: DHCPACK on 172.17.12.20 to c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:44:35 ibm dhcpd: DHCPREQUEST for 172.17.12.20 from c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:44:35 ibm dhcpd: DHCPACK on 172.17.12.20 to c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:51:04 ibm dhcpd: DHCPDISCOVER from c0:4a:00:8e:be:4f via 172.17.12.1
Feb  3 13:51:08 ibm dhcpd: DHCPDISCOVER from c0:4a:00:8e:be:4f via 172.17.12.1
Feb  3 13:51:09 ibm dhcpd: DHCPOFFER on 172.17.12.150 to c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:51:09 ibm dhcpd: DHCPREQUEST for 172.17.12.150 (172.17.1.6) from c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:51:09 ibm dhcpd: DHCPACK on 172.17.12.150 to c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:53:34 ibm dhcpd: DHCPREQUEST for 172.17.12.150 from c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:53:34 ibm dhcpd: DHCPACK on 172.17.12.150 to c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:56:04 ibm dhcpd: DHCPREQUEST for 172.17.12.150 from c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:56:04 ibm dhcpd: DHCPACK on 172.17.12.150 to c0:4a:00:8e:be:4f (mart) via eth0

 

Вот часть конфига :

shared-network "12" {
subnet 172.17.12.0 netmask 255.255.255.0 {    
   option routers 172.17.12.1; 
   option subnet-mask 255.255.255.0;
   option broadcast-address 172.17.12.255;
   option domain-name-servers 172.17.1.2;

class "mart"     { match if binary-to-ascii (16, 8, ":", substring(hardware,1,6))  = "c0:4a:0:8e:be:4f" ;     }
pool { range 172.17.12.20;  allow members of "mart"; }

   range 172.17.12.150 172.17.12.155;
   allow unknown-clients;
}
}

 

Использую классы тк потом по портам адреса выдавать буду.

Share this post


Link to post
Share on other sites

Щас заметил что DHCPD перестал выдавать адрес, который присвоен по маку. И не могу понять что случилось.

Конфиг не менял, dhcpd не перезапускал. Выдавал 172.17.12.20, а стал выдавать 172.17.12.150 .

Вот что в логе :

Feb  3 13:39:34 ibm dhcpd: DHCPOFFER on 172.17.12.20 to c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:39:35 ibm dhcpd: DHCPDISCOVER from c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:39:35 ibm dhcpd: DHCPOFFER on 172.17.12.20 to c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:39:35 ibm dhcpd: DHCPREQUEST for 172.17.12.20 (172.17.1.6) from c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:39:35 ibm dhcpd: DHCPACK on 172.17.12.20 to c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:42:05 ibm dhcpd: DHCPREQUEST for 172.17.12.20 from c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:42:05 ibm dhcpd: DHCPACK on 172.17.12.20 to c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:44:35 ibm dhcpd: DHCPREQUEST for 172.17.12.20 from c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:44:35 ibm dhcpd: DHCPACK on 172.17.12.20 to c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:51:04 ibm dhcpd: DHCPDISCOVER from c0:4a:00:8e:be:4f via 172.17.12.1
Feb  3 13:51:08 ibm dhcpd: DHCPDISCOVER from c0:4a:00:8e:be:4f via 172.17.12.1
Feb  3 13:51:09 ibm dhcpd: DHCPOFFER on 172.17.12.150 to c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:51:09 ibm dhcpd: DHCPREQUEST for 172.17.12.150 (172.17.1.6) from c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:51:09 ibm dhcpd: DHCPACK on 172.17.12.150 to c0:4a:00:8e:be:4f (mart) via 172.17.12.1
Feb  3 13:53:34 ibm dhcpd: DHCPREQUEST for 172.17.12.150 from c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:53:34 ibm dhcpd: DHCPACK on 172.17.12.150 to c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:56:04 ibm dhcpd: DHCPREQUEST for 172.17.12.150 from c0:4a:00:8e:be:4f (mart) via eth0
Feb  3 13:56:04 ibm dhcpd: DHCPACK on 172.17.12.150 to c0:4a:00:8e:be:4f (mart) via eth0

 

Вот часть конфига :

shared-network "12" {
subnet 172.17.12.0 netmask 255.255.255.0 {    
   option routers 172.17.12.1; 
   option subnet-mask 255.255.255.0;
   option broadcast-address 172.17.12.255;
   option domain-name-servers 172.17.1.2;

class "mart"     { match if binary-to-ascii (16, 8, ":", substring(hardware,1,6))  = "c0:4a:0:8e:be:4f" ;     }
pool { range 172.17.12.20;  allow members of "mart"; }

   range 172.17.12.150 172.17.12.155;
   allow unknown-clients;
}
}

 

Использую классы тк потом по портам адреса выдавать буду.

ну как бы не хватает символа в маке

Share this post


Link to post
Share on other sites

ну как бы не хватает символа в маке

не, это нормально. У dhcpd так функция binary-to-ascii работает - числа вначале которых ноль ( 01,0f,0a ) обрезает и убирает ноль.

Share this post


Link to post
Share on other sites

добавил :

one-lease-per-client true;
deny duplicates;
ignore client-updates;

и вроде проблем больше нет.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this