0% found this document useful (0 votes)
66 views13 pages

Internet Protocols: The TCP/IP Stack

The document discusses internet protocols and the TCP/IP stack. It explains that protocols define how computers communicate and provide rules for formatting and transmitting data. It then describes the layers of the TCP/IP stack - application, transport, internet/network, and link layer - and their functions in encoding, splitting, addressing, and transmitting data between networked devices. It provides an example of how data is encapsulated as it passes through each layer of the stack.

Uploaded by

Prakash Shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views13 pages

Internet Protocols: The TCP/IP Stack

The document discusses internet protocols and the TCP/IP stack. It explains that protocols define how computers communicate and provide rules for formatting and transmitting data. It then describes the layers of the TCP/IP stack - application, transport, internet/network, and link layer - and their functions in encoding, splitting, addressing, and transmitting data between networked devices. It provides an example of how data is encapsulated as it passes through each layer of the stack.

Uploaded by

Prakash Shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Internet Protocols

The TCP/IP Stack


Protocol
• A collection of rules which define how
computers communicate.
– What language computers use
– The format data should take
– Header information
– Standard port numbers
Protocol Stack
• A collection of protocols that work together to
accomplish a complex task
TCP/IP Stack
• Application layer
Encodes the data being sent
• Transport layer
Splits the data into manageable
chunks, adds port number
information
• Internet/Network layer
Adds IP addresses stating where the
data is from and where it is going
• Link layer
Adds MAC address information to
specify which hardware device the
message came from, and which
hardware device the message is
going to
Example
The Original Data
The raw data in XML format.
<gospel>Matt</gospel><gospel>Mark</gospel><gospel>Luke</gospel><gospel>John</gospel>

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).

Transport Header Data

:80, 1/11 HTTP/1.1 200 OK

:80, 2/11 Date: Mon, 27 Jul 2009 12:28:53 GMT

:80, 3/11 Server: Apache/2.2.14 (Win32)

:80, 4/11 Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT

:80, 5/11 Content-Length: 88

:80, 6/11 Content-Type: text/html

:80, 7/11 Connection: Closed

:80, 8/11 <gospel>Matt</gospel>

:80, 9/11 <gospel>Mark</gospel>

:80, 10/11 <gospel>Luke</gospel>

:80, 11/11 <gospel>John</gospel>


Internet/Network Layer
The network layer attaches the IP address of the sender, so that the recipient will
know who sent it and who to send a confirmation message to. It must also attach the
IP address of the host that it is sending the data to so it doesn't get lost.
Network Header Transport Header Data
102.231.4.189 :80, 1/11 HTTP/1.1 200 OK
98.1.232.99
102.231.4.189 :80, 2/11 Date: Mon, 27 Jul 2009 12:28:53 GMT
98.1.232.99
102.231.4.189 :80, 3/11 Server: Apache/2.2.14 (Win32)
98.1.232.99
102.231.4.189 :80, 4/11 Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
98.1.232.99
102.231.4.189 :80, 5/11 Content-Length: 88
98.1.232.99
102.231.4.189 :80, 6/11 Content-Type: text/html
98.1.232.99
102.231.4.189 :80, 7/11 Connection: Closed
98.1.232.99
102.231.4.189 :80, 8/11 <gospel>Matt</gospel>
98.1.232.99
102.231.4.189 :80, 9/11 <gospel>Mark</gospel>
98.1.232.99
102.231.4.189 :80, 10/11 <gospel>Luke</gospel>
98.1.232.99
102.231.4.189 :80, 11/11 <gospel>John</gospel>
98.1.232.99
Link Layer
Finally the link layer attaches the MAC address of the sender and the recipient,
allowing the packets to be directed to a specific network interface on the IP Address
host machine.
Link Header Network Header Transport Header Data
11-22-33-44-55 102.231.4.189 :80, 1/11 HTTP/1.1 200 OK
00-17-4F-08-5D-69 98.1.232.99
11-22-33-44-55 102.231.4.189 :80, 2/11 Date: Mon, 27 Jul 2009 12:28:53 GMT
00-17-4F-08-5D-69 98.1.232.99
11-22-33-44-55 102.231.4.189 :80, 3/11 Server: Apache/2.2.14 (Win32)
00-17-4F-08-5D-69 98.1.232.99
11-22-33-44-55 102.231.4.189 :80, 4/11 Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
00-17-4F-08-5D-69 98.1.232.99
11-22-33-44-55 102.231.4.189 :80, 5/11 Content-Length: 88
00-17-4F-08-5D-69 98.1.232.99
11-22-33-44-55 102.231.4.189 :80, 6/11 Content-Type: text/html
00-17-4F-08-5D-69 98.1.232.99
11-22-33-44-55 102.231.4.189 :80, 7/11 Connection: Closed
00-17-4F-08-5D-69 98.1.232.99
11-22-33-44-55 102.231.4.189 :80, 8/11 <gospel>Matt</gospel>
00-17-4F-08-5D-69 98.1.232.99
11-22-33-44-55 102.231.4.189 :80, 9/11 <gospel>Mark</gospel>
00-17-4F-08-5D-69 98.1.232.99
11-22-33-44-55 102.231.4.189 :80, 10/11 <gospel>Luke</gospel>
00-17-4F-08-5D-69 98.1.232.99
11-22-33-44-55 102.231.4.189 :80, 11/11 <gospel>John</gospel>
00-17-4F-08-5D-69 98.1.232.99
TCP or UDP?
• At the transport layer there are two protocols:
TCP and UDP
• Only one is used for any particular message transmitted
TCP UDP
• Every message sent • No confirmation is sent
requires a confirmation of • Lost packets are not resent
receipt by the receiver
• If the confirmation is not
received in good time then
a replacement is sent

• Used where the content is • Used where speed is more


important and should not important than receiving
be lost: eg web pages, files, 100% of the data. Eg VOIP,
etc gaming
How Packets Travel in a Network
Protocol Examples
Protocol Use Standard Port
HTTP World Wide Web 80
HTTPS World Wide Web (Secure) 443
FTP File transfer 21
FTPS File transfer (secure) 990
BitTorrent Peer-to-peer file sharing 6881
Telnet Console commands 23
SSH Console commands (secure) 22
POP3 Receiving emails 110
SMTP Sending emails 25

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

You might also like