[Samba] Re: Unexpected IP resolution

Dragan Krnic dkrnic at lycos.com
Fri Jun 20 18:27:12 GMT 2003


>The result from nmblookup (same result on all 
>platform) for a given samba server isn't what I 
>expect.

But it is exactly what nmblookup expects if you
configure your card the way you did!

>[global]
> netbios name = ourserver2
> netbios aliases = ourserverdev ourserverlab ourserver
> name resolve order = hosts bcast
>
>/etc/hosts
>10.10.10.1             ourserver1
>10.10.10.2             ourserver2
>10.10.10.10            ourserver
>10.10.10.11            ourserverdev
>10.10.10.12            ourserverlab
>
>My hostname is set to ourserver2.
>
>ifconfig :
>2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc >pfifo_fast qlen 100
> link/ether 00:99:fc:99:99:fc brd ff:ff:ff:ff:ff:ff
> inet 10.10.10.2/24 brd 10.10.10.255 scope global eth0
> inet 10.10.10.10/24 brd 10.10.10.255 scope global secondary eth0:1
> inet 10.10.10.11/24 brd 10.10.10.255 scope global secondary eth0:2
> inet 10.10.10.12/24 brd 10.10.10.255 scope global secondary eth0:3
>
>On whatever machine I run a nmblookup, I get :
>$ nmblookup ourserver2 ->querry ourserver2 on 10.10.10.255 =>10.10.10.12 
>$ nmblookup ourserverdev ->querry ourserverdev on 10.10.10.255 =>10.10.10.12 
>$ nmblookup ourserverlab ->querry ourserverlab on 10.10.10.255 =>10.10.10.12 

Sure, that's what got entered in the WINS tdb.

>A tcpdump/ethereal show me that it is really >10.10.10.2 that answers me.

Of course. The computer knows its name is ourserver2
and its address is 10.10.10.2. You didn't ask the
computer to tell you its name and address. You
asked nmblookup to tell you what address is entered
for each of those names. Now you know - each one is 
pegged to 10.10.10.12.

>Is it normal that I get 10.10.10.12 for every >machine ?  How comes ?

Yes, it's normal. Giving several addresses in the
same network to an ether card just doesn't cut it.
You may just as well leave the real address and set 
different aliases to map to the same IP address, 
although it's questionable what that may be good for.

So, what did you actually want to do? Perhaps there
are easier ways to do it and someone on this list
can help you. We know that you would like nmblookup
to give you a different address for every alias but
we don't know why you would want something like that.
What should such obfuscation accomplish?


____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005



More information about the samba mailing list