Skip to content

feat: Add configurable server IP for DHCP responses#32

Closed
robertvolkmann wants to merge 6 commits intomainfrom
configurable-server-ip
Closed

feat: Add configurable server IP for DHCP responses#32
robertvolkmann wants to merge 6 commits intomainfrom
configurable-server-ip

Conversation

@robertvolkmann
Copy link
Contributor

@robertvolkmann robertvolkmann commented Apr 15, 2025

Description

Add the ability to configure a fixed source IP address for DHCP and PXE responses through a new --server-ip flag. This is particularly useful when network interfaces don't have IPv4 addresses configured but DHCP/PXE services still need to operate with a specific source IP.

Changes include:

  • Add new ServerIP configuration option to Server struct
  • Implement --server-ip CLI flag with IPv4 validation
  • Modify DHCP and PXE services to use configured IP when available
  • Maintain backward compatibility by keeping auto-detection as default
  • Allow DHCP/PXE operation even when interfaces lack IPv4 addresses

Example:

pixiecore --server-ip 192.168.1.10 [other options]

Add the ability to configure a fixed source IP address for DHCP and PXE responses through a new --server-ip flag. This is particularly useful when network interfaces don't have IPv4 addresses configured but DHCP/PXE services still need to operate with a specific source IP.

Changes include:
- Add new ServerIP configuration option to Server struct
- Implement --server-ip CLI flag with IPv4 validation
- Modify DHCP and PXE services to use configured IP when available
- Maintain backward compatibility by keeping auto-detection as default
- Allow DHCP/PXE operation even when interfaces lack IPv4 addresses

Example:
pixiecore --server-ip 192.168.1.10 [other options]
@Gerrit91
Copy link
Contributor

Can you describe the scenario in which the network interfaces do not have IPv4 addresses configured? Where does the pixiecore run?

Before:
dhcp":{"mac":"fMJV5Tr9","error":"packet is DHCPREQUEST, not DHCPDISCOVER"}
@robertvolkmann
Copy link
Contributor Author

Some dual-attached server with unnumbered interfaces, nothing special.

@robertvolkmann robertvolkmann marked this pull request as ready for review April 15, 2025 17:53
@robertvolkmann robertvolkmann requested a review from a team as a code owner April 15, 2025 17:53
@github-project-automation github-project-automation bot moved this to Review in Development Jun 5, 2025
@Gerrit91 Gerrit91 removed the status in Development Jun 13, 2025
@robertvolkmann robertvolkmann deleted the configurable-server-ip branch July 16, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants