TCP/IP V5.0 Nameservice

I have tcp/ip v5.0 up and running. Now I want to do some fancy name
serving.

Currently my /etc/resolv.conf looks like this:
domain .
nameserver

Name service is working. I can access external host names.

I would like to be able to add some local host names to the local universe
only. I don’t need these names to be visible to the outside world. Let say
that my local host names are:
node1
node2
node3

Can I configure some kind of local name server to return IP addresses for
these three names but defer to an outside nameserver for any other name?

If so, how?

(Be gentle on me. I’m a name server virgin.)

“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:

I have tcp/ip v5.0 up and running. Now I want to do some fancy name
serving.

Currently my /etc/resolv.conf looks like this:
domain .
nameserver <some external IP address

Try adding a line to your /etc/resolv.conf that says

lookup file bind

after your domain spec, but before your nameserver spec.

Name service is working. I can access external host names.

I would like to be able to add some local host names to the local universe
only. I don’t need these names to be visible to the outside world. Let say
that my local host names are:
node1
node2
node3

Put these in your /etc/hosts file

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

I have done that but no dice yet.

Currently my /etc/resolv.conf looks like this:
domain .
lookup file bind
nameserver

The three hosts are in my /etc/hosts file.

Curiously enough a ping to one of these hosts works weather or not I have
the “lookup file bid” line in the resolv.conf file.

But nslookup will not look in /etc/hosts.

Even so, I want to have a single name data base so that as I do add many
other hosts I don’t have to update all the /etc/hosts files.


“David Gibbs” <dagibbs@qnx.com> wrote in message
news:a9nglq$2is$1@nntp.qnx.com

“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:
I have tcp/ip v5.0 up and running. Now I want to do some fancy name
serving.

Currently my /etc/resolv.conf looks like this:
domain .
nameserver <some external IP address

Try adding a line to your /etc/resolv.conf that says

lookup file bind

after your domain spec, but before your nameserver spec.

Name service is working. I can access external host names.

I would like to be able to add some local host names to the local
universe
only. I don’t need these names to be visible to the outside world. Let
say
that my local host names are:
node1
node2
node3

Put these in your /etc/hosts file

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:

I have done that but no dice yet.

Currently my /etc/resolv.conf looks like this:
domain .
lookup file bind
nameserver <some external IP address

The three hosts are in my /etc/hosts file.

Curiously enough a ping to one of these hosts works weather or not I have
the “lookup file bid” line in the resolv.conf file.

But nslookup will not look in /etc/hosts.

The resolver nslookup used, is different with the one in libsocket
(used by gethostbyname() …). and “lookup f b” is an option we
invented in libsocket. That’s why nslookup will not find them.

Even so, I want to have a single name data base so that as I do add many
other hosts I don’t have to update all the /etc/hosts files.

/etc/resolv.conf only defined “where” to get the name translate.
These are private to each node. So if a “newnode” being added
into the network, you have to add that entry into everybody’s
/etc/hosts.

You either have to prefix a central node /etc/hosts, or, you
can run a named on the “central node”. Everybody will have
/etc/resolv.conf looks like:

domain .
lookup file bind
nameserver central_node_ip
nameserver external_nameserver_ip

Thus, next time, you only need to add “newnode” in your central_node
named database.

-xtang

“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:a9nglq$2is$> 1@nntp.qnx.com> …
“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:
I have tcp/ip v5.0 up and running. Now I want to do some fancy name
serving.

Currently my /etc/resolv.conf looks like this:
domain .
nameserver <some external IP address

Try adding a line to your /etc/resolv.conf that says

lookup file bind

after your domain spec, but before your nameserver spec.

Name service is working. I can access external host names.

I would like to be able to add some local host names to the local
universe
only. I don’t need these names to be visible to the outside world. Let
say
that my local host names are:
node1
node2
node3

Put these in your /etc/hosts file

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:

I have done that but no dice yet.

Currently my /etc/resolv.conf looks like this:
domain .
lookup file bind
nameserver <some external IP address

The three hosts are in my /etc/hosts file.

Curiously enough a ping to one of these hosts works weather or not I have
the “lookup file bid” line in the resolv.conf file.

But nslookup will not look in /etc/hosts.

Hm…no it won’t.

Even so, I want to have a single name data base so that as I do add many
other hosts I don’t have to update all the /etc/hosts files.

I don’t know nameservers either.

But, if I suggested:

prefix -A /etc/hosts=//1/etc/hosts

would you laugh at me?

I would.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Hi

Well I know how to prefix a file to another node, but what if some of the
hosts aren’t QNX hosts?

Let me take a different approach. Let’s assume that node1 is a gateway to
the outside world. It has an IP address and name (we’ll call it xyz.com)
that is visible to the outside world. Nodes 2 through X can access the
outside world through node1 as a gateway. The outside world does not need
to get to the inner nodes but inside the network I want to access:
node2.xyz.com
node3.xyz.com
etc.

Everyone inside can use node 1 as a name server. What is the minimum amount
of work to accomplish this?

I assume that nodes 2 and up simply have to reference node1 as their name
server, right? So what does node 1 have to do?


“Xiaodan Tang” <xtang@qnx.com> wrote in message
news:a9npd1$8gq$1@nntp.qnx.com

“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:
I have done that but no dice yet.

Currently my /etc/resolv.conf looks like this:
domain .
lookup file bind
nameserver <some external IP address

The three hosts are in my /etc/hosts file.

Curiously enough a ping to one of these hosts works weather or not I
have
the “lookup file bid” line in the resolv.conf file.

But nslookup will not look in /etc/hosts.

The resolver nslookup used, is different with the one in libsocket
(used by gethostbyname() …). and “lookup f b” is an option we
invented in libsocket. That’s why nslookup will not find them.

Even so, I want to have a single name data base so that as I do add many
other hosts I don’t have to update all the /etc/hosts files.

/etc/resolv.conf only defined “where” to get the name translate.
These are private to each node. So if a “newnode” being added
into the network, you have to add that entry into everybody’s
/etc/hosts.

You either have to prefix a central node /etc/hosts, or, you
can run a named on the “central node”. Everybody will have
/etc/resolv.conf looks like:

domain .
lookup file bind
nameserver central_node_ip
nameserver external_nameserver_ip

Thus, next time, you only need to add “newnode” in your central_node
named database.

-xtang

“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:a9nglq$2is$> 1@nntp.qnx.com> …
“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:
I have tcp/ip v5.0 up and running. Now I want to do some fancy name
serving.

Currently my /etc/resolv.conf looks like this:
domain .
nameserver <some external IP address

Try adding a line to your /etc/resolv.conf that says

lookup file bind

after your domain spec, but before your nameserver spec.

Name service is working. I can access external host names.

I would like to be able to add some local host names to the local
universe
only. I don’t need these names to be visible to the outside world.
Let
say
that my local host names are:
node1
node2
node3

Put these in your /etc/hosts file

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Ouch!

Well I taught myself how to configure a nameserver. It’s not as hard as I
was worried about but it is harder than it ought to be.

I have configured to internal domains, “at” and “qat”. They are both
working. I have defined a host called “poly.qat”. So if I type:
nslookup poly.qat
it works. Is there a way that if I try to:
nslookup poly
it will attempt to default to “.qat” or “.at”?

If I can only have one default that is OK too.

“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:

Ouch!

Well I taught myself how to configure a nameserver. It’s not as hard as I
was worried about but it is harder than it ought to be.

I have configured to internal domains, “at” and “qat”. They are both
working. I have defined a host called “poly.qat”. So if I type:
nslookup poly.qat
it works. Is there a way that if I try to:
nslookup poly
it will attempt to default to “.qat” or “.at”?

If I can only have one default that is OK too.

You want to defien a “default domain” in /etc/resolv.conf

domain qat
lookup file bind
nameserver <ip_of_node1>

Thus any request of “abc”, will first try as “abc”, then
as “abc.qat”.

If, for any reason, you want a “qat” domain host try “at”
domain, you can use the “search” keyword.

domain qat
lookup file bind
nameserver <ip_of_node1>
search at

-xtang

“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:

Hi

Well I know how to prefix a file to another node, but what if some of the
hosts aren’t QNX hosts?

Let me take a different approach. Let’s assume that node1 is a gateway to
the outside world. It has an IP address and name (we’ll call it xyz.com)
that is visible to the outside world. Nodes 2 through X can access the
outside world through node1 as a gateway. The outside world does not need
to get to the inner nodes but inside the network I want to access:
node2.xyz.com
node3.xyz.com
etc.

Everyone inside can use node 1 as a name server. What is the minimum amount
of work to accomplish this?

I assume that nodes 2 and up simply have to reference node1 as their name
server, right? So what does node 1 have to do?

It is posiable to run named on node1, but force it only listen on its
internal nic’s IP. IE:

option {
listen-on {192.168.0.1;};
}

-xtang

BUT . . .

Using QNX 4.25E and TCP/IP v 5.0, if there is a file called /etc/resolv.conf
then my name server no longer works as expected. The ‘lookup fild bind’
doesn’t work.

“Xiaodan Tang” <xtang@qnx.com> wrote in message
news:a9srbh$3jd$1@nntp.qnx.com

“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:

I have configured to internal domains, “at” and “qat”. They are both
working. I have defined a host called “poly.qat”. So if I type:
nslookup poly.qat
it works. Is there a way that if I try to:
nslookup poly
it will attempt to default to “.qat” or “.at”?

You want to defien a “default domain” in /etc/resolv.conf

domain qat
lookup file bind
nameserver <ip_of_node1

Thus any request of “abc”, will first try as “abc”, then
as “abc.qat”.

If, for any reason, you want a “qat” domain host try “at”
domain, you can use the “search” keyword.

domain qat
lookup file bind
nameserver <ip_of_node1
search at

-xtang

I thought I had this all figured out. But alas, not yet. Here’s what I
have.

I have a ‘/etc/named.conf’ that defines the domains ‘.qat.’ and ‘.at.’. All
other names are resolved by external nameservers. All of this works, but
only if name lookups are happening on the same host that named is running
on.

If I configure another host to use an external nameserver it works fine but
of course it know nothing about my ‘.qat.’ and ‘.at.’ domains.

If I configure another host to use my first host as its nameserver and I ask
for:
nslookup xyz.qat
I get something like:
*** Can’t find server name for address 10.2.0.2: Non-existant host/domain

10.2.0.2 is the IP of my nameserver.

BTW, I can ping all hosts from all hosts so routing is working OK.


“Xiaodan Tang” <xtang@qnx.com> wrote in message
news:a9srlj$3jd$2@nntp.qnx.com

“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:
Hi

Well I know how to prefix a file to another node, but what if some of
the
hosts aren’t QNX hosts?

Let me take a different approach. Let’s assume that node1 is a gateway
to
the outside world. It has an IP address and name (we’ll call it
xyz.com)
that is visible to the outside world. Nodes 2 through X can access the
outside world through node1 as a gateway. The outside world does not
need
to get to the inner nodes but inside the network I want to access:
node2.xyz.com
node3.xyz.com
etc.

Everyone inside can use node 1 as a name server. What is the minimum
amount
of work to accomplish this?

I assume that nodes 2 and up simply have to reference node1 as their
name
server, right? So what does node 1 have to do?

It is posiable to run named on node1, but force it only listen on its
internal nic’s IP. IE:

option {
listen-on {192.168.0.1;};
}

-xtang

“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:

I thought I had this all figured out. But alas, not yet. Here’s what I
have.

I have a ‘/etc/named.conf’ that defines the domains ‘.qat.’ and ‘.at.’. All
other names are resolved by external nameservers. All of this works, but
only if name lookups are happening on the same host that named is running
on.

If I configure another host to use an external nameserver it works fine but
of course it know nothing about my ‘.qat.’ and ‘.at.’ domains.

If I configure another host to use my first host as its nameserver and I ask
for:
nslookup xyz.qat
I get something like:
*** Can’t find server name for address 10.2.0.2: Non-existant host/domain

10.2.0.2 is the IP of my nameserver.

I believe nslookup insist it have to resolve the nameserver ip into a
name. (10.2.0.2 → ns.qat) You want to setup a 2.10.in-addr.arpa zone
to resolve the nameserver name.

However, I suspect our utility (which using libsocket resolver) do
not insist that, can you “ping xyz.qat” it ?

-xtang


BTW, I can ping all hosts from all hosts so routing is working OK.



“Xiaodan Tang” <> xtang@qnx.com> > wrote in message
news:a9srlj$3jd$> 2@nntp.qnx.com> …
“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:
Hi

Well I know how to prefix a file to another node, but what if some of
the
hosts aren’t QNX hosts?

Let me take a different approach. Let’s assume that node1 is a gateway
to
the outside world. It has an IP address and name (we’ll call it
xyz.com)
that is visible to the outside world. Nodes 2 through X can access the
outside world through node1 as a gateway. The outside world does not
need
to get to the inner nodes but inside the network I want to access:
node2.xyz.com
node3.xyz.com
etc.

Everyone inside can use node 1 as a name server. What is the minimum
amount
of work to accomplish this?

I assume that nodes 2 and up simply have to reference node1 as their
name
server, right? So what does node 1 have to do?

It is posiable to run named on node1, but force it only listen on its
internal nic’s IP. IE:

option {
listen-on {192.168.0.1;};
}

-xtang