elfin8er
Posts: 3
Joined: Mon Jan 06, 2014 12:24 am

Connecting To The Internet From PC Via Crossover Cable

Mon Jan 06, 2014 12:32 am

I'm trying to get internet to my raspberry pi by using windows internet sharing, and a crossover cable from my PC to the pi. I had it somewhat working a little bit ago. I was able to ping my PC, however I wasn't able to ping any other websites. I believe the only thing left that I have to do, is edit my /etc/network/interfaces file. Here are all of my IP's:

RaspberryPI IP: 192.168.2.77
PC IP: 192.168.2.45
Static Ethernet IP: 192.168.2.78
Router IP: 192.168.2.1

If there's any other information you need, please let me know.

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Connecting To The Internet From PC Via Crossover Cable

Mon Jan 06, 2014 7:32 am

Hi and welcome to the forum.
For one thing you will probably not need a crossover cable - the pi is able to use both straight and crossovers, and most modern laptops and PC's are the same.
This old front page news article from Meltwater may help :
http://www.raspberrypi.org/archives/3760

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

elfin8er
Posts: 3
Joined: Mon Jan 06, 2014 12:24 am

Re: Connecting To The Internet From PC Via Crossover Cable

Mon Jan 06, 2014 3:24 pm

Thanks for your help, however, I've already tried that guide that you linked to, however I'm not able to connect to the internet. I can only connect to the PC that the PI is connected to.

User avatar
topguy
Posts: 6527
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Connecting To The Internet From PC Via Crossover Cable

Mon Jan 06, 2014 3:45 pm

Have you enabled bridging or ICS (Internet Connections Sharing) on the PC ? Its the PC's job to route traffic to your ISP-Router. Remember also that the PC is the gateway for the PI.

So from your information I would have the following in /etc/network/interfaces.

Code: Select all

address 192.168.2.77
netmask 255.255.255.0
gateway 192.168.2.45

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

Re: Connecting To The Internet From PC Via Crossover Cable

Mon Jan 06, 2014 3:58 pm

you can use a crossover or normal cable - both will work
if you want to do it via ICS then you will need a different network for the ICS end than the normal end

i.e. PC -> router use 192.168.2.x [subnet 255.255.255.0]
PC -> RPI 192.168.1.x [subnet 255.255.255.0 ]

you cannot have the PC -> router and PC - RPi on the same network.

or plug the RPI into the router as well as the PC [or use a network Switch there]
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

elfin8er
Posts: 3
Joined: Mon Jan 06, 2014 12:24 am

Re: Connecting To The Internet From PC Via Crossover Cable

Mon Jan 06, 2014 4:01 pm

topguy wrote:Have you enabled bridging or ICS (Internet Connections Sharing) on the PC ? Its the PC's job to route traffic to your ISP-Router. Remember also that the PC is the gateway for the PI.

So from your information I would have the following in /etc/network/interfaces.

Code: Select all

address 192.168.2.77
netmask 255.255.255.0
gateway 192.168.2.45
That's what I have in /etc/network/interfaces, however I'm still only able to ping the PC the PI is connected to. I can't ping IP's outside of my network.
RaTTuS wrote:you can use a crossover or normal cable - both will work
if you want to do it via ICS then you will need a different network for the ICS end than the normal end

i.e. PC -> router use 192.168.2.x [subnet 255.255.255.0]
PC -> RPI 192.168.1.x [subnet 255.255.255.0 ]

you cannot have the PC -> router and PC - RPi on the same network.

or plug the RPI into the router as well as the PC [or use a network Switch there]
Same deal. I can SSH into the PI, but can't ping external IP's.

Not sure if it helps, but I'm unable to ping anything in my network other than the PC with ICS. This goes for both suggestions.

User avatar
topguy
Posts: 6527
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Connecting To The Internet From PC Via Crossover Cable

Tue Jan 07, 2014 9:44 am

Which other interface (network card) is the PC using to provide the internet-link, wireless ?

Return to “Troubleshooting”