Solution to “TFTP copy: operation terminated due to bad checksum comparison”


In short:

TFTP_CHECKSUM=0

will get you out of trouble

I came across this error when trying to re-image a Cisco 2600 router.  I had set up another router as a tftp server, and was attempting to re-flash the problem router when up popped:

TFTP copy: operation terminated due to bad checksum comparison

I checked my settings, and noticed that when you first attempt to do the tftpdnld, you are told about some mandatory settings and some optional ones:

rommon 8 > tftpdnld
Missing or illegal ip address for variable IP_ADDRESS
Illegal IP address.
usage: tftpdnld [-r]
  Use this command for disaster recovery only to recover an image via TFTP.  
  Monitor variables are used to set up parameters for the transfer.  
  (Syntax: "VARIABLE_NAME=value" and use "set" to show current variables.)
  "ctrl-c" or "break" stops the transfer before flash erase begins.

 The following variables are REQUIRED to be set for tftpdnld:
            IP_ADDRESS: The IP address for this unit
        IP_SUBNET_MASK: The subnet mask for this unit
       DEFAULT_GATEWAY: The default gateway for this unit
           TFTP_SERVER: The IP address of the server to fetch from
             TFTP_FILE: The filename to fetch

 The following variables are OPTIONAL:
          TFTP_VERBOSE: Print setting. 0=quiet, 1=progress(default), 2=verbose
      TFTP_RETRY_COUNT: Retry count for ARP and TFTP (default=7)
          TFTP_TIMEOUT: Overall timeout of operation in seconds (default=7200)
         TFTP_CHECKSUM: Perform checksum test on image, 0=no, 1=yes (default=1)

 Command line options:
   -r: do not write flash, load to DRAM only and launch image

I’d used the command line -r option before, and was about to give that a go, when I noticed that one of the OPTIONAL variables was:
TFTP_CHECKSUM: Perform checksum test on image, 0=no, 1=yes (default=1)

So I set the TFTP_CHECKSUM=0, tried again and success was mine.

The transcript is below
rommon 8 > tftpdnld

Missing or illegal ip address for variable IP_ADDRESS
Illegal IP address.

usage: tftpdnld [-r]
Use this command for disaster recovery only to recover an image via TFTP.
Monitor variables are used to set up parameters for the transfer.
(Syntax: "VARIABLE_NAME=value" and use "set" to show current variables.)
"ctrl-c" or "break" stops the transfer before flash erase begins.

The following variables are REQUIRED to be set for tftpdnld:
IP_ADDRESS: The IP address for this unit
IP_SUBNET_MASK: The subnet mask for this unit
DEFAULT_GATEWAY: The default gateway for this unit
TFTP_SERVER: The IP address of the server to fetch from
TFTP_FILE: The filename to fetch

The following variables are OPTIONAL:
TFTP_VERBOSE: Print setting. 0=quiet, 1=progress(default), 2=verbose
TFTP_RETRY_COUNT: Retry count for ARP and TFTP (default=7)
TFTP_TIMEOUT: Overall timeout of operation in seconds (default=7200)
TFTP_CHECKSUM: Perform checksum test on image, 0=no, 1=yes (default=1)

Command line options:
-r: do not write flash, load to DRAM only and launch image
rommon 9 > set
PS1=rommon ! >
RET_2_RUTC=0
RANDOM_NUM=597215518
CRASHINFO=flash:crashinfo_19930301-000820
BSI=0
RET_2_RTS=
RET_2_RCALTS=
?=1
rommon 10 > IP_ADDRESS=1.1.1.2
rommon 11 > IP_SUBNET_MASK=255.0.0.0
rommon 12 > DEFAULT_GATEWAY=1.1.1.3
rommon 13 > TFTP_SERVER=1.1.1.1
rommon 14 > TFTP_FILE=c2600-jk8o3s-mz.122-23a.bin
rommon 15 > TFTP_VERBOSE=2
rommon 16 >
rommon 17 > tftpdnld

IP_ADDRESS: 1.1.1.2
IP_SUBNET_MASK: 255.0.0.0
DEFAULT_GATEWAY: 1.1.1.3
TFTP_SERVER: 1.1.1.1
TFTP_FILE: c2600-jk8o3s-mz.122-23a.bin

Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!
Do you wish to continue? y/n: [n]: y

Performing tftpdnld over 10Mb Enet.
Initializing interface.
Interface link state down.
Interface link state up.
ARPing for 1.1.1.1
ARP reply for 1.1.1.1 received. MAC address 00:05:5e:de:25:20
Receiving c2600-jk8o3s-mz.122-23a.bin from 1.1.1.1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
File reception completed.
TFTP copy: operation terminated due to bad checksum comparison.
rommon 18 > set
PS1=rommon ! >
RET_2_RUTC=0
RANDOM_NUM=597215518
CRASHINFO=flash:crashinfo_19930301-000820
RET_2_RTS=
BSI=0
RET_2_RCALTS=
IP_ADDRESS=1.1.1.2
IP_SUBNET_MASK=255.0.0.0
DEFAULT_GATEWAY=1.1.1.3
TFTP_SERVER=1.1.1.1
TFTP_FILE=c2600-jk8o3s-mz.122-23a.bin
TFTP_VERBOSE=2
?=65
rommon 19 >
rommon 19 >
rommon 19 > TFTP_CHECKSUM=0
rommon 20 > set
PS1=rommon ! >
RET_2_RUTC=0
RANDOM_NUM=597215518
CRASHINFO=flash:crashinfo_19930301-000820
RET_2_RTS=
BSI=0
RET_2_RCALTS=
IP_ADDRESS=1.1.1.2
IP_SUBNET_MASK=255.0.0.0
DEFAULT_GATEWAY=1.1.1.3
TFTP_SERVER=1.1.1.1
TFTP_FILE=c2600-jk8o3s-mz.122-23a.bin
TFTP_VERBOSE=2
?=0
TFTP_CHECKSUM=0
rommon 21 > tftpdnld

IP_ADDRESS: 1.1.1.2
IP_SUBNET_MASK: 255.0.0.0
DEFAULT_GATEWAY: 1.1.1.3
TFTP_SERVER: 1.1.1.1
TFTP_FILE: c2600-jk8o3s-mz.122-23a.bin

Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!
Do you wish to continue? y/n: [n]: y

Performing tftpdnld over 10Mb Enet.
Initializing interface.
Interface link state up.
ARPing for 1.1.1.1
ARP reply for 1.1.1.1 received. MAC address 00:05:5e:de:25:20
Receiving c2600-jk8o3s-mz.122-23a.bin from 1.1.1.1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
File reception completed.
Copying file c2600-jk8o3s-mz.122-23a.bin to flash.
Erasing flash at 0x60fc0000
program flash location 0x60c60000
rommon 22 >
rommon 23 > dir flash:
File size Checksum File name
13007016 bytes (0xc678a8) 0xcbca c2600-jk8o3s-mz.122-23a.bin

Advertisements

About RedNectar Chris Welsh

Professional IT Instructor. All things TCP/IP, Cisco or VoIP
This entry was posted in Cisco and tagged , , , , , . Bookmark the permalink.