Mount cifs share with wireless ip address

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Mount cifs share with wireless ip address

Postby pk_fox » Wed Jun 25, 2014 7:59 am

Hi all, when I have my Windows laptop connected to my network via a cable I can mount my Windows share on my Linux box using its ip address
Code: Select all
mount -t cifs //192.168.1.6/Pete Laptop -o username=pjk,password=mypassword


and all is good, BUT if I try and mount the same share when I'm connected via wireless
Code: Select all
mount -t cifs //172.16.31.3/Pete Laptop -o username=pjk,password=mypassword

I receive a message "operation is in progress" and nothing happens i.e. it doesn't mount. Any ideas as to how to resolve this ?
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby dandnsmith » Thu Jun 26, 2014 6:32 am

You're trying to do connections on two different networks.
Do ifconfig when connected by wire to check which is the internal address - should be 192.168 .x.y
You may also need to check routes - a useful command to use is ping from each end (if that doesn't work then something has to be sorted, if it works but the mount doesn't then it will be permissions)
Derek
dandnsmith
LXF regular
 
Posts: 314
Joined: Fri Apr 15, 2005 10:01 am
Location: Berks, UK

Postby pk_fox » Thu Jun 26, 2014 6:46 am

dandnsmith wrote:You're trying to do connections on two different networks.
Do ifconfig when connected by wire to check which is the internal address - should be 192.168 .x.y
You may also need to check routes - a useful command to use is ping from each end (if that doesn't work then something has to be sorted, if it works but the mount doesn't then it will be permissions)


Hi Dan, it can't be a permissions thing as I'm looking at the same file location, also it's not a communication problem between subnets as they reside on the same router and I happily copy files to and fro using a file manager , it is a peculiarity with the mount command that it can't seem to resolve wireless ip addresses. The network guys at work are nonplussed so I thought I'd try here, I'm a software engineer and have a basic but solid understanding of networking but this is odd.
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby sledgehammer » Thu Jun 26, 2014 7:33 pm

Sounds like you haven't got windows setup to share the files via the wifi/172 network. Sounds quite sensible to me. In other words its probably not your linux box thats got the problem, you need to be looking at your windows laptop.

I also think dandnsmith may be right with the different subnets. Is there any reason for that?

regards
User avatar
sledgehammer
 
Posts: 47
Joined: Fri Jul 28, 2006 2:03 pm

Postby dandnsmith » Fri Jun 27, 2014 7:30 am

I happily copy files to and fro using a file manager


You can do that without ever noticing the IP address, so I still think investigation of the addresses and routing is in order.

Its quite possible that the IP address in the mount is being treated as foreign address the wrong side of a firewall or permissions barrier.

I don't remember how long I've been setting up and diagnosing networks - first in Unix and other OSs, and later in Windows (when it got to being able to have networking)
Derek
dandnsmith
LXF regular
 
Posts: 314
Joined: Fri Apr 15, 2005 10:01 am
Location: Berks, UK

Postby MartyBartfast » Fri Jun 27, 2014 9:02 am

I think the cifs mount uses port 445 (at least a very cursory google says it does but you may want to google further to confirm that).

On that basis, go into "wireless mode" and from the laptop do

Code: Select all
$ telnet 172.16.31.3 445


The reponses may be one of:

"connection refused"
this means all the routing etc is correct, you have reached the windows machine but it's not serving network shares on the 172 address.

"no route to host" or "Network is unreachable"
guess what, it's a routing problem and you're not reaching the windows box, so you need to check all your network setup and routing most likely on the Linux box.

"connection timed out"
the routing is probably OK, but you still can't reach the box, this could be something such as windows firewall on the Windows box denying connections into the 172 network.


"connected to 172.16.31.3 " followed by a couple of lines about escape chars
This means you've connected to the WIndows box successfully, so all networking is OK, this means it's most likely something wrong with the mount points, or the Windows box is serving shares on the 172 network but not the share you're looking for.


The next steps will depend on what result you get.
I have been touched by his noodly appendage.
User avatar
MartyBartfast
LXF regular
 
Posts: 815
Joined: Mon Aug 22, 2005 7:25 am
Location: Hants, UK

Postby pk_fox » Fri Jun 27, 2014 9:13 am

I also think dandnsmith may be right with the different subnets. Is there any reason for that?

Hi, it's the way my router came configured it's a sonicwall TZ150, can I put the wireless and wired on the same subnet ?
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby pk_fox » Fri Jun 27, 2014 9:15 am

MartyBartfast wrote:I think the cifs mount uses port 445 (at least a very cursory google says it does but you may want to google further to confirm that).

On that basis, go into "wireless mode" and from the laptop do

Code: Select all
$ telnet 172.16.31.3 445


The reponses may be one of:

"connection refused"
this means all the routing etc is correct, you have reached the windows machine but it's not serving network shares on the 172 address.

Ok thanks I'll give it a go


"no route to host" or "Network is unreachable"
guess what, it's a routing problem and you're not reaching the windows box, so you need to check all your network setup and routing most likely on the Linux box.

"connection timed out"
the routing is probably OK, but you still can't reach the box, this could be something such as windows firewall on the Windows box denying connections into the 172 network.


"connected to 172.16.31.3 " followed by a couple of lines about escape chars
This means you've connected to the WIndows box successfully, so all networking is OK, this means it's most likely something wrong with the mount points, or the Windows box is serving shares on the 172 network but not the share you're looking for.


The next steps will depend on what result you get.
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby pk_fox » Fri Jun 27, 2014 9:16 am

dandnsmith wrote:
I happily copy files to and fro using a file manager


You can do that without ever noticing the IP address, so I still think investigation of the addresses and routing is in order.

Its quite possible that the IP address in the mount is being treated as foreign address the wrong side of a firewall or permissions barrier.

I don't remember how long I've been setting up and diagnosing networks - first in Unix and other OSs, and later in Windows (when it got to being able to have networking)


Thanks Dan I'm trying all the suggestions.
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby pk_fox » Fri Jun 27, 2014 9:21 am

This is what I got
Code: Select all
 
Unable to connect to remote host: Connection timed out


I checked the Windows firewall and under incoming file sharing although I had ticked all local addresses it seems Windows regards my server as a remote address because when I checked the "All addresses" under remote addresses it now works. Well telnet does which is a start - thank you all very much for your help.
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby nelz » Fri Jun 27, 2014 10:00 am

It's a remote address because it is on a different subnet. Either put the wired and wireless connections on the same subnet or configure the windows firewall to allow both subnets to connect.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8490
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby pk_fox » Sat Jun 28, 2014 6:11 am

dandnsmith wrote:
I happily copy files to and fro using a file manager


You can do that without ever noticing the IP address, so I still think investigation of the addresses and routing is in order.

Its quite possible that the IP address in the mount is being treated as foreign address the wrong side of a firewall or permissions barrier.

I don't remember how long I've been setting up and diagnosing networks - first in Unix and other OSs, and later in Windows (when it got to being able to have networking)


Hi Dan, you were spot on the money,it's just when you said earlier about permissions I thought you meant file permissions not firewall rules ( I think it's better to refer to files and folders as permissions and firewall stuff as rules - but that's me ) changed the Windows firewall to allow remote addresses and it worked thank you, I have narrowed the firewall rule down to my 192.168 subnet so should be OK - the only reason I need to mount it is to back it up using rsync. Thanks again.
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK


Return to Help!

Who is online

Users browsing this forum: No registered users and 2 guests