Solved Please help to solve the random network problem

In other words the base dhclient should be started for v4 and isc client for v6, but in the actual script there is:
Stange. Not in mine:
Code:
dice@williscorto:~ % cat /usr/local/sbin/dual-dhclient
#!/bin/sh

# $FreeBSD: head/net/dual-dhclient/files/dual-dhclient 431537 2017-01-15 09:00:18Z cperciva $

# Public domain

/sbin/dhclient "$@"
/usr/local/sbin/dhclient -6 -nw -cf /dev/null "$@"
Code:
dice@williscorto:~ % ps -ax | grep dhclient
  609  -  Is        0:05.24 dhclient: system.syslog (dhclient)
  612  -  Is        0:17.34 dhclient: re0 [priv] (dhclient)
  687  -  ICs       0:10.89 dhclient: re0 (dhclient)
  689  -  Is        0:18.91 /usr/local/sbin/dhclient -6 -nw -cf /dev/null re0
46882  0  S+        0:00.00 grep dhclient
Code:
dice@williscorto:~ % pkg info dual-dhclient
dual-dhclient-1.0_1
Name           : dual-dhclient
Version        : 1.0_1
Installed on   : Sun Feb 14 11:53:45 2021 CET
Origin         : net/dual-dhclient
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : net
Licenses       : PD
Maintainer     : cperciva@FreeBSD.org
WWW            : UNKNOWN
Comment        : Spawns dhclients for a dual-stack network
Annotations    :
        FreeBSD_version: 1300139
        repo_type      : binary
        repository     : dicelan
Flat size      : 478B
Description    :
This port provides a script which spawns both /sbin/dhclient and
/usr/local/sbin/dhclient -6; this simplifies the configuration needed to
run DHCP on both protocols of a dual-stack network.

As this is a relatively small script it's actually included with the port itself:

So, your bug is not caused by the port or package.
 
Stange. Not in mine:
Code:
dice@williscorto:~ % cat /usr/local/sbin/dual-dhclient
#!/bin/sh

# $FreeBSD: head/net/dual-dhclient/files/dual-dhclient 431537 2017-01-15 09:00:18Z cperciva $

# Public domain

/sbin/dhclient "$@"
/usr/local/sbin/dhclient -6 -nw -cf /dev/null "$@"
Code:
dice@williscorto:~ % ps -ax | grep dhclient
  609  -  Is        0:05.24 dhclient: system.syslog (dhclient)
  612  -  Is        0:17.34 dhclient: re0 [priv] (dhclient)
  687  -  ICs       0:10.89 dhclient: re0 (dhclient)
  689  -  Is        0:18.91 /usr/local/sbin/dhclient -6 -nw -cf /dev/null re0
46882  0  S+        0:00.00 grep dhclient
Code:
dice@williscorto:~ % pkg info dual-dhclient
dual-dhclient-1.0_1
Name           : dual-dhclient
Version        : 1.0_1
Installed on   : Sun Feb 14 11:53:45 2021 CET
Origin         : net/dual-dhclient
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : net
Licenses       : PD
Maintainer     : cperciva@FreeBSD.org
WWW            : UNKNOWN
Comment        : Spawns dhclients for a dual-stack network
Annotations    :
        FreeBSD_version: 1300139
        repo_type      : binary
        repository     : dicelan
Flat size      : 478B
Description    :
This port provides a script which spawns both /sbin/dhclient and
/usr/local/sbin/dhclient -6; this simplifies the configuration needed to
run DHCP on both protocols of a dual-stack network.

As this is a relatively small script it's actually included with the port itself:

So, your bug is not caused by the port or package.
Very strange. Never touched it before. How can this be?
 
Did you install this from ports or did you use the FreeBSD packages? If it's built from a port check your local ports tree. You probably edited it at some point because those changes don't appear out of nowhere. That /usr/local/sbin/dual-dhclient script hasn't changed since it was introduced 4-5 years ago. Only that subversion id was removed some time ago.

 
Did you install this from ports or did you use the FreeBSD packages? If it's built from a port check your local ports tree. You probably edited it at some point because those changes don't appear out of nowhere. That /usr/local/sbin/dual-dhclient script hasn't changed since it was introduced 4-5 years ago. Only that subversion id was removed some time ago.

Installed from ports some time ago and did not touch it. Strange. Can try to delete the port and install again.

And on another machine in this network it is all good.
 
Then check your /usr/ports/net/dual-dhclient/files/dual-dhclient. Do you use git to update your ports tree? Or something else?
Looked into this file and it is good on both machines. One base machine I am using portsnap and on another the gitup but I can see now that the file is good.
 
If your port is fine then your installed /usr/local/sbin/dual-dhclient was edited after you installed the port.
 
Might be worthwhile to compare the timestamps of /usr/local/sbin/dual-dhclient with the timestamp from pkg info dual-dhclient. If the timestamp on the actual file is newer then it must have been modified after you installed the port.

Code:
root@williscorto:~ # pkg info dual-dhclient
dual-dhclient-1.0_1
Name           : dual-dhclient
Version        : 1.0_1
Installed on   : Sun Feb 14 11:53:45 2021 CET
Origin         : net/dual-dhclient
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : net
Licenses       : PD
Maintainer     : cperciva@FreeBSD.org
WWW            : UNKNOWN
Comment        : Spawns dhclients for a dual-stack network
Annotations    :
        FreeBSD_version: 1300139
        repo_type      : binary
        repository     : dicelan
Flat size      : 478B
Description    :
This port provides a script which spawns both /sbin/dhclient and
/usr/local/sbin/dhclient -6; this simplifies the configuration needed to
run DHCP on both protocols of a dual-stack network.
root@williscorto:~ # ll /usr/local/sbin/dual-dhclient
-r-xr-xr-x  1 root  wheel  194 Feb 11  2021 /usr/local/sbin/dual-dhclient*
 
Might be worthwhile to compare the timestamps of /usr/local/sbin/dual-dhclient with the timestamp from pkg info dual-dhclient. If the timestamp on the actual file is newer then it must have been modified after you installed the port.
It is gone now because I reinstalled the port. The only assumption is that perhaps it was from some earlier times.
 
If the exact same version on a different host works - Sometimes a recompile/reinstall of the problematic copy might be worth a try.
There is nothing to recompile. This is just a very simple shell script. Reinstalled and it is good now. Just wondering how that script could be wrong because I can swear that I did not edit it manually.

But the problem is now solved. Another question is why the net/isc-dhcp44-client is not working properly with IPv4?
 
There is nothing to recompile. This is just a very simple shell script. Reinstalled and it is good now. Just wondering how that script could be wrong because I can swear that I did not edit it manually.

But the problem is now solved. Another question is why the net/isc-dhcp44-client is not working properly with IPv4?
Why do you have so many ports for the DHCP client installed, anyway? net/dual-dhclient and net/isc-dhcp44-client are two that I noticed mentioned in this thread. I thought that 13-RELEASE has some kind of DHCP client included in the base, and it supports both IPv4 and IPv6... no need to install extra stuff from ports.
 
I thought that 13-RELEASE has some kind of DHCP client included in the base, and it supports both IPv4 and IPv6...
dhclient(8) from the base only supports IPv4 unfortunately. IPv6 SLAAC works, but there's no DHCPv6 client in the base. Oh, that reminds me, this might be something to put on that list for future development.

Edit: someone already seemed to have mentioned it. https://wiki.freebsd.org/2021FoundationCFI
 
There was some discussion on these forums in the past that DHCPv6 is actually unnecessary, that IPv6 SLAAC (Stateless router solicitation) is all you really need on a host to receive a dynamically assigned IPv6 address. Sounds like OP's router is OK for IPv6.
 
that IPv6 SLAAC (Stateless router solicitation) is all you really need on a host to receive a dynamically assigned IPv6 address.
Yes, but for other things DHCP is more useful because it can do more than just serve your host with an IP address. Think timeservers, domain configuration, thin client (PXE/network boot) etc.
 
Yes, but for other things DHCP is more useful because it can do more than just serve your host with an IP address. Think timeservers, domain configuration, thin client (PXE/network boot) etc.
For all of that, I would think that one would first get an IPv6 address via SLAAC, and then the related daemons do what needs to be done. We do seem to expect too much of DHCP.
 
There was some discussion on these forums in the past that DHCPv6 is actually unnecessary, that IPv6 SLAAC (Stateless router solicitation) is all you really need on a host to receive a dynamically assigned IPv6 address. Sounds like OP's router is OK for IPv6.
I am using DHCP for assigning fixed addresses from one point of configuration - router.

BTW I have the similar v4 setup on the server with Bhyve clients - a dhcp server which gives out fixed leases based on MAC-s of the vm-s. I find this setup convenient. Rather than manually configuring the fixed addresses, I have a single point where to configure all the addresses in the network.
 
Back
Top