Date: Tue, 13 Aug 2024 09:15:05 -0700 From: Bakul Shah <bakul@iitbombay.org> To: Alex Arslan <ararslan@comcast.net> Cc: "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Diagnosing virtual machine network issues Message-ID: <C2D17751-17A9-4429-91ED-5E60B471B22F@iitbombay.org> In-Reply-To: <607068B0-E531-4D7F-8B61-923EE5DC443D@comcast.net> References: <607068B0-E531-4D7F-8B61-923EE5DC443D@comcast.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail-6C287FBB-2318-4FEC-A070-66B1CC895C7D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D= utf-8"></head><body dir=3D"auto"><div dir=3D"ltr"></div><div dir=3D"ltr"><di= v style=3D"display: block;" class=3D"">This weird 127. address seems like a s= ystemd feature/bug thing: <a href=3D"https://unix.stackexchange.com/que= stions/612416/why-does-etc-resolv-conf-point-at-127-0-0-53">https://unix.sta= ckexchange.com/questions/612416/why-does-etc-resolv-conf-point-at-127-0-0-53= </a></div><div style=3D"display: block;" class=3D""><br></div><div style=3D"= display: block;" class=3D"">This behavior seems like some strange interactio= n between systemd assumptions and freebsd=E2=80=99s, or something not being s= et up quite right on the linux side when the vm is running freebsd. </d= iv><div style=3D"display: block;" class=3D""><br></div></div><div dir=3D"ltr= "><blockquote type=3D"cite">On Aug 13, 2024, at 8:46 AM, Alex Arslan <ara= rslan@comcast.net> wrote:<br><br></blockquote></div><blockquote type=3D"c= ite"><div dir=3D"ltr">=EF=BB=BF<meta http-equiv=3D"content-type" content=3D"= text/html; charset=3Dutf-8"><div dir=3D"auto" style=3D"overflow-wrap: break-= word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Rodney,<b= r id=3D"lineBreakAtBeginningOfMessage"><div><br><blockquote type=3D"cite"><d= iv>On Aug 10, 2024, at 9:11=E2=80=AFAM, Rodney W. Grimes <freebsd-rwg@gnd= rsh.dnsmgr.net> wrote:</div><br class=3D"Apple-interchange-newline"><div>= <meta charset=3D"UTF-8"><blockquote type=3D"cite" style=3D"font-family: Helv= etica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-= weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-= indent: 0px; text-transform: none; white-space: normal; widows: auto; word-s= pacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br><br= ><blockquote type=3D"cite">On Aug 2, 2024, at 5:58?PM, Bakul Shah <bakul@= iitbombay.org> wrote:<br><br>On Aug 2, 2024, at 3:52?PM, Alex Arslan <= ararslan@comcast.net> wrote:<br><blockquote type=3D"cite"><br><blockquote= type=3D"cite">Just a comment and a name server line:<br><br>$ cat /etc/reso= lv.conf<br># Generated by resolvconf<br>nameserver 192.168.122.1<br></blockq= uote><br>I believe that is the host IP, so I guess the VM is using the host f= or DNS<br>resolution? Interestingly, if I add `nameserver 8.8.8.8` below the= line<br>with the host IP, it takes 10 seconds rather than 30 to reach the e= xpected<br>domain resolution failure. If I put 8.8.8.8 above the host IP, th= e domain<br>resolution failure is instantaneous.<br></blockquote><br>What do= es your host use as a namesever?<br></blockquote><br>The nameserver is 127.0= .0.53. It sets options edns0 and trust-ad, and<br>includes a search entry as= well.<br></blockquote><br style=3D"caret-color: rgb(0, 0, 0); font-family: H= elvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; fo= nt-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px;= text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-= stroke-width: 0px; text-decoration: none;"><span style=3D"caret-color: rgb(0= , 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-v= ariant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: s= tart; text-indent: 0px; text-transform: none; white-space: normal; word-spac= ing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none= ; display: inline !important;">First, is that a typo and you mean 127.0.0.1:= 53?</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; fo= nt-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 4= 00; letter-spacing: normal; text-align: start; text-indent: 0px; text-transf= orm: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width= : 0px; text-decoration: none;"></div></blockquote><div><br></div><div><div>N= o, the host's /etc/resolv.conf has `nameserver 127.0.0.53`, I just went</div= ><div>back and rechecked to be sure.</div></div><br><blockquote type=3D"cite= "><div><span style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; fon= t-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 40= 0; letter-spacing: normal; text-align: start; text-indent: 0px; text-transfo= rm: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width:= 0px; text-decoration: none; float: none; display: inline !important;">Secon= d, is that name server locked to 127.0.0.1, or is it</span><br style=3D"care= t-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: n= ormal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; t= ext-align: start; text-indent: 0px; text-transform: none; white-space: norma= l; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;= "><span style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-siz= e: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; le= tter-spacing: normal; text-align: start; text-indent: 0px; text-transform: n= one; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;= text-decoration: none; float: none; display: inline !important;">actually l= istinging on *:53? If it is LOCKED you have no name server</span><br s= tyle=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; f= ont-style: normal; font-variant-caps: normal; font-weight: 400; letter-spaci= ng: normal; text-align: start; text-indent: 0px; text-transform: none; white= -space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-deco= ration: none;"><span style=3D"caret-color: rgb(0, 0, 0); font-family: Helvet= ica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-we= ight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text= -transform: none; white-space: normal; word-spacing: 0px; -webkit-text-strok= e-width: 0px; text-decoration: none; float: none; display: inline !important= ;">running on 192.168.122.1 to be reached by the VM, if it is NOT locked</sp= an><br style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size= : 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; let= ter-spacing: normal; text-align: start; text-indent: 0px; text-transform: no= ne; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; t= ext-decoration: none;"><span style=3D"caret-color: rgb(0, 0, 0); font-family= : Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal;= font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0= px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-te= xt-stroke-width: 0px; text-decoration: none; float: none; display: inline !i= mportant;">can the guest ping 192.168.122.1, and can it reach dns at that IP= on</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; fo= nt-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 4= 00; letter-spacing: normal; text-align: start; text-indent: 0px; text-transf= orm: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width= : 0px; text-decoration: none;"><span style=3D"caret-color: rgb(0, 0, 0); fon= t-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps:= normal; font-weight: 400; letter-spacing: normal; text-align: start; text-i= ndent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -w= ebkit-text-stroke-width: 0px; text-decoration: none; float: none; display: i= nline !important;">port 53? Can the host send a packet BACK to t= he guest?</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: Helveti= ca; font-size: 12px; font-style: normal; font-variant-caps: normal; font-wei= ght: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-= transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke= -width: 0px; text-decoration: none;"></div></blockquote><div><div><br></div>= <div>I apologize but I don't really know enough about these things to know h= ow</div><div>to answer your question. I did post the output of tcpdump on th= e VM and</div><div>the host a while back but that was for the invalid reques= t, so that</div><div>probably doesn't capture what you're describing.</div><= /div><br><blockquote type=3D"cite"><div><span style=3D"caret-color: rgb(0, 0= , 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-vari= ant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: star= t; text-indent: 0px; text-transform: none; white-space: normal; word-spacing= : 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; d= isplay: inline !important;">Third you can "fix" the "nameserver 192.168.122.= 1" entry in /etc/resolv.conf</span><br style=3D"caret-color: rgb(0, 0, 0); f= ont-family: Helvetica; font-size: 12px; font-style: normal; font-variant-cap= s: normal; font-weight: 400; letter-spacing: normal; text-align: start; text= -indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -= webkit-text-stroke-width: 0px; text-decoration: none;"><span style=3D"caret-= color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: no= rmal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; t= ext-align: start; text-indent: 0px; text-transform: none; white-space: norma= l; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;= float: none; display: inline !important;">by configuring the DHCP server th= at handed out the lease to the VM to send</span><br style=3D"caret-color: rg= b(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; fon= t-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align= : start; text-indent: 0px; text-transform: none; white-space: normal; word-s= pacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span s= tyle=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; f= ont-style: normal; font-variant-caps: normal; font-weight: 400; letter-spaci= ng: normal; text-align: start; text-indent: 0px; text-transform: none; white= -space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-deco= ration: none; float: none; display: inline !important;">a namserver entry of= 8.8.8.8.</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: Helveti= ca; font-size: 12px; font-style: normal; font-variant-caps: normal; font-wei= ght: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-= transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke= -width: 0px; text-decoration: none;"></div></blockquote><div><br></div><div>= If I understand correctly, that is indeed what we've done as a Band-Aid fix<= /div><div>for the time being: I added the line `prepend_nameservers=3D8.8.8.= 8` to</div><div>/etc/resolvconf.conf.</div><br><blockquote type=3D"cite"><di= v><blockquote type=3D"cite" style=3D"font-family: Helvetica; font-size: 12px= ; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-sp= acing: normal; orphans: auto; text-align: start; text-indent: 0px; text-tran= sform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-t= ext-stroke-width: 0px; text-decoration: none;"><br><blockquote type=3D"cite"= ><br><blockquote type=3D"cite">Not a particularly satisfying conclusion to t= his saga as I don't understand<br>why it's happening but at least I have a w= orkaround that should hopefully<br>do the job. I really appreciate everyone'= s help and input thus far!<br><br>What's the best way to add `nameserver 8.8= .8.8` to /etc/resolv.conf as<br>part of the VM's configuration?<br></blockqu= ote><br>You should diagnose the problem of the nameserver at 192.168.122.1<b= r>and fix it to act properly. I don't use vm (just bhyve) so can't help<br>y= ou with its config.<br></blockquote><br>I do still plan to try to figure out= what the actual issue is, but I also<br>now have a path forward in the mean= time. :)<br><br><br></blockquote><br style=3D"caret-color: rgb(0, 0, 0); fon= t-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps:= normal; font-weight: 400; letter-spacing: normal; text-align: start; text-i= ndent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -w= ebkit-text-stroke-width: 0px; text-decoration: none;"><span style=3D"caret-c= olor: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: nor= mal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; te= xt-align: start; text-indent: 0px; text-transform: none; white-space: normal= ; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; f= loat: none; display: inline !important;">--<span class=3D"Apple-converted-sp= ace"> </span></span><br style=3D"caret-color: rgb(0, 0, 0); font-family= : Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal;= font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0= px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-te= xt-stroke-width: 0px; text-decoration: none;"><span style=3D"caret-color: rg= b(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; fon= t-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align= : start; text-indent: 0px; text-transform: none; white-space: normal; word-s= pacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: n= one; display: inline !important;">Rod Grimes &= nbsp;  = ; &nb= sp; &= nbsp; </span><a href=3D"mailto:rgrimes@freebsd.org" s= tyle=3D"font-family: Helvetica; font-size: 12px; font-style: normal; font-va= riant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto;= text-align: start; text-indent: 0px; text-transform: none; white-space: nor= mal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">rgrim= es@freebsd.org</a></div></blockquote></div><br></div></div></blockquote></bo= dy></html>= --Apple-Mail-6C287FBB-2318-4FEC-A070-66B1CC895C7D--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C2D17751-17A9-4429-91ED-5E60B471B22F>