Mailing List Archive

write mem if running-config and startup-config are different?
Hi-

We would like to catch and remedy situations where we have altered a
switch's running-config, but then forget to write mem (weeks later,
the switch reboots due to power outage, and suddenly vlans aren't
working, etc).

Is anyone using rancid to notice that running-config and
startup-config are different, and if so, issue a write mem command?
(or something else to address such an issue?) Would you be willing
to share what you've done?

Thanks-
Matt
--
--
Matt Wilson <mwilson at northwestern.edu>
Systems Engineer, IT Telecomm and Network Services
Northwestern University
write mem if running-config and startup-config are different? [ In reply to ]
On 16.05.2005 16:30 Matt Wilson wrote

> Hi-
>
> We would like to catch and remedy situations where we have altered a
> switch's running-config, but then forget to write mem (weeks later,
> the switch reboots due to power outage, and suddenly vlans aren't
> working, etc).
>
> Is anyone using rancid to notice that running-config and
> startup-config are different, and if so, issue a write mem command?
> (or something else to address such an issue?) Would you be willing
> to share what you've done?
>

Why don't you run "write memory" every time you pick up the config?



Arnold
--
Arnold Nipper, AN45
write mem if running-config and startup-config are different? [ In reply to ]
Mon, May 16, 2005 at 05:05:48PM +0200, Arnold Nipper:
> On 16.05.2005 16:30 Matt Wilson wrote
>
> >Hi-
> >
> >We would like to catch and remedy situations where we have altered a
> >switch's running-config, but then forget to write mem (weeks later,
> >the switch reboots due to power outage, and suddenly vlans aren't
> >working, etc).
> >
> >Is anyone using rancid to notice that running-config and
> >startup-config are different, and if so, issue a write mem command?
> >(or something else to address such an issue?) Would you be willing
> >to share what you've done?
> >
>
> Why don't you run "write memory" every time you pick up the config?
>

or periodically, somethign like
for r in `cat */router.db | egrep -i '(cisco|cat5)' | cut -f1 -d: `; do
clogin -c 'write mem' $r
done
write mem if running-config and startup-config are different? [ In reply to ]
On 16.05.2005 23:00 john heasley wrote

> Mon, May 16, 2005 at 05:05:48PM +0200, Arnold Nipper:
>> On 16.05.2005 16:30 Matt Wilson wrote
>>
>> >Hi-
>> >
>> >We would like to catch and remedy situations where we have altered a
>> >switch's running-config, but then forget to write mem (weeks later,
>> >the switch reboots due to power outage, and suddenly vlans aren't
>> >working, etc).
>> >
>> >Is anyone using rancid to notice that running-config and
>> >startup-config are different, and if so, issue a write mem command?
>> >(or something else to address such an issue?) Would you be willing
>> >to share what you've done?
>> >
>>
>> Why don't you run "write memory" every time you pick up the config?
>>
>
> or periodically, somethign like
> for r in `cat */router.db | egrep -i '(cisco|cat5)' | cut -f1 -d: `; do
> clogin -c 'write mem' $r
> done

Be aware that this will fail as both cisco and cat5 expect confirmation
of the write command. You have to add 2-3 new lines to make it work (2
for cisco and 3 for cat5 iirc)





Arnold
--
Arnold Nipper, AN45
write mem if running-config and startup-config are different? [ In reply to ]
At 11:25 PM +0200 5/16/05, Arnold Nipper wrote:
>On 16.05.2005 23:00 john heasley wrote
>>> >Is anyone using rancid to notice that running-config
>>>and >startup-config are different, and if so, issue a write mem
>>>command? >(or something else to address such an issue?) Would you
>>>be willing >to share what you've done?
>>>>
>>>
>>>Why don't you run "write memory" every time you pick up the config?
>>>
>>
>>or periodically, somethign like
>> for r in `cat */router.db | egrep -i '(cisco|cat5)' | cut -f1 -d: `; do
>> clogin -c 'write mem' $r
>> done
>
>Be aware that this will fail as both cisco and cat5 expect
>confirmation of the write command. You have to add 2-3 new lines to
>make it work (2 for cisco and 3 for cat5 iirc)

Hi-

Thanks for the replies -- our experience seems to indicate that doing
a wr mem will often make NVRAM look different even if the configs are
the same. We want to avoid lots of extraneous NVRAM diffs on every
rancid run. We're still looking into why this seems to be happening
for us. Running a separate script to wr mem against all devices
sounds good though -- thanks for the help!

Regarding sending newlines
clogin -c 'wr mem' $router
seems to work without problems at our site (rancid v2.3.1)

-Matt