sargon / ddhcpd

A distributed DHCP Daemon
GNU General Public License v3.0
31 stars 11 forks source link

default gateway not delivered by ddhcp #61

Open christf opened 4 years ago

christf commented 4 years ago

ddhcpd is started with /usr/sbin/ddhcpd -D -s 1 -b 2 -c local-node -i mmfd0 -N 10.139.0.0 17 -o 51 4 0 0 1 44 -o 3 4 10 139 0 1 -o 6 4 10 139 0 1

but default gateway are not assigned to clients. According to tcpdump they are not provided by ddhcpd. Am I missing something?

rubo77 commented 4 years ago

did you install mesh-announce on your gateways? see https://github.com/sargon/gluon-sargon/tree/master/ddhcpd

sargon commented 4 years ago

I wrote the following via Mail back to this Issue, 4 days ago ... seems like that didn't end up here.

Yes you are missing the integration part. Please have a look at [1], which is depending on a respondd extension provided by [2]. These information's are covered by the README [3].

[1] https://github.com/sargon/gluon-sargon/blob/master/ddhcpd/files/usr/sbin/ddhcpd-gateway-update [2] https://github.com/ffnord/mesh-announce [3] https://github.com/sargon/gluon-sargon/blob/master/ddhcpd/README.md#configuration

christf commented 4 years ago

I am not sure we are discussing the same thing. When saying ddhcpd is started with, this is what ps www shows. The dhcp options 3 and 6 are set. However I am not seeing that the gateway is actually delivered to the client.

On another note, the integration you mention introduces a dependency of ddhcpd on batman. This means ddhcpd cannot be used with babel however this is exactly where I want to use ddhcpd. I think is is plain wrong not to deliver a dhcp option to the client when it was specified on the command line. When specified it is the users wish to provide that data. ddhcpd should honor it.

And there should not be any assumptions on the topology of the network or the mesh protocol in use. When topology information is required to configure ddhcpd, a wrapper should handle this that integrates with ddhcpd.

sargon commented 4 years ago

Okay, we are not discussing the same thing here. By default there is no dependency of ddhcpd on any mesh protocol. But as we usually discussion ddhcpd in the context of batman-adv our focus is a prone in that direction ... sry.

But are you using those integration scripts? If so please check, using ddhcpctl, if the option is in the option set used.

christf commented 4 years ago

I see -o 3 and -o 6 in the output of ps www|grep ddhcp. Ddhcpd is configured to send default gateway and dns - and I cannot see the presence of these dhcp options in the tcpdump on the client end.

sargon commented 4 years ago

The option given to ddhcpd by cmdline is only the starting point. The dhcp option store can be manipulated during runtime. Therefore could you please check the state of the dhcp options set with ddhcpctl.

sargon commented 4 years ago

I extracted the batman-adv related integration scripts into an own package. This should solve your problem.