6.7 Virtual Servers

   

Virtual servers can be used to create the illusion of having multiple servers on the network, when in reality there is only one. The technique is simple to implement: a system simply registers more than one NetBIOS name in association with its IP address. There are tangible benefits to doing this.

For example, the accounting department might have an accounting server, and clients of it would see just the accounting disks and printers. The marketing department could have its own server, marketing , with its own reports , and so on. However, all the services would be provided by one medium- size Unix server (and one relaxed administrator) instead of having one small server per department.

6.7.1 Virtual Server Configuration Options

Samba will allow a server to use more than one NetBIOS name with the netbios aliases option. See Table 6-7.

Table 6-7. Virtual server configuration options

Option

Parameters

Function

Default

Scope

netbios aliases

string (list of NetBIOS names )

Additional NetBIOS names to respond to, for use with multiple "virtual" Samba servers

None

Global

6.7.1.1 netbios aliases

The netbios aliases option can be used to give the Samba server more than one NetBIOS name. Each NetBIOS name listed as a value will be displayed in the Network Neighborhood of Windows clients. When a connection is requested to any of the servers, it will connect to the same Samba server.

This might come in handy, for example, if you're transferring three departments' data to a single Unix server with larger and faster disks and are retiring or reallocating the old Windows NT/2000 servers. If the three servers are called sales , accounting , and admin , you can have Samba represent all three servers with the following options:

 [global]     netbios aliases = sales accounting admin     include = /usr/local/samba/lib/smb.conf.%L 

See Figure 6-5 for what the Network Neighborhood would display from a client. When a client attempts to connect to Samba, it will specify the name of the server to which it's trying to connect, which is made available in the configuration file through the %L variable. If the requested server is sales , Samba will include the file /usr/local/samba/lib/smb.conf.sales . This file might contain global and share declarations exclusively for the sales team, such as the following:

 [global]     workgroup = SALES     hosts allow = 192.168.10.255 [sales2003]     path = /usr/local/samba/sales/sales2003/ ... 

This particular example would set the workgroup to SALES as well and set the IP address to allow connections only from the SALES subnet (192.168.10). In addition, it would offer shares specific to the sales department.

Figure 6-5. Using NetBIOS aliases for a Samba server
figs/sam2_0605.gif
   


Using Samba
Using Samba: A File and Print Server for Linux, Unix & Mac OS X, 3rd Edition
ISBN: 0596007698
EAN: 2147483647
Year: 2003
Pages: 475

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net