DarthTobias
Posts: 1
Joined: Sat May 11, 2013 5:11 am

Connecting to the Internet with ICS

Sat May 11, 2013 5:20 am

Hi all! ^_^

So i recently got my Model B Pi, but haven't been able to set it up on the internet yet.

Due to my location, i am unable to get Internet access in the conventional way, and only have a small laptop, an Ethernet cable and a Pre-Paid USB modem.

Could anybody outline how i would go about setting up ICS from my Windows 7 laptop to share my USB internet connection over Ethernet? Thanks in advance! ^_^

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: Connecting to the Internet with ICS

Sat May 11, 2013 1:21 pm

Simply find a tutorial about how to share an internet connection on a pc with windows 7.
Instead of connecting a network, other pc's to the lan adapter, simply connect the Pi.
The PC should have a DHCP server running, so the Pi should receive a DHCP IP adress from it.
You can run ifconfig on the Pi to check that it got a valid ip on it's eth0 adapter.

User avatar
lmarmisa
Posts: 1230
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: Connecting to the Internet with ICS

Sat May 11, 2013 7:59 pm

You have to configure static local IP addresses for the Ethernet subnet.

For example, you can assign 192.168.100.1 to Windows 7 and 192.168.100.2 to RPi.

I will explain how define both configs.

1) Config the Windows 7 USB modem interface.

Go to control panel -> network & sharing center -> manage network connections ->USB modem interface -> properties -> sharing

Code: Select all

Tick -> Allow other network users to connect through this computer's internet connection
2) Config the Window 7 ethernet interface.

Go to control panel -> network & sharing center -> manage network connections -> local area connection -> properties -> networking -> Internet protocol v4 -> properties and select

Code: Select all

Use the following IP address:
IP address: 192.168.100.1
Subnet mask: 255.255.255.0
3) RPI.

Copy the current file /etc/network/interfaces to /etc/network/interfaces.bak

Code: Select all

sudo cp /etc/network/interfaces /etc/network/interfaces.bak
Edit the file /etc/network/interfaces

Code: Select all

sudo nano /etc/network/interfaces
and change the contents to this:

Code: Select all

auto lo
iface lo inet loopback

iface eth0 inet static
address 192.168.100.2
netmask 255.255.255.0
network 192.168.100.1
broadcast 192.168.100.255
gateway 192.168.100.1
nameserver 8.8.8.8
Save, exit and reboot.

This link shows another example of ICS:

http://www.morrisville.edu/documents/te ... haring.pdf

elstcb
Posts: 1
Joined: Thu Aug 15, 2013 3:48 pm

Re: Connecting to the Internet with ICS

Thu Aug 15, 2013 3:50 pm

To get internet access you might need to add a route on the Pi to tell it how to access the outside world. e.g.

Code: Select all

sudo route add default gw 192.168.137.1

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

Re: Connecting to the Internet with ICS

Thu Aug 15, 2013 5:55 pm

I don't understand why every time this question comes up, responders say that you need to configure static IP on the Pi. Nothing could be further from the truth.

In principle, this should be easy [Just setup ICS on the host PC's Internet-facing device and go!] - but of course, theory and practice often diverge.

In the past, I've had the problem where Windows, in its majesty, refused to let me share a "cellular modem" device (PCMCIA) because it thought that it was not a "high speed device" - that is, it thought it was just a puny little modem, and thus not worth sharing. My workaround for this was to install VMWare on the Windows box and run a Linux VM there. Then I setup the usual IPTABLES stuff under Linux to serve a local network, all driven off the cellular modem.

Another option (which I've never gotten to work very well) is "bridging" under Windows...
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)

ravikanth3110
Posts: 2
Joined: Thu Aug 15, 2013 8:19 pm

Re: Connecting to the Internet with ICS

Thu Aug 15, 2013 8:24 pm

Hi,
I tried as you have said. But could not get the internet up. can you suggest how to debug the issue..
Thanks in Advance.

ravikanth3110
Posts: 2
Joined: Thu Aug 15, 2013 8:19 pm

Re: Connecting to the Internet with ICS

Thu Aug 15, 2013 8:28 pm

Hi lmarmisa,
I followed the all the steps, but still could not make the internet up on my pi (via my Windiws 7 PC with USB dongle.)
Any furthur suggestions for debigging this issue??

smp
Posts: 5
Joined: Mon Jan 07, 2013 12:31 pm

Re: Connecting to the Internet with ICS

Mon Sep 16, 2013 6:27 am

Hi

Anyone has got the solution / updates for the subject line Post. Since I'm also facing the same issue. Could not connect to internet using Pi through Windows 7 ICS.
Ping between Pi and Win 7 laptop OK
Ping between Win 7 and Pi laptop OK
Ping from Win 7 to google (8.8.8.8) OK
Ping from Pi to www.google.com NOT OK - reply as ping: unknown host www.google.com

And for command

sudo route add default gw 192.168.137.1
reply received as SIOCADDRT: Networks is unreachable

Thanks in advance,

Return to “Troubleshooting”