0

I have a linux computer with a pre-configured static ip. When the pc is installed i need to access it via remote access teamviewer. Sometimes the static ip not working. Then i would like to switch to DHCP after an X time.

for example: PI connected to network, but static adress is wrong. So has to switch to DHCP after 1 minute. Then device is connected and i can use remote access.

added: the PI is sended to customer, where the static IP has to work. In a case the static ip not works (due to other subnet) failover to dhcp

WOuter
  • 11
  • 2

1 Answers1

3

This is impossible in principle! A static IP address cannot fail! It may be unroutable on some networks, but will still "WORK".

You can use a static IP address as fall back when DHCP lease fails.

There are methods of setting different addresses on different networks. See How to set up networking/WiFi

None of this changes the fact that static IP addresses are rarely necessary - there are better solutions which don't require you to know the IP address!

Milliways
  • 62,573
  • 32
  • 113
  • 225