Community discussions

MikroTik App
Topic Author
Posts: 405
Joined: Tue Sep 27, 2011 7:55 am

DHCP server with static leases

Fri Mar 08, 2013 2:34 pm


I use my mikrotik as an DHCP server.
This is working fine.
Now I want only static-IP's, so a static lease.
I found this:
/ip dhcp-server lease
add address= mac-address=00:97:30:32:34:77 comment="foo-31"
add address= mac-address=00:2B:71:A3:82:46 comment="bar-07"
add address= mac-address=74:58:16:69:DF:D3 comment="baz-89"

This wil work but now second thing.
I have two gateways in my network.
Can I allso add the gateway address to a static lease?
For example I want that foo-31 use as default gateway and got this from the DHCP server
and that bar-07 use ad default gateway and get this from the DHCP server.
Posts: 478
Joined: Sat May 06, 2006 4:11 pm

Re: DHCP server with static leases

Fri Mar 08, 2013 5:22 pm

The gateway assignment is done under "/ip dhcp-server network". Just add /32 mask "networks" for your single hosts and assign different gateways for each of them. Also, you may have a general /24 netmask entry for that whole network as well, nothing will get broken - the single defined exceptions will take priority.

Who is online

Users browsing this forum: bradfordbb, Google [Bot] and 59 guests