NVRAM and its peculliar behaviour...

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6440
Location: UK, London, just across the river..

PostPosted: Wed Apr 05, 2023 16:08    Post subject: NVRAM and its peculliar behaviour... Reply with quote
It been a time since, ive found some odd behaviour on my R9000 nvram output...which after every reset i have some odd MAC's swap on hardware interfaces...or odd bridges created and still no clue why it happens....
I already checked other R9000 and those have normal output of nvram show | grep hwaddr with no swapped macs or odd hardware interfaces...

Recently on my R7800, since moving from 52189 to build 52217, ive noticed some odd values in the output of nvram show | grep hwaddr, those in bold text are obsolete interfaces created by
old use of those variables or just a tests and those are carried out forward on upgrades, but those will stay even with nvram erase...

After the update from 52189>52217.....

OUTPUT A
eth1.100_hwaddr=xx.xx.xx.xx.xx
eth0_hwaddr=xx.xx.xx.xx.xx
eth1_hwaddr=xx.xx.xx.xx.xx
oet1_hwaddr=00:00:00:00:00:00
def_hwaddr=00:00:00:00:00:00
eth1.3_hwaddr=xx.xx.xx.xx.xx
wlan1_wds10_hwaddr=00:00:00:00:00:00
wan_hwaddr=xx.xx.xx.xx.xx
vlan200_hwaddr=xx.xx.xx.xx.xx
vlan1_hwaddr=xx.xx.xx.xx.xx
vlan2_hwaddr=xx.xx.xx.xx.xx
vlan3_hwaddr=xx.xx.xx.xx.xx
lan_hwaddr=xx.xx.xx.xx.xx
[b]wlan1_wds1_hwaddr[/b]=00:00:00:00:00:00
wlan1_wds2_hwaddr=00:00:00:00:00:00
wlan1_wds3_hwaddr=00:00:00:00:00:00
wlan1_wds4_hwaddr=00:00:00:00:00:00
wlan1_wds5_hwaddr=00:00:00:00:00:00
wlan1_wds6_hwaddr=00:00:00:00:00:00
wlan1_wds7_hwaddr=00:00:00:00:00:00
wlan1_wds8_hwaddr=00:00:00:00:00:00
wlan1_wds9_hwaddr=00:00:00:00:00:00
def_whwaddr=00:00:00:00:00:00
vlan100_hwaddr=xx.xx.xx.xx.xx
eth1.200_hwaddr=xx.xx.xx.xx.xx
wlan0_hwaddr=xx.xx.xx.xx.xx
wlan1_hwaddr=xx.xx.xx.xx.xx
br1_hwaddr=xx.xx.xx.xx.xx
br2_hwaddr=xx.xx.xx.xx.xx
br3_hwaddr=xx.xx.xx.xx.xx

I manually removed some of those, as i dont use those futures as well, i was able to compare with another brand new R7800, which i flashed recently and stays as a spare...as well, some of those are created once you activate a GUI setting and click save (expected behaviour), if you click apply those will be committed to the nvram and...stay forever...until you manually
nvram unset wlan1_wds9_hwaddr..than nvram commit

I may have some other nvram variables that i dont need in my output, but i deleted only those in bold text, those that im certain of...and checked...if those are created once you activate a future...

Now... the fun stuff Laughing I deleted those interfaces (i was certain of) and nvram committed, than i did a dirty update to an older version, which i have 52095...and nvram erase after the update...than rebooted to a default config and set a pass and than loaded my safe file with complete working set up of 52095...than unit rebooted and was fully functional...(expected behaviour)...
than logged via SSh and checked the output of nvram show | grep hwaddr and DANG !!

OUTPUT B
eth0_hwaddr=XX.XX.XX.XX.XX.XX
eth1_hwaddr=XX.XX.XX.XX.XX.XX
def_hwaddr=XX.XX.XX.XX.XX.XX
wan_hwaddr=XX.XX.XX.XX.XX.XX
vlan200_hwaddr=XX.XX.XX.XX.XX.XX
vlan1_hwaddr=XX.XX.XX.XX.XX.XX
vlan2_hwaddr=XX.XX.XX.XX.XX.XX
lan_hwaddr=XX.XX.XX.XX.XX.XX
def_whwaddr=00:00:00:00:00:00
vlan100_hwaddr=XX.XX.XX.XX.XX.XX
wlan1_hwaddr=XX.XX.XX.XX.XX.XX
br1_hwaddr=XX.XX.XX.XX.XX.XX
br2_hwaddr=XX.XX.XX.XX.XX.XX
br3_hwaddr=XX.XX.XX.XX.XX.XX

This is the output form 52095 which is reset, rebooted, than loaded old config of 52095 and fully working with x2 VLAN setup ...but actually, this is same nvram output of 52217 when i deleted all variables, that i didn't need..(also expected behaviour) and interesting to me, unit is fully operational...expected behaviour...

Do notice, there is no interface of br0, but in GUI its there...there was no br0 even in the other output before my 'nvram unset' edit...in both cases unit is fully working...as this set up makes sense anyway...once i click save this short output B becomes output A (with WDS stuff missing) also expected behaviour...but peculiar stuff is why those all interfaces are carried out forward even on nvram reset... and if you experiment with your unit, you will end up with lots of unused hardware interfaces..if you dont use those futures any more..
like eth1.14_hwaddr ; oet1_hwaddr ; wlan1_wds2_hwaddr and ect. all those obsolete

On my second R7800 unit i had some stuff like empty variables..

wl_hwaddr=
tun1_hwaddr=

for example i do use VPN on it..
but why empty..VPN is working...as intended
there is no br0 on this
I have total of x3 R7800 Razz ...1 stays as spare and its new in box Razz Razz

output C

eth1.12_hwaddr=XX.XX.XX.XX.XX.XX
eth1.13_hwaddr=XX.XX.XX.XX.XX.XX
eth1.14_hwaddr=XX.XX.XX.XX.XX.XX
tun1_hwaddr=
eth1_hwaddr=XX.XX.XX.XX.XX.XX
def_hwaddr=00:00:00:00:00:00
wan_hwaddr=XX.XX.XX.XX.XX.XX
vlan1_hwaddr=XX.XX.XX.XX.XX.XX
lan_hwaddr=XX.XX.XX.XX.XX.XX
wl_hwaddr=
def_whwaddr=00:00:00:00:00:00
vlan13_hwaddr=XX.XX.XX.XX.XX.XX
vlan14_hwaddr=XX.XX.XX.XX.XX.XX
vlan15_hwaddr=XX.XX.XX.XX.XX.XX
wlan0_hwaddr=XX.XX.XX.XX.XX.XX
wlan1_hwaddr=XX.XX.XX.XX.XX.XX
br1_hwaddr=XX.XX.XX.XX.XX.XX
br2_hwaddr=XX.XX.XX.XX.XX.XX
br3_hwaddr=XX.XX.XX.XX.XX.XX

so, yes i had to remove some obsolete stuff from my second R7800 too, and my question is... Is there anyway on reset to remove any unused hardware interface or at least revert to a basic setup
and not carry those forward...I guess it may be very tricky in some cases...and all those different platforms supported...it will take lots of time to fiddle in...but anyway, as i know what to do, im fine...(well i believe so..) Laughing Laughing Laughing

Is there any possibility those remains, to create some odd router behaviour or issues, if those are overlayed or duplicated by any chance.. i guess not... Rolling Eyes

I dont know what will be the output of my R7000, that i have even form before my R7800 or even
my oldest 1043v2 Razz Razz

For the record my main R7800 its working as it should, i did some gimmicks going back and forth, to sort a peculiar reboot behaviour on 52217 with no access to the SSh or GUI from wired or radio side...
My main R7800 has been flashed the last god knows how many years back, since Kong and even before that days, with every single build made by Kong or BS afterwards mostly with no resets...big thanks to all developers or anyone around good or bad, that provided any kind of help to me or to the DDWRT users around...hats off to Brain Slayer...!!

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Sponsor
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2977
Location: Germany

PostPosted: Thu Apr 06, 2023 4:01    Post subject: Reply with quote
Yes, this is known and expected behavior.
No MAC addresses are deleted even not with "nvram erase".

On some devices the MAC addresses are only stored in the nvram, if you delete them - have fun.
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6440
Location: UK, London, just across the river..

PostPosted: Thu Apr 06, 2023 6:26    Post subject: Reply with quote
ho1Aetoo wrote:
Yes, this is known and expected behavior.
No MAC addresses are deleted even not with "nvram erase".

On some devices the MAC addresses are only stored in the nvram, if you delete them - have fun.


Yes i know MAC addresses are stored/read from another partition...

my Question was pointed about all those unused hardware interfaces carried out forward...or missing br0, but anyway i can live with it, was just good to know...what can be done..

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Thu Apr 06, 2023 7:00    Post subject: Reply with quote
You can selectively 'nvram unset' or nuke the entire partition as if it were corrupt using the old 'erase nvram' cmd.
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2977
Location: Germany

PostPosted: Thu Apr 06, 2023 7:06    Post subject: Reply with quote
Alozaros wrote:
ho1Aetoo wrote:
Yes, this is known and expected behavior.
No MAC addresses are deleted even not with "nvram erase".

On some devices the MAC addresses are only stored in the nvram, if you delete them - have fun.


Yes i know MAC addresses are stored/read from another partition...

my Question was pointed about all those unused hardware interfaces carried out forward...or missing br0, but anyway i can live with it, was just good to know...what can be done..


Yes on atheros routers that have an ART partition.
There are also routers that do not have an ART partition.
Therefore the MAC addresses are not deleted
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6440
Location: UK, London, just across the river..

PostPosted: Thu Apr 06, 2023 16:06    Post subject: Reply with quote
blkt wrote:
You can selectively 'nvram unset' or nuke the entire partition as if it were corrupt using the old 'erase nvram' cmd.


yes selectively sounds wright...
how safe is to used the old erase nvram cmd on R7800 Rolling Eyes Embarassed
as i might use it once by mistake.. among all those resets i did recently...
So far, the unit is working Cool using GUI for vlans segmentation...

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions 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