mob-i-l
Posts: 315
Joined: Sat Dec 29, 2012 2:45 am
Location: Lund, Skåne/Scania, Sweden
Contact: Website Facebook Google+ Twitter YouTube

How to share one Pi's Internet from WiFi to another Pi

Tue Jan 19, 2016 5:11 pm

I'm testing to have one Raspberry Pi connected via WiFi-dongel and another Raspberry Pi via ethernet cable to the first, and network between them works because e.g. x2x works, but on the second (that without WiFi) I don't get Internet -- e.g. ping to google.com doesn't work, but that works on the first.

How should I do to get Internet to the second Pi?

The LAN have IP-numbers that starts with 169.254 and the WLAN's starts with 192.168.1.

One idea is to get the WiFi-router to give the LAN-interfaces IP-numbers, but I don't know how to do this. I would rather not use fixed IP-numbers because I want to be able to move the Pis to other networks without manual reconfiguration.
Have Pi0&1A&1B&1B+&2B&3B&4B w/ Raspbian. Started w/ BASIC on ABC80&ZX81 then Forth, Z80… https://scratch.mit.edu/users/mobluse/ https://github.com/mobluse/ https://twitter.com/mobluse/ https://YouTube.com/MOBiL4u/

User avatar
Milliways
Posts: 534
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: How to share one Pi's Internet from WiFi to another Pi

Wed Jan 20, 2016 7:11 am

You need to configure a bridge on the Pi connected to the internet. The kernel should support bridging, but you will need the bridge-utils package. I haven't done this on the Pi although it is available on most Linux platforms, but there is documentation on the web.

Note you will NEVER be able to use the 169 IP address range. This is a link-local address and not routable. You have a number of options
  • Install a dhcpcd server
    use static address
    you may be able get the router's DHCP to allocate addresses

Return to “Raspberry Pi OS”