Originally posted by RSpliet
View Post
Announcement
Collapse
No announcement yet.
Systemd Is Working Towards Its Own Super Fast DHCP Server, Client
Collapse
X
-
-
Originally posted by RSpliet View PostWell, this sounds like quite an important implementation detail to me. Could you clear up the design a bit please? In particular: What happens if the non-forked-off library hits a nullptr-deref... will it kill PID 1? How much of your system do you need to update to do a bugfix in the library? As what user is networkd (and NetworkManager, for that matter) ran, and what are the consequences of "popping a shell" by exploiting a bug in it?
Currently the library only has one user, which is networkd itself, and it is in fact not shipped as a stand-alone library yet, but just compiled-in to networkd. So as things are now, if there is a bug in the library, networkd will have to be updated.
NetworkManager is run as root (as is most system daemons for that matter). networkd is also run as root, but with quite restricted capabilities. Exploiting a bug in a system-daemon is generally a bad thing, and this is no different with networkd. We are trying to limit the potential damage by dropping capabilities, but it still would be pretty bad... (nothing specific to networkd though).
Comment
-
Originally posted by tomegun View PostI understand the confusion, a bit of context is required to make sense of this You almost certainly already have a DHCP client as part of your boot process. It is probably being forked off as a separate daemon from whatever configures your network (maybe NetworkManager?). networkd is a network management daemon shipped with systemd, which can manage some types of basic networks. Including configuring DHCP. We don't fork off a daemon though, we do this via a library inside the networkd process itself (but that's an implementation detail). So from a users point of view configuring DHCP via networkd or networkmanager is not so different. They are both separate daemons started by PID1 at boot.
As to the server, there are cases where a network managment daemon may need to hand out dhcp leases. I'm not thinking of big DHCP servers like in your router or at your ISP, use special-purpose DHCP servers for that. If you have a peer-to-peer connection one side may want to hand out a dhcp lease to the other (wifi direct does this for instance), or if you do network sharing, you may want to connect your phone to the internet over 3G, set up a hotpot and hand out DHCP leases on that. The user-case I have in mind though, is to hand out DHCP leases to containers as they are started on your machine.
as for server, i'm still struggling to understand what difference it is from starting dhcpd as 1st service you start after networkd. simply, because your machine that would start it, should never depend on it anyway. but, as far as any other scenario goes i fail to see it. containers could simply depend on dhcpd and systemd by default takes care that they don't start until all is prepared. why otherwise making dependency tree if you plan to hardcode it in the 1st place by stucking everything in your project.
Comment
-
Originally posted by newwen View PostI don't know such times how can be possible without violating any stardard. I thought clients have to send some ARP probes during a few seconds when they get a lease to avoid possible IP collisions.All opinions are my own not those of my employer if you know who they are.
Comment
-
Originally posted by newwen View PostI don't know such times how can be possible without violating any stardard. I thought clients have to send some ARP probes during a few seconds when they get a lease to avoid possible IP collisions.
Comment
-
Originally posted by newwen View PostI don't know such times how can be possible without violating any stardard. I thought clients have to send some ARP probes during a few seconds when they get a lease to avoid possible IP collisions.
Nobody using Windows has such an issue, so I assume that their dhcp client does exactly what you mention.
RFC2131 states that the server _should_ check for IP conflicts. So, looks like this responsibility belongs to the server, not the client. Though it appears that Windows has it the other way around.
Comment
-
Originally posted by Luke_Wolf View PostBut this does raise a question, is this DHCPclient going to be ported over to networkmanager?
Comment
-
Originally posted by DeeK View PostI get IP collisions using the ISC dhcp client. Colliding, of course, with idiots in the office that statically assign an IP in the dhcp range. It happens very occasionally, but still happens.
Nobody using Windows has such an issue, so I assume that their dhcp client does exactly what you mention.
RFC2131 states that the server _should_ check for IP conflicts. So, looks like this responsibility belongs to the server, not the client. Though it appears that Windows has it the other way around.
RFC5227 tells how this must be done using ARP probes. According to that it would take 7seconds after the lease is obtained to check that there's no conflictLast edited by newwen; 02 April 2014, 09:45 PM.
Comment
-
Originally posted by newwen View PostI don't know such times how can be possible without violating any stardard. I thought clients have to send some ARP probes during a few seconds when they get a lease to avoid possible IP collisions.
There are cases where these features may be needed, so we will probably add them eventually. But in most cases they are not needed, and in the standard they are optional, so we'll almost certainly leave them as opt-in.
Comment
Comment