PDA

View Full Version : why tftp(udp) for config files


FrankHenry
02-09-2011, 02:35 PM
Good Day,

Why is UDP used to transfer configs file from a TFTP server? How does one know if the whole file was received or do you find out the hard way when you run it?

Thanks in advance.
Networking newbie

Big Evil
02-10-2011, 02:11 AM
Hi mate,

Take a peep over http://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol
Which should answer most of your questions.

When you copy a config from or two a router/switch you will get a confirmation from both the router/switch and tftp server. If there is an issue, likewise you get an error message from both parties if something has gone wrong.

Here is a good example.

http://www.cisco.com/en/US/products/hw/routers/ps233/products_tech_note09186a00800a6744.shtml

HTH.

FrankHenry
02-10-2011, 08:25 AM
Hi Big Evil,

Thanks for clearing that up. If I'm understanding the below correctly TFTP is leveraging UDP to send the 512k data or ack. packets back and forth. In other words TFTP is making sure the whole transmission is received not UDP.

from the wiki link:

If a packet gets lost in the network, the intended recipient will timeout and may retransmit his last packet (which may be data or an acknowledgment), thus causing the sender of the lost packet to retransmit that lost packet. The sender has to keep just one packet on hand for retransmission, since the lock step acknowledgment guarantees that all older packets have been received. Notice that both machines involved in a transfer are considered senders and receivers. One sends data and receives acknowledgments, the other sends acknowledgments and receives data.

Thanks again,
FrankHenry

Big Evil
02-10-2011, 09:54 AM
UDP applications use datagram sockets (69 in TFTP case) to establish host-to-host communications. An application binds the socket to its endpoint of data transmission, which is a combination the IP address and a service port.

UDP is the protocol, and TFTP is the socket.

HTH.