q3dm6
Posts: 2
Joined: Mon Apr 16, 2012 3:50 pm

Re: Internet Connection Sharing with Windows 7 Machine

Mon Apr 23, 2012 5:42 pm

Is this possible? I've got my Raspberry PI hooked up to my desktop, and I've shared my internet connection, however I can't get online.

I can ping the router (192.168.1.1) but it doesn't get any further than that.

Any advice?

larsth
Posts: 55
Joined: Sat Aug 27, 2011 9:51 pm
Contact: Website

Re: Internet Connection Sharing with Windows 7 Machine

Mon Apr 23, 2012 5:57 pm

q3dm6 said:


Is this possible? I've got my Raspberry PI hooked up to my desktop, and I've shared my internet connection, however I can't get online.

I can ping the router (192.168.1.1) but it doesn't get any further than that.

Any advice?



of course it is poosible

Check if DNS is working on the Pi, run this command:

dig google.com

if is doesn't resolve google.com into a couple of IPv4 addresses, then insert the IPv4 address of minimum 1 DNS server into /etc/resolv.conf

Changes to /etc/resolv.conf has effect immediately.

Googles public DNS server IPv4 adresses are 8.8.8.8 and 8.8.4.4

larsth
Posts: 55
Joined: Sat Aug 27, 2011 9:51 pm
Contact: Website

Re: Internet Connection Sharing with Windows 7 Machine

Mon Apr 23, 2012 6:01 pm

double post

q3dm6
Posts: 2
Joined: Mon Apr 16, 2012 3:50 pm

Re: Internet Connection Sharing with Windows 7 Machine

Mon Apr 23, 2012 6:52 pm

Ahh cheers, working!

User avatar
RaTTuS
Posts: 10703
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Internet Connection Sharing with Windows 7 Machine

Tue Apr 24, 2012 8:21 am

or you can use the opendns servers 208.67.222.222 208.67.220.220
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Blunderbuss
Posts: 18
Joined: Sun Feb 19, 2012 12:05 am

Re: Internet Connection Sharing with Windows 7 Machine

Tue Apr 24, 2012 4:55 pm

I did have a very strange issue with this. Depending on which wireless adapter my win7 pc was using to access my home wireless, I was either able or unable to run: sudo apt-get update on the RPi. One adapter caused me to consistently get stuck waiting for headers to download, while the other worked fine...

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Internet Connection Sharing with Windows 7 Machine

Tue Apr 24, 2012 5:05 pm

Internet Connection Sharing (a Windows thing) is definitely a mixed bag.  It can stop working for any number of seemingly arbitrary reasons (or for no reason at all).  It has always been thus, for the many years that I've been using it (off and on - never as the basis of an ongoing system).

I would imagine that if you want to do apt-get update or any other thing requiring an Internet connection from your Pi, you should so something like:

ping google.com && apt-get update
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Internet Connection Sharing with Windows 7 Machine

Tue Apr 24, 2012 5:10 pm

Joe Schmoe said:


Internet Connection Sharing (a Windows thing) is definitely a mixed bag.


I was always annoyed that it forced me to use a specific IP address for the interfacing through which the sharing was being done rather than let me manually set it to whatever I pleased.
Dear forum: Play nice ;-)

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Internet Connection Sharing with Windows 7 Machine

Tue Apr 24, 2012 5:19 pm

Right.  It is hardcoded to use 192.168.1.1 for its end of the connection - and 192.168.1.* for the clients.

I get the impression that it was added to Windows as a quick "one-off", possibly by an intern or something, and was never really finished.  Orphaned, as they say.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Dendennis
Posts: 8
Joined: Thu Dec 01, 2011 2:26 am

Re: Internet Connection Sharing with Windows 7 Machine

Wed Apr 25, 2012 7:30 pm

ICS is more of a legacy application nowadays, "bridging" adapters is the way to go.

I'll set a minimal example.

Windows 7 machine connected to internet through router via wifi.
Ethernet hub connects win 7 machine, raspberry Pi (and other devices but let's keep it simple).

First of all open "Network and sharing center" on the win7 machine.
Select "Change adapter settings"
select the wifi adapter and the ethernet adapter.
right click one of the adapers and select "Bridge Connections".
A new adapter appears called "Network bridge".
right click on this adapter and select properties.
Edit the IPv4 settings to your preferance, lets use a 10.0.0.0 address range.
(to show that the 192.168.1.* restriction is avoided.)
so we'll have router address 10.0.0.1 win7 machine at 10.0.0.2 and the Pi at 10.0.0.3

so for the bridged adapter (win7 machine) :-
ip address= 10.0.0.2
netmask=255.0.0.0
gateway=10.0.0.1
preferred Dns Server=10.0.0.1

let's now setup the Pi

edit /etc/network/interfaces (I prefer nano but use the editor of your choice).

iface eth0 inet static
address 10.0.0.3
netmask 255.0.0.0
gateway 10.0.0.1

then edit /etc/resolv.conf for DNS

nameserver 10.0.0.1

then restart your network

/etc/inet.d/networking restart

oddeyed
Posts: 1
Joined: Fri Jun 22, 2012 9:01 am

Re: Internet Connection Sharing with Windows 7 Machine

Fri Jun 22, 2012 9:02 am

Windows 7 machine connected to internet through router via wifi.
Ethernet hub connects win 7 machine, raspberry Pi (and other devices but let's keep it simple).
Dendennis - would it work with an ethernet crossover cable instead of an ethernet hub?
Cheers :)

Return to “Beginners”