-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Current implementation only acts as DHCP server. Need adaptive behavior to support macOS Internet Sharing where the host becomes the DHCP server.
Problem
When macOS Internet Sharing is enabled, macOS acts as DHCP server (typically 192.168.2.x range). The device needs to detect this and act as DHCP client instead of server.
Requirements
- Try DHCP client first (5 second timeout)
- If no DHCP server found, become DHCP server
- Support macOS Internet Sharing (192.168.2.x range)
- Maintain compatibility with direct connections
Proposed systemd-networkd Configuration
[Network]
DHCP=yes
LinkLocalAddressing=yes
Address=192.168.7.1/24
DHCPServer=yes
ConfigureWithoutCarrier=yes
[DHCP]
UseDNS=yes
UseRoutes=yes
RequestTimeout=5
[DHCPServer]
PoolOffset=100
PoolSize=20Alternative Approach
Create a script that:
- Attempts DHCP client with timeout
- Checks if lease obtained
- If yes: Acts as client
- If no: Configures static IP and starts DHCP server
Use Cases
- Direct connection: Device provides DHCP (192.168.7.x)
- macOS Internet Sharing OFF: Device provides DHCP
- macOS Internet Sharing ON: Device gets IP from macOS, has internet access
Acceptance Criteria
- Device gets IP from macOS when Internet Sharing enabled
- Device provides DHCP when directly connected
- Seamless switching between modes
- Internet connectivity works through macOS sharing
- Link-local addresses always available as fallback
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request