Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Network Troublshooting => Linux Servers Support => Topic started by: rajesh.bahl on April 01, 2007, 02:36:41 PM

Title: Network Browsing Problem With Samba Server
Post by: rajesh.bahl on April 01, 2007, 02:36:41 PM
Hi All !,

I am facing problem with Samba.
I am using CentOS 4.4 and using samba 3.0.10 that is part of standard distribution. My windows clients can see the Samba server and share files as desired without a problem.

If I go to Linux server running Samba and select Computer and then Network --- the cursor keeps appearing in the
"network " screen and the "Windows Network" icon appears after about 20 Minutes !!!!!

Is there any way we can reduce this time to some real time ?


Thanks in Advance
rajesh.bahl
Title: Network Browsing Problem With Samba Server
Post by: Ricky on April 02, 2007, 09:05:45 AM
Can you bring tcp dump while you open shares from samba ?

Also check if there is any packet loss in data transfer ?
Title: Network Browsing Problem With Samba Server
Post by: rajesh.bahl on April 02, 2007, 05:46:51 PM
Thanks Ricky !!

How to take tcp dump ? Can you please explain step by step ?


Regards
rajesh.bahl
Title: Network Browsing Problem With Samba Server
Post by: rajesh.bahl on April 02, 2007, 08:11:49 PM
One more input here!!

Samba server is having two ethernet cards . eth0 is connected to internet and eth1 is connected to internal network.

If I disable eth0 and try browsing the network --It immediately opens the window having "Windows network". The moment I enable eth0 again , the first network browsing window takes almost 20 minutes to come up.


Regards
rajesh.bahl
Title: Network Browsing Problem With Samba Server
Post by: Ricky on April 03, 2007, 06:50:16 PM
I have not used samba from long but somewhere in its config file you can specify that which eth. should bind itself to.

Btw, now its clear that it actually also try to query net (as I expected and hence was asking for tcpdump to figure out certain possibilities) .


BTW, tcpdump is nice tool , you can see its nice usage info at ..
www2.papamike.ca:8082/tutorials/pub/tcpdump.html
Title: Network Browsing Problem With Samba Server
Post by: gauravbajaj on April 04, 2007, 10:17:46 AM
Really the problem is strange............

Just send ur smb.conf file or paste it here...........
Title: Network Browsing Problem With Samba Server
Post by: rajesh.bahl on April 04, 2007, 05:16:26 PM
Here's my amb.conf file:-

[global]

   workgroup = MYGROUP
   server string = Samba Server
   printcap name = /etc/printcap
   load printers = yes
   printing = cups
   log file = /var/log/samba/%m.log
   max log size = 50
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   interfaces = eth1
   bind interfaces only = Yes
   local master = yes
   preferred master = yes


#============================ Share Definitions ==============================
   idmap uid = 16777216-33554431
   idmap gid = 16777216-33554431
   template shell = /bin/false
   winbind use default domain = no
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
# Set public = yes to allow user 'guest account' to print
   guest ok = no
   writable = no
   printable = yes


Please correct me where I am going wrong.


regards
rajesh.bahl
Title: Network Browsing Problem With Samba Server
Post by: gauravbajaj on April 05, 2007, 06:30:42 AM
Hi

Can u send me the file /etc/hosts,...................
Title: Network Browsing Problem With Samba Server
Post by: rajesh.bahl on April 05, 2007, 03:30:17 PM
Hi Gaurav !

This is my /etc/hosts:


# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1   linserver.bahl.net   linserver   localhost.localdomain   localhost




Regards
rajesh.bahl
Title: Network Browsing Problem With Samba Server
Post by: gauravbajaj on April 07, 2007, 01:57:51 PM
ok

Do one thing add your internal ip and hostname in this file


your_ip    linserver.bahl.net linserver


Hope that it wil work

Gaurav
Title: Network Browsing Problem With Samba Server
Post by: rajesh.bahl on April 07, 2007, 05:49:21 PM
I tried by including the internal ip and hostname but no improvement is there.


regards
rajesh.bahl
Title: Network Browsing Problem With Samba Server
Post by: gauravbajaj on April 10, 2007, 04:34:37 AM
ok.........

So u have two ethernet card

eth0 and eth1

eth0--------------> Connected to internet.

eth1--------------> Connected to internal LAN.

please tel me your public IP ,the gateway at eth0

and the gateway at eth1

and the gateway of all clients connected to LAN

All Clients computers gateway  should be your internal ip of eth1........

Please let me know the whole senerio......

Gaurav
Title: Network Browsing Problem With Samba Server
Post by: rajesh.bahl on April 11, 2007, 09:51:47 AM
The interface eth0 is connected to internet and the IP/DNS etc are configured dynamically.
All the clients on the LAN have gateway as the ip of eth1. All clients can share the disk and browse very well. It is only the server that has an issue of browsing.

I feel that if some how we can specify only eth1 to be configured in SAMBA the problem might get sorted out. But how to do that -----is the real problem ?




rajesh.bahl
Title: Network Browsing Problem With Samba Server
Post by: gauravbajaj on April 12, 2007, 08:12:28 AM
Hmm...............................

I think its a problem at the gateway at public NIC give one more gateway there not default as ur internal ip i.e of eth1

Your query is:

"I feel that if some how we can specify only eth1 to be configured in SAMBA the problem might get sorted out. But how to do that -----is the real problem ?"

But u have already configured samba with eth1 itself:

Here's ur smb.conf file

"
Posted: Wed Apr 04, 2007 5:16 pm    Post subject:  

--------------------------------------------------------------------------------
 
Here's my smb.conf file:-

[global]

workgroup = MYGROUP
server string = Samba Server
printcap name = /etc/printcap
load printers = yes
printing = cups
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
interfaces = eth1   ------------> {U have already configured samba  with eth1 }
bind interfaces only = Yes
local master = yes
preferred master = yes

Any comment Ricky????


Gaurav
Title: Network Browsing Problem With Samba Server
Post by: rajesh.bahl on April 12, 2007, 03:23:16 PM
Perfectly okay. But it does not seem to work.
The moment I disable eth0 interface manually, the "first" network window appears immediately.



rajesh.bahl
Title: Network Browsing Problem With Samba Server
Post by: gauravbajaj on April 13, 2007, 05:36:45 AM
Try and add the following  at interfaces

[global]

workgroup = MYGROUP
server string = Samba Server
printcap name = /etc/printcap
load printers = yes
printing = cups
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
interfaces = eth1 lo -----------> { add l0 also here i.e loopback }
bind interfaces only = Yes
local master = yes
preferred master = yes





Give one more  try........
Title: Re: Network Browsing Problem With Samba Server
Post by: rajesh.bahl on April 26, 2007, 04:40:28 PM

No improvement !!!



rajesh.bahl
Title: Re: Network Browsing Problem With Samba Server
Post by: Ricky on April 26, 2007, 07:04:48 PM
hmm...

I saw that Gaurav already suggested all possible solution.
You may now try something different.
May be blocking query by Samba on eth0 ie. internet using iptables ?
May I know which port exactly is used by Samba to do its stuff .?