Skip site navigation (1)Skip section navigation (2)
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 &lt;<a href=3D"mailto:grahamperrin@freebsd.org">grah=
amperrin@freebsd.org</a>&gt; 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>
&gt; 04.08.23 19:07, Graham Perrin =D0=BF=D0=B8=D1=88=D0=B5:<br>
&gt;&gt;<br>
&gt;&gt; Can anyone from freebsd-net@ help?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; -------- Forwarded Message --------<br>
&gt;&gt; Subject:=C2=A0=C2=A0=C2=A0=C2=A0 Unreliability with DHCP<br>
&gt;&gt; Date:=C2=A0=C2=A0=C2=A0=C2=A0 Sun, 30 Jul 2023 16:17:43 +0100<br>
&gt;&gt; From:=C2=A0=C2=A0=C2=A0=C2=A0 Graham Perrin &lt;<a href=3D"mailto:=
grahamperrin@freebsd.org" target=3D"_blank">grahamperrin@freebsd.org</a>&gt=
;<br>
&gt;&gt; Organisation:=C2=A0=C2=A0=C2=A0=C2=A0 FreeBSD<br>
&gt;&gt; To:=C2=A0=C2=A0=C2=A0=C2=A0 FreeBSD CURRENT &lt;<a href=3D"mailto:=
freebsd-current@freebsd.org" target=3D"_blank">freebsd-current@freebsd.org<=
/a>&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; 1. Sleep (suspend) whilst connected to one network<br>
&gt;&gt;<br>
&gt;&gt; 2. connect to a network elsewhere<br>
&gt;&gt;<br>
&gt;&gt; 3. wake (resume).<br>
&gt;&gt;<br>
&gt;&gt; Result:<br>
&gt;&gt;<br>
&gt;&gt; /etc/resolv.conf frequently contains outdated information. In some=
 <br>
&gt;&gt; (maybe all) such cases, the IPv4 inet address is outdated; and so =
on.<br>
&gt;&gt;<br>
&gt;&gt; Which /etc/rc.d/ file(s) should I attempt to fix?<br>
&gt;&gt;<br>
&gt;&gt; I imagine using the resume keyword, which is currently used by onl=
y <br>
&gt;&gt; one script:<br>
&gt;&gt;<br>
&gt;&gt; % rcorder -k resume /etc/rc.d/*<br>
&gt;&gt; /etc/rc.d/ntpd<br>
&gt;&gt; %<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I routinely run the command below to work around the bug (and obse=
rve <br>
&gt;&gt; the states of things) =E2=80=93 run _after_ the bug bites. I&#39;d=
 prefer a fix, <br>
&gt;&gt; to prevent the bites.<br>
&gt;&gt;<br>
&gt;&gt; ls /var/run/resolvconf/interfaces/ ; route delete default ; ifconf=
ig <br>
&gt;&gt; wlan0 down &amp;&amp; ifconfig em0 down &amp;&amp; sleep 5 ; ls <b=
r>
&gt;&gt; /var/run/resolvconf/interfaces/ ; ifconfig em0 up &amp;&amp; sleep=
 15<br>
&gt;&gt; ; ls /var/run/resolvconf/interfaces/ ; cat /etc/resolv.conf ; ping=
 -c <br>
&gt;&gt; 2 -4 <a href=3D"http://freshports.org" rel=3D"noreferrer" target=
=3D"_blank">freshports.org</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; As dirty workaround I have in my /etc/rc.resume<br>
&gt;<br>
&gt; service netif restart<br>
&gt; service routing restart<br>
<br>
<br>
Thanks, I&#39;ll try when I&#39;m next on campus.<br>
<br>
I do know that &#39;service routing restart&#39; can be problematic. Please=
, <br>
see, for example, &lt;<a href=3D"https://pastebin.com/raw/mXmVPruq" rel=3D"=
noreferrer" target=3D"_blank">https://pastebin.com/raw/mXmVPruq</a>&gt;; 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 &quot;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>