Internet Protocols: The TCP/IP Stack
Internet Protocols: The TCP/IP Stack
Application Layer
Formats the data so it will be understood by the application that receives it. This
might use the HTTP protocol or FTP or torrent or some other protocol. In this example
we have a HTTP response containing the data and the HTTP headers.
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
Content-Length: 88
Content-Type: text/html
Connection: Closed
<gospel>Matt</gospel><gospel>Mark</gospel><gospel>Luke</gospel><gospel>John</gospel>
Transport Layer
The transport layer divides the complete message into packets, adds headers to show
how many packets, the packet order and a port number (in this case port 80 – the
standard HTTP port).
You should be familar with these protocols and their uses but don’t need to memorise
the standard ports, these are given for reference only
BitTorrent Protocol
• Allows file sharing without needing a central
server
• Reduces load on any one computer as the load
is shared
• Used by Blizzard for updating game clients
such as World of Warcraft
• Commonly used for piracy because there is no
central server for the authorities to take down
How BitTorrent Works
• All computers who are sharing or downloading a particular file are
part of a swarm
• A computer joins a swarm by loading a torrent file which connects
the computer to a tracker (a computer which tracks all computers in
the swarm)
• Once connected to the swarm a computer will download small
chunks of data which it immediately starts to share with others
• Users who are downloading are known as leechers whilst those who
already have the full file but continue to share are known as seeders
• A leecher will download parts of the file it still needs from seeders
and from other leechers whilst sharing the parts of the file it already
has with other leechers