A
A
Alexander2014-01-06 03:11:04
FreeBSD
Alexander, 2014-01-06 03:11:04

FreeBSD. How to set dhclient to infinite number of attempts to get an ip address?

For a long time I noticed strange glitches with the Internet on the server under FreeBSD. The provider issues an ip-address via DHCP, and you need to re-obtain the address at least once a day, that is, the option to register statically is not suitable.
For the sake of experiment, I installed FreeBSD in VitualBox'e, the network interface received an ip-address via DHCP. Then I turned off the DHCP server in order to see what would happen. DHCLIENT sent the 4th unicast request to the ip-address of the dhcp server, then the 8th request broadcast and that's it. There is a dhclient in the processes, but I didn’t see more attempts to get an ip-address after half an hour with tcpdump.
I have read man dhclient.conf(5) but it is either bad or indeed there is no way to tell the dhclient process not to stop trying to get an ip address.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
pr0l, 2014-01-06
@savio

make it easier, write a script to restart the dhcp client and run it in kroner every 5-10 minutes, while the record of your poppy + Ip hangs on the server, the server will receive the old ip, otherwise the new one. well, or a script with checking what Ip address is on the interface, if 0,0,0,0 then send a dhcp restart to the client.

S
Sergey, 2014-01-06
@edinorog

0_o fuck it's a problem. This is how crooked hands the provider should have that in a given interval the fryakha does not receive a lease extension from the dhcp server.

A
Alexander, 2014-01-06
@savio

no, pr normal. a situation is considered when, for those reasons, there is no network, and the lease of the ip-address expires / has expired. Later, the network is restored, and the server remains without the Internet

A
Alexander, 2014-01-07
@savio

thanks for the idea! I wrote the script, I'm testing it...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question