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>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000ce5edb06023b6008 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Aug 5, 2023 at 3:16=E2=80=AFPM Graham Perrin <grahamperrin@freebsd.= org> wrote: > On 05/08/2023 12:39, Oleksandr Kryvulia wrote: > > 04.08.23 19:07, Graham Perrin =D0=BF=D0=B8=D1=88=D0=B5: > >> > >> 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) =E2=80=93 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). --=20 Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 --000000000000ce5edb06023b6008 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon= t-family:tahoma,sans-serif;font-size:small">On Sat, Aug 5, 2023 at 3:16=E2= =80=AFPM Graham Perrin <<a href=3D"mailto:grahamperrin@freebsd.org">grah= amperrin@freebsd.org</a>> wrote:</div></div><div class=3D"gmail_quote"><= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">On 05/08/2023 12:39, Oleks= andr Kryvulia wrote:<br> > 04.08.23 19:07, Graham Perrin =D0=BF=D0=B8=D1=88=D0=B5:<br> >><br> >> Can anyone from freebsd-net@ help?<br> >><br> >><br> >> -------- Forwarded Message --------<br> >> Subject:=C2=A0=C2=A0=C2=A0=C2=A0 Unreliability with DHCP<br> >> Date:=C2=A0=C2=A0=C2=A0=C2=A0 Sun, 30 Jul 2023 16:17:43 +0100<br> >> From:=C2=A0=C2=A0=C2=A0=C2=A0 Graham Perrin <<a href=3D"mailto:= grahamperrin@freebsd.org" target=3D"_blank">grahamperrin@freebsd.org</a>>= ;<br> >> Organisation:=C2=A0=C2=A0=C2=A0=C2=A0 FreeBSD<br> >> To:=C2=A0=C2=A0=C2=A0=C2=A0 FreeBSD CURRENT <<a href=3D"mailto:= freebsd-current@freebsd.org" target=3D"_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 onl= y <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 obse= rve <br> >> the states of things) =E2=80=93 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 ; ifconf= ig <br> >> wlan0 down && ifconfig em0 down && sleep 5 ; ls <b= r> >> /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=3D"http://freshports.org" rel=3D"noreferrer" target= =3D"_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=3D"https://pastebin.com/raw/mXmVPruq" rel=3D"= noreferrer" target=3D"_blank">https://pastebin.com/raw/mXmVPruq</a>>; I = had something <br> similar a few minutes ago.<br></blockquote><div><span class=3D"gmail_defaul= t" style=3D"font-family:tahoma,sans-serif;font-size:small"><br></span></div= ><div><span class=3D"gmail_default" style=3D"font-family:tahoma,sans-serif;= font-size:small">My usual solution is "service netif restart wlan0&quo= t; (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=3D"gmail_signature_prefix">-- </span><br><div d= ir=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"= ><div><div dir=3D"ltr"><div><div dir=3D"ltr">Kevin Oberman, Part time kid h= erder and retired Network Engineer<br>E-mail: <a href=3D"mailto:rkoberman@g= mail.com" target=3D"_blank">rkoberman@gmail.com</a><br></div><div>PGP Finge= rprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683</div></div></div></div></d= iv></div></div></div></div> --000000000000ce5edb06023b6008--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1sSuOs_hRZBF1gCua3djfqJhLR5PiTX9Xro1YAY=Nfc8w>