Help: Wifi Hotspot on same subnet and SSID

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
Posts: 2
Joined: Mon Apr 20, 2020 4:39 am

Help: Wifi Hotspot on same subnet and SSID

Post by mazz12 »

Hello all, I don't have a technical background and after days of struggling with unsuccessful trial and error and searching for answers elsewhere, have come here for help. If there is relevant documentation that I should read, some pointers in the right direction would also be great.

Thanks in advance.

In response to COVID-19 I have set up my raspberry pi with DietPi at home to run a Nextcloud server and Wifi hotspot so that my parents can work from home. (Thanks to documentation here and elsewhere!)

However there is one big issue I would like to fix, and another minor issue.

1. The DietPi Wifi hotspot is on a separate subnet. 192.168.42.x rather than 192.168.1.x as well as having a different SSID to "Router 2". If possible I would like to have the hosts connected to the DietPi to be on the same subnet as the rest of the network, as well as share the same SSID to the other wireless router. (I know I can change the SSID for the DietPi through dietpi-config → network adapters, but when I changed it to the same SSID, the network stopped working. I don’t know why, regardless simply changing the SSID does not solve the issue with them being on different subnets.)

My intuition tells me that changing the static IP of DietPi wlan0 from to would result in something bad. Or is this safe to do?

2. At the moment with dnsmasq on “Router 1”, LAN traffic to the nextcloud server (directed at the DDNS domain e.g., is redirected to However with this current setup, clients connected to the DietPi hotspot are (probably?) connecting to the hotspot, which then forwards traffic to the router, which then redirects back to the DietPi to access the Nextcloud server. This seems kind of redundant and a waste of bandwidth. If possible, it would be great if clients connected to the DietPi Hotspot directly access the Nextcloud server without going through “Router 1” How would I go about doing this?

This is the current setup:
Both routers are running ddwrt.
Please let me know if I should provide further details.

Under normal circumstances I would try to sort this myself after many days of trial and error. However due to COVID-19, the network is being heavily used for professional academic purposes by family members working from home, so I can’t afford to break the network constantly, and it would help them if this got fixed sooner rather than later.
User avatar
Posts: 292
Joined: Tue Feb 25, 2020 2:54 pm

Re: Help: Wifi Hotspot on same subnet and SSID

Post by trendy »

1) To have the wifi in the same subnet with the ethernet interface, you need to bridge the eth and wlan interfaces and manage them as one. (hint: brctl). I have not seen it in dietpi scripts, so check what needs to be done in /etc/network/interfaces and fix it manually.
2) Create an A record in your local nameserver for the fqdn you are using and specify the internal IP directly.
User avatar
Posts: 4544
Joined: Sat Nov 16, 2019 12:49 am

Re: Help: Wifi Hotspot on same subnet and SSID

Post by Joulinar »


many thanks for your report. I guess that's what you are looking for ... p?t=178420

It will link you to another blog which is quite old but contains the right thinks in it, like to install wireless-tools hostapd bridge-utils and to setup the network bridge

I general I would recommend to not use DietPi software / config to install the access points as it will setup as well a DHCP server. And this one would not be needed. ;)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Posts: 2
Joined: Mon Apr 20, 2020 4:39 am

Re: Help: Wifi Hotspot on same subnet and SSID

Post by mazz12 »

Thank you both for the replies. I've done the best to follow your advice on problem 1).

However now I can no longer SSH into the Pi and the nextcloud server is inaccessible. and the bridged AP on the DietPi is not broadcasting anything. The Pi does however show up as a host through the router control page, under connected LAN devices. However all ping requests get dropped.

What I did:

I uninstalled the wifi hotspot software through the DietPi software menu, then proceeded to install "wireless-tools", "hostapd" and "bridge-utils" through apt. (iirc only hostapd and bridge-utils needed re-installing)

Then following ... ian-linux/

I created a new config file for /etc/network/interfaces in /etc/network/interfaces.d/ as advised in the original interfaces file ("drop-in") with options similar to the above but with IPs corresponding to my network. Named: /etc/network/interfaces.d/interfaces with these options

Code: Select all

# Location: /etc/network/interfaces.d/interfaces
# This is my drop-in in: /etc/network/interfaces.d/ (whatever a drop in is I don't know but here goes)

# Local
auto lo br0
iface lo inet loopback

# Ethernet
allow-hotplug eth0
iface eth0 inet manual

# Wireless
allow-hotplug wlan0
iface wlan0 inet manual

# Bridge setup

# for static ip
iface br0 inet static
bridge_ports eth0 wlan0

dns-search localdomain
Then I created the hostapd.conf in /etc/hostapd/ with these options (I had to newly create the file so am wondering if it exists somewhere else?):

Code: Select all

# Location: /etc/hostapd/hostapd.conf

# Bridge name

# the country code
# limit the frequencies used to those allowed in the country
# 802.11n support

# AP SSID name

# Hardware mode, a = 5GHz, g = 2.4GHz

# Wireless Channel

# QoS support, also required for full speed on 802.11n/ac/ax
#mac address filtering. 0 means "accept unless in ignore list"
#setting ignore_broadcast_ssid to 1 will disable the broadcasting of ssid
# Security 1=wpa, 2=wep, 3=both
# WPA2 only
# WPA2 encryption
# WPA encryption
# Passphrase
After doing those things, I rebooted the Pi and found myself with an unusable Pi.

Before I did the reboot, through the DietPi launcher, checking services before I saved the files and it all failed, I noticed something about hostapd being "masked". I am wondering if that is an issue.
User avatar
Posts: 292
Joined: Tue Feb 25, 2020 2:54 pm

Re: Help: Wifi Hotspot on same subnet and SSID

Post by trendy »

I was not able to make networking work with configuration files in interfaces.d/ . Instead I added the things I needed inside the main interfaces file. Also if I remember properly there is some specific filename structure for the files in interfaces.d, like bridge.conf.
Post Reply