# [solved]djbdns problem: mathematica

## Qubax

i'm using mathematica and always have problems with dns

mathematica does something like pinging xenos and won't start until it

has the ip or some kind of "not found"

if there is no dns service like bind or djbdns running it starts

instantly.

running bind i have to use the config file shows at the end so math.

gets the ip(i think)

now i want to switch from bind to djbdns (just external cache ->

dnscache, i followed the instructions of the homepage, tested it with

the internet and it worked fine):

-> mathematica start after about 10 sec (i think after getting servfail)

log of dnscache:

```
@400000003ebbe35d3251d40c lame 7f000001 . .

@400000003ebbe35d3251dbdc tx 0 1 xenos. . 803f0235 c0702404 c1000e81 c620400c c0cbe60a ca0c1b21 c00505f1 c6290004 c0249411 8009006b 80080a5a c021040c c629000a

@400000003ebbe35d3251eb7c drop 13 network unreachable

@400000003ebbe371323f172c query 14 c0a86489:8004:0020 1 xenos.

@400000003ebbe371323f3284 tx 0 1 xenos. . 80080a5a c0cbe60a c00505f1 c6290004 c1000e81 803f0235 c620400c ca0c1b21 c629000a c0702404 7f000001 c0249411 c021040c 8009006b

@400000003ebbe371325189d4 lame 7f000001 . .

@400000003ebbe371325191a4 tx 0 1 xenos. . c620400c 80080a5a c00505f1 8009006b c0702404 c0cbe60a c0249411 803f0235 ca0c1b21 c021040c c6290004 c1000e81 c629000a

@400000003ebbe37132519d5c drop 14 network unreachable

@400000003ebbe45010be665c query 15 c0a86489:8004:ab40 1 xenos.

@400000003ebbe45010be79e4 tx 0 1 xenos. . 803f0235 80080a5a ca0c1b21 c00505f1 c021040c c6290004 c0249411 c629000a c0702404 c620400c 8009006b c0cbe60a 7f000001 c1000e81

@400000003ebbe45a104cb4e4 query 16 c0a86489:8004:ab40 1 xenos.

@400000003ebbe45a104cc86c tx 0 1 xenos. . c1000e81 c620400c 8009006b c021040c c0cbe60a c00505f1 ca0c1b21 c6290004 80080a5a c0702404 c629000a 7f000001 c0249411 803f0235

@400000003ebbe45b12a93e9c servfail xenos. input/output error

@400000003ebbe45b12a9560c sent 15 23

@400000003ebbe465120f3504 servfail xenos. input/output error

@400000003ebbe465120f4c74 sent 16 23
```

i also tried to put 

```
nameserver 127.0.0.1
```

 on top in /etc/resolv.conf, hoping that it would first have a look at /etc/hosts, but

it didn't help(so i deleted it after testing)

can someone give me an idea what to do?

there should be a possibility to tell dnscache that xenos has ip

192.168.100.137 (hoping that this is the problem)

dnscache is just used to hopefully increase the speed of my 56k(crank)

modem, so also other solutions are welcomed

maybe needed configs:

computername: xenos

static ip   : 192.168.100.137

/etc/resolv.conf:

```
domain monz.net

nameserver 192.168.100.137
```

/etc/hosts:

```
127.0.0.1   localhost

192.168.100.137 xenos

192.168.100.1   morpheus
```

working bind zonefile:

```

$TTL 1W

@               IN      SOA     ns.monz.net. hostmaster.blatt.net. (

                                2       ; Serial

                                28800   ; Refresh

                                7200    ; Retry

                                604800  ; Expire

                                86400)  ; Minimum TTL

                        NS      ns.monz.net.

                MX      10 mail       ; Primary Mail Exchanger

localhost       A       127.0.0.1

                MX      10 mail

ns              A       127.0.0.1

                MX      10 mail

mail            A       127.0.0.1

ftp             A       127.0.0.1

xenos           A       192.168.100.137

                MX      10 mail

morpheus        A       192.168.100.1

```

Last edited by Qubax on Thu May 15, 2003 7:49 pm; edited 3 times in total

----------

## Qubax

so i changed dnscache to listen on 127.0.0.1 and tinydns and axfrdns on 192.168.100.137 and it seems to work.

but can someone explain to me how this thing works, the cache listening on localhost and dns listening on *.*.*.*

do i need the cache running?

----------

## Qubax

ok there was somewhere a mistake on *.dns dnscache didn't work, mathematica got an error and started, but thats not exactly what i wanted

can someone tell how he gozt djbdns working with one pc and one networkcard. i don't understand how you can set the cache to an ip und the dns to another with just one pc

----------

## Vancouverite

When I use dnscache on localhost (listening on 127.0.0.1) I set my /etc/resolv.conf to:

nameserver 127.0.0.1

And all of my lookups work fine. Is dnscache working properly for you with a web browser? The error "network unreachable" appears more like routing problem... strange. Is Mathematica trying to contact something over the network? Running ethereal while starting it would tell you this. This is how I setup dnscache to listen on 127.0.0.1:

I do this manually and if you want all the steps I can also post them. After installing daemontools, djbdns and the two users:

dnscache-conf dnscache dnslog /etc/dnscache 127.0.0.1

Then just point resolv.conf at localhost.

----------

## Qubax

i tried it out this way, and it didn't work

i also don't see the difference by setting dnscache listening to 127.0.0.1 and setting resolv.conf to "nameserver 127.0.0.1" and the whole thing just with 192.168.100.137

----------

## Qubax

is there a way to start tinydns and dnscache on a sinlge machine with just one ip (ok two: localhost and network)?

because i can get it running with tinydns but then i cann't connect to the internet with just using tinydns, and with dnscahe listening on 127 it doesn't work

----------

## Vancouverite

 *Qubax wrote:*   

> i tried it out this way, and it didn't work
> 
> i also don't see the difference by setting dnscache listening to 127.0.0.1 and setting resolv.conf to "nameserver 127.0.0.1" and the whole thing just with 192.168.100.137

 

How did this not work? For Mathematica or at all? Is it setup properly to begin with? If you only want to use dnscache on the localhost use 127.0.0.1 since you don't need it listening for external queries.

 *Qubax wrote:*   

> is there a way to start tinydns and dnscache on a sinlge machine with just one ip (ok two: localhost and network)?
> 
> because i can get it running with tinydns but then i cann't connect to the internet with just using tinydns, and with dnscahe listening on 127 it doesn't work

 

Tinydns is an authority server; if you only want a dns proxy cache then you don't need it.

----------

## Qubax

i'll give it a second try listening on localhost.

i think it has something to do with xenos be found as host. if i leave away the xenos line in the bind config file mathematica doesn't work, and i don't see a possibility to tell dnscache that xenos is a host at [ip].

----------

## Qubax

tried it out the way you mentioned - didn't work   :Sad:   still get the same "network unreachable" as above

i think i'll stay with bind, even if it has some security problems

----------

## Qubax

i found the solution: i want tinydns just to work local, so i set it up to listen on 127.0.0.1, and for internet queries dnscache listening on 192.168.100.137 ( a better describtion can be found here http://puzzling.org/computing/help/djb)

till to this point it's nothing new, until i saw in the logs, that xenos.monz.net can be found, but not xenos -> somehow hostname problem

so i changed the hostname from xenos to xenos.monz.net -> it's working

if someone can give me an explanation i'd be happier than i'm now

----------

