Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Samba acting different on different subnets
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
GurliGebis
Retired Dev
Retired Dev


Joined: 08 Aug 2002
Posts: 509

PostPosted: Sun Jun 27, 2004 1:23 pm    Post subject: Samba acting different on different subnets Reply with quote

I would like to know if it is possible to make samba behave like a domain/local/preffered master on one subnet, and not on another.
_________________
Queen Rocks.
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Sun Jun 27, 2004 1:46 pm    Post subject: Reply with quote

I think that's the point of domain/local

local is only for the subnet the server is in, domain is for all subnets.
Back to top
View user's profile Send private message
GurliGebis
Retired Dev
Retired Dev


Joined: 08 Aug 2002
Posts: 509

PostPosted: Sun Jun 27, 2004 1:49 pm    Post subject: Reply with quote

well, I have two servers, that both behave like routers.

One of the is connected to the internet and to 192.168.3.0/24 , while the other is connected to 192.168.3.0/24 and 192.168.1.0/24 .
The one that is connected to the internet should be master for 192.168.3.0/24 , while the one connected to both of the subnets should be master for 192.168.1.0/24 , and a normal client for the 192.168.3.0/24 subnet.
_________________
Queen Rocks.
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Sun Jun 27, 2004 1:56 pm    Post subject: Reply with quote

I see your problem, why don't you just make the multihomed machine master for both subnets?
Back to top
View user's profile Send private message
GurliGebis
Retired Dev
Retired Dev


Joined: 08 Aug 2002
Posts: 509

PostPosted: Sun Jun 27, 2004 1:57 pm    Post subject: Reply with quote

I could, but it's a mobile server that I sometimes uses somewhere else for a few days, and then the 192.168.3.0/24 subnet would be without a master.
_________________
Queen Rocks.
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Sun Jun 27, 2004 1:58 pm    Post subject: Reply with quote

I think it would just hold an election an elect a new master based on OS level.
Back to top
View user's profile Send private message
GurliGebis
Retired Dev
Retired Dev


Joined: 08 Aug 2002
Posts: 509

PostPosted: Sun Jun 27, 2004 2:00 pm    Post subject: Reply with quote

hold on a sec, going to post the two configs.
_________________
Queen Rocks.
Back to top
View user's profile Send private message
GurliGebis
Retired Dev
Retired Dev


Joined: 08 Aug 2002
Posts: 509

PostPosted: Sun Jun 27, 2004 2:03 pm    Post subject: Reply with quote

Server on 192.168.3.0/24 and 192.168.1.0/24 (should act as wins server for 192.168.1.0/24, and announce its precens to 192.168.3.1.
Code:
[global]
workgroup = TUS
netbios name = TUS-Server
server string =
log file = /var/log/samba/log.%m
max log size = 50
local master = yes
domain master = yes
preferred master = yes
hosts allow = 192.168.1. 192.168.3. 127.
encrypt passwords = yes
smb passwd file = /etc/samba/private/smbpasswd
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
interfaces = 192.168.1.0/24 192.168.3.0/24
remote browse sync = 192.168.1.255
remote announce = 192.168.1.255 192.168.3.1
wins support = yes


Server on 192.168.3.0/24 (should act as wins server for 192.168.3.0/24.
Code:
[global]
workgroup = TUS
netbios name = GurliNET
server string =
log file = /var/log/samba/log
max log size = 50
local master = yes
domain master = yes
preferred master = yes
encrypt passwords = yes
os level = 64
smb passwd file = /etc/samba/private/smbpasswd
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
interfaces = 192.168.3.0/24
remote browse sync = 192.168.3.255
remote announce = 192.168.3.255
wins support = yes


What should I change?
_________________
Queen Rocks.
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Sun Jun 27, 2004 2:14 pm    Post subject: Reply with quote

I think if you just remove
local master = yes
domain master = yes

from the second smb.conf that way the multihomed server will be the master. When you remove it the other server should easily win all browser elections since it has os level = 64 and prefered master = yes.

Provided your clients know which WINS server to talk to WINS should work fine also.
Back to top
View user's profile Send private message
GurliGebis
Retired Dev
Retired Dev


Joined: 08 Aug 2002
Posts: 509

PostPosted: Sun Jun 27, 2004 2:16 pm    Post subject: Reply with quote

yep, the dhcp server on 192.168.3.0 tells them to use 192.168.3.1, and the server on 192.168.1.0 tells them to use 192.168.1.1.
Will the multihomed still be master for 192.168.1.0, and will it still announce to 192.168.3.1, so people on 192.168.3.0 can see it?
_________________
Queen Rocks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum