DHCP: renewal when cable is plugged out/in
arnout at mind.be
Fri Apr 4 04:40:26 CDT 2008
Chris Johns wrote:
> Arnout Vandecappelle wrote:
>> I have an RTEMS-based system which normally is not connected to the
>> (Ether)network, but occasionally a user comes a long and plugs in a
>> cable. I need DHCP to get a new address whenever the network cable is
>> plugged in, even if it's previous lease hasn't expired yet. I also need
>> DHCP to fall back to a statically configured address if no reply comes.
>> My questions:
>> * does anyone have these features already? I expect not, so
> This is not normal behavior as network drop outs can occur at anytime
> and this is just one how-ever I can see the need with an embedded box
> in certain applications. I suggest this be an application you have.
Actually also on my laptop it would be useful: I sometimes move to the
meeting room, which is on a separately routed network, so my IP address
should be updated... But that's of no concern on this forum :-)
>> * any suggestions on how to implement the network cable plug-in
>> detection? My Ethernet driver detects cable (dis)connects, how should
>> these be propagated to the DHCP task?
>> - By setting the struct ifnet's if_flags and have the DHCP task poll
>> on them; or
> Yes this would seem to be the best path.
Nice, that's also the easiest!
So, you're suggestion is not to integrate this with the existing DHCP
client? Well, I'm going to do that anyway. I'll send in the patch and
you can see if it's worthwhile to merge in.
> Can you configure short leases ?
I have no control over the DHCP servers that are used, so no I can't.
Thanks for the info,
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Mind Embedded Development (an Essensium division)
More information about the rtems-users