wl0.1_hwaddr does not match 'wl -i wl0.1 bssid'

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
puterboy2
DD-WRT User


Joined: 24 Feb 2019
Posts: 139

PostPosted: Fri Jul 29, 2022 5:08    Post subject: wl0.1_hwaddr does not match 'wl -i wl0.1 bssid' Reply with quote
I have a 2.4GHz guest network set up on wl0.1 that stopped working about 2 days ago on one of my routers.
(see https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=332640)
However, the 5GHz guest network (as well as the regular 2.4 and 5GHz wireless networks) work fine. Also the 2.4GHz guest networks continue to work fine on my 3 other APs.
All 4 routers are Netgear r6700v3 running dd-wrt r49532

The only difference I could find is that there is an inconsistency between:
Code:
#ifconfig wl0.1
6b:ad:d4:23:27:e0
#nvram get wl0.1_hwaddr
6b:ad:d4:23:27:e0

and
Code:

#wl -i wl0.1 bssid
6b:ad:d4:23:27:e0

which of course is the bssid that is broadcast.

The MAC address is consistent for the other wireless interfaces on this router (wl0, wl1, wl1.1) as well as for all 4 interfaces on my other 3 routers.

I tried changing wl0.1_hwaddr using 'nvram set' and 'nvram commit' and I also tried manually setting the MAC address for wl0.1 using 'ip dev wl0.1 address 6b:ad:d4:23:27:f0' but neither change helped nor persisted a reboot.

Still, this mismatch seems odd and could presumably explain why my 2.4GHz network is no longer working.

A similar issue seems to have been mentioned but not really resolved in https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1261545

Regardless, how do I get the bssid MAC and the ifconfig MAC to align for wl0.1?

Or am I barking up the wrong tree here?
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Fri Jul 29, 2022 9:35    Post subject: Reply with quote
It is possible to explicitly set bssid, that was made for wireless connection of the router(Station (bridge) modes)

Is it possible that you played with these modes and that that somehow got you a different bssid?

You said it stopped working, what changed?

Consider resetting to defaults and setup manually do not restore from a backup (garbage out, garbage in)

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
puterboy2
DD-WRT User


Joined: 24 Feb 2019
Posts: 139

PostPosted: Fri Jul 29, 2022 14:28    Post subject: Reply with quote
egc wrote:
It is possible to explicitly set bssid, that was made for wireless connection of the router(Station (bridge) modes)


How do I change the bssid?
And where/how is it set -- i.e. what routine sets it and what nvram variable is used to set it.
I would have thought that it was set to wl0.1_hwaddr but it seems to be set to wl0.1_hwaddr +10h

Quote:

Is it possible that you played with these modes and that that somehow got you a different bssid?

You said it stopped working, what changed?


The only thing I did was to remove the following 2 firewall settings for the guest network on br1]

Code:

iptables-save | grep -q "POSTROUTING -o br0 -j SNAT --to-source" || iptables -t nat -I POSTROUTING -o br0 -j SNAT --to $(nvram get lan_ipaddr)
iptables-save | grep -q "FORWARD.*-i br1 -j REJECT" || iptables -I FORWARD -i br1 -d $(nvram get lan_ipaddr)/$(nvram get lan_netmask) -j REJECT


However, (1) restoring the old settings didn't fix the problem (2) only the 2.4GHz network was affected (even thought the 5GHz network is also on br1)

Quote:

Consider resetting to defaults and setup manually do not restore from a backup (garbage out, garbage in)


I will play with it over the weekend... though it was working before Smile so not sure why restoring from an old (working) backup would cause problems.
puterboy2
DD-WRT User


Joined: 24 Feb 2019
Posts: 139

PostPosted: Sun Jul 31, 2022 5:24    Post subject: Reply with quote
@ECG, before I try factory resetting the router, I would like to see if I can fix it by manually changing the BSSID to match the value of the ifconfig MAC.

You mentioned that it is possible to change the BSSID... so how would I do that?

Also, do you understand how and where in the code the dd-wrt firmware sets the BSSID relative to the nvram value of wl0.1_hwaddr?

Thanks
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Sun Jul 31, 2022 6:33    Post subject: Reply with quote
You can only set bssid when the router is in station mode I guess.

I do not know much about it, so cannot be much helpful Sad

P.S. you can test if an iptables rule is present before setting it but simply deleting it before setting is perhaps the easier and more efficiënt solution Smile

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
puterboy2
DD-WRT User


Joined: 24 Feb 2019
Posts: 139

PostPosted: Tue Aug 02, 2022 1:27    Post subject: Solved but not sure why... Reply with quote
By assiduously comparing the nvram parameters between a working and a non-working router... and via trial-and-error, I was able to fix the problem by *unsetting* br1_hwaddr.

Even though the MAC address for br1_hwaddr did not itself conflict with the BSSID or the MAC address for wl0.1, somehow it created a problem... resulting in the BSSID for wl0.1 differing from the ifconfig (hardware?) MAC address for wl0.1 which presumably was the proximal cause for the problem.

It still would be good to understand how the BSSID is set and calculated relative to the ifconfig (hardware?) MAC address for wl0.1

And it would be helpful to know whether and how one can set the BSSID manually.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum