TCP IP Illustrated

2 shows the packet exchange that takes place 1 2 3 4

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: program we see that there are 48 lines in the file, so the 48 Unix newline characters are expanded into file:///D|/Documents%20and%20Settings/bigini/Documenti/homenet2run/tcpip/tcp-ip-illustrated/tftp_tri.htm (2 of 4) [12/09/2001 14.47.07] Chapter 15. TFTP: Trivial File Transfer Protocol 48 CR/LF pairs, since the TFTP default is a netascii transfer. Figure 15.2 shows the packet exchange that takes place. 1 2 3 4 5 0.0 0.287080 0.291178 0.299446 0.312320 (0.2871) (0.0041) (0.0083) (0.0129) bsdi.ll06 svr4.1077 bsdi.1106 svr4.1077 bsdi.ll06 > > > > > svr4.tftp: bsdi.ll06: svr4.1077: bsdi.1106: svr4.1077: 19 RRQ "testl.c" udp 516 udp 4 udp 454 udp 4 Figure 15.2 Packet exchange for TFTP of a file. Line 1 shows the read request from the client to the server. Since the destination UDP port is the TFTP well-known port (69), tcpdump interprets the TFTP packet and prints RRQ and the name of the file. The length of the UDP data is printed as 19 bytes and is accounted for as follows: 2 bytes for the opcode, 7 bytes for the filename, 1 byte of 0, 8 bytes for netascii, and another byte of 0. The next packet is from the server (line 2) and contains 516 bytes: 2 bytes for the opcode, 2 bytes for the block number, and 512 bytes of data. Line 3 is the acknowledgment for this data: 2 bytes for the opcode and 2 bytes for the block number. The final data packet (line 4) contains 450 bytes of data. The 512 bytes of data in line 2 and this 450 bytes of data account for the 962 bytes of data output by the client. Note that tcpdump doesn't output any additional TFTP protocol information for lines 2-5, whereas it interpreted the TFTP message in line 1. This is because the server's port number changes between lines 1 and 2. The TFTP protocol requires that the client send the first packet (the RRQ or WRQ) to the server's well-known UDP port (69). The server then allocates some other unused ephemeral port on the server's host (1077 in Figure 15.2), which is then used by the server for all further...
View Full Document

Ask a homework question - tutors are online