View previous topic :: View next topic |
Author |
Message |
trumee Guru
Joined: 02 Mar 2003 Posts: 551 Location: London,UK
|
Posted: Fri Dec 06, 2013 5:47 pm Post subject: Fallback static ip when cable is unplugged |
|
|
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
Code: |
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? |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3137
|
Posted: Fri Dec 06, 2013 6:36 pm Post subject: |
|
|
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) |
|
Back to top |
|
|
|