I had a Cisco 1811 router that I could happily change the configuration on, write mem and reload and it would just never actually use that config.
Turns out it was caused by the configuration register not being correctly set. Do a ‘show version’ and verify that the configuration register is set as 0x2102 (it is probably set as 0x2142 which will ignore NVRAM contents on bootup). If it is not set to this, enter configuration mode and type ‘config-register 0x2102’ then do a copy running-config startup-config and reload the router to verify that it is now saving the configuration and using it on bootup.
You can find more information on the configuration register and the different variables at: