Community discussions

MikroTik App
 
User avatar
petardo
just joined
Topic Author
Posts: 11
Joined: Fri Sep 25, 2015 4:06 pm

DHCP server is pushing both internal and received dynamic IPs to clients

Wed Nov 30, 2022 1:03 pm

MT router behind provider's router receives dynamic DNS 192.168.0.1
MT router IP: 192.168.128.1

Settings:
/ip dns set allow-remote-requests=yes
/ip dns static add address=192.168.128.1 name=router.lan
/ip dhcp-server add address-pool=dhcp interface=bridge name=defconf
/ip dhcp-server network add address=192.168.128.0/24 comment=defconf gateway=192.168.128.1 netmask=24
All clients are getting both 192.168.0.1 and 192.168.128.1 as DNS servers.
To my understanding only the MT internal DNS address (192.168.128.1) should have been pushed.
I don't understand, pls help.
 
erlinden
Forum Guru
Forum Guru
Posts: 1900
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: DHCP server is pushing both internal and received dynamic IPs to clients

Wed Nov 30, 2022 1:10 pm

I think it can be overwritten by setting DNS server in /ip dhcp-server network
 
User avatar
petardo
just joined
Topic Author
Posts: 11
Joined: Fri Sep 25, 2015 4:06 pm

Re: DHCP server is pushing both internal and received dynamic IPs to clients

Wed Nov 30, 2022 1:22 pm

I think it can be overwritten by setting DNS server in /ip dhcp-server network
It is not overwritten:
/ip dhcp-server network print
Columns: ADDRESS, GATEWAY
# ADDRESS           GATEWAY      
;;; defconf
0 192.168.128.0/24  192.168.128.1
 
erlinden
Forum Guru
Forum Guru
Posts: 1900
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: DHCP server is pushing both internal and received dynamic IPs to clients

Wed Nov 30, 2022 1:48 pm

I mean, the behaviour can be overwritten by setting the DNS server explicitely:
/ip dhcp-server network add address=192.168.128.0/24 dns-server=192.168.128.1 comment=defconf gateway=192.168.128.1 netmask=24
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: DHCP server is pushing both internal and received dynamic IPs to clients

Wed Nov 30, 2022 2:10 pm

There is a separate checkmark "No DNS" to remove the automatic DNS servers from the list of DNS servers distributed via DHCP.
You can still distribute statically configured DNS servers.
 
User avatar
petardo
just joined
Topic Author
Posts: 11
Joined: Fri Sep 25, 2015 4:06 pm

Re: DHCP server is pushing both internal and received dynamic IPs to clients

Wed Nov 30, 2022 2:34 pm

I mean, the behaviour can be overwritten by setting the DNS server explicitely:
/ip dhcp-server network add address=192.168.128.0/24 dns-server=192.168.128.1 comment=defconf gateway=192.168.128.1 netmask=24
Yes, thanks, that works, but it is then just a workaround, I would like to unterstand the behavior.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: DHCP server is pushing both internal and received dynamic IPs to clients

Wed Nov 30, 2022 6:06 pm

 
User avatar
petardo
just joined
Topic Author
Posts: 11
Joined: Fri Sep 25, 2015 4:06 pm

Re: DHCP server is pushing both internal and received dynamic IPs to clients

Wed Nov 30, 2022 11:07 pm

There is a separate checkmark "No DNS" to remove the automatic DNS servers from the list of DNS servers distributed via DHCP.
You can still distribute statically configured DNS servers.
Thanks.
I had a look at my other installations, and I recognized that that pushing received or set DNS as secondary DNSs is the normal operation.
I was mistaken, sorry.

Who is online

Users browsing this forum: Bing [Bot] and 77 guests