Date: Sat, 5 Aug 2023 23:38:14 -0700 From: Kevin Oberman <rkoberman@gmail.com> To: Graham Perrin <grahamperrin@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Re: Fwd: Unreliability with DHCP Message-ID: <CAN6yY1sSuOs_hRZBF1gCua3djfqJhLR5PiTX9Xro1YAY=Nfc8w@mail.gmail.com> In-Reply-To: <753f3990-9903-3718-445c-49fc01f960a7@freebsd.org> References: <62d300c8-2c3e-58fa-334e-23a17962279a@freebsd.org> <e5e80c42-08c3-140b-b53b-a13ffbf01ff7@freebsd.org> <ceac6410-fcff-8020-ecee-e7953eb29078@shurik.kiev.ua> <753f3990-9903-3718-445c-49fc01f960a7@freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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). -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">On Sat, Aug 5, 2023 at 3:16 PM Graham Perrin <<a href="mailto:grahamperrin@freebsd.org">grahamperrin@freebsd.org</a>> wrote:</div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 05/08/2023 12:39, Oleksandr Kryvulia wrote:<br> > 04.08.23 19:07, Graham Perrin пише:<br> >><br> >> Can anyone from freebsd-net@ help?<br> >><br> >><br> >> -------- Forwarded Message --------<br> >> Subject: Unreliability with DHCP<br> >> Date: Sun, 30 Jul 2023 16:17:43 +0100<br> >> From: Graham Perrin <<a href="mailto:grahamperrin@freebsd.org" target="_blank">grahamperrin@freebsd.org</a>><br> >> Organisation: FreeBSD<br> >> To: FreeBSD CURRENT <<a href="mailto:freebsd-current@freebsd.org" target="_blank">freebsd-current@freebsd.org</a>><br> >><br> >><br> >><br> >> 1. Sleep (suspend) whilst connected to one network<br> >><br> >> 2. connect to a network elsewhere<br> >><br> >> 3. wake (resume).<br> >><br> >> Result:<br> >><br> >> /etc/resolv.conf frequently contains outdated information. In some <br> >> (maybe all) such cases, the IPv4 inet address is outdated; and so on.<br> >><br> >> Which /etc/rc.d/ file(s) should I attempt to fix?<br> >><br> >> I imagine using the resume keyword, which is currently used by only <br> >> one script:<br> >><br> >> % rcorder -k resume /etc/rc.d/*<br> >> /etc/rc.d/ntpd<br> >> %<br> >><br> >><br> >> I routinely run the command below to work around the bug (and observe <br> >> the states of things) – run _after_ the bug bites. I'd prefer a fix, <br> >> to prevent the bites.<br> >><br> >> ls /var/run/resolvconf/interfaces/ ; route delete default ; ifconfig <br> >> wlan0 down && ifconfig em0 down && sleep 5 ; ls <br> >> /var/run/resolvconf/interfaces/ ; ifconfig em0 up && sleep 15<br> >> ; ls /var/run/resolvconf/interfaces/ ; cat /etc/resolv.conf ; ping -c <br> >> 2 -4 <a href="http://freshports.org" rel="noreferrer" target="_blank">freshports.org</a><br> >><br> ><br> ><br> > As dirty workaround I have in my /etc/rc.resume<br> ><br> > service netif restart<br> > service routing restart<br> <br> <br> Thanks, I'll try when I'm next on campus.<br> <br> I do know that 'service routing restart' can be problematic. Please, <br> see, for example, <<a href="https://pastebin.com/raw/mXmVPruq" rel="noreferrer" target="_blank">https://pastebin.com/raw/mXmVPruq</a>>; I had something <br> similar a few minutes ago.<br></blockquote><div><span class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small"><br></span></div><div><span class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">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).</span> <br></div></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Kevin Oberman, Part time kid herder and retired Network Engineer<br>E-mail: <a href="mailto:rkoberman@gmail.com" target="_blank">rkoberman@gmail.com</a><br></div><div>PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683</div></div></div></div></div></div></div></div></div>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1sSuOs_hRZBF1gCua3djfqJhLR5PiTX9Xro1YAY=Nfc8w>
