Community discussions

MikroTik App
 
Sigmoid
just joined
Topic Author
Posts: 2
Joined: Mon Oct 24, 2011 9:28 pm

Auto-updated hostnames from DHCP

Mon Oct 24, 2011 9:56 pm

I replaced an ancient Linksys with the new RouterBoard 750GL, and well I like it, so far so good. There is one thing only...

I have a small network with several machines that interact A LOT. I mean, a XenServer host, which I manage from my desktop and notebook, a Xen virtual machine that I want to access via NFS and CIFS shares from my machines, a VirtualBox running Windows on my Mac that exports a CIFS share ISO store for XenServer (unfortunately XenServer doesn't speak Netbios, it needs DNS name resolution to access the share), etc.

All this nice stuff fell totally to pieces when I installed the RouterBoard, as it doesn't register hostnames from DHCP leases into the builtin DNS server. Giving each of my machines fixed IPs would be a Major Pain, and I really don't want to do that. I even have a HP network printer that I never figured out how to give a static address to, as I always accessed it by its registered factory-set hostname.

Can I somehow, like with a script or cleverly hidden option, achieve the same SOHO router behavior that the Linksys did for me?

(eg. my mac asks for a dhcp lease and specifies its hostname as "mac", then when I type "host mac" from another box, it would give me the dynamic address that the mac got from the router.)
 
tjc
Member Candidate
Member Candidate
Posts: 276
Joined: Sun Jul 10, 2011 3:08 am

Re: Auto-updated hostnames from DHCP

Tue Oct 25, 2011 5:52 am

You have at least a couple options:

- Make the DHCP assignment for the various mac addresses static. This is trivial to do from either winbox or webfig. Search for "make-static" in the on-line manuals.
The webfig menu path is: IP -> DHCP Server -> Leases -> <Lease> -> Make Static You can even write a simple script to iterate over all the assignments and make them static.

- You can write a script that scans for new DHCP leases and adds a dynamic DNS entry. The host-name and active-address properties documented here are what you would need: http://wiki.mikrotik.com/wiki/Manual:IP ... properties

Who is online

Users browsing this forum: No registered users and 83 guests