From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Sun, 4 Dec 2011 14:15:24 -0500 Message-ID: From: slash To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=f46d0447a141288c3c04b34906bf Subject: [9fans] wildcard dns cname Topicbox-Message-UUID: 4d7091c6-ead7-11e9-9d60-3106f5b1d025 --f46d0447a141288c3c04b34906bf Content-Type: text/plain; charset=ISO-8859-1 I have the following wildcard entry in my /lib/ndb/local: cname=server.local dom=*.local Essentially I want every name to resolve back to my server. Now, ndb/dnsdebug is able to resolve any host just fine: cpu% ndb/dnsdebug > foobar ---------------------------- answer server.local 1 hr ip 10.0.0.1 ---------------------------- But the lookup fails when issued on a unix box: $ nslookup foobar.local Server: 10.0.0.1 Address: 10.0.0.1#53 <5 seconds delay> *** Can't find foobar.local: No answer Specifying the server in ndb/dnsdebug shows the following: cpu% ndb/dnsdebug > @10.0.0.1 > foobar 8300.2: sending to 10.0.0.1/10.0.0.1 foobar.local ip 8300.2: sending to 10.0.0.1/10.0.0.1 foobar.local ip 8300.2: sending to 10.0.0.1/10.0.0.1 foobar.local cname 8300.2: sending to 10.0.0.1/10.0.0.1 foobar.local cname 8300.2: sending to 10.0.0.1/10.0.0.1 server.local ip 8300.2: sending to 10.0.0.1/10.0.0.1 server.local ip ---------------------------- answer server.local 1 hr ip 10.0.0.1 ---------------------------- How do I fix this so that these dns lookups work without delays on all machines on my network? The dns server is started as "ndb/dns -sr" in cpurc. --f46d0447a141288c3c04b34906bf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have the following wildcard entry in my /lib/ndb/local:

cname=3Dse= rver.local
=A0 =A0 =A0 =A0 dom=3D*.local

Essen= tially I want every name to resolve back to my server.

=
Now, ndb/dnsdebug is able to resolve any host just fine:

cpu% ndb/dnsdebug
> foobar
= ----------------------------
answer server.local =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1 hr =A0 =A0 =A0 =A0 =A0 =A0ip =A0 10.0.0.1
----------------------------

But the lo= okup fails when issued on a unix box:

$ nsloo= kup foobar.local
Server: 10.0.0.1
Address: 10.0.0.1#53

<5 seconds delay>
*= ** Can't find foobar.local: No answer

Sp= ecifying the server in ndb/dnsdebug shows the following:

cpu% ndb/dnsdebug
> foobar
8300.2: sending to= 10.0.0.1/10.0.0.1 foobar.local ip=
<delay>
8300.2: sending to=A010.0.0.1/10.0.0.1=A0f= oobar.local ip
<delay>
8300.2: sendi= ng to=A010.0.0.1/10.0.0.1=A0foobar.local cname
<d= elay>
8300.2: sending to=A010.0.0.1/10.0.0.1=A0foobar.local cname
<delay>
8300.2: sending to=A010.0.0.1/10.0.0.1= =A0server.local ip
<delay>
8300.2: sendi= ng to=A010.0.0.1/10.0.0.1=A0server.local ip
<dela= y>
----------------------------
answer server.local =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1 hr =A0 =A0 =A0 =A0 =A0 =A0ip =A0 10.0.0.1
----------------------------

How do I fix this so that these dns lookups work = without delays on all machines on my network?

The = dns server is started as "ndb/dns -sr" in cpurc.
--f46d0447a141288c3c04b34906bf-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sun, 4 Dec 2011 14:21:11 -0500 To: 9fans@9fans.net Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] wildcard dns cname Topicbox-Message-UUID: 4d74d452-ead7-11e9-9d60-3106f5b1d025 > cpu% ndb/dnsdebug > > @10.0.0.1 > > foobar > 8300.2: sending to 10.0.0.1/10.0.0.1 foobar.local ip > sure looks like your the dns packet is being dropped. you might want to check your routing. can you ping 10.0.0.1 from your linux host (with the interfaces dns is allowed to talk on). make sure you see those icmp packets on your plan 9 system before proceeding. - erik From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 4 Dec 2011 16:21:02 -0500 Message-ID: From: slash To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=f46d044470bf76ec6d04b34ac786 Subject: Re: [9fans] wildcard dns cname Topicbox-Message-UUID: 4d7a2074-ead7-11e9-9d60-3106f5b1d025 --f46d044470bf76ec6d04b34ac786 Content-Type: text/plain; charset=ISO-8859-1 Yes ping works and I can also make nslookups for hosts that don't match the wildcard. $ nslookup server.local Server: 10.0.0.1 Address: 10.0.0.1#53 Name: server.local Address: 10.0.0.1 $ nslookup other.local Server: 10.0.0.1 Address: 10.0.0.1#53 Name: other.local Address: 10.0.0.2 snoopy confirms that my server sees the expected packets on the right interface. Where is the problem? On Sun, Dec 4, 2011 at 2:21 PM, erik quanstrom wrote: > > cpu% ndb/dnsdebug > > > @10.0.0.1 > > > foobar > > 8300.2: sending to 10.0.0.1/10.0.0.1 foobar.local ip > > > > sure looks like your the dns packet is being dropped. > you might want to check your routing. can you ping 10.0.0.1 > from your linux host (with the interfaces dns is allowed to talk on). > make sure you see those icmp packets on your plan 9 system > before proceeding. > > - erik > > --f46d044470bf76ec6d04b34ac786 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yes ping works and I can also make nslookups for hosts that don't match= the wildcard.

$ nslookup server.local
Se= rver: 10.0= .0.1
Address: 10.0.0.1#53

Name: server.local
Address: 10.0.0.1=

$ nslookup other.local
Server: 10.0.0.1
= Address: 10= .0.0.1#53

Name: other.local
Address: 10.0.0.2

=
snoopy confirms that my server sees the expected packets on the = right interface.

Where is the problem?


On Sun, Dec 4, 2011 at 2:21 PM, erik quanstrom <quanstro@quanstro= .net> wrote:
> cpu% ndb/dnsdebug > > @10.0.0.1
> > foobar
> 8300.2: sending to 10.0.0.1/10.0.0.1 foobar.local ip
> <delay>

sure looks like your the dns packet is being dropped.
you might want to check your routing. =A0can you ping 10.0.0.1
from your linux host (with the interfaces dns is allowed to talk on).
make sure you see those icmp packets on your plan 9 system
before proceeding.

- erik


--f46d044470bf76ec6d04b34ac786-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sun, 4 Dec 2011 16:32:00 -0500 To: 9fans@9fans.net Message-ID: <8c0b532e660933e94c876b5b4d672912@chula.quanstro.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] wildcard dns cname Topicbox-Message-UUID: 4d7e38d0-ead7-11e9-9d60-3106f5b1d025 where is your soa record? - erik From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <8c0b532e660933e94c876b5b4d672912@chula.quanstro.net> References: <8c0b532e660933e94c876b5b4d672912@chula.quanstro.net> Date: Sun, 4 Dec 2011 17:07:06 -0500 Message-ID: From: slash To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=e89a8f839b2137ac1b04b34b6c61 Subject: Re: [9fans] wildcard dns cname Topicbox-Message-UUID: 4d82d61a-ead7-11e9-9d60-3106f5b1d025 --e89a8f839b2137ac1b04b34b6c61 Content-Type: text/plain; charset=ISO-8859-1 > > where is your soa record? /lib/ndb/local: dom=local soa= refresh=3600 ttl=3600 ns=server.local mb=email@abcxyz.com --e89a8f839b2137ac1b04b34b6c61 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
where is your so= a record?=A0

/lib/ndb/local:
dom=3Dlocal soa=3D
refresh=3D3600 ttl=3D3600
ns=3Dserver.local
mb=3Demail@abcxyz.com


--e89a8f839b2137ac1b04b34b6c61-- From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <8c0b532e660933e94c876b5b4d672912@chula.quanstro.net> Date: Sun, 4 Dec 2011 17:38:38 -0500 Message-ID: From: slash To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=f46d04451823ff429004b34bdcd5 Subject: Re: [9fans] wildcard dns cname Topicbox-Message-UUID: 4d870744-ead7-11e9-9d60-3106f5b1d025 --f46d04451823ff429004b34bdcd5 Content-Type: text/plain; charset=ISO-8859-1 ndb/dnsquery also fails for wildcard names but works for real ones: cpu% ndb/dnsquery > foooo !dns: resource does not exist; negrcode 0 > bar !dns: resource does not exist; negrcode 0 > server server.local ip 10.0.0.1 > other other.local ip 10.0.0.2 Why do dnsquery and dnsdebug give different results? --f46d04451823ff429004b34bdcd5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable ndb/dnsquery also fails for wildcard names but works for real ones:
cpu% ndb/dnsquery
> foooo
!dns: res= ource does not exist; negrcode 0
> bar
!dns: resourc= e does not exist; negrcode 0
> server
server.local ip 10.0.0.1
> other
oth= er.local ip 10.0.0.2

Why do dnsquery and dnsdebug give different result= s?

--f46d04451823ff429004b34bdcd5-- From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <8c0b532e660933e94c876b5b4d672912@chula.quanstro.net> Date: Sun, 4 Dec 2011 17:51:40 -0500 Message-ID: From: slash To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=f46d04451823a3113304b34c0b9f Subject: Re: [9fans] wildcard dns cname Topicbox-Message-UUID: 4d8b5bb4-ead7-11e9-9d60-3106f5b1d025 --f46d04451823a3113304b34c0b9f Content-Type: text/plain; charset=ISO-8859-1 > > > ndb/dnsquery also fails for wildcard names but works for real ones: > > cpu% ndb/dnsquery > > foooo > !dns: resource does not exist; negrcode 0 > > bar > !dns: resource does not exist; negrcode 0 > > server > server.local ip 10.0.0.1 > > other > other.local ip 10.0.0.2 > > Why do dnsquery and dnsdebug give different results? > > For reference here is what dnsdebug gives me: cpu% ndb/dnsdebug > fooooo any ---------------------------- answer fooooo.local 1 hr came server.local ---------------------------- > bar any ---------------------------- answer bar.local 1 hr cname server.local ---------------------------- > server any ---------------------------- answer server.local 1 hr ip 10.0.0.1 answer server.local 1 hr cname server.local ---------------------------- > other any ---------------------------- answer other.local 1 hr ip 10.0.0.2 answer other.local 1 hr cname server.local ---------------------------- --f46d04451823a3113304b34c0b9f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

ndb/dns= query also fails for wildcard names but works for real ones:

=
cpu% ndb/dnsquery
> foooo
!dns: resource does n= ot exist; negrcode 0
> bar
!dns: resource does not e= xist; negrcode 0
> server
server.local ip 10.0.0.1
> other
other.local ip 10.0.0.2

Why do dnsquery and dnsdebug give different result= s?


For reference here is what dnsdebug gives= me:

cpu% ndb/dnsdebug
> fooooo = any
----------------------------
answer fooooo.local = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A01 hr =A0 =A0 =A0 =A0 =A0 =A0= came server= .local
----------------------------
> bar any
--------= --------------------
answer bar.local =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 1 hr =A0 =A0 =A0 =A0 =A0 =A0cname server.local
----------------------------
> server any
-----= -----------------------
answer= =A0server.local=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A01 hr =A0 =A0 =A0 =A0 =A0 =A0ip =A0 10.0.0.1
answer=A0server.local=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= 1 hr =A0 =A0 =A0 =A0 =A0 =A0cname server.local
----------------------------
> other any
------= ----------------------
answer other.local =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 1 hr =A0 =A0 =A0 =A0 =A0 =A0ip =A0 10.0.0.2
answer other.local =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1 hr = =A0 =A0 =A0 =A0 =A0 =A0cname server.local
----------------------------
=
--f46d04451823a3113304b34c0b9f--