Away on Holidays till 14th Sept

Posted by Bradley | personal | Thursday 4 September 2008 16:33

Just to let you all know that there wont be any updates or comment approvals on this site until I return from holiday on the 14th of September 2008.

Simple TFTP out of sequence error

Posted by Bradley | switching | Tuesday 2 September 2008 00:05

Today I used the Cisco recommended TFTP server tftpd32 to copy an IOS image from my desktop to my lab 3550, but I got some errors which ultimately led to the transfer failing;

Switch3550#copy tftp flash
Address or name of remote host []? 10.0.0.1
Source filename []? c3550-ipservicesk9-mz.122-46.SE.bin
Destination filename [c3550-ipservicesk9-mz.122-46.SE.bin]?
Accessing tftp://10.0.0.1/c3550-ipservicesk9-mz.122-46.SE.bin...
Loading c3550-ipservicesk9-mz.122-46.SE.bin .from 10.0.0.1 (via FastEthernet0/24
):!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!O!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!O!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!O!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!O!!!!!!!!!!!!!!O!!!!!!!!!!!!!!O!!O!!!!O!!O!!!O!!!O!!!O!!O!!
!O!!!O!!O!!!O!!!O!!!O!!O!!!!O!!O!!!O!!!O!!O!!!O!!!O!!!O!!O!!!O!!!O!!!O!!O!!!O!!!
O!!O!!!!O!!O!!!O!!!O!!!O!!O!!!O!!!O!!O!!!O!!!O!!!O!!O!!!!O!!O!!O!!!!O!!O!!!O!!!O
!!O!!!O!!!O!!O!!O!!O!!OOO!OO!OO!OO!OOOO!OO!OO!OO!OOOO!OO!OO!OO!OOOO!OO!OO!OO!OOO
O!OO!OO!OO!OOOO!OO!OO!OO!OOOOO!OOOO!OOOOO... [timed out]
%Error reading tftp://10.0.0.1/c3550-ipservicesk9-mz.122-46.SE.bin (Timed out)

I tried resending the file and got the same error, I looked up the error code and O means that the packets were received out of order, I checked the interface and couldn’t see any issues with it;

Switch3550#show int fa0/24
FastEthernet0/24 is up, line protocol is up (connected)
Hardware is Fast Ethernet, address is 0013.80a2.6b00 (bia 0013.80a2.6b00)
Internet address is 10.0.0.2/8
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, media type is unknown media type
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output 00:00:03, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 52000 bits/sec, 2 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
20965 packets input, 10551667 bytes, 0 no buffer
Received 2515 broadcasts (42 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 1279 multicast, 0 pause input
0 input packets with dribble condition detected
19122 packets output, 1248823 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 PAUSE output
0 output buffer failures, 0 output buffers swapped out

To resolve it I doubled the timeout from 3 seconds to 6 seconds and increased the number or max retransmits from 6 to 12, and the transfer went smoothly. Im unsure of why I was getting the errors, I did not set tftpd32 to use an anticipation window and there was only a straight through cable between me and the switch, any suggestions why they were out of sequence would be appreciated!

So I thought this would be a good opportunity to review TFTP & some of its status codes like ! and O. TFTP uses UDP port 69, and block numbers within packets to order them. There was originally a 512 byte block per packet with a 32MB file limit but this has now increased to a variable block size and a 4GB limit with RFC 2348. TFTP is only used significantly today to transfer network device images & associated configurations across trusted networks, it has no methods of listing directories, packet encryption or passwords.

The characters which show the status of a transfer in IOS are
! – Indicates a successful transfer to 10 packets
O – Indicates out of sequence packets
. – Indicates a timeout
E – Uppercase E indicates an error
e – Lowercase e indicates flash is being erased
V – Indicates checksum verification