LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-10-2006, 04:53 AM   #1
Sammael
Member
 
Registered: Jun 2006
Location: Slovakia, currently working in Liverpool UK
Distribution: Gentoo 2006.0
Posts: 97

Rep: Reputation: 15
Question smb4k + 2 networks problem


hi,

i've recently installed samba to connect to my friends wintendo box. we are connected via ethernet cable with adresses 192.168.0.x and 192.168.0.y.

we also have an internet connection via wireless router with adresses 192.168.1.x and 192.168.1.y.

i'd like to use smb4k to browse local network, because i like it, but here lies the problem.

whenever smb4k searches for new computers, it finds my friends box, but only through router adress. this makes file transfer incredibly slow. if i type lan adress into search bar it finds it but that's all. i can ping my friend, and he can connect to my box no problem.

so how can i tell smb4k to scan only 192.168.0.x adresses? i played with config files by myself, which resulted in re-emerging of samba :-( so now i'm seeking some proffesional advice;-)

i can connect to my friend in konqueror via samba io slave (smb://) and copy data ~2-3mb/s (which is slow, but hey, it's samba). so problem is in smb4k config, but i can't seem to find the relevant settings.

Last edited by Sammael; 09-11-2006 at 05:13 AM.
 
Old 09-10-2006, 06:47 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
This sounds much more like a routing issue and a problem with smb4k. Open a konsole and run the command 'netstat -r' without the quotes. Look for an entry for the 192.168.0.x sub-net. I suspect you will need to add one.
 
Old 09-11-2006, 05:11 AM   #3
Sammael
Member
 
Registered: Jun 2006
Location: Slovakia, currently working in Liverpool UK
Distribution: Gentoo 2006.0
Posts: 97

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by camorri
This sounds much more like a routing issue and a problem with smb4k. Open a konsole and run the command 'netstat -r' without the quotes. Look for an entry for the 192.168.0.x sub-net. I suspect you will need to add one.
Code:
sammael@high-flyer ~ $ netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.0     *               255.255.255.0   U         0 0          0 wlan0
loopback        *               255.0.0.0       U         0 0          0 lo
default         dsldevice.lan   0.0.0.0         UG        0 0          0 wlan0
i don't see route for 192.168.0.x interface, how do i add it?

thanks!
 
Old 09-11-2006, 09:01 AM   #4
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
To add a route, you use the 'route add' command. Here is an example.

Quote:
route add -net 192.56.76.0 netmask 255.255.255.0 dev eth0
You will have to edit the example and change the network, the mask should be correct for a class c network. Also will have do determine if the wired connection is eth0 or eth1 or what ever.

Use teh netstat -r to dump the routing table after you add the route, and try pinging the other machines on that sub-net. Once you have the pinging working, try smb4k again. I think it will work once the pinging works.
 
Old 09-11-2006, 09:22 PM   #5
Sammael
Member
 
Registered: Jun 2006
Location: Slovakia, currently working in Liverpool UK
Distribution: Gentoo 2006.0
Posts: 97

Original Poster
Rep: Reputation: 15
Exclamation

well, after that, my routing table looks like this:
Code:
sammael@high-flyer ~ $ netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.0     *               255.255.255.0   U         0 0          0 wlan0
192.168.0.0     *               255.255.255.0   U         0 0          0 eth0
loopback        *               255.0.0.0       U         0 0          0 lo
default         dsldevice.lan   0.0.0.0         UG        0 0          0 wlan0
i can ping 192.168.0.x and 192.168.1.x subnets, but smb4k still finds the other computer through wrong way:
screenshot

and i found another interesting thing. if i check in smb4k configuration "Try to bind to port 137 to receive UDP datagrams", smb4k seems unable to find any adress, but after searching for an IP i know is on the subnet, it finds it, then i can click on add button and suddenly i see whole subnet...

can you advise me what am i doing wrong?

thanks!
 
Old 09-12-2006, 09:28 AM   #6
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
I wished I could. I have only used smb4k a little, an I have only a single lan connection for my machines. I think we have fixed one issue, the routing table. The windows protocol used I don't understand very well. I hope someone else can give you some direction on making it work better.
 
Old 09-13-2006, 05:51 AM   #7
Sammael
Member
 
Registered: Jun 2006
Location: Slovakia, currently working in Liverpool UK
Distribution: Gentoo 2006.0
Posts: 97

Original Poster
Rep: Reputation: 15
hey, i restarted samba & net.eth0 and it works exactly as i wanted. thanks a bunch.

one more question: are the changes to routing table permanent or only until restart? and how do i add route for eth0 with dhcp... because sometimes i am connected to net via eth0...

thanks again...
 
Old 09-13-2006, 09:55 AM   #8
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Quote:
one more question: are the changes to routing table permanent or only until restart?
As far as I know, they are permenant, at leat until you do a route del. The changes are saved in a file /proc/net/route. This is a read only file, so I think the only way you should add routes is through the command line, or some front end designed to run the command, ( possibly WebMin ).

Quote:
and how do i add route for eth0 with dhcp... because sometimes i am connected to net via eth0...
Route add adds a route to your linuxs kernel routing table. What this does is give the kernel some options on where to forward various IP packets. A static route add ( which this is ), isn't for a particular network connection. Before we added the route, the only option the kernel had was to forward the packet to the 'default'. We simply gave it more knowledge about one more physical connection, so the packets got sent to that net. Your router is connected and belongs to your 192.168.1.x net, it can not route to your 192.168.0.x net.

There are many commercial routers with many more interfaces. If you had another interface, you could have plugged the 192.168.0.x lan in, and the router could then do the routing. BTW an interface is not just a lan connection, it has its own IP address. Most home routers have only two interfaces, one for the ISP side and one for the home lan side.

Hope this helps.
 
Old 09-13-2006, 04:24 PM   #9
Sammael
Member
 
Registered: Jun 2006
Location: Slovakia, currently working in Liverpool UK
Distribution: Gentoo 2006.0
Posts: 97

Original Poster
Rep: Reputation: 15
Thumbs up

thank you very much. see, this is what i love about this site, not only i solve my problems, but everytime i learn something new and useful!

thanks again, everything is now working as it should and i even now why and how.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SMB4K on new mandriva doesn't see the share that the OLD install's smb4k did. unuser38 Linux - Networking 3 07-10-2006 03:46 AM
SMB4k issues - unsolvable permission problem comptiger5000 Linux - Software 2 07-05-2005 06:47 AM
Smb4k problem eponymous Linux - Networking 0 11-17-2004 06:11 AM
10.0community small problem starting Smb4k caged Mandriva 1 07-17-2004 05:23 AM
Problem talking to two networks Evilone Linux - Networking 3 07-23-2003 03:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration