Two sambas in the same machine ?

Dani Camps danicamps81 at yahoo.com
Thu Mar 10 14:21:56 GMT 2005


I want to have a workgroup that spans more than one
subnet. This is my setup:

                   INTERNET
                       |
                   __eth1__               
    |--------eth0|_______|eth2-----------|
192.168.0.0/24    Gateway         192.168.1.0/24

     <----------------------------------->
                   WORKGROUP

eth0:192.168.0.1 and gateway of the 192.168.0.0/24
eth2:192.168.1.1 and gateway of the 192.168.1.0/24
eth1:public IP, doing NAT of the internal subnets

The Gateway is a Fedora Core 3 box where I have Samba
3.0.10 installed. I have Samba configured to be a WINS
server in that machine.

What I have now and it doesn't work is the following:
In the gateway machine I have one instance of Samba
running with this configuration:
-------------------------------------------------
hosts allow=127. 192.168.0. 192.168.1.
...
socket options = TCP_NODELAY SO_RCVBUF=8192
SO_SNDBUF=8192
...
interfaces=192.168.0.1/24 192.168.1.1/24 127.0.0.1/8
bind interfaces only=yes
...
#To be the DMB and LMB of each subnet
domain master = yes
local master = yes
os level = 255
preferred master = yes
...
#To be the WINS server
name resolve order = wins lmhosts bcast
wins support = yes
dns proxy = no
------------------------------------------

I configure all the clients using DHCP this way in
both subnets:
--------------------------------------------
option netbios-name-servers 192.168.0.1;
option netbios-node-type 2;
--------------------------------------------

What is happening exactly now is the following:

1-The subnet 192.168.0.0/24 works perfect, but the
machines there only see machines in that subnet. But
browsing works.

2-The machines in the 192.168.1.0/24 subnet are the
ones doing more weird things:
 -I can not do browsing from those machines. If I try 
to use the network neighborhood icon or do "net view"
I get "error 53-Impossible to access the network".
 -But from those machines I can do "nbtstat -a
NAME_MACHINE" and this works perfect, with any machine
in any subnet. So it seems a browsing problem, maybe
the samba machine is not the LMB in that subnet ? If I
try "nbtstat -a GATEWAY" it says is the LMB (appears
..__MSBROWSE__.)
 -I have tried the clients in this subnet to be p-node
or h-node and the behavior is exactly the same.

I don't know what could be failing. I think that
theoretically what I need to make what I want work is:

-One LMB, being a machine with samba, in each subnet.
-One DMB, being one of the two LMBs.
-One WINS server, one of the two LMBs, and configure
the clients to use WINS.

So maybe what I need is to have two instances of samba
running in the gateway machine and listening only one
interface (either eth0 or eth2), to assure having one
LMB in each subnet. Both instances would be the LMB of
their subnets and one of them would be in addition the
DMB and the WINS server. Is this the only way to make
work that setup ? (I know it could be some problems in
having two instances of samba in the same machine)


Thanks !

PD:I tried to post this in the samba general mailing
list but I got no answer so I try here.






		
__________________________________ 
Do you Yahoo!? 
Yahoo! Sports - Sign up for Fantasy Baseball. 
http://baseball.fantasysports.yahoo.com/


More information about the samba-technical mailing list