I am currently in the process of developing a network device that functions as a PPP server.
The device is designed to be flexible, allowing connections to ISPs that support IPv4, IPv6, or both.
The device exposes a UART interface to the client host which connects with PPP.
In this setup, the device is intended to act like a network bridge, connecting the client host to various ISPs.
IPv4 and IPv6 information will be sent in PPP Configuration ACK, and IPv6 RA in IPv6 traffic after.
The device connects to the ISP, before the client connect to it.
Device Configuration:
The device has one interface for connecting to an ISP.
It also has a interface that is allocated for the PPP interface.
Behavioral Requirement:
When a user connects to this device using PPPD on the client host, I want the user to receive the same IP type (IPv4/IPv6/both) as the one provided by the ISP to the device.
This poses a challenge because the type of IP is not known before establishing the connection to the ISP.
Challenges Faced:
I can't force the client to request only a specific IP type since the device should be versatile and support whatever the ISP provides.
I can't disable IPCP or IP6CP negotiation at the server end as it must be adaptive based on the ISP.
I have tried two different approaches to resolve this issue:
Rejecting Unusable Protocol:
My first thought was to reject IPCP if the ISP provides only IPv6 and to reject IP6CP if the ISP provides only IPv4.
However, doing this seems to prompt PPPD to send endless IPCP/IP6CP empty configuration requests, which I am looking to avoid.
Ignoring Protocol Configuration Requests:
The alternative was to ignore the protocol configuration request for the unsupported IP type.
In this case, PPPD would retry sending the request about 10 times before timing out.
While this works, I would prefer to avoid retries altogether if possible.
I am interested in hearing your insights on this particular situation.
Is the endless request behavior upon rejection expected, or might this be a bug in PPPD?
Are there any best practices or recommendations for how a PPP server should behave under such dynamic conditions?
Thank you for your time and looking forward to your valuable feedback.
Best regards