TCP IP Illustrated

026224 01932 9527634 45014 bsdi1099 svr48888 s

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: the connection is closed, instead of the normal FIN. We'll connect to a server version of our sock program on svr4 and type one line of input: bsdi % sock -LO svr4 8888 this is the client; server shown later type one line of input that's sent to other end hello, world type end-of-file character to terminate client ^D Figure 18.15 shows the tcpdump output for this example. (We have deleted all the window advertisements in this figure, since they add nothing to the discussion.) 1 0.0 2 0.004975 (0.0050) 3 4 5 6 0.006656 (0.0017) 4.833073 (4.8264) 5.026224 (0.1932) 9.527634 (4.5014) bsdi.1099 > svr4.8888: S 671112193:671112193(0) <mss 1024> svr4.8888 > bsdi.1099; S 3224959489:3224959489(0) ack 671112194 <mss 1024> bsdi.1099 > svr4.8888: . ack 1 bsdi.1099 > svr4.8888: P 1:14(13) ack 1 svr4.8888 > bsdi.1099: . ack 14 bsdi.1099 > svr4.8888: R 14:14(0) ack 1 Figure 18.15 Aborting a connection with a reset (RST) instead of a FIN. Lines 1-3 show the normal connection establishment. Line 4 sends the data line that we typed (12 characters plus the Unix newline character), and line 5 is the acknowledgment of the received data. Line 6 corresponds to our typing the end-of-file character (Control-D) to terminate the client. Since we specified an abort instead of a normal close (the -L0 command-line option), the TCP on bsdi sends an RST instead of the normal FIN. The RST segment contains a sequence file:///D|/Documents%20and%20Settings/bigini/Docu...homenet2run/tcpip/tcp-ip-illustrated/tcp_conn.htm (20 of 37) [12/09/2001 14.47.16] Chapter 18. TCP Connection Establishment and Termination number and acknowledgment number. Also notice that the RST segment elicits no response from the other end-it is not acknowledged at all. The receiver of the reset aborts the connection and advises the application that the connection was reset. We get the following error on the server for this exchange: run as server, listen on-port 8888 svr4 % sock -s 8888 this is what the client sent over hello, world read error: Connection reset by peer This server reads from the network and copies whatever it receives to stand...
View Full Document

This test prep was uploaded on 04/04/2014 for the course ECE EL5373 taught by Professor Guoyang during the Spring '12 term at NYU Poly.

Ask a homework question - tutors are online