Host lookup fails with NIS+ with cname but succeeds with name

From: Colin Jean-Noël (jnc@tradeware.be)
Date: Thu May 30 2002 - 04:03:37 EDT


Hi,

I'm running NIS+ on Solaris 8. One system is set up as the master, all others
are clients.

Here is the content of the NIS+ host table:
bash-2.03$ niscat -h hosts.org_dir
# cname name addr comment
s58-srv1 S58-SRV1-201 192.168.2.201
S58-NIS-200 s58-nis 192.168.2.200 NIS+ Master Server
s58-demo S58-DEMO-205 192.168.2.205
s58-int1 S58-INT1-202 192.168.2.202
s58-gtw1 S58-GTW1-203 192.168.2.203

The problem is that when I try to telnet (or whatever connection) to a system,
host lookup fails.
bash-2.03$ ping s58-int1
ping: unknown host s58-int1

Here's the snoop of the exchange with the NIS+ master:

    s58-srv1 -> S58-NIS-200 NIS+ C IBlist "hosts.org_dir.tradeware.be." [name
= "s58-int1"]
 S58-NIS-200 -> s58-srv1 NIS+ R IBlist [Partial Success] and 1 object

The strange thing is that when I lookup an alias or perform a 'reverse'
lookup, NIS+ replies correctly
bash-2.03$ ping -s S58-INT1-202
PING S58-INT1-202: 56 data bytes
64 bytes from s58-int1 (192.168.2.202): icmp_seq=0. time=1. ms
64 bytes from s58-int1 (192.168.2.202): icmp_seq=1. time=0. ms
^C
----S58-INT1-202 PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/1

bash-2.03$ ping -s 192.168.2.202
PING 192.168.2.202: 56 data bytes
64 bytes from s58-int1 (192.168.2.202): icmp_seq=0. time=0. ms
64 bytes from s58-int1 (192.168.2.202): icmp_seq=1. time=0. ms
64 bytes from s58-int1 (192.168.2.202): icmp_seq=2. time=0. ms
^C
----192.168.2.202 PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0

Here's the output of snoop during this test:
    s58-srv1 -> S58-NIS-200 NIS+ C IBlist "hosts.org_dir.tradeware.be." [addr
= "192.168.2.202"]
 S58-NIS-200 -> s58-srv1 NIS+ R IBlist [Success] and 1 object
    s58-srv1 -> S58-NIS-200 NIS+ C IBlist "hosts.org_dir.tradeware.be." [name
= "s58-int1"]
 S58-NIS-200 -> s58-srv1 NIS+ R IBlist [Partial Success] and 1 object

To make sure I am querying the NIS+ server, I use the following line in
nsswitch.conf:
bash-2.03$ grep hosts /etc/nsswitch.conf
# "hosts:" and "services:" in this file are used only if the
#hosts: nisplus dns files
hosts: nisplus
# searching the hosts databases. Before turning this option on, consult
#hosts: nisplus dns [NOTFOUND=return] files
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:23 EDT