Skip to content

Add support for DHCP server #446

Closed
1 of 4 issues completed
Closed

Description

@troglobit

Description

A common feature request is support for DHCP server. Discussions have been around continuing to use dnsmasq, which is used as the system DNS resolver and helper for coordinating received DHCP client options and configured settings, or to leverage the ISC DHCP server. The latter has a new implementation called Kea which also use sysrepo + yang. However, it does not seem their YANG model and implementation can easily be reused, see the Infix discussion thread for more: https://github.com/orgs/kernelkit/discussions/345.

Requirements

  1. Easy to set up a general DHCP server
    • Selecting an interface in the CLI infers pool range, DNS server, and gateway option from interface address
    • Inferred default options (dnsmasq defaults) from the CLI
  2. Support static host leases
    • Support matching on MAC address, client-id option, and (future) Option 82 sub-options
    • Support "easy replacement" with Option 82, i.e., not lock static leases to MAC address
  3. Support setting DHCP options (with YANG validation of standard types like inet address)
    • Global options
    • Pool option, possible to override global options
    • Static host options, possible to override global and pool options
  4. Common settings, that many vendors have dedicated settings for, like "default router", "dns server", should be managed as DHCP options instead
  5. Use common vernacular in the YANG model:
    • Compare existing models, including draft models (see below links)
    • Compare with nomenclature used by Cisco/Juniper/Procurve/Moxa/Westermo
    • Fit in with nomenclature used in infix-dhcp-client.yang and other models in Infix
    • If all else fails, use terminology from dnsmasq

One critical use-case Infix must support is "IP per port". I.e., a central DHCP server1, with relay agents on other subnets that are capable of tacking on Option 82, containing local port name and relay agent ID. See issue #438 for more information. The server can then use this information to always hand out the same IP address to client(s) connected to that port on that switch. For quick device replacement these static leases must be possible to disable locking to the MAC address of the old (to be replaced) device.

dhcp-server2

In the simplest variant of this use-case the relay agent and DHCP server run on the same Infix device. But for the implementation of DHCP server support in Infix, the server must support serving leases (including static) on per-subnet rather than on a per-interface basis.

Additional Information

General Information

You can help out by sponsoring the development, or contributing a pull request for its support. Use this issue for discussions around this topic.

Footnotes

  1. possibly with a hot-standby backup. ↩

Sub-issues

Sub-issues

1 of 4 Issues completed
Loading 4 sub-issues

Activity

  1. added
    enhancement
    triage
    on May 15, 2024
  2. troglobit commented on Aug 21, 2024

    @troglobit
    ContributorAuthor
  3. changed the title [-]Support for DHCP server[/-] [+]Add support for DHCP server[/+] on Aug 22, 2024
  4. troglobit commented on Aug 30, 2024

    @troglobit
    ContributorAuthor

    Review patch from Minex.

  5. moved this to In progress in Infix & C:oon Aug 30, 2024
  6. added this to the Infix v24.09 milestone on Aug 30, 2024
  7. self-assigned this
    on Aug 30, 2024
  8. removed
    triage
    on Sep 5, 2024
  9. removed this from the Infix v24.09 milestone on Sep 24, 2024
  10. added this to the Infix v25.01 milestone on Jan 7, 2025
  11. added 2 commits that reference this issue on Jan 20, 2025
    00d9a17
    71e25b4
  12. 5 remaining items

  13. added 4 commits that reference this issue on Jan 28, 2025
    32391c0
    0443be9
    137c4ed
    954b6b3
  14. modified the milestones: Infix v25.01, FUTURE on Jan 30, 2025
  15. troglobit commented on Jan 30, 2025

    @troglobit
    ContributorAuthor

    CCB: Adjust milestone, this issue is for the complete DHCP server package including relay agent, which was never the target for v25.01.

  16. added 2 commits that reference this issue on Jan 31, 2025
    7496d85
    2646a51
  17. troglobit commented on Jan 31, 2025

    @troglobit
    ContributorAuthor
  18. moved this from In progress to Todo in Infix & C:oon Jan 31, 2025
  19. removed their assignment
    on Mar 31, 2025
  20. troglobit commented on Oct 5, 2026

    @troglobit
    ContributorAuthor

    The DHCP server was merged in #703 and is documented in DHCP Server. The remaining parts of the original scope are tracked separately: the relay agent in #438 and Option 82 matching in #705. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions