20.01.2014 Views

Lectures notes for 2010 - KTH

Lectures notes for 2010 - KTH

Lectures notes for 2010 - KTH

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

TCP servers<br />

Stevens, Vol. 1, pp. 254-260 discusses how to design a TCP server, which is<br />

similar to list of features discussed <strong>for</strong> UDP server, but now it is incoming<br />

connection requests which are queued rather than UDP datagrams<br />

• note that incoming requests <strong>for</strong> connections which exceed the queue -<br />

are silently ignored - it is up to the sender to time out it active open<br />

• this limited queuing has been one of the targets of denial of service<br />

attacks<br />

• TCP SYN Attack - see http://cio.cisco.com/warp/public/707/4.html<br />

• Increase size of the SYN_RCVD queue (kernel variable somaxconn limits the maximum<br />

backlog on a listen socket - backlog is the sum of both the SYN_RCVD and accept queues)<br />

and decrease the time you will wait <strong>for</strong> an ACK in response to your SYN_ACK<br />

• <strong>for</strong> a nice HTTP server example, see<br />

http://www.cs.rice.edu/CS/Systems/Web-measurement/paper/node3.html<br />

Maguire TCP servers 5: 38 of 77<br />

maguire@kth.se <strong>2010</strong>.03.21 Internetworking/Internetteknik

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!