Is there a reason to keep dhcpcd running after an Internet connection is established? - Re: Systemd service life cycle

Karl Auer kauer at biplane.com.au
Wed Apr 13 22:44:53 UTC 2016


On Wed, 2016-04-13 at 20:13 +0200, Ralf Mardorf wrote:
> I noticed something very funny. If dhcpcd isn't running, I still have
> an Internet connection.

DHCP gets you an IP address. The IP address is "leased" to you for a
certain period of time. It could be minutes, could be hours, could be
months. Starting about two-thirds of the way through the lease period,
DHCP begins negotioting to let you keep the IP address for a further
period. If DHCP can't negotiate an address - the same one, or if that
fails, ANY address - then it will remove the address from the interface
and you have no IP address. Most DHCP clients will also remove the
address from the interface when they shut down, unless they are told
not to.

Except for obtaining the address at the start of the period and
renegotiating for it periodically thereafter, DHCP plays no part in you
ractual use of the address.

If you keep using an address beyond the end of the current lease
period, but without renewing it, your results will vary. t might work
for a while, but eventually it will be blocked or (worse) reallocated
to someone else.

> At this point I disconnected the rooter from the mains

"router" not "rooter".

BTW most DHCP servers will try very hard to make sure you always get
the same address. They don't guarantee it unless you have arranged for
a static IP address, but they do try. Some misguided ISPs force a
regular address change; you should avoid such ISPs.

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B
Old fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4







More information about the ubuntu-users mailing list