[Samba] Multiple VLAN/subnet recommendations

David Magda dmagda at ee.ryerson.ca
Sat Jul 10 14:26:37 MDT 2010


On Jul 10, 2010, at 11:25, Mark Fox wrote:

> I've read that Samba can be given multiple netbios names and multiple
> configuration files to achieve something like what we want. But the  
> posts
> were very old. Has anything changed? Is there a better way to  
> achieve what
> we want now? Maybe what we want really isn't what want.

See smb.conf(5):

           socket address (G)
              This  option allows you to control what address Samba  
will listen
              for connections on. This is  used  to  support   
multiple  virtual
              interfaces  on  the  one server, each with a different  
configura-
              tion.

              By default Samba will accept connections on any address.

              Default: socket address =

              Example: socket address = 192.168.2.20

So you could have multiple configuration files, each configured to  
listen on a different port. You'd have also probably have multiple  
start up scripts for each instance that used the different config  
file. From smbd(8):

        -s <configuration file>
           The file specified contains the configuration  details   
required  by
           the  server.  The  information in this file includes server- 
specific
           information such as what printcap file to use, as well  as   
descrip-
           tions  of  all  the  services  that  the  server  is to  
provide. See
           smb.conf for more information. The default configuration   
file  name
           is determined at compile time.

Similar start-up scripts would be needed for nmbd(8). See also  
winbindd(8).

I'm not quite sure what problem you're trying to solve though. Why do  
you need the server listening on each subnet directly? And why the  
different names, do you have different domains? You can tell clients  
about the server with the "netbios-name-servers", "netbios-dd-server",  
and "netbios-node-type" ISC DHCP options.

You can forward DHCP requests from each subnet to a central server via  
an IP helper, which is a standard options on all router devices.

Your Samba, DHCP, DNS, and mail servers could then all live in their  
own VLAN on a "server subnet".


P. S. Personally, I find it easiest to use /24s to break up networks.  
It's easier for others to understand and easier to do "CIDR math"  
then /23s or /25s. :)



More information about the samba mailing list