Comment 53 for bug 2065037

Revision history for this message
Stefano (luckylinux777) wrote (last edit ):

Now I just tried with `dhclient` on my Main Workstation to check the time it takes "from scratch" to bring up and get an IP from DHCP on eno1.

Keep in mind that the "path" to the Router/Gateway (OPNSense Router: 192.168.1.7 master and 192.168.1.8 slave, or 192.168.1.1 Virtual IP) is much longer (there are like 3 extra Switches in between).

EDIT 1: I also tested directly on the Secondary Laptop, there is not a significant time difference. If anything, it is actually slower to bring up Interfaces (possibly due to much weaker CPU).

```
root@HOST:/# ifconfig eno1 0.0.0.0
root@HOST:/# ifconfig
# Only eno1 shown here
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet6 fe80::ec4:7aff:fe79:2d9a prefixlen 64 scopeid 0x20<link>
        ether 0c:c4:7a:79:2d:9a txqueuelen 1000 (Ethernet)
        RX packets 56621 bytes 56090624 (56.0 MB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 20888 bytes 2885632 (2.8 MB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
        device memory 0xf7300000-f737ffff
root@HOST:/# ifconfig eno1 down
root@HOST:/# ls -l /var/lib/dhcp/dhclient.*
-rw-r--r-- 1 root root 894 May 9 08:47 /var/lib/dhcp/dhclient.eno1.leases
-rw-r--r-- 1 root root 1552 Feb 20 2022 /var/lib/dhcp/dhclient.eno2.leases
-rw-r--r-- 1 root root 5567 May 6 14:12 /var/lib/dhcp/dhclient.leases
-rw-r--r-- 1 root root 58 Mar 11 18:23 /var/lib/dhcp/dhclient.vmbr0.200.leases
-rw-r--r-- 1 root root 1022 Mar 11 18:23 /var/lib/dhcp/dhclient.vmbr0.leases
-rw-r--r-- 1 root root 641 Mar 9 2022 /var/lib/dhcp/dhclient.wlx00c0ca961be5.leases
root@HOST:/# rm /var/lib/dhcp/dhclient.*
root@HOST:/# date +"%Y%m%d-%H%M%S"; time dhclient -v; date +"%Y%m%d-%H%M%S";
20240509-085910
Internet Systems Consortium DHCP Client 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
Listening on LPF/virbr0/52:54:00:a2:62:15
Sending on LPF/virbr0/52:54:00:a2:62:15
Listening on LPF/eno2/0c:c4:7a:79:2d:9b
Sending on LPF/eno2/0c:c4:7a:79:2d:9b
Listening on LPF/eno1/0c:c4:7a:79:2d:9a
Sending on LPF/eno1/0c:c4:7a:79:2d:9a
Sending on Socket/fallback
xid: warning: no netdev with useable HWADDR found for seed's uniqueness enforcement
xid: rand init seed (0x6643753e) built using gethostid
DHCPDISCOVER on virbr0 to 255.255.255.255 port 67 interval 3 (xid=0x375da74)
DHCPDISCOVER on eno2 to 255.255.255.255 port 67 interval 3 (xid=0xc0acb6b)
DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 3 (xid=0xc119e63d)
DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 7 (xid=0xc119e63d)
DHCPDISCOVER on virbr0 to 255.255.255.255 port 67 interval 6 (xid=0x375da74)
DHCPDISCOVER on eno2 to 255.255.255.255 port 67 interval 4 (xid=0xc0acb6b)
DHCPDISCOVER on eno2 to 255.255.255.255 port 67 interval 8 (xid=0xc0acb6b)
DHCPDISCOVER on virbr0 to 255.255.255.255 port 67 interval 7 (xid=0x375da74)
DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 8 (xid=0xc119e63d)
DHCPOFFER of 192.168.15.223 from 192.168.1.7
DHCPREQUEST for 192.168.15.223 on eno1 to 255.255.255.255 port 67 (xid=0x3de619c1)
DHCPACK of 192.168.15.223 from 192.168.1.7 (xid=0xc119e63d)
bound to 192.168.15.223 -- renewal in 249 seconds.

real 0m10,792s
user 0m0,000s
sys 0m0,002s
20240509-085921
```

Targeting the interface explicitly i.e. `dhclient -v eno1` didn't change the timing of the first attempt much, went only from ~10s to ~7-9s:
```
root@HOST:/# rm /var/lib/dhcp/dhclient.*
root@HOST:/# ifconfig eno1 0.0.0.0
root@HOST:/# ifconfig eno1 down
root@HOST:/# date +"%Y%m%d-%H%M%S"; time dhclient -v eno1; date +"%Y%m%d-%H%M%S";
20240509-091017
Internet Systems Consortium DHCP Client 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eno1/0c:c4:7a:79:2d:9a
Sending on LPF/eno1/0c:c4:7a:79:2d:9a
Sending on Socket/fallback
xid: warning: no netdev with useable HWADDR found for seed's uniqueness enforcement
xid: rand init seed (0x664377d9) built using gethostid
DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 3 (xid=0x9fddd939)
DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 5 (xid=0x9fddd939)
DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 9 (xid=0x9fddd939)
DHCPOFFER of 192.168.13.107 from 192.168.1.8
DHCPREQUEST for 192.168.13.107 on eno1 to 255.255.255.255 port 67 (xid=0x39d9dd9f)
DHCPACK of 192.168.13.107 from 192.168.1.7 (xid=0x9fddd939)
Error: ipv4: Address already assigned.
bound to 192.168.13.107 -- renewal in 1651 seconds.

real 0m7,970s
user 0m0,001s
sys 0m0,000s
20240509-091025

```

If the Interface is already up but the lease file is removed (and the Interface got its IP Address unassigned):
```
root@HOST:/# rm /var/lib/dhcp/dhclient.*
root@HOST:/# ifconfig eno1 0.0.0.0
root@HOST:/# date +"%Y%m%d-%H%M%S"; time dhclient -v; date +"%Y%m%d-%H%M%S";
20240509-090345
Internet Systems Consortium DHCP Client 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
Listening on LPF/virbr0/52:54:00:a2:62:15
Sending on LPF/virbr0/52:54:00:a2:62:15
Listening on LPF/eno2/0c:c4:7a:79:2d:9b
Sending on LPF/eno2/0c:c4:7a:79:2d:9b
Listening on LPF/eno1/0c:c4:7a:79:2d:9a
Sending on LPF/eno1/0c:c4:7a:79:2d:9a
Sending on Socket/fallback
xid: warning: no netdev with useable HWADDR found for seed's uniqueness enforcement
xid: rand init seed (0x66437451) built using gethostid
DHCPDISCOVER on virbr0 to 255.255.255.255 port 67 interval 3 (xid=0x67a6fc7c)
DHCPDISCOVER on eno2 to 255.255.255.255 port 67 interval 3 (xid=0x95c50e)
DHCPDISCOVER on eno1 to 255.255.255.255 port 67 interval 3 (xid=0xccdbf90e)
DHCPOFFER of 192.168.13.107 from 192.168.1.8
DHCPREQUEST for 192.168.13.107 on eno1 to 255.255.255.255 port 67 (xid=0xef9dbcc)
DHCPACK of 192.168.13.107 from 192.168.1.8 (xid=0xccdbf90e)
bound to 192.168.13.107 -- renewal in 291 seconds.

real 0m1,191s
user 0m0,000s
sys 0m0,001s
20240509-090346

```