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

    Add static DHCP mapping via CLI

    Scheduled Pinned Locked Moved DHCP and DNS
    2 Posts 2 Posters 515 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.
    • M
      marekdes
      last edited by

      Is it possible to add static DHCP mapping using CLI/SSH?
      I am planning to use external system for generating MAC/IP pairs.

      1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan
        last edited by

        Ah, a CLI expert.

        In that case : it's up to you !

        Add to your plans:
        Goto /usr/local/www/services_dhcp_edit.php - lines 153 up to 340. read them to get the picture.
        These ones are validating setting, writing to the config.xml and "marking the subsystem dirty" (which probably winds up killing the DHCP server, to revive it with new settings)
        If you can handle this in CLI (and why not) then work out your plans ;)

        note:

        1. I'm not sure this is the only file to be considered.
        2. handling config.xml is considered 'madness'.
        3. handle all cases I just omitted for simplicity.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

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