1<HTML> 2<HEAD> 3<TITLE> 4[Chapter 4] 4.7 Virtual Servers</title><META NAME="DC.title" CONTENT=""><META NAME="DC.creator" CONTENT=""><META NAME="DC.publisher" CONTENT="O'Reilly & Associates, Inc."><META NAME="DC.date" CONTENT="1999-11-05T21:32:17Z"><META NAME="DC.type" CONTENT="Text.Monograph"><META NAME="DC.format" CONTENT="text/html" SCHEME="MIME"><META NAME="DC.source" CONTENT="" SCHEME="ISBN"><META NAME="DC.language" CONTENT="en-US"><META NAME="generator" CONTENT="Jade 1.1/O'Reilly DocBook 3.0 to HTML 4.0"></head> 5<BODY BGCOLOR="#FFFFFF" TEXT="#000000" link="#990000" vlink="#0000CC"> 6<table BORDER="0" CELLPADDING="0" CELLSPACING="0" width="90%"> 7<tr> 8<td width="25%" valign="TOP"> 9<img hspace=10 vspace=10 src="gifs/samba.s.gif" 10alt="Using Samba" align=left valign=top border=0> 11</td> 12<td height="105" valign="TOP"> 13<br> 14<H2>Using Samba</H2> 15<font size="-1"> 16Robert Eckstein, David Collier-Brown, Peter Kelly 17<br>1st Edition November 1999 18<br>1-56592-449-5, Order Number: 4495 19<br>416 pages, $34.95 20</font> 21<p> <a href="http://www.oreilly.com/catalog/samba/">Buy the hardcopy</a> 22<p><a href="index.html">Table of Contents</a> 23</td> 24</tr> 25</table> 26<hr size=1 noshade> 27<!--sample chapter begins --> 28 29<center> 30<DIV CLASS="htmlnav"> 31<TABLE WIDTH="515" BORDER="0" CELLSPACING="0" CELLPADDING="0"> 32<TR> 33<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="172"> 34<A CLASS="sect1" HREF="ch04_06.html" TITLE="4.6 Networking Options with Samba"> 35<IMG SRC="gifs/txtpreva.gif" ALT="Previous: 4.6 Networking Options with Samba" BORDER="0"></a></td><TD ALIGN="CENTER" VALIGN="TOP" WIDTH="171"> 36<B> 37<FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1"> 38<A CLASS="chapter" REL="up" HREF="ch04_01.html" TITLE="4. Disk Shares "> 39Chapter 4<br> 40Disk Shares </a></font></b></td><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="172"> 41<A CLASS="sect1" HREF="ch04_08.html" TITLE="4.8 Logging Configuration Options"> 42<IMG SRC="gifs/txtnexta.gif" ALT="Next: 4.8 Logging Configuration Options" BORDER="0"></a></td></tr></table> <hr noshade size=1></center> 43</div> 44<blockquote> 45<div> 46<H2 CLASS="sect1"> 47<A CLASS="title" NAME="ch04-16899"> 484.7 Virtual Servers</a></h2><P CLASS="para">Virtual servers are a technique for creating the illusion of multiple NetBIOS servers on the network, when in reality there is only one. The technique is simple to implement: a machine simply registers more than one NetBIOS name in association with its IP address. There are tangible benefits to doing this.</p><P CLASS="para"> 49The accounting department, for example, might have an <CODE CLASS="literal"> 50accounting</code> server, and clients of it would see just the accounting disks and printers. The marketing department could have their own server, <CODE CLASS="literal"> 51marketing</code>, with their own reports, and so on. However, all the services would be provided by one medium-sized Unix workstation (and one relaxed administrator), instead of having one small server and one administrator per department.</p><P CLASS="para"> 52Samba will allow a Unix server to use more than one NetBIOS name with the <CODE CLASS="literal"> 53netbios</code> <CODE CLASS="literal"> 54aliases</code> option. See <A CLASS="xref" HREF="ch04_07.html#ch04-92259"> 55Table 4.6</a>. </p><br> 56<TABLE CLASS="table" BORDER="1" CELLPADDING="3"> 57<CAPTION CLASS="table"> 58<A CLASS="title" NAME="ch04-92259"> 59Table 4.6: Virtual Server Configuration Options </a></caption><THEAD CLASS="thead"> 60<TR CLASS="row" VALIGN="TOP"> 61<TH CLASS="entry" ALIGN="LEFT" ROWSPAN="1" COLSPAN="1"> 62<P CLASS="para"> 63Option</p></th><TH CLASS="entry" ALIGN="LEFT" ROWSPAN="1" COLSPAN="1"> 64<P CLASS="para"> 65Parameters</p></th><TH CLASS="entry" ALIGN="LEFT" ROWSPAN="1" COLSPAN="1"> 66<P CLASS="para"> 67Function</p></th><TH CLASS="entry" ALIGN="LEFT" ROWSPAN="1" COLSPAN="1"> 68<P CLASS="para"> 69Default</p></th><TH CLASS="entry" ALIGN="LEFT" ROWSPAN="1" COLSPAN="1"> 70<P CLASS="para"> 71Scope</p></th></tr></thead><TBODY CLASS="tbody"> 72<TR CLASS="row" VALIGN="TOP"> 73<TD CLASS="entry" ROWSPAN="1" COLSPAN="1"> 74<P CLASS="para"> 75<CODE CLASS="literal"> 76netbios aliases</code></p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1"> 77<P CLASS="para">List of NetBIOS names</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1"> 78<P CLASS="para"> 79Additional NetBIOS names to respond to, for use with multiple "virtual" Samba servers.</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1"> 80<P CLASS="para"> 81None</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1"> 82<P CLASS="para"> 83Global</p></td></tr></tbody></table><DIV CLASS="sect2"> 84<H3 CLASS="sect2"> 85<A CLASS="title" NAME="ch04-pgfId-962377"> 864.7.1 netbios aliases</a></h3><P CLASS="para"> 87The <CODE CLASS="literal"> 88netbios</code> <CODE CLASS="literal"> 89aliases</code> 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 a browsing machine. When a connection is requested to any machine, however, it will connect to the same Samba server.</p><P CLASS="para"> 90This might come in handy, for example, if you're transferring three departments' data to a single Unix server with modern large disks, and are retiring or reallocating the old NT servers. If the three servers are called <CODE CLASS="literal"> 91sales</code>, <CODE CLASS="literal"> 92accounting</code>, and <CODE CLASS="literal"> 93admin</code>, you can have Samba represent all three servers with the following options:</p><PRE CLASS="programlisting"> 94[global] 95 netbios aliases = sales accounting admin 96 include = /usr/local/samba/lib/smb.conf.%L</pre><P CLASS="para"> 97See <A CLASS="xref" HREF="ch04_07.html#ch04-28393"> 98Figure 4.7</a> 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 that it's trying to connect to, which you can access through the <CODE CLASS="literal"> 99%L</code> variable. If the requested server is <CODE CLASS="literal"> 100sales</code>, Samba will include the <I CLASS="filename"> 101/usr/local/samba/lib/smb.conf.sales</i> file. This file might contain global and share declarations exclusively for the sales team, such as the following:</p><PRE CLASS="programlisting"> 102[global] 103 workgroup = SALES 104 hosts allow = 192.168.10.255 105 106[sales1998] 107 path = /usr/local/samba/sales/sales1998/ 108...</pre><P CLASS="para"> 109This 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. </p><H4 CLASS="figure"> 110<A CLASS="title" NAME="ch04-28393"> 111Figure 4.7: Using NetBIOS aliases for a Samba server </a></h4><IMG CLASS="graphic" SRC="figs/sam.0407.gif" ALT="Figure 4.7"></div></div></blockquote> 112<div> 113<center> 114<hr noshade size=1><TABLE WIDTH="515" BORDER="0" CELLSPACING="0" CELLPADDING="0"> 115<TR> 116<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="172"> 117<A CLASS="sect1" HREF="ch04_06.html" TITLE="4.6 Networking Options with Samba"> 118<IMG SRC="gifs/txtpreva.gif" ALT="Previous: 4.6 Networking Options with Samba" BORDER="0"></a></td><TD ALIGN="CENTER" VALIGN="TOP" WIDTH="171"> 119<A CLASS="book" HREF="index.html" TITLE=""> 120<IMG SRC="gifs/txthome.gif" ALT="" BORDER="0"></a></td><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="172"> 121<A CLASS="sect1" HREF="ch04_08.html" TITLE="4.8 Logging Configuration Options"> 122<IMG SRC="gifs/txtnexta.gif" ALT="Next: 4.8 Logging Configuration Options" BORDER="0"></a></td></tr><TR> 123<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="172"> 1244.6 Networking Options with Samba</td><TD ALIGN="CENTER" VALIGN="TOP" WIDTH="171"> 125<A CLASS="index" HREF="inx.html" TITLE="Book Index"> 126<IMG SRC="gifs/index.gif" ALT="Book Index" BORDER="0"></a></td><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="172"> 1274.8 Logging Configuration Options</td></tr></table><hr noshade size=1></center> 128</div> 129 130<!-- End of sample chapter --> 131<CENTER> 132<FONT SIZE="1" FACE="Verdana, Arial, Helvetica"> 133<A HREF="http://www.oreilly.com/"> 134<B>O'Reilly Home</B></A> <B> | </B> 135<A HREF="http://www.oreilly.com/sales/bookstores"> 136<B>O'Reilly Bookstores</B></A> <B> | </B> 137<A HREF="http://www.oreilly.com/order_new/"> 138<B>How to Order</B></A> <B> | </B> 139<A HREF="http://www.oreilly.com/oreilly/contact.html"> 140<B>O'Reilly Contacts<BR></B></A> 141<A HREF="http://www.oreilly.com/international/"> 142<B>International</B></A> <B> | </B> 143<A HREF="http://www.oreilly.com/oreilly/about.html"> 144<B>About O'Reilly</B></A> <B> | </B> 145<A HREF="http://www.oreilly.com/affiliates.html"> 146<B>Affiliated Companies</B></A><p> 147<EM>© 1999, O'Reilly & Associates, Inc.</EM> 148</FONT> 149</CENTER> 150</BODY> 151</html> 152