Page 1 of 1

Can I share my laptop's internet connection?

Posted: Wed Sep 05, 2012 5:29 pm
by jwilliams991
Can I use an ethernet cable to connect my Raspberry Pi to my Laptop and then share my Laptop's internet connection? If so then how?

Re: Can I share my laptop's internet connection?

Posted: Wed Sep 05, 2012 5:32 pm
by jamesh
Yes, I believe you can, is your laptop running windows or Linux?

Re: Can I share my laptop's internet connection?

Posted: Wed Sep 05, 2012 5:38 pm
by jwilliams991
jamesh wrote:Yes, I believe you can, is your laptop running windows or Linux?
windows

Re: Can I share my laptop's internet connection?

Posted: Wed Sep 05, 2012 5:48 pm
by Licaon_Kter
set up windows ethernet: 192.168.100.1
set up windows wireless connection internet connection share
set up linux ethernet: 192.168.100.2
set up linux gateway: 192.168.100.1
set up linux dns 208.67.222.222

end

Re: Can I share my laptop's internet connection?

Posted: Wed Sep 05, 2012 6:03 pm
by jwilliams991
Licaon_Kter wrote:set up windows ethernet: 192.168.100.1
set up windows wireless connection internet connection share
set up linux ethernet: 192.168.100.2
set up linux gateway: 192.168.100.1
set up linux dns 208.67.222.222

end
Do you put this in the config.txt or in the command line or what?

Re: Can I share my laptop's internet connection?

Posted: Wed Sep 05, 2012 6:39 pm
by bredman
The above instructions were very unhelpful.

To make sense of the above instructions...

Search the internet for "windows network bridge"
Search the internet for "windows set static ip address"
Search this forum for "set static address"

You may find the following thread useful
http://www.raspberrypi.org/phpBB3/viewt ... 26&t=12601

Re: Can I share my laptop's internet connection?

Posted: Wed Sep 05, 2012 6:52 pm
by Joe Schmoe
I find both of the last two helpful posts less than helpful.

IMHO, the most straightforward way to do this is to use "Internet Connection Sharing" on the Windows side. Now, I can't tell you directly how/where to find this in the Windows GUI stuff, because:

1) On XP, I can not really tell you where it is, since every time I've had to set it up, I've had to rummage through the various control panels to find it. And I don't remember now where it is, but it is easy to find.

2) Most people now are probably using Vista (puke) or 7 (retch), so any instructions I could give from XP probably wouldn't help anyway. But the point is, in any case, you should be able to find it.

Anyway, once you turn ICS on, then all you have to do is run a cable from the ethernet port on the Windows machine to the ethernet port on the Pi and it should "just work". The Pi will be able to access the Internet via the Wireless (or whatever the "main" connection on the Windows box is) connection. No setup is necessary on the Pi side (as long as the Pi is setup to use DHCP, as it is unless you've changed that).

Re: Can I share my laptop's internet connection?

Posted: Thu Sep 06, 2012 1:04 am
by Licaon_Kter
Since you said you use Windows I ( wrongfully) presumed you know how to use it.

> set up windows ethernet: 192.168.100.1
in Windows set up your ethernet card

> set up windows wireless connection internet connection share
In Windows set up your wireless card to

> set up linux ethernet: 192.168.100.2
> set up linux gateway: 192.168.100.1
these are here: http://elinux.org/RPi_Setting_up_a_static_IP_in_Debian

> set up linux dns 208.67.222.222
nameserver in /etc/resolv.conf

c'mon it's fun to learn ;)

Re: Can I share my laptop's internet connection?

Posted: Fri Sep 07, 2012 10:00 am
by Raspberry wino
When I got broadband, I also got a 4-port wired router. Whenever I want to connect more than one computer to the internet, I use an Ethernet cable to connect it to the router.

I'm a Linux user and it just worked with no fiddling about. Is internet sharing more difficult if you use MS Windows? Surely not.

Edit: I realise now, the above probably wasn't helpful to the OP. If you haven't got a simple router you'd need to spend money and get one or follow better advice than I can give from the others above.

Re: Can I share my laptop's internet connection?

Posted: Fri Sep 07, 2012 12:08 pm
by bill.f
One thing that you will need is a "crossover ethernet cable" which is different to a normal network cable, if you are NOT using a switch/hub/router and connecting the PI directly to the laptop.






Bill

Re: Can I share my laptop's internet connection?

Posted: Fri Sep 07, 2012 12:12 pm
by bredman
bill.f wrote:One thing that you will need is a "crossover ethernet cable" which is different to a normal network cable, if you are NOT using a switch/hub/router and connecting the PI directly to the laptop.
Bill
This is absolute rubbish, please ignore it.

The Raspberry Pi has an auto-sensing NIC, any standard Ethernet cable will work.

Re: Can I share my laptop's internet connection?

Posted: Fri Sep 07, 2012 12:49 pm
by bill.f
by bredman ยป Fri Sep 07, 2012 1:12 pm

bill.f wrote:
One thing that you will need is a "crossover ethernet cable" which is different to a normal network cable, if you are NOT using a switch/hub/router and connecting the PI directly to the laptop.
Bill

This is absolute rubbish, please ignore it.
bredman is quite correct, and I have learned something today, please ignore me.

also I promise to not post absolute rubbish in future !!!


Bill

Re: Can I share my laptop's internet connection?

Posted: Fri Sep 07, 2012 1:00 pm
by jamesh
I personally would have used the phrase 'I'm afraid that information is incorrect', just for the politeness.....

Re: Can I share my laptop's internet connection?

Posted: Fri Sep 07, 2012 1:02 pm
by bredman
Apologies, Friday is not my favourite day.

Re: Can I share my laptop's internet connection?

Posted: Thu Jan 31, 2013 2:22 am
by Buck90
[quote="Licaon_Kter"]Since you said you use Windows I ( wrongfully) presumed you know how to use it.

> set up windows ethernet: 192.168.100.1
in Windows set up your ethernet card

> set up windows wireless connection internet connection share
In Windows set up your wireless card to

> set up linux ethernet: 192.168.100.2
> set up linux gateway: 192.168.100.1
these are here: http://elinux.org/RPi_Setting_up_a_static_IP_in_Debian

> set up linux dns 208.67.222.222
nameserver in /etc/resolv.conf :/quote

Thanks so much for this after a few hours of tinkering around I finally managed to get it to work. Just to help out there for anyone that may need it. Firstly you need to bridge your connection, the Internet sharing won't work. So you can skip the setting up windows part above and replace it with bridging connections. Also replace the dns server above with your own dns server, you can find this through windows command prompt by typing ipconfig/all and scrolling down. Note those numbers.

Next type in the terminal
sudo leafpad /etc/resolv.conf
Edit the name serve with your own dns server

The rest is exactly the same as mentioned above

Again thanks so much, it took me a while to get this to work, wouldn't have done it without you

Re: Can I share my laptop's internet connection?

Posted: Thu Jan 31, 2013 5:12 am
by aTao
Windows internet connection sharing sets up DHCP on the ethernet port. You do not need any settings on the RPi except its initial state.

http://windows.microsoft.com/en-GB/wind ... on-Sharing

Remember Windows is meant for people that arent into setting up networks so it does the work for you.

Re: Can I share my laptop's internet connection?

Posted: Thu Jan 31, 2013 6:00 am
by vsayanam
It is quite easy. In Windows, allow Internet sharing. An IP of 192.168.0.2 will be automatically assigned to the Laptop's network card. Make static IP of 192.168.0.2 in Rasp Pi. Enter subnet mask and gateway (192.168.0.1). Also make an entry in /etc/resolv.conf with nameserver=192.168.0.2. Reboot and Rasp Pi will get Net all right.

Re: Can I share my laptop's internet connection?

Posted: Thu Jan 31, 2013 6:02 am
by vsayanam
It is quite easy. In Windows, allow Internet sharing. An IP of 192.168.0.2 will be automatically assigned to the Laptop's network card. Make static IP of 192.168.0.2 in Rasp Pi. Enter subnet mask and gateway (192.168.0.1). Also make an entry in /etc/resolv.conf with nameserver=192.168.0.2. Reboot and Rasp Pi will get Net all right.

Sorry for the mistake. The nameserver = 192.168.0.1

Re: Can I share my laptop's internet connection?

Posted: Thu Jan 31, 2013 12:06 pm
by vsayanam
Sorry for the number of mistakes..Was in a hurry as my Net connection was not stable..Windows will allot 192.168.0.1 to the laptop. Allot manually 192.168.0.2 to Rasp Pi (along with Subnet Mask, Gateway and entry for Nameserver in /etc/resolv.conf. ) Now Rasp Pi will get connected to the Internet (after rebooting, of course).

Re: Can I share my laptop's internet connection?

Posted: Fri Mar 08, 2013 5:34 am
by khingcat
"An IP of 192.168.0.2 will be automatically assigned to the Laptop's network card. Make static IP of 192.168.0.2 in Rasp Pi. Enter subnet mask and gateway (192.168.0.1). Also make an entry in /etc/resolv.conf with nameserver=192.168.0.2."
Hi, vsayanam, I'm still a little confused with your guidance. First, I've search my laptop's Ip (using ipconfig/all, as was told above by Buck90), and I found that my laptop's IP is not 192.168.0.2, but 10.228.95.159 (I found it next to IPv4 address, is it right?). Subnet mask: 255.255.255.255, and Default gateway: 0.0.0.0
DNS Servers : 10.17.3.252.
I've enter on /etc/resolv.conf with nameserver with 10.228.95.159, but I still didn't get any internet connection on my RPi. Would you give me a more detail intruction, because I'm still a beginner on this forum?


Khingcat

Re: Can I share my laptop's internet connection?

Posted: Tue Apr 02, 2013 9:21 am
by nymar
Hi,

Can you help me doing the same with FEDORA ?? i have a laptop and R-PI on the same network.

Re: Can I share my laptop's internet connection?

Posted: Sat Apr 13, 2013 2:04 pm
by schneidz