hi! Sorry in advance if I am not on the right mailing-list and sorry if my question is cover somewhere is doc (I didn't find anything). The result from nmblookup (same result on all platform) for a given samba server isn't what I expect. The key part of my smb.conf is: [global] netbios name = ourserver2 netbios aliases = ourserverdev ourserverlab ourserver name resolve order = hosts bcast And the key part of my /etc/hosts is: 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 (Having it or not in lmhosts doesn't change anything.) My hostname is set to ourserver2. And the last but not the least is my 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 querying ourserver2 on 10.10.10.255 10.10.10.12 ourserver2<00> $ nmblookup ourserverdev querying ourserverdev on 10.10.10.255 10.10.10.12 ourserverdev<00> $ nmblookup ourserverlab querying ourserverlab on 10.10.10.255 10.10.10.12 ourserverlab<00> It is the stock samba server (with updates) coming with Redhat 9 : $ rpm -q samba samba-2.2.7a-8.9.0 A tcpdump/ethereal show me that it is really 10.10.10.2 that answers me. Is it normal that I get 10.10.10.12 for every machine ? How comes ? Thanks in advance. Richard
Is it host or hosts ? Then, what do you have in /etc/resolv.conf and /etc/hosts.conf? Joel On Thu, Jun 19, 2003 at 08:40:13AM -0400, Richard Prescott wrote:> hi! > > Sorry in advance if I am not on the right mailing-list and sorry if my > question is cover somewhere is doc (I didn't find anything). > > The result from nmblookup (same result on all platform) for a given > samba server isn't what I expect. > > The key part of my smb.conf is: > [global] > netbios name = ourserver2 > netbios aliases = ourserverdev ourserverlab ourserver > name resolve order = hosts bcast > > And the key part of my /etc/hosts is: > > 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 > > (Having it or not in lmhosts doesn't change anything.) > > My hostname is set to ourserver2. > > And the last but not the least is my 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 > querying ourserver2 on 10.10.10.255 > 10.10.10.12 ourserver2<00> > $ nmblookup ourserverdev > querying ourserverdev on 10.10.10.255 > 10.10.10.12 ourserverdev<00> > $ nmblookup ourserverlab > querying ourserverlab on 10.10.10.255 > 10.10.10.12 ourserverlab<00> > > It is the stock samba server (with updates) coming with Redhat 9 : > $ rpm -q samba > samba-2.2.7a-8.9.0 > > A tcpdump/ethereal show me that it is really 10.10.10.2 that answers me. > > Is it normal that I get 10.10.10.12 for every machine ? How comes ? > > Thanks in advance. > > Richard > > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
>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.12Sure, 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
>> >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! >> > >Ok then, how do I configure things in such way that >nmblookup (and windows machines) will return >10.10.10.10 for ourserver instead of 10.10.10.12.That's easy, Richard. Just configure your ourserver as an alias or hostname for a machine with an IP addresss of 10.10.10.10. How else?>Note that gethostbynam() returns 10.10.10.10.Sure, if you set up your nsswitch.conf to first look into files before calling a dns server and your /etc/hosts contains a line saying 10.10.10.10 is the IP address of ourserver then gethostbynam() will return 10.10.10.10 as the IP address of ourserver. You could even fool a DNS server if your hat were black enough. There's nothing contradictory here, just a simple principle: Garbage in, garbage out.>I don't put the fault on mnblookup. Far from that. >Let's me show you the ethereal output (transcripted) : > >source destination info >10.10.10.111 10.10.10.255 Name query NB OURSERVER<00> >10.10.10.2 10.10.10.111 response NB 10.10.10.12 > >As you can see, the smb service is binded to >10.10.10.2:137 and it answers 10.10.10.12 in the >message.Where do you see any inconsistency? Your client 10.10.10.111 broadcasts to everyone in 10.10.10.0/24, someone may please let him know which IP address goes under the WINS name of OURSERVER. A server of yours whose eth0 is primarily bound to global IP address of 10.10.10.2 reads the broadcast and passes it over to nmbd. nmbd consults browse.dat and wins.tdb and finds that OURSERVER was most recently updated as having the address of 10.10.10.12. This piece of wisdom will be put on the wire by your said server with address 10.10.10.2 where it's intercepted by ethereal. End of story. As you have seen, there's no mistery. The only question is, why would you want to confuse a perfectly functioning samba server in this particular way? I don't doubt that you have some lofty motives, but perhaps you may go for a compromise solution, which isn't exactly how you thought things would work out but at least you have happy users being industriously served by a fantastic piece of open source software. I know what you want, Richard. You want different WINS aliases of your samba server to be reported under different IP addresses, all of them in the same logical subnet. Taking into consideration the present state of development of TCP/IP and SMB one way to achieve that is for you to rewrite the nmbd.c in such a way that it looks up your /etc/hosts instead of wins.dat and browse.tdb. I'm afraid that would have some very nasty side effects, but hey, what the hell, give it a try. But why would you want that? What's the perceived benefit that you expect from forcing a samba server with 10 aliases and 10 IP addresses, OK 5 not 10, all in the same subnet, to remember exactly which IP address should belong to which WINS alias? Cheers Dragan ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005
Possibly Parallel Threads
- range query for terms
- Direct network link for glusterfs servers and client mount glusterfs from lan
- Multiple Samba Instances on a Single Distribution.
- syslinux 6.03pre17 + gpxelinux.0 + iso from http not working
- syslinux 6.03pre17 + gpxelinux.0 + iso from http not working