MarkJ62
Posts: 28
Joined: Mon Dec 17, 2012 11:55 am
Location: Sydney, Australia
Contact: Website

Pi on a windows network

Wed Feb 20, 2013 2:26 pm

I have been having a bit of fun getting my Pi's to behave on a windows network.

My router can see all the devices, however the Pi's don't seem able to see the windows machines. They can access the internet fine and I can download updates and surf the net with Midori just fine.

I need to get the Pi's talking to some of the windows boxes. To work around this I put the IP address and host names into /etc/hosts, however as the router could reassign IP addresses this doesn't seem like a good solution. Is there a way where I can refer to the windows machines by host name apart from doing this? The router is acting as DNS.

I have a proxy server on the windows network running squid. To get the Pi's talking to it I had to add it into /etc/hosts as well.

User avatar
jackokring
Posts: 816
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: Pi on a windows network

Wed Feb 20, 2013 2:59 pm

Have you tried hostname.local? Another option is to make a resolver script using arp, grep and maybe some other tools to use MAC addressing, instead of IP addressing. I think windows machines can be set up to pass DNS information back to the router, it's roundabout the same place as WINS resolution in the network configuration dialog. "Append local domain name" or such.
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

MikeAlx
Posts: 22
Joined: Wed Sep 05, 2012 8:16 am

Re: Pi on a windows network

Fri Feb 22, 2013 9:55 am

Mark, I understand the proper way to get the Pi talking to Windows is to install and configure Samba server and Samba client. That said, I'm trying to do this myself at the moment, but struggling to get it to work!

Edit:
You may also need to install winbind.

Cloudcentric
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am

Re: Pi on a windows network

Fri Feb 22, 2013 10:10 am

The Raspberry Pi is hardware and has no means to communicate with anything, it is just a bunch of electronic components.........

Presuming you have booted up with Raspbian "wheezy" operating system, which has been fully updated, Samba will need to be installed to fully communicate with a Windows Network.

http://packages.debian.org/wheezy/samba

http://elinux.org/R-Pi_NAS#Configure_a_ ... Debian_RPi

http://www.samba.org/samba/docs/man/Sam ... Collection
I know everything about nothing"

MarkJ62
Posts: 28
Joined: Mon Dec 17, 2012 11:55 am
Location: Sydney, Australia
Contact: Website

Re: Pi on a windows network

Mon Feb 25, 2013 11:22 am

jackokring wrote:Have you tried hostname.local? Another option is to make a resolver script using arp, grep and maybe some other tools to use MAC addressing, instead of IP addressing. I think windows machines can be set up to pass DNS information back to the router, it's roundabout the same place as WINS resolution in the network configuration dialog. "Append local domain name" or such.
No I haven't tried hostname.local. I will have to read up on it. There is a /etc/hostname file which has the name of the Pi in it. I also had to specify it in /etc/hosts otherwise it complains it can't find host name (itself).

My concern is the router could assign different IP addresses for the 3 hosts that I have had to specify in /etc/hosts. Other than that its working fine without samba. One of those addresses is the Pi itself and the other two are windows machines. I could get the Pi to use a static address which would fix it up but I wouldn't want the windows machines using static addressing.

Cloudcentric
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am

Re: Pi on a windows network

Mon Feb 25, 2013 11:33 am

Most routers will if you set your Pi (whatever operating system) to a high Static IP address, always find that address

ie if the router assigns in the range of say 192.1.168.2 to 168.100, then setting the static IP to a high number should not conflict, may be worth a try.
I know everything about nothing"

MarkJ62
Posts: 28
Joined: Mon Dec 17, 2012 11:55 am
Location: Sydney, Australia
Contact: Website

Re: Pi on a windows network

Fri Mar 01, 2013 8:34 pm

I now have the router assigning a static IP to the Pi so at least it doesn't change.

Samba thinks its already installed

MikeAlx
Posts: 22
Joined: Wed Sep 05, 2012 8:16 am

Re: Pi on a windows network

Fri Mar 01, 2013 11:09 pm

If Samba's installed, you should just need to configure it by editing /etc/smb.conf - then Pi and Windows should play nicely. Worked for me. Eventually. :lol:

Return to “Raspbian”