Recovery EPROM Cookie on Router Cisco
Sometimes when rains a lighting could damage your router, that’s what happened to me last week.The problem was that the lighting deleted the cookies of my router’s eprom, it contains the data that the bootloader use to determine the MAC address,the CPU version,the vendor etc. Based on this informations the IOS runs or not on the platform, if these cookie are lost (my chase) the router cannot start…..
The router will be in ROMMON status, so don’t try to use the TFTPDNLD command or XMODEM to load the IOS because it’s still in the Flash.
Here’s the steps to follow 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 enter.
2- if you cookies are corrupt you’ll see this situation:
>>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 you can set the values manually.When you insert them you just need to insert the values after the :
Below you can see good cookies of a 827 router:
byte 0×00 – Version: 01
byte 0×01 – Vendor (Recommended Value: 0×01): 01
bytes 0×02-0×07 – Ethernet HW Address: 00 04 27 fe 00 ea
byte 0×08-0×08 – Processor (Recommended Value: 0×3e): 3e (0×3E for 827
e_machine=62)(0×5B for soho77 e_machine=91)
byte 0×09-0×09 – NVRAM Size (Recommended Values: 256K – 0×00): 00
byte 0×0a-0×0a – CPU Speed (Recommended Value: 50Mhz – 0×01): 01
byte 0×0b-0×0b – Unused: ff
bytes 0×0c-0×0d – On-board PM ID: 01 ff
bytes 0×0e-0×0f – MAC Address Allocated: 00 00
bytes 0×10-0×17: 00 00 00 00 00 00 00 00
bytes 0×18-0×22: 4a 41 44 05 42 30 39 ** ** 03 01 (Processor board ID
JAD054209**)+(CPU revision 0×301)
bytes 0×23-0×24 – Deviation: 6f e6 (hardware revision 6FE6)
bytes 0×25-0×2c: 00 00 00 00 ff ff ff 50 (50 should be cpu_type)
bytes 0×2d-0×2d – Board Config: 04
bytes 0×2e-0×31: 49 11 ec 03
bytes 0×32-0×37 – WAN MAC Address: ff ff ff ff ff ff
bytes 0×38-0×3f: ff ff ff ff ff ff ff ff
bytes 0×40-0×47: ff ff ff ff ff ff ff ff
bytes 0×48-0×4f: ff ff ff ff ff ff ff ff
bytes 0×50-0×57: ff ff ff ff ff ff ff ff
bytes 0×58-0×5f: ff ff ff ff ff ff ff ff
bytes 0×60-0×67: ff ff ff ff ff ff ff ff
bytes 0×68-0×6f: ff ff ff ff ff ff ff ff
bytes 0×70-0×77: ff ff ff ff ff ff ff ff
bytes 0×78-0×7f: ff ff ff ff ff ff ff ff
As i told you the important values are number after the : as you can see let’s see the first two rows of the previous example :
byte 0×00 – Version: 01 —–> insert only 01
byte 0×01 – Vendor (Recommended Value: 0×01): 01 —> insert 01
and the same for all the others rows.
The final situation of the cookies will be something like this:
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.
jotfco 2005
PS: sorry for my “not perfect” english.











Anonymous said on January 26, 2010
SWEET DUDE!!! Got a Cisco 831 with the exact same problem… All tho i tried with your cookie first and ended up with a ATM router with a Ethernet swtich attached?!?!? Hahahaha!!!
Anyways for the 831 the e_machine is 129 and cpu_type is 62. In other words
byte 0×08-0×08 – Processor (Recommended Value: 0×3e): 3e then do
byte 0×08-0×08 – Processor (Recommended Value: 0×3e): 81 (129 in HEX)
And
bytes 0×25-0×2c: 00 00 00 00 ff ff ff 50 (50 should be cpu_type) use 62
so that’ll be:
bytes 0×25-0×2c: 00 00 00 00 ff ff ff 62
My final Cisco 831 cookie looks like this:
01 01 00 04 27 fe 00 ea 81 00 01 ff 01 ff 00 00
00 00 00 00 00 00 00 00 4a 41 44 05 42 30 39 00
00 03 01 6f e6 00 00 00 00 ff ff ff 62 04 49 11
ec 03 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
By the way, i stole your mac address!! :P
Ohh yes almost forgot, if you mistype and need to reenter or alter your cookie, the priv password has changed (its generated out of the cookie values)
use this website to “decrypt” the new password (just pasted your new password and click calculate) http://www.bitshift.ch/eng/support/kbase/000002.asp
Lostedcisco said on November 8, 2010
Decrypting the priv password is easy. Just add the first five words of the cookie. For some older routers, that’s enough. But if the generated password is more than 4 hex numbers long, then mod that number with 0×10000. Or just take the rightmost 4 hex numbers from the 5 or 6 digit number you’ve generated.
Derek said on May 22, 2011
Password for example above.
First line 01 01 00 04 27 fe 00 ea 81 00 01 ff 01 ff 00 00
Add in hexidecimal calculator following values
0101
0004
27fe
00ea
8100
————
aaed
Keshava said on October 19, 2011
Hello all,
How do we find the cpu_type for the router cisco1841….and how to edit that in the Priv mode….
Please mail me @ keshava3564@gmail.com