0

There are a great many tutorials to do this that require setting up my Pi as a DHCP server. This puts downstream devices on a new subnet.

Use case: I want my Pi, which is connected via my WiFi, to allow my Ethernet only network HiFi Amp, to share the internet connection. It needs to be on the main subnet so I can see it on the network. For example, I want to be able to use my mobile app to control my HiFi amp, and I want Spotify Connect on my amp to appear as a playable client from my phone.

How can I share internet from my Pi WiFi out my Pi Ethernet port but have my HiFi amp (connected to my Pi Ethernet)receive an IP from the same subnet on my home lan, so that it can be accessed from any other device on the LAN?

Updates from comments:
My Home router 192.168.0.1 is a DHCP server. I don't want my Pi to give Ethernet devices a 192.168.n.x address. I want to just share the internet connection, and whatever is plugged to the Ethernet port (in my case my HiFi Amp) to get an address on the home LAN's subnet... 192.168.0.n. Otherwise the HiFi amp doesn't seem accessible from the network for the two examples I provided. e.g. if it gets an address from the Pi such as 192.168.2.56 the device isn't seen by my phone, for example, which is on the main subnet.

Also I'm not trying to set up a WiFi access point. I'm trying to turn my Pi into an Ethernet router, with a bridged WiFi connection. I know I don't want two DHCP servers. That's the point of the question.

  • 1
    It is unclear from your question exactly what you are trying to achieve. While it is true that most Access Point tutorials also describe how to setup a DHCP server, but there is no reason why you couldn't use an existing DHCP server (it is generally not possible - or desirable, to have more than 1 server, although you could serve a limited subset of the IP range). – Milliways Apr 18 at 8:10
  • I have a use case. It tried my best to explain exactly what I want to achieve. My Home router 192.168.0.1 is a DHCP server. I don't want my Pi to give Ethernet devices a 192.168.n.x address. I want to just share the internet connection, and whatever is plugged to the Ethernet port (in my case my HiFi Amp) to get an address on the home LAN's subnet... 192.168.0.n. Otherwise the HiFi amp doesn't seem accessible from the network for the two examples I provided. e.g. if it gets an address from the Pi such as 192.168.2.56 the device isn't seen by my phone, for example, which is on the main subnet. – square_eyes Apr 18 at 8:17
  • Also I'm not tryiing to set up a WiFi access point. I'm trying to turn my Pi into an Ethernet router, with a bridged WiFi connection. I know I don't want two DHCP servers. That's the point of the question. – square_eyes Apr 18 at 8:22
  • 1
    It is not possible to bridge a WiFi client connection (wlan0) with a wired interface (eth0). You have to use workarounds. I have some, but only tested with Raspbian Stretch. I don't believe that's also working with outdated Raspbian Jessie. – Ingo Apr 18 at 10:24
  • How about these? github.com/arpitjindal97/raspbian-recipes – square_eyes Apr 19 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.