nmbd and loopback

Yuval Yeret yuval at exanet.com
Thu Feb 21 01:58:02 GMT 2002

A quick update on what I achieved. This might be interesting for folks
looking to run samba in a cluster with Load Balancing, and not just High
Availability in mind. Also relevant to the LVS group as my virtual IP
implementation is related to that.

What I did was run nmbd on one node2, and smbd on node3. The relevant
lines from the configuration file for both was:

#======================= Global Settings

   netbios name = Exanet
   workgroup = exanet-il
   server string = CIFS Server

   interfaces =
   #bind interfaces only = True

And a virtual IP mechanism was in place which sent clients for VIP to node3.

At first I put interfaces= nmbd wouldn't
start because it only saw loopback (non-broadcast) interfaces. I then
put the which is the VIP + the subnet mask of
the real interface. 

The interfaces in question on both nodes look like this:
	eth1      Link encap:Ethernet  HWaddr 00:02:B3:90:D9:8F  
          inet addr:  Bcast:  Mask:	
	lo:so0    Link encap:Local Loopback  
          inet addr:  Mask:
	eth1      Link encap:Ethernet  HWaddr 00:02:B3:90:D9:76  
          inet addr:  Bcast:  Mask:
	lo:so0    Link encap:Local Loopback  
          inet addr:  Mask:

I also use the hidden-arp patch on the lo interface (this means the node
will not answer broadcast ARPs for this interface, but will answer
unicast arp, and also might use it to communicate. It's used heavily in
LVS and other HA stuff).

After this change, what happens is I succeed in starting nmbd and smbd
on separate nodes, and can do both net view \\exanet
and net use \\exanet and net use \\

An issue I'm looking at now is integration of winbindd into this
configuration. I'm thinking winbind should be near the nmb (only one
instance per cluster), and therefore might need to replace the unix
domain socket used between the nss library and the winbind daemon with
UDP sockets. If anyone has done this and has some pointers, or better
yet, a working specimen, I would like to hear about it. 

Hope my experiment is useful for future work in the area of integrating
LVS and Samba. I believe the issues aren't too difficult and Linux
Clusters in general would benefit from being able to Load Balance across
Samba servers.

Regards, yuval
yuval at exanet.com

> -----Original Message-----
> From: Yuval Yeret 
> Sent: Wednesday, February 20, 2002 8:12 AM
> To: 'samba-technical at lists.samba.org'
> Subject: nmbd and loopback
> hi,
> I'm looking for a way to make samba and especially nmbd bind 
> to an ethernet interface, but still use an IP from a loopback 
> interface for all registration, name resolving answers, etc.
> Can I do that ? 
> Also are there restrictions that nmbd should run on the same 
> machine as smbd ? 
> And is there any good reference about samba in a clustering 
> environment ? 
> thanks, yuval
> yuval at exanet.com

More information about the samba-technical mailing list