Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Automatically Generating Static Mappings?

    Scheduled Pinned Locked Moved DHCP and DNS
    1 Posts 1 Posters 609 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      ElectroPulse
      last edited by

      Hello, all!

      I'm wondering… Is there a way to generate static mappings whenever a new user connects to the network?

      At the very least, is there some way to take a list of MAC addresses and easily create a bunch of static mappings with that?

      The reason I ask: I am managing a school network. I recently installed Sarg, and noticed it tracks usage based on IP address. Obviously, if a user's IP address is changing every day or two, this just won't work. There isn't much user turnover here, so I have no worries about running out of IP addresses (though I'd keep an eye on it, of course).

      One suggestion that I ran across was this: Save the DHCP settings using the backup/restore tool, make the required changes, and then restore with the updated config.

      I tried this, but here's my problem... How on earth would I go about automatically generating a form like this? (this is how it exported)

      		 <staticmap><mac>MACADDRESS</mac>
      			<ipaddr>IPADDRESS</ipaddr>
      			 <hostname><filename><rootpath><defaultleasetime><maxleasetime><gateway><domain><domainsearchlist><ddnsdomain><tftp><ldap></ldap></tftp></ddnsdomain></domainsearchlist></domain></gateway></maxleasetime></defaultleasetime></rootpath></filename></hostname></staticmap> 
      

      Thanks!
      ElectroPulse

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.