Re: Fwd: Unreliability with DHCP
- Reply: Graham Perrin : "Re: Fwd: Unreliability with DHCP"
- In reply to: Kevin Oberman : "Re: Fwd: Unreliability with DHCP"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 06 Aug 2023 16:05:59 UTC
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: >> > 04.08.23 19:07, Graham Perrin пише: >> >> >> >> Can anyone from freebsd-net@ help? >> >> >> >> >> >> -------- Forwarded Message -------- >> >> Subject: Unreliability with DHCP >> >> Date: Sun, 30 Jul 2023 16:17:43 +0100 >> >> From: Graham Perrin <grahamperrin@freebsd.org> >> >> Organisation: FreeBSD >> >> To: FreeBSD CURRENT <freebsd-current@freebsd.org> >> >> >> >> >> >> >> >> 1. Sleep (suspend) whilst connected to one network >> >> >> >> 2. connect to a network elsewhere >> >> >> >> 3. wake (resume). >> >> >> >> Result: >> >> >> >> /etc/resolv.conf frequently contains outdated information. In some >> >> (maybe all) such cases, the IPv4 inet address is outdated; and so on. >> >> >> >> Which /etc/rc.d/ file(s) should I attempt to fix? >> >> >> >> I imagine using the resume keyword, which is currently used by only >> >> one script: >> >> >> >> % rcorder -k resume /etc/rc.d/* >> >> /etc/rc.d/ntpd >> >> % >> >> >> >> >> >> I routinely run the command below to work around the bug (and observe >> >> the states of things) – run _after_ the bug bites. I'd prefer a fix, >> >> to prevent the bites. >> >> >> >> ls /var/run/resolvconf/interfaces/ ; route delete default ; ifconfig >> >> wlan0 down && ifconfig em0 down && sleep 5 ; ls >> >> /var/run/resolvconf/interfaces/ ; ifconfig em0 up && sleep 15 >> >> ; ls /var/run/resolvconf/interfaces/ ; cat /etc/resolv.conf ; ping -c >> >> 2 -4 freshports.org >> >> >> > >> > >> > 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