Proposal for extending 'netbios aliases' to 'netbios virtual hosts' for nmbd

Kashif Shaikh kshaikh at
Wed Jan 29 16:55:55 GMT 2003

Hello all(I'm a new face here),

Currently netbios aliases are bcast registered on every subnet on a 
multihomed box if samba is operating as a B-node. If it's operating as a 
P-node, then I assume samba will just use the interface where a WINS 
server is reachable(I haven't examined the code on this part, so I'm 
really ASSuming here).

Now on our multihomed box, if we have only one IP per subnet, then a 
netbios name/alias is registered with that only that IP which is all 
fine and dandy.  But in the case where you have multiple IPs per subnet, 
there is no clear cut way of telling samba, "I want SALES to be mapped 
to and DEVELOPMENT to be mapped to".

In my case, I get multiple IPs on a subnet through virtual IPs.  So in 
Linux I have eth0, eth0:1, eth0:2.  Let's attach some numbers to them 
for illustration: eth0 =, eth0:1, and eth0:2  Now if such a configuration exists, nmbd when operating 
as a B-node, will only register names and aliases on eth0, not on the 
eth0:1 or eth0:2 virtual interfaces.

What I propose is changing netbios aliases to simple netbios virtual 
hosts, where I can specify netbios name/IP mappings.  So a sample 
configuration item would be:

interfaces =
virtual netbios hosts = SALES/ DEVELOPMENT/

This would effectively register with WINS or through broadcast the 
name/ip mapping, provided the IPs exist on the local machine. But is 
this the best way to do it? Do I have massive holes in my knowledge that 
make my proposed method utterly fail?

Why I would do this: in a clustered failover environment, it's very 
useful to have the concept of virtual hosts for HA applications. 
Currently, I'm working off the 2.2.7a release branch.

Kashif Shaikh

More information about the samba-technical mailing list