Community discussions

 
landersohn
just joined
Topic Author
Posts: 1
Joined: Thu Jul 26, 2018 9:23 pm

DHCP server assigns wrong netmask

Thu Jul 26, 2018 9:28 pm

I tried to change my microtik router to a new ip: 10.69.9.1/24. I also changed the pool for the DHCP server accordingly.
I expected when a client connects to get a netmask of 255.255.255.0

Turns out on my linux pc I get 255.0.0.0, on my windows pc I get 255.255.255.255 and I have difficulties doing ssh and broadcasts from one pc to the next.
Dopes anybody know how to configure the DHCP server such that the netmask comes out OK?
 
User avatar
reidavidinho
Frequent Visitor
Frequent Visitor
Posts: 81
Joined: Mon Jul 25, 2016 11:11 am
Location: Ibadan, Nigeria
Contact:

Re: DHCP server assigns wrong netmask

Mon Jul 30, 2018 5:29 pm

Why don't u remove the existing dhcp server and the pool, and then create an entirely new one.
Mikrotik Certified Consultant
[ MTCNA , MTCRE ]
 
diddie17
Frequent Visitor
Frequent Visitor
Posts: 68
Joined: Thu Sep 14, 2017 8:53 pm
Location: UK

Re: DHCP server assigns wrong netmask

Mon Jul 30, 2018 5:56 pm

It might be optional, but I think it's the /ip dhcp-server network command that sets the netmask in my config, with an entry matching each pool.

It probably should sort itself out as a default, but doesn't look like it is in your example.

From https://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Server
netmask (integer: 0..32; Default: 0) The actual network mask to be used by DHCP client. If set to '0' - netmask from network address will be used.

As an example from my config -
/ip dhcp-server network
add address=192.168.0.0/24 dns-server=192.168.0.3,192.168.0.4 domain=test.com gateway=192.168.0.1 netmask=24 ntp-server=192.168.0.3,192.168.0.4

Happy to be corrected though :-)

Who is online

Users browsing this forum: No registered users and 33 guests