Debugging CIFS / samba on Windows

From: Peter (BOUGHTONP)19 Jun 2016 21:18
To: ANT_THOMAS 33 of 52
Hey, I'm still celebrating finally having a device that does 4G. :C
From: Peter (BOUGHTONP)19 Jun 2016 21:19
To: Chris (CHRISSS) 34 of 52
Yep, gonna have a go at setting up the Pi as a DHCP server, but probably tomorrow when I'm (hopefully) less tired.
From: Peter (BOUGHTONP)19 Jun 2016 21:19
To: ANT_THOMAS 35 of 52
There's nothing deliberately unconventional - it really was just get the NAS connected enough to shunt files around and make space on the main machine and I'll set things up properly later, then it's always just been oh it's working good enough for now.

I fecking hate "good enough for now". :@

From: graphitone19 Jun 2016 21:22
To: Peter (BOUGHTONP) 36 of 52
Doesn't whatever router you're using to connect to the internet have a DHCP client on it?
From: graphitone19 Jun 2016 21:29
To: patch Peter (BOUGHTONP) 37 of 52
Yeah, as I said somewhere above, the 169.254.X.X range is the automatic private IP addressing, usually only used by default when a client machine can't connect anywhere and gives itself an address.

I can imagine PB using it for his network address though. :C

Making sure everything's on the same subnet should be the first thing to check, unless PB's got a huge amount of hosts or some weird routing somewhere, it should only need a /24 range, looking at the ipconfig, he's got a /16 on the windows box.

PB - what're the IP settings on the NAS?


 
From: ANT_THOMAS19 Jun 2016 21:37
To: Peter (BOUGHTONP) 38 of 52
Get a proper router and use that as your DHCP server. Don't arse about with other devices.

Do it a more conventional way and it'll no doubt work properly.
EDITED: 19 Jun 2016 21:37 by ANT_THOMAS
From: Peter (BOUGHTONP)19 Jun 2016 21:39
To: graphitone 39 of 52
The router is my mobile, using wifi tethering.

The NAS and Pi are on ethernet only, connected via a dumb switch.

From: Peter (BOUGHTONP)19 Jun 2016 21:40
To: graphitone 40 of 52
The NAS is 169.254.184.206 and matching 255.255.0.0 subnet (again, this was working fine for six months).

You'll be delighted to know that when I setup DHCP I'm gonna use class A. :>

From: ANT_THOMAS19 Jun 2016 21:43
To: Peter (BOUGHTONP) 41 of 52
I've actually done what you're doing years ago and I was able to use a more conventional network setup.

Probably easier using static IPs.

I had a small access point in client mode attached to the network via a cable and then wireless to the phone. This meant whenever the tethering was enabled the network got Internet access. Meant only a single wifi connection to the phone to get everything online.
From: graphitone19 Jun 2016 22:32
To: Peter (BOUGHTONP) 42 of 52
 :-O

 :-O~~~
From: patch20 Jun 2016 06:36
To: graphitone 43 of 52
APIPA uses a /16 mask by default, so that's no biggy. If you can ping and ssh, then you know the connectivity is there, so it's either something in the PCs network adapter, or the NAS itself. Perhaps try deleting the NIC from the PC and then adding it again after a reboot. That might (might!) set it up with the default settings.
From: graphitone20 Jun 2016 10:35
To: patch Peter (BOUGHTONP) 44 of 52
Aye, it's usable o' course, just unusual to see it - it always makes me think that the host has lost connectivity, but if PB's NAS is on the same range then all's ok.

Does the PC just have the one NIC?
EDITED: 20 Jun 2016 10:40 by GRAPHITONE
From: Peter (BOUGHTONP)20 Jun 2016 19:47
To: patch 45 of 52
"try deleting the NIC"

Do you mean go into Device Manager, Network adapters, and uninstall the relevant option - or something else?

From: patch21 Jun 2016 06:21
To: Peter (BOUGHTONP) 46 of 52
That's the one. No idea whether it will work, but it's worth a shot. The worst that happens is a full re-install, and it's probably about time you did that anyway.
From: Peter (BOUGHTONP)21 Jun 2016 21:45
To: patch 47 of 52
A full re-install may happen if hell freezes over, but not before.

I did it without re-starting yesterday and got a new 169 IP address, but no luck with the shares.

At some point I might have a go at inspecting packets with Wireshark to see what's actually going on, but for the time being I'll make do with FTP. :(

From: ANT_THOMAS21 Jun 2016 22:15
To: Peter (BOUGHTONP) 48 of 52
NFS?
From: graphitone21 Jun 2016 22:30
To: Peter (BOUGHTONP) 49 of 52
<pointing out the bleedin' obvious>

Are you sure the Windows box hasn't been assigned the same IP as the NAS?

 
From: Peter (BOUGHTONP)21 Jun 2016 23:33
To: ANT_THOMAS 50 of 52
That requires me to determine why my "Turn Windows features on or off" list is blank, of which there's a variety of possible causes/solutions and it's not the common ones. :(

(Or locate a third-party client, but a quick check of the options didn't uncover anything acceptable; everyone recommends the Microsoft one.)

From: ANT_THOMAS21 Jun 2016 23:44
To: Peter (BOUGHTONP) 51 of 52
Sounds like hell has just frozen over.
From: Ken (SHIELDSIT) 3 Jul 2016 19:07
To: Peter (BOUGHTONP) 52 of 52
Doesn't Windows assign a 169 address when it can't actually get a "good" address from DHCP?  I think you really need to use a different IP range.

Another thing, did you say you're using a wireless adapter for internet and a wired adapter to only access the NAS?  If that's the case, I've had times where the adapters come up in the wrong order and one doesn't work.  I would disable the wireless adapter and try to access the NAS.  What happens is Windows looks for the NAS over the wireless adapter and of course it won't find it there.