David, I've been trying to figure out how you would do this on Linux. This seems to be the right answer. Done via a "lease" configuration for dhcpd, or via secondary static IP on the interface https://stackoverflow.com/questions/12727175/set-static-ip-if-not-obtained-from-dhcp-script
For your purposes, I think there would be a few paths: 1. Modify the netinit logic to attempt connection over DHCP, but on failure to connect to the server, fallback and setup the DHCP. 2. Modify DHCP logic to support fallback static IP via configuration similar to lease. 3. Add support for multiple IP addresses on a single interface within the network stack. Then always assign the static IP in addition to the one DHCP may or may not setup. This is a big job, but I'd really like to see us get it done at some point. Right now, for IPv6, AFAIK, we can't even support a link-local IP address (fe80::/10 with a global IP at the same time. On Thu, Sep 17, 2020 at 4:02 PM Gregory Nutt <spudan...@gmail.com> wrote: > On 9/17/2020 1:59 PM, David Sidrane wrote: > > Is the only option for using the network monitor.... > > > > Hi, > > > > My goal is to have a run time option to use a static IP or DHCP. > (Curretly > > it is compile time) > > > > If either are used I want to "auto up" the eth0. Once the interface > comes up > > , if configured for DHCP it should make start the DHCP request process. > > > > Is the only option for using the network monitor to have phy interrupts > or > > is there a polled option? > > > > David > > > There is no polled option. I am not certain if you can access the PHY > while in normal operating mode either. Doesn't management mode disable > the MAC? > >