2

Today I was hoping to setup a network extender. I want it to connect to my router via ethernet, and then share out that connection via WiFi, and stay on the same network. All of the tutorials I looked at configured it in a way that the connected devices are on their own network with the raspberry pi, whereas I want mine to connect them to the 192.168.1.0/24 subnet. Is there anyway I can do this?

Thanks!

Toffee
  • 78
  • 8
  • Any specific reason you need them on the same subnet? All the home routers I've seen / tried are find with multiple subnets as long as you use the switch in the back of them for the extenders. Its sometimes an advantage to see who is connecting to what AP (using the sub-net) when trying to sort out an issue - just ask my son... –  Apr 02 '20 at 17:11
  • @Andyroo oh, yeah, I need them to be able to access the network directly to see servers and stuff on the network – Toffee Apr 02 '20 at 17:14
  • But the routing on the Pi AP will bridge the two networks in both directions for you so it will be transparent to the devices on the WiFi side. They should pick the Pi AP up as the router and that passes the data between the two sub-nets for you. If they need access outside the LAN the Pi will bridge to the router and that will pass out to the internet for you. –  Apr 02 '20 at 17:25
  • It's important that I have direct access to a network tho, I am using this a testing device to develop a pen-testing device. It is designed to just plug in and share out the network on the same subnet – Toffee Apr 02 '20 at 17:31
  • Sorry but not going there - sounds like a hack device. –  Apr 02 '20 at 17:33
  • I literally said it was, but its for me to learn about it and see if I can develop a fix for it in my own network – Toffee Apr 02 '20 at 17:34
  • Only thing I can recommend is some ethical hacking courses that take you through the ethics and skills needed. A search of 'White Hat Ethical Hacking CompTIA Cisco' will show lots of options inc vouchers and free courses. Once this basics are understood you will find lots of courses on Linux networking. –  Apr 02 '20 at 18:17
  • I got my old router to do the same thing anyway, thanks – Toffee Apr 02 '20 at 23:02

1 Answers1

2

It seems that you only found setups, using routing. But it is no problem to setup the WiFi access point on the RasPi to be on the same internal subnet as the internet router. You have to bridge the wired connection to the router on eth0 with the wlan0 interface of the access point. This way you are even on the same broadcast domain as the router, so your clients connected by WiFi will also use the DHCP server from the router. And it will give all clients ip addresses from the same subnet. How to setup it just have a look at Setting up a Raspberry Pi as an access point - the easy way. Beside the other options using routing you should follow the section ♦ Setting up an access point with a bridge.

Ingo
  • 40,606
  • 15
  • 76
  • 189
  • It works! Thank you so much. Quick question - what would happen to the Pi if there was no Ethernet plugged in and a USB tethering device instead? – Toffee Apr 07 '20 at 14:29
  • @SlipDip USB tethering is usually provided by mobile phones to share its mobile internet connection to the connected device. This also works with the RasPi. You will get an additional interface **usb0** that you can use to connect direct to the internet by the mobile phone. But it doesn't fit to the current network setup, so you have to do additional configuration. – Ingo Apr 07 '20 at 16:58
  • sorry for the bad wording, what I meant was would it still broadcast an access point when it isn't connected to ethernet? I realised I worded that question horribly, sorry. – Toffee Apr 07 '20 at 21:27
  • @SlipDip Yes, the access point is made by wpa_supplicant, which isn't effected by the wired connection. Then you have a standalone access point without internet connection. – Ingo Apr 08 '20 at 13:24