Community discussions

MikroTik App
 
pentagrammer
just joined
Topic Author
Posts: 1
Joined: Thu Oct 07, 2021 8:04 am

Strange situation with DHCP Networks

Thu Oct 07, 2021 8:51 am

Hi All!

Src: Mikrotik HAP AC^2 with RouterOS 6.48.4.

Setup DHCP:
/Iip dhcp network add address=192.168.1.0/24 gateway=192.168.1.1 netmask=24 dns-server=192.168.1.1 wins-server=192.168.1.6 ntp-server=192.168.1.1 caps-manager=192.168.1.1 next-server=192.168.1.1
In log:
22:33:27 dhcp,debug DHCP: DHCP server received REQUEST id 793723368 from 0.0.0.0 '1:32:11:5:6c:41:e8' 
22:33:27 dhcp,debug,packet DHCP:     flags = broadcast 
22:33:27 dhcp,debug,packet DHCP:     ciaddr = 0.0.0.0 
22:33:27 dhcp,debug,packet DHCP:     chaddr = 32:11:05:6C:41:E8 
22:33:27 dhcp,debug,packet DHCP:     Msg-Type = REQUEST 
22:33:27 dhcp,debug,packet DHCP:     Server-Id = 192.168.1.6 
22:33:27 dhcp,debug,packet DHCP:     Address-REQUEST = 192.168.1.2 
22:33:27 dhcp,debug,packet DHCP:     Client-Id = 01-32-11-05-6C-41-E8 
22:33:27 dhcp,debug,packet DHCP:     Max-DHCP-Message-Size = 576 
22:33:27 dhcp,debug,packet DHCP:     Parameter-List = Subnet-Mask,Router,Domain-Server,Host-Name,Domain-Name,Broadcast-Address 
22:33:27 dhcp,debug,packet DHCP:     Class-Id = "udhcp 1.21.0" 
22:33:27 dhcp,debug,packet DHCP:     Host-Name = 67-78-62-6F-78-00 
22:33:27 dhcp,debug DHCP: lease waiting, talking to another server: 192.168.1.6 
Why Server-ID is equal my tftp boot server ip? And last message said: system "lease waiting" from my tftp boot server", but I have only one dhcp server in my network and tftp boot server can't controlling dhcp leases... Result: Device (TV receiver) can't get IP address via dhcp from AP AC^2 with that setup.

Ok, I removing previos dhcp network and do setup again without next_server value:
/Iip dhcp network add address=192.168.1.0/24 gateway=192.168.1.1 netmask=24 dns-server=192.168.1.1 wins-server=192.168.1.6 ntp-server=192.168.1.1 caps-manager=192.168.1.1

Got in log after that fix:
22:36:02 dhcp,debug DHCP: DHCP server received REQUEST id 103825896 from 0.0.0.0 '1:32:11:5:6c:41:e8' 
22:36:02 dhcp,debug,packet DHCP:     flags = broadcast 
22:36:02 dhcp,debug,packet DHCP:     ciaddr = 0.0.0.0 
22:36:02 dhcp,debug,packet DHCP:     chaddr = 32:11:05:6C:41:E8 
22:36:02 dhcp,debug,packet DHCP:     Msg-Type = REQUEST 
22:36:02 dhcp,debug,packet DHCP:     Server-Id = 192.168.1.1 
22:36:02 dhcp,debug,packet DHCP:     Address-REQUEST = 192.168.1.2 
22:36:02 dhcp,debug,packet DHCP:     Client-Id = 01-32-11-05-6C-41-E8 
22:36:02 dhcp,debug,packet DHCP:     Max-DHCP-Message-Size = 576 
22:36:02 dhcp,debug,packet DHCP:     Parameter-List = Subnet-Mask,Router,Domain-Server,Host-Name,Domain-Name,Broadcast-Address 
22:36:02 dhcp,debug,packet DHCP:     Class-Id = "udhcp 1.21.0" 
22:36:02 dhcp,debug,packet DHCP:     Host-Name = 67-78-62-6F-78-00 
22:36:02 dhcp,debug DHCP: lease offered, addressed to me 
22:36:02 dhcp,debug DHCP: add arp for 192.168.1.2 to 32:11:05:6C:41:E8 
22:36:02 dhcp,debug DHCP: 192.168.1.2 entering bound 
22:36:02 dhcp,info DHCP server assigned 192.168.1.2 to 32:11:05:6C:41:E8 
22:36:02 dhcp,debug DHCP: DHCP server sending ACK with id 103825896 to 255.255.255.255 
22:36:02 dhcp,debug,packet DHCP:     flags = broadcast 
22:36:02 dhcp,debug,packet DHCP:     ciaddr = 0.0.0.0 
22:36:02 dhcp,debug,packet DHCP:     yiaddr = 192.168.1.2 
22:36:02 dhcp,debug,packet DHCP:     siaddr = 192.168.1.1 
22:36:02 dhcp,debug,packet DHCP:     chaddr = 32:11:05:6C:41:E8 
22:36:02 dhcp,debug,packet DHCP:     Msg-Type = ACK 
22:36:02 dhcp,debug,packet DHCP:     Server-Id = 192.168.1.1 
22:36:02 dhcp,debug,packet DHCP:     Address-Time = 900 
22:36:02 dhcp,debug,packet DHCP:     Subnet-Mask = 255.255.255.0 
22:36:02 dhcp,debug,packet DHCP:     Router = 192.168.1.1 
22:36:02 dhcp,debug,packet DHCP:     Domain-Server = 192.168.1.1 
Result: Always is ok and TV receiver got the IP address .

Hmmmm, I maked dhcp option "next-server" with code 66 and value "0xc0a80106", also I set the options with codes 42,67,150. Removing previous dhcp network and create new as:
/ip dhcp network add address=192.168.1.0/24 gateway=192.168.1.1 netmask=24 dns-server=192.168.1.1 wins-server=192.168.1.6 caps-manager=192.168.1.1 dhcp-option-set=Set_for_LAN
and
Result: TV receiver got the IP address via dhcp and other devices can boot from tftp boot server.

Question: what I do wrong with next_server option in dhcp network? Whi when I set it - it changed DHCP Server-Id?

PS: with RouterOS v.6.49 - the same situation.

Who is online

Users browsing this forum: Google [Bot], hjf and 74 guests