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 192.168.1.1 and DEVELOPMENT to be mapped to 192.168.1.2".

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 = 192.168.2.1, eth0:1 192.168.2.101, and eth0:2 192.168.2.102. 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 = 192.168.2.0/255.255.255.0
virtual netbios hosts = SALES/192.168.2.101 DEVELOPMENT/192.168.2.101

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


Reply via email to