Re: Alternatives to ISC dhcp-client ?

2022-06-03 Thread Kamil Jońca
john doe  writes:

[...]
>>
>
> You might be better off asking this on the appropriate mailing list! :)

I asked:
https://lists.freedesktop.org/archives/systemd-devel/2022-May/047889.html

My impressions:
1. Scripts called by dhcp client are "BAD THING" (according to systemd
developers) - and systemd-networkd will not handle it
2. systemd-networkd lacks of some functionality I need, and I doubt it
will have (bridge without interfaces, partial nat and so on)

So for now I will use isc-dhcp-client until it will be impossible.

KJ

-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html



Re: Alternatives to ISC dhcp-client ?

2022-05-09 Thread Anssi Saari
Dan Ritter  writes:

> The package name is udhcpc.

Yes, and it's very cool. Well, poorly documented so it was a little hard
to understand. Mostly my problem was the script it wants to run for
various events and how to fix that to do the stuff I need and not do
stuff that messes up my network setup.

But in my case udhcpc seems to be the only DHCP client that will talk to
the LTE module in my router, others just balk and whine.



Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread Vincent Lefevre
On 2022-05-08 11:19:33 +0800, Jeremy Ardley wrote:
> Of note: Using systemd-networkd you should not use NetworkManager or
> networking services. I think both use the ISC dhcp client

And what about NetworkManager users?

Note: it has its own internal DHCP client, but it is not robust on
buggy networks:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933930

And the dhclient hooks are not run:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=966618

So I don't use it.

In particular, in my /etc/dhcp/dhclient.conf isc-dhcp-client
configuration file, I have

  prepend domain-name-servers 127.0.0.1;

to be able to use the local nameserver preferably (the nameservers
provided by the DHCP server are still needed on networks that
filter UDP).

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread john doe

On 5/8/2022 6:33 PM, Kamil Jońca wrote:

Kamil Jońca  writes:

[...]


But systemd-networkd also has a huge number of configuration options
that may do what you want anyway

https://www.freedesktop.org/software/systemd/man/systemd.network.html


Hm. Can you create bridge without ports with systemd-networkd?
i.e.



Another question. Can I pass option during interface up/down?
For example, in my if-up*/if-down* scripts I have code for replacing (or
not!) default route when needed.[1]

Then I can execute something like:

--8<---cut here---start->8---
ifup wlan0 -o replacedefaultroute=on
--8<---cut here---end--->8---

how I can achieve this with networkctl (or other systemd tool)?

Moreover https://gitlab.com/craftyguy/networkd-dispatcher/-/issues/61
So my migration probes are not very promising :/

I take into account that I have some habits and some thing should be
done completely different way[2]. But for now I even don't know if some
things can be achieved.



You might be better off asking this on the appropriate mailing list! :)

--
John Doe



Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread Kamil Jońca
Kamil Jońca  writes:

[...]
>>
>> But systemd-networkd also has a huge number of configuration options
>> that may do what you want anyway
>>
>> https://www.freedesktop.org/software/systemd/man/systemd.network.html
>
> Hm. Can you create bridge without ports with systemd-networkd?
> i.e.
>

Another question. Can I pass option during interface up/down?
For example, in my if-up*/if-down* scripts I have code for replacing (or
not!) default route when needed.[1]

Then I can execute something like:

--8<---cut here---start->8---
ifup wlan0 -o replacedefaultroute=on
--8<---cut here---end--->8---

how I can achieve this with networkctl (or other systemd tool)?

Moreover https://gitlab.com/craftyguy/networkd-dispatcher/-/issues/61
So my migration probes are not very promising :/

I take into account that I have some habits and some thing should be
done completely different way[2]. But for now I even don't know if some
things can be achieved. 

KJ
[1]
in man systemd.network
I found
--8<---cut here---start->8---
[DHCPV4]
UseRoutes=
--8<---cut here---end--->8---
but I am not sure if this is about default routes or only classless
static routes

[2] - I had to spent some time to "properly" translate my iptables
rules/scripts to nftables ones (using sets and maps instead simple
iptables -I ... nad iptables -D ... command). 


-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html



Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread Michael Stone

On Sun, May 08, 2022 at 04:09:27PM +0200, Oliver Schoede wrote:

Alternatively there's dhcpcd5,


Be careful with this one unless you have a simple network 
configuration--by default it will attempt to get addresses on all 
interfaces that don't have them, not only ones you set to dhcp in 
/etc/network/interfaces




Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread Oliver Schoede
On Sun, 8 May 2022 09:20:25 -0400
Dan Ritter  wrote:

> Stefan Monnier wrote: 
> > Rick Thomas [2022-05-07 19:47:57] wrote:
> > > According to the ISC webpage:
> > >> ISC has ended development on the ISC DHCP client as of early
> > >> 2022. This client implementation is no longer maintained and
> > >> should not be used in production any longer.
> > > Can anybody recommend a good replacement?
> > 
> > Depends on your needs, but `busybox` provides a dhcp client that's
> > good enough for the most common situations.
> 
> 
> The package name is udhcpc.
> 
> -dsr-
> 

Right, it's not (yet?) tagged for provides/dhcp-client but at home
would probably do the trick for me, too. Alternatively there's dhcpcd5,
which is tagged and also specifically mentioned on the ISC's eom-page,
though apparently a much broader solution. I'll be using the
legacy one until it's actually removed from Debian and then switch to
whatever is recommended, if anything and provided it's not networkd.

Oliver


https://roy.marples.name/projects/dhcpcd



Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread Dan Ritter
Stefan Monnier wrote: 
> Rick Thomas [2022-05-07 19:47:57] wrote:
> > According to the ISC webpage:
> >> ISC has ended development on the ISC DHCP client as of early 2022.
> >> This client implementation is no longer maintained and should not be
> >> used in production any longer.
> > Can anybody recommend a good replacement?
> 
> Depends on your needs, but `busybox` provides a dhcp client that's good
> enough for the most common situations.


The package name is udhcpc.

-dsr-



Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread The Wanderer
On 2022-05-08 at 07:06, Rick Thomas wrote:

> On Sat, May 7, 2022, at 7:47 PM, Rick Thomas wrote:
> 
>> According to the ISC webpage:
>> 
>>> ISC has ended development on the ISC DHCP client as of early
>>> 2022. This client implementation is no longer maintained and
>>> should not be used in production any longer.
>> 
>> Can anybody recommend a good replacement? Does anybody know what
>> the Debian PTBs are planning for this?
>> 
>> Thanks! Rick
> 
> Does anybody know what the Debian developers plan to do about this
> change of policy by ISC?  I have a feeling it's going to be a problem
> that will have to be faced reasonably soon.

I remember reading a discussion on debian-devel recent-ish-ly which
could be relevant. I haven't reviewed it in detail at the moment, but I
think

https://lists.debian.org/debian-devel/2021/09/msg00407.html

would be a good starting point for anyone who does want to review it.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread Rick Thomas
On Sat, May 7, 2022, at 7:47 PM, Rick Thomas wrote:
> According to the ISC webpage:
>
>> ISC has ended development on the ISC DHCP client as of early 2022.
>> This client implementation is no longer maintained and should not be
>> used in production any longer.
>
> Can anybody recommend a good replacement?
> Does anybody know what the Debian PTBs are planning for this?
>
> Thanks!
> Rick

Does anybody know what the Debian developers plan to do about this change of 
policy by ISC?  I have a feeling it's going to be a problem that will have to 
be faced reasonably soon.

Rick



Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread Kamil Jońca
Jeremy Ardley  writes:

> On 8/5/22 3:19 pm, Kamil Jońca wrote:
>> I cannot see if systemd-networkd can run scripts[1] after change in
>> lease. Am I missing something?
>>
> The top answer below is a partial answer to your question.
>
> https://unix.stackexchange.com/questions/469716/systemd-networkd-run-script-after-dhcp-client-aqcuires-new-address

You mean:

"I couldn't get networkd-dispatcher to respond to dhcp changes on Ubuntu
Server 20.04, but[...] " :) ?

Yes. I know that this is two year old, but I did not found anything
newer with answer.


>
> But systemd-networkd also has a huge number of configuration options
> that may do what you want anyway
>
> https://www.freedesktop.org/software/systemd/man/systemd.network.html

Hm. Can you create bridge without ports with systemd-networkd?
i.e.

--8<---cut here---start->8---
iface qemu inet static
dns-search myquemudomain
address 192.168.1.1
netmask 255.255.255.0
bridge_ports none #part which I was not able to achieve
--8<---cut here---end--->8---


I still have situation described in
https://lists.debian.org/debian-user/2022/02/msg00118.html

I simply try to look for migration, but it seems that most of testing I
will have to do by myself. 

KJ

-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html



Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread Jeremy Ardley


On 8/5/22 2:27 pm, Rick Thomas wrote:

Thanks!
Rick
PS:  I'll also do the IPv6 part, because I'm interested in that too.



One word of caution moving away from ISC dhcp client is that any 
possibility of it being started by the networking daemon will result in 
very bad behaviour if you have any left-over lease files - whether or 
not you have dhcp set in your /etc/network.interfaces file


In that case, the dhcp server will be spammed many times a second by 
dhclient.


I'll amend my blog post to stop the networking service, kill any 
dhclient processes, and then erase any dhclient lease files


rm -f /var/lib/dhcp/dhclient*


--
Jeremy



OpenPGP_signature
Description: OpenPGP digital signature


Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread Jeremy Ardley


On 8/5/22 3:19 pm, Kamil Jońca wrote:

I cannot see if systemd-networkd can run scripts[1] after change in
lease. Am I missing something?


The top answer below is a partial answer to your question.

https://unix.stackexchange.com/questions/469716/systemd-networkd-run-script-after-dhcp-client-aqcuires-new-address

But systemd-networkd also has a huge number of configuration options 
that may do what you want anyway


https://www.freedesktop.org/software/systemd/man/systemd.network.html



--

Jeremy



OpenPGP_signature
Description: OpenPGP digital signature


Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread Kamil Jońca
Jeremy Ardley  writes:

[...]
>
> You can just use systemd-networkd as an IPv4 dhcp client.

I cannot see if systemd-networkd can run scripts[1] after change in
lease. Am I missing something?

KJ
[1] similar to /etc/dhcp/dhclient*hooks.d
-- 
http://wolnelektury.pl/wesprzyj/teraz/



Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread john doe

On 5/8/2022 5:24 AM, Rick Thomas wrote:

On Sat, May 7, 2022, at 8:14 PM, Jeremy Ardley wrote:

On 8/5/22 10:47 am, Rick Thomas wrote:

ISC has ended development on the ISC DHCP client as of early 2022.

This client implementation is no longer maintained and should not be
used in production any longer.

Can anybody recommend a good replacement?



I presently use systemd-networkd which provides its own DHCP v4 and v6
clients, and servers if you want.

In my network my dual homed router acts as a dhcp client to the ISP and
gets an IPv4 address and is delegated an IPv6 /56 range.

You can just use systemd-networkd as an IPv4 dhcp client.
Jeremy


Is systemd-networkd automatically installed by Debian?

I ask because my "testing" and "stable" systems all show isc-dhcp-client as 
installed and running.



For a regular installation of Debian, yes.

--
John Doe



Re: Alternatives to ISC dhcp-client ?

2022-05-08 Thread Rick Thomas



On Sat, May 7, 2022, at 9:37 PM, Jeremy Ardley wrote:
> On 8/5/22 11:27 am, Rick Thomas wrote:
>> Thanks for the heads up!
>> Can you describe in detail what one needs to do in order to switch over?
>> I.e. what to remove, what to install?  What to configure?
>
> This is a recent blogpost of mine showing a more complex installation 
> including IPv6 delegation. If you just do the bits that refer to IPv4 it 
> should still work.
>
> https://jeremyardley.blogspot.com/2022/04/configuring-systemd-networkd-with.html
> Jeremy

Thanks!
Rick
PS:  I'll also do the IPv6 part, because I'm interested in that too.



Re: Alternatives to ISC dhcp-client ?

2022-05-07 Thread Jeremy Ardley


On 8/5/22 11:27 am, Rick Thomas wrote:

Thanks for the heads up!
Can you describe in detail what one needs to do in order to switch over?  I.e. 
what to remove, what to install?  What to configure?





This is a recent blogpost of mine showing a more complex installation 
including IPv6 delegation. If you just do the bits that refer to IPv4 it 
should still work.


https://jeremyardley.blogspot.com/2022/04/configuring-systemd-networkd-with.html

--
Jeremy



OpenPGP_signature
Description: OpenPGP digital signature


Re: Alternatives to ISC dhcp-client ?

2022-05-07 Thread Rick Thomas
On Sat, May 7, 2022, at 8:19 PM, Jeremy Ardley wrote:
> On 8/5/22 11:14 am, Jeremy Ardley wrote:
>>
>>
>> You can just use systemd-networkd as an IPv4 dhcp client.
>>
>>
>
> Of note: Using systemd-networkd you should not use NetworkManager or 
> networking services. I think both use the ISC dhcp client
>
> Of further note, I moved to systemd-networkd precisely because the ISC 
> dhcp client was badly behaved, and no-one at ISC seemed interested in 
> fixing it.

Thanks for the heads up!
Can you describe in detail what one needs to do in order to switch over?  I.e. 
what to remove, what to install?  What to configure?

Thanks!
Rick



Re: Alternatives to ISC dhcp-client ?

2022-05-07 Thread Rick Thomas
On Sat, May 7, 2022, at 8:14 PM, Jeremy Ardley wrote:
> On 8/5/22 10:47 am, Rick Thomas wrote:
>> ISC has ended development on the ISC DHCP client as of early 2022.
>>> This client implementation is no longer maintained and should not be
>>> used in production any longer.
>> Can anybody recommend a good replacement?
>>
>
> I presently use systemd-networkd which provides its own DHCP v4 and v6 
> clients, and servers if you want.
>
> In my network my dual homed router acts as a dhcp client to the ISP and 
> gets an IPv4 address and is delegated an IPv6 /56 range.
>
> You can just use systemd-networkd as an IPv4 dhcp client.
> Jeremy

Is systemd-networkd automatically installed by Debian?

I ask because my "testing" and "stable" systems all show isc-dhcp-client as 
installed and running.

Thanks!
Rick



Re: Alternatives to ISC dhcp-client ?

2022-05-07 Thread Jeremy Ardley


On 8/5/22 11:14 am, Jeremy Ardley wrote:



You can just use systemd-networkd as an IPv4 dhcp client.




Of note: Using systemd-networkd you should not use NetworkManager or 
networking services. I think both use the ISC dhcp client


Of further note, I moved to systemd-networkd precisely because the ISC 
dhcp client was badly behaved, and no-one at ISC seemed interested in 
fixing it.



--
Jeremy



OpenPGP_signature
Description: OpenPGP digital signature


Re: Alternatives to ISC dhcp-client ?

2022-05-07 Thread Jeremy Ardley


On 8/5/22 10:47 am, Rick Thomas wrote:

ISC has ended development on the ISC DHCP client as of early 2022.

This client implementation is no longer maintained and should not be
used in production any longer.

Can anybody recommend a good replacement?



I presently use systemd-networkd which provides its own DHCP v4 and v6 
clients, and servers if you want.


In my network my dual homed router acts as a dhcp client to the ISP and 
gets an IPv4 address and is delegated an IPv6 /56 range.


You can just use systemd-networkd as an IPv4 dhcp client.


--
Jeremy



OpenPGP_signature
Description: OpenPGP digital signature


Alternatives to ISC dhcp-client ?

2022-05-07 Thread Rick Thomas
According to the ISC webpage:

> ISC has ended development on the ISC DHCP client as of early 2022.
> This client implementation is no longer maintained and should not be
> used in production any longer.

Can anybody recommend a good replacement?
Does anybody know what the Debian PTBs are planning for this?

Thanks!
Rick