Recover EPROM Cookies on Cisco Router

Posted September 2, 2005 by jotfco in Cisco router

Lightning produced during a thunderstorm can damage a router if a power surge occurs. This tutorial describes how to repair your router if lightning removes its EPROM cookie information.


My router was recently damaged during a thunderstorm. The problem was that lightning deleted the cookies on my router’s EPROM. It contains the data that the bootloader uses to determine the MAC address, the CPU version, the vendor, etc. Based on this information, the IOS runs or not on the platform. If these cookies are lost, as in my case, the router cannot start. Here is how to fix this.

The router will be in ROMMON status, so do not try to use the TFTPDNLD command or XMODEM to load the IOS because it is still in the flash.

Follow these steps to repair the router:

1. In the ROMMON mode digit the command PRIV that allows to you to enter in the privileged mode, use the password 0000 (four zeros) and hit enter.

2. If your cookies are corrupt, you will see the following warning:
>>rommon 1 > cookie
>>WARNING: Cookie information is corrupt
>>
>>cookie:
>>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>rommon 2 >

3. Now, type the command COOKIE so that you can set the values manually. When you insert them, you just need to insert the values after the colon(:). The undamaged cookies of a 827 router are listed below:

byte 0x00 – Version: 01
byte 0x01 – Vendor (Recommended Value: 0x01): 01
bytes 0x02-0x07 – Ethernet HW Address: 00 04 27 fe 00 ea
byte 0x08-0x08 – Processor (Recommended Value: 0x3e): 3e (0x3E for 827
e_machine=62)(0x5B for soho77 e_machine=91)
byte 0x09-0x09 – NVRAM Size (Recommended Values: 256K – 0x00): 00
byte 0x0a-0x0a – CPU Speed (Recommended Value: 50Mhz – 0x01): 01
byte 0x0b-0x0b – Unused: ff
bytes 0x0c-0x0d – On-board PM ID: 01 ff
bytes 0x0e-0x0f – MAC Address Allocated: 00 00
bytes 0x10-0x17: 00 00 00 00 00 00 00 00
bytes 0x18-0x22: 4a 41 44 05 42 30 39 ** ** 03 01 (Processor board ID
JAD054209**)+(CPU revision 0x301)
bytes 0x23-0x24 – Deviation: 6f e6 (hardware revision 6FE6)
bytes 0x25-0x2c: 00 00 00 00 ff ff ff 50 (50 should be cpu_type)
bytes 0x2d-0x2d – Board Config: 04
bytes 0x2e-0x31: 49 11 ec 03
bytes 0x32-0x37 – WAN MAC Address: ff ff ff ff ff ff
bytes 0x38-0x3f: ff ff ff ff ff ff ff ff
bytes 0x40-0x47: ff ff ff ff ff ff ff ff
bytes 0x48-0x4f: ff ff ff ff ff ff ff ff
bytes 0x50-0x57: ff ff ff ff ff ff ff ff
bytes 0x58-0x5f: ff ff ff ff ff ff ff ff
bytes 0x60-0x67: ff ff ff ff ff ff ff ff
bytes 0x68-0x6f: ff ff ff ff ff ff ff ff
bytes 0x70-0x77: ff ff ff ff ff ff ff ff
bytes 0x78-0x7f: ff ff ff ff ff ff ff ff

The important values are the numbers after the colon (:). Let us examine the first two rows of the previous example:

byte 0x00 – Version: 01 —–> insert only 01
byte 0x01 – Vendor (Recommended Value: 0x01): 01 —> insert 01
and the same for all the others rows.

The final group of cookies will look something like the following:

01 01 00 b0 c2 8e 5e 81 5b 00 01 ff 01 ff 00 00
00 00 00 00 00 00 00 00 4a 41 44 05 31 30 50 38
33 04 01 00 00 00 00 00 00 ff ff ff 50 04 49 11
ec 04 ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

(These are exact cookies for a soho77.)

At the end, you just need to reset your router, and your IOS and configuration will be there ready to work again.

The Conversation

Follow the reactions below and share your own thoughts.