element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum [RESOLVED] Using my PC has a bridge to the Internet for my Raspberry Pi via Ethernet Cable.
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 7 replies
  • Subscribers 664 subscribers
  • Views 1902 views
  • Users 0 members are here
  • raspberry
  • internet
  • pi
  • ethernet
  • cable
  • raspberry_pi
Related

[RESOLVED] Using my PC has a bridge to the Internet for my Raspberry Pi via Ethernet Cable.

Former Member
Former Member over 11 years ago

     Okay so I received my raspberry Pi just yesterday, and I've been spending the majority of my time since trying to figure out how to get a connection to the internet. Currently my set up is a PC that is Wireless-ly connected to the Internet, and the my Raspberry Pi is connected to my PC via Ethernet Cable. I've changed a lot of settings however it has all been to no avail. Is the Ethernet Cable to old maybe? Do i need a crossover cable? I can ping my Raspberry Pi as well as SSH into it, however I can not ping my computer from the Pi. Any help?

 

[UPDATE]

So the solution to the problem was simple...So even agree editing all the files, assigning static ip address to the RPi, gateway, all the shabang didn't work, I took to looking for another tutorial. I thought I had attempted this solution before but to no avail. However it worked this time.

 

I went back through the settings I changed, basically turning them all to how they were in the beginning. Then located my Wi-Fi adaptor of the pc assigned the IPv4 and 6 to obtain automatically, and repeated that for the connection the RPi connected to. Then highlighted both connections, right clicked, arbd chose " Bridge Connections ". *Face Palm* Such a simple solution.

 

Thank You, everyone, that had tried to help me image I actually learned some new stuff in the process!

  • Sign in to reply
  • Cancel
  • packetgeek
    packetgeek over 11 years ago

    A few comments/questions:

    • If you can ping and SSH into the Pi, then there's no issue with the cable.  You didn't mention any sort of wireless connection on the Raspberry PI, so I'm assuming there isn't one.
    • If you're attempting to set up a connection from the Pi to the Internet, you'll need to set up some sort of forwarding through it.  One Windows, this is called "Internet connection sharing".  On Linux, it's called "forwarding" and is typically done via IPTables.  In either case, your PC is effectively an oversized version of your home router.
    • If you can't ping the PC from the Pi, it's likely that you have a host-based firewall turned on, on the PC.  That or you have issues with IP addresses.  By this, I mean: you shouldn't use the same IP space for both sides of the PC.  If one side uses 192.168.2.x, the other side should use 192.168.3.x (i.e., the third number changes).  This means that the PC will have an address on the wireless network and a different one on the wired connection.  Whatever IP address is on the PC's wired connection should be the defined gateway on the Pi.

     

    I've probably missed a few things that others here will pick up on...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to packetgeek

    You are correct in your assumption that there is no WiFi dongle, which I'm going to pick up here shortly, but wanted to get the RPi going first.

     

    These are tutorials I have tried:

    http://anwaarullah.wordpress.com/2013/08/12/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode/

    http://pihw.wordpress.com/guides/direct-network-connection/

     

    Obviously, neither of which have worked for me. Do i need to enable Port Forwarding? I've never dealt with this kind of stuff before.

     

    Any recommendations as to how I will go about get this hooked up? If not, do you know if RadioShack carries a WiFi "dongle" that is compatibility with the RPi, or does any one just work?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • gallopingalice
    gallopingalice over 11 years ago in reply to Former Member

    Pi on line.

    Why do you want your PC as a bridge? What's wrong with ethernet direct to your router.

    My Pi is 20metres from my router and connects to the internet via an ethernet-over-mains device, no problem.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • packetgeek
    packetgeek over 11 years ago in reply to Former Member

    It's difficult to do troubleshooting via forum but...

     

    1) Ensure that /etc/network/interfaces (in the Pi) has the correct settings for eth0 (should look something like the following).  Assuming that your wireless network addresses are 192.168.1.x and the wired addresses are 192.168.2.x, the entries (in the PI's /etc/network/interfaces file) should look something like:

     

      auto eth0

      iface eth0 inet static

            address 192.168.2.5         <-- IP address for the RPi

            netmask 255.255.255.0

            broadcast 192.168.2.255

            network 192.168.2.0

            gateway 192.168.2.1         <-- IP address of wired side of PC

            dns-nameservers 192.168.1.1   <-- use whatever is reported when you run "ipconfig /all" on the PC

            dns-search cox.net            <-- optional.  if used, employ whatever your ISP's domain is

     

    Of course, be sure to remove my comments from the above.  On the PC, you'll want to add a static IP to the wired NIC.  In the example above, it'd be 192.168.2.1.  Also, above assumes that OS is Raspbian or similar Debian-based variant.

     

    2) On the PC, if you run ipconfig /all at the command line, you should see one gateway entry and one or more DNS entries (the IP address of your router and/or your ISP's DNS server).

     

    3) Instead of trying to connect to (or ping) the PC from the Pi, trying pinging www.google.com or some other site out on the Internet.  If you can do that, your connection sharing is probably configured correctly.  If you still can't ping or connect to your PC, it's probably a firewall issue (on the PC).

     

    That's about all that I can think of.  The only connection sharing I've ever used was via Linux boxes.  I've never used Windows connection sharing, though I've seen it used.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago

    Actually I would recommend that you buy a cheap dongle. Less problems no stress... Good Luck!!!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to gallopingalice

    Because I neither have an Ethernet net drop in my room, and have no desire to spend extra money right now to buy a 100 foot cable. I don't think my router is 20 metres away from my PC though. Haha.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to packetgeek

    I'll go try that out!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube