WINS resolves to multiple IPs!

Jean-Serge Gagnon
Thu, 02 Dec 1999 05:06:08 -0000

Hi,
	This is a long post.

	It seams that when using "interfaces = " in the smbd.conf files, the
wins server reports the IP of each interface. In some cases it does not
cause any problems, but in other it prevents access to the requested
resource.

Here is the setup we have:

-----------
| PC #1   | 192.168.1.10
| Win98   | SPEED (NEWLIX)
-----------
    |                         bind interfaces only = yes
-----------                   interfaces = 192.168.1.2/255.255.255.0
|         |                                127.0.0.1/255.255.255.255
|         |                   wins server = 192.168.1.5
| PC #2   | 192.168.1.2       domain master = no
|         |                   local master = no
| Linux   | DEVELOPMENT       prefered master = no
|         | (NEWLIX)          workgroup = NEWLIX
|         |
-----------
    |                         bind interfaces only = yes
-----------                   interfaces = 24.200.y.z/255.255.255.0
|         |                                192.168.1.5/255.255.255.0
| GW #1   | 192.168.1.5                    127.0.0.1/255.255.255.255
|         |                    remote browse sync = 192.168.2.1
| linux   | SRVDUNGEON         remote announce = 192.168.1.255
192.168.2.1
|         | (NEWLIX)           wins support = yes
| WINS    |                    domain master = yes
| ipsec   |                    local master = yes
|         |                    workgroup = NEWLIX
| VPN     | 24.200.b.c         prefered master = yes
----------
    |
 __-----___
/ internet \
\VPN tunnel/
 ----------
     |                          bind interfaces only = yes
-----------                     interfaces = 24.112.y.z/255.255.252.0
|         |                                  192.168.2.1/255.255.255.0
|         |                                  127.0.0.1/255.255.255.255
| GW #2   | 24.112.y.z          wins server = 192.168.1.5
|         |                     remote browse sync = 192.168.1.5
| linux   | SRVSNOOPY           wins support = no
|         | (WORKGROUP)         remote announce = 192.168.2.255
192.168.1.5
| no WINS | 192.168.2.1         local master = yes
-----------                     domain master = no
    |                           workgroup = WORKGROUP
    |                           prefered master = yes
    |
-----------
|  PC #3  | 192.168.2.11
| Win98   | LINUS (WORKGROUP)
-----------

The network/VPN is setup ok. I can ping any of these from any other
system. The problem is the browsing and Wins setup.

Here are the problems:

srvdungeon:/USERSPACE/root# smbclient -N -L srvsnoopy
Added interface ip=24.200.7.57 bcast=24.200.7.255 nmask=255.255.255.0
Added interface ip=192.168.1.5 bcast=192.168.1.255 nmask=255.255.255.0
Added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0
Added interface ip=10.222.222.1 bcast=10.222.222.255 nmask=255.255.255.0
Got a positive name query response from 127.0.0.1 ( 127.0.0.1 24.112.y.z
192.168.2.1 )

Development:/home/cube/source# smbclient -N -L srvsnoopy
Added interface ip=192.168.1.2 bcast=192.168.1.255 nmask=255.255.255.0
Added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0
Added interface ip=10.222.222.1 bcast=10.222.222.255 nmask=255.255.255.0
Got a positive name query response from 192.168.1.5 ( 192.168.2.1
24.112.y.z 127.0.0.1 )

As you can see the smbclient resolves "SRVSNOOPY" to the right address
if I run it from 192.168.1.2, but not from the WINS server itself
(192.168.1.5). On that machine, it gives me 127.0.0.1 as the address
(which is correct if I were running it on 192.168.2.1) and the result is
the browse list of 192.168.1.5 instead of 192.168.2.1.

I've seen problems with Win clients that popup up the very usefull error
message and not being able to browse to some machines. I suspect it's
related to this.

Is there a way to force nmbd wins server to repond with a particular IP?
So, I would always get the "LAN" address back instead of the
"Internet"
address or the 127.0.0.1 address?

Thanks.

--
Jean-Serge Gagnon <jsg@newlix.com>     (613)271-8995   fax:(613)591-0760
Newlix Corporation                      Applications Director