Re: Fwd: Unreliability with DHCP

From: Graham Perrin <grahamperrin_at_gmail.com>
Date: Thu, 17 Aug 2023 18:07:06 UTC
On 06/08/2023 17:05, Warner Losh wrote:

> On Sun, Aug 6, 2023 at 12:38 AM Kevin Oberman <rkoberman@gmail.com> wrote:
>
>     On Sat, Aug 5, 2023 at 3:16 PM Graham Perrin
>     <grahamperrin@freebsd.org> wrote:
>
>         On 05/08/2023 12:39, Oleksandr Kryvulia wrote:
>
>         > …
>         >
>         > As dirty workaround I have in my /etc/rc.resume
>         >
>         > service netif restart
>         > service routing restart
>
>         Thanks, I'll try when I'm next on campus.
>
>         I do know that 'service routing restart' can be problematic.
>         Please,
>         see, for example, <https://pastebin.com/raw/mXmVPruq>; I had
>         something
>         similar a few minutes ago.
>
>
>     My usual solution is "service netif restart wlan0" (or the
>     interface you are using). It should restart the interface, if
>     rc.conf calls for it, dhcpclient and wpa_supplicant (if appropriate).
>
>
> I'll have to remember that. I've been removing and reinsterting my usb 
> dongle when when dhclient fails.
> I'd like to move to the internal wlan card, but the driver support has 
> some show-stopper issues with
> suspend/resume for me more basic than dhclient... However, once those 
> are resolved, I'd need a way to
> workaround the dhclient bug.
>
> Anybody have a clue why this is needed?
>
> Warner


I have no clue, however if such needs are commonplace then maybe someone 
who's network-savvy can make a bug report. There's been tumbleweed, over 
the years, whenever I've tried to make things reliable for myself.

Warner, I'll be interested to know whether what's below (also) works 
around things for you. Assuming ue0.

route delete default ; ifconfig ue0 down && sleep 5 ; ifconfig ue0 up && 
sleep 15 ; ls /var/run/resolvconf/interfaces/ ; cat /etc/resolv.conf ; 
ping -c 2 -4 freshports.org