BPI-R3 Debian hostapd ping with DUP!

Obviously not. But when I turn off the hostpad service, wlan0 also turns off but wlan1 remains active.

systemctl | grep hostapd

Will show you why :wink:

hostapd.service  loaded active running   Access point and authentication server for Wi-Fi and Ethernet
hostapd2.service  loaded active running   Access point and authentication server for Wi-Fi 2 and Ethernet

Hostapd service using wlan0 config,hostapd2 uses wlan1

Defined in /etc/default/hostapd

Have you considered using the template unit file [email protected]?

But anyway, back to subject, @radek.juthner , you could try changing the mac addresses as above… Perhaps it helps.

Thanks for the explanation. I get it. Then why wlan0 returns DUP! is a mystery to me and wlan1 does not.

I tried changing the mac address using machchanger but no luck.

Is mac really changed? Normally this needs to be done when interface is not up

@ericwoud do not know templates for systemd just added new var to default file and copied service file with some changes (use other var and different pid)

I used:

ifconfig wlan0 down      #Bring wifi down
macchanger -r wlan0      #Randomly generate new MAC address
ifconfig wlan0 up        #Bring wifi back up

I tried but no luck.

With file named /etc/hostapd/wlan1.conf

Do:

systemctl start [email protected]

Then no need to edit the files.

1 Like

Never mind that, do:

sudo nano /etc/systemd/network/10-wlan0.link

[Match]
OriginalName=wlan0

[Link]
MACAddress=aa:bb:cc:11:22:00

Press CTRL-x and type y to save it.

And:

sudo nano /etc/systemd/network/10-wlan1.link

[Match]
OriginalName=wlan1

[Link]
MACAddress=aa:bb:cc:11:23:00

Press CTRL-x and type y to save it.

Then

reboot

Check again with:

ip a

I managed to change the MAC addresses. I checked with ip a. Unfortunately DUP! on wlan0 it didn’t fix it. I think the problem will be with the files in /etc/hostapd. I don’t know why there is a hostapd.conf file (doesn’t it create some duplication?). When I remove it wlan0 doesn’t work but wlan1 works. Another observation:

  • if wlan0 and wlan1 are on, then the client on wlan0 pings DUP, but the client on wlan1 has clean pings.
  • if I turn off wlan1, then the client on wlan0 has clean pings.

again:

  • hostapd.conf is default file from package and should not be used as i changed DAEMONCONF in /etc/defaults/hostapd
  • hostapd service should use hostapd_wlan0.conf (DAEMONCONF in /etc/defaults/hostapd)
  • hostapd2 service should use hostapd_wlan1.conf (DAEMONCONF2 in /etc/defaults/hostapd)

have you dropped the bridge-setting from the configs???

What do you mean???

this setting…try without it and do the local pings without the bridge…you can also enable routing to not break internet connectivity

If I remove bridge=lanbr0 from /etc/hostapd/hostapd_wlan1.conf (or wlan0), the client does not get an IP address. I still found this out. After the reboot, wlan1 is disabled. If klinet is on wlan0, it pings with DUP. Just turn on and then turn off wlan1 and then the client is on wlan0 with a clean ping.

then reenable the systemd-file from image with the ip-adress and dhcp-server

Sorry, but I don’t understand what to do.

I’m not sure if isc-dhcp has fully replaced or works well in systemd-networkd. In the folder /etc/systemd/network I have the original configurations: 05-eth0.network 15-wan.network 21-lanbr-bind.network 10-wan.link 20-lanbr.netdev

I moved the hostapd_wlan0.conf and hostapd_wlan1.conf files to the /etc/hostapd folder and added bridge=lanbr0 to them.

Other DHCP configuration is according to isc-dhcp.

not sure about the isc-dhcp…if you use this then add config for wlan0+1 and add ip to these interfaces

my original system uses this systemd setting

we first need to check without this bridge as i guess the dup are from there