Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fallback static ip when cable is unplugged
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
trumee
Guru
Guru


Joined: 02 Mar 2003
Posts: 468
Location: London,UK

PostPosted: Fri Dec 06, 2013 5:47 pm    Post subject: Fallback static ip when cable is unplugged Reply with quote

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
View user's profile Send private message
szatox
Guru
Guru


Joined: 27 Aug 2013
Posts: 553

PostPosted: Fri Dec 06, 2013 6:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum