# Fallback static ip when cable is unplugged

## trumee

Hi,

I want the system to revert to a static ip if the network link is unplugged. I tried the following in /etc/conf.d/net

```

modules="!plug"

config_eth0="dhcp"

dhcpcd_eth0="-t 5 -L"

fallback_eth0="192.168.1.116 broadcast 192.168.1.255 netmask 255.255.255.0"

fallback_route_eth0="default via 192.168.1.1"

```

After unplugging the cable, the system doesnt fall back the static ip defined above.

Any reason why this may be the case?

----------

## szatox

the reason is dhcp didn't fail, so there is no point in falling back

I'd expect it to use static once dhcp lease es expired though. I've seen some tricks related to pulling cables in laptop related howtos, so it's definitely possible to achieve result you want. (like switching interfaces when cable is plugged/unplugged)

----------

