My Ubuntu 16.04 system connects to a LAN by Ethernet w/ DHCP (say 10.128.10.2).
When I unplug that Ethernet cord, I want my machine to switch to a local static ip (say 192.168.10.2) on that same interface.
I tried the following in etc/network/interface but it didnt work:
# interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback auto enp0s31f6 iface enp0s31f6 inet dhcp auto enp0s31f6:1 iface enp0s31f6:1 inet static address 192.168.10.2 netmask 255.255.255.0
What am i doing wrong?