[Samba] Samba with 2 NICs

hamacker sirhamacker at gmail.com
Sat Sep 20 15:35:42 GMT 2008


I bond two NICs in same IP, basicly :
# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:0c:76:97:04:f3
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:76ff:fe97:4f3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22185515 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20365072 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:12422061457 (11.5 GB)  TX bytes:7350461490 (6.8 GB)
          Interrupt:18 Base address:0x2000
# modprobe bonding
# ifconfig bond0 192.168.1.2 netmask 255.255.255.0
# ifenslave -v bond0 eth0 eth1
# route add default gw 192.168.1.254

I did tests very well on my switch (on/off ports) and ping from
network - it's run fine. I check default route before and after bond.

My problem is that only WinXP can logon into domain if two nics are
enabled(with bond or not), win95/98 dont logon (with bond or not).

# cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
	address 192.168.1.2
	netmask 255.255.255.0
	network 192.168.1.0
	broadcast 192.168.1.255
	gateway 192.168.1.254
 	dns-nameservers 192.168.1.14
 	dns-search vidylab.com.br

# samba wont authenticate win9x machines if eth1enabed
# then I comment bellow lines
#auto eth1
#iface eth1 inet static
#        address 192.168.1.3
#        netmask 255.255.255.0
#        network 192.168.1.0
#        broadcast 192.168.1.255
#        gateway 192.168.1.254
#        # dns-* options are implemented by the resolvconf package, if installed
#        dns-nameservers 192.168.1.14
#        #dns-nameservers 200.204.0.10, 200.204.0.138
#        dns-search vidylab.com.br

my smb.conf :
[global]
	unix charset = UTF8
	workgroup = VIDY2005
	server string = %h server (Samba %v)
	interfaces = eth0, eth1
	obey pam restrictions = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *New*password* %n\n *Please*retype*new*password* %n\n
*password*successfully*updated*
	unix password sync = Yes
	lanman auth = Yes
	syslog = 0
	log file = /var/log/samba/log.%m.%U
	max log size = 10000
	smb ports = 139
	name resolve order = hosts wins bcast
	time server = Yes
	socket options = TCP_NODELAY SO_RCVBUF=16384 IPTOS_LOWDELAY
	printcap name = cups
	add user script = /usr/sbin/useradd -m '%u'
	rename user script = /usr/sbin/usermod -l '%unew' '%uold'
	delete user script = /usr/sbin/userdel -r '%u'
	add group script = /usr/sbin/groupadd '%g'
	delete group script = /usr/sbin/groupdel '%g'
	add user to group script = /usr/bin/gpasswd -a '%u' '%g'
	delete user from group script = /usr/bin/gpasswd -d '%u' '%g'
	set primary group script = /usr/sbin/usermod -g '%g' '%u'
	add machine script = /usr/sbin/adduser -n -r -g machines -c "Samba
machine" -d /dev/null -s /bin/false %u
	logon script = scripts\%u.bat
	logon path = \\%L\profiles\%U
	logon home = /home/samba/netlogon
	domain logons = Yes
	os level = 100
	preferred master = Yes
	domain master = Yes
	dns proxy = No
	panic action = /usr/share/samba/panic-action %d
	idmap uid = 10000-20000
	idmap gid = 10000-20000
	template shell = /bin/bash
	create mask = 0777
	force create mode = 0777
	force security mode = 0777
	directory mask = 0777
	force directory mode = 0777
	force directory security mode = 0777
	cups options = raw
	preserve case = No
	short preserve case = No
	veto oplock files = /*.odt/*.doc/*.xls/*.mdb/


2008/9/20 Chris Smith <smb_77 at chrissmith.org>:
> On Friday 19 September 2008 08:35:58 am hamacker wrote:
>> I did that.
>> I test, and everything is OK.
>> It's not misconfiguration.
>>
>> When 2 NICs bonded (or 2 NICs only enabled), WinXP can logon into
>> domain and win95/98 can not. If I disable one NIC then any OS can
>> logon into domain.
>
> From your first post:
>
>>    #interfaces = 192.168.1.2/24 192.168.1.3 127.
>>    interfaces = eth0 eth1
>
> It looks like you have 2 nic's on the same subnet but not bonded or you would
> not have 2 different IP addresses and the interface would be called bond0.
> This scenario - 2 nics on the same subnet, AFAIK, will generally not work.
>
> Once you bond them there will only be one IP address for the bonded interface
> bond0. You will need to pick a proper bonding mode for your needs and switch
> configuration (see bonding.txt in your kernel source documentation).
>
> Also try:
>
> smb ports = 139
>
> in the global section of your smb.conf file.
>
> Chris
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/listinfo/samba
>


More information about the samba mailing list