Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
33 views9 pages

14.1 Protocol Notes by EMK 2024

The document outlines the importance of protocols in computer communication, detailing how they establish standardized rules for data transmission. It explains the TCP/IP protocol suite's four layers (Application, Transport, Internet, Link) and the specific functions of various protocols such as HTTP, FTP, SMTP, and IMAP. Additionally, it discusses the role of each layer in data handling and transmission, emphasizing the necessity of protocols for reliable and efficient communication across networks.

Uploaded by

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

14.1 Protocol Notes by EMK 2024

The document outlines the importance of protocols in computer communication, detailing how they establish standardized rules for data transmission. It explains the TCP/IP protocol suite's four layers (Application, Transport, Internet, Link) and the specific functions of various protocols such as HTTP, FTP, SMTP, and IMAP. Additionally, it discusses the role of each layer in data handling and transmission, emphasizing the necessity of protocols for reliable and efficient communication across networks.

Uploaded by

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

14.

1 Protocols Notes

Objective:
 Show understanding of why a protocol is essential for communication between computers
 Show understanding of how protocol implementation can be viewed as a stack, where each
layer has its own functionality.
 Show understanding of the TCP/IP protocol suite. Four Layers (Application, Transport,
Internet, Link) Purpose and function of each layer.
 Show understanding of protocols (HTTP, FTP, POP3, IMAP, SMTP, Bit Torrent) and their
purposes. Bit Torrent protocol provides peer-to-peer file sharing.

Protocol

Protocol is a set of rules for data transmission which are agreed by sender and receiver for
successful transmission of data over a network.
A protocol is essential for communication between computers because it establishes a
standardized set of rules, conventions, and procedures that enable consistent and reliable
data exchange.
Examples: TCP, IP, FTP, HTTP, POP3 and SMTP.
ESQ: Explain why a protocol is used in communication between computers. P32 Nov 22
Ans: • Protocols set a standard for communication and Communication will be independent
of software and hardware used.• Protocols enable communication between devices from
different manufacturers/platforms • If two devices were sending messages to each other but
using different protocols, they would not be able to communicate properly.

• Protocol Stack
A Protocol Suite is collection of related protocols. For a protocol suite, protocols can be
viewed as layers within a protocol stack. TCP/IP protocols is four layers structure;
– Application Layer – Transport Layer – Internet Layer – Link Layer (Data Link / Network)
➢ Each layer can only accept input from next higher layer or next lower layer. There is a
defined interface between adjacent layers which constitutes only interaction allowed
between layers.
➢ A layer is serviced by the actions of lower layers. This means that in a protocol suite, each
layer performs a specialized function and depends on services of layers below it to
achieve its purpose.
➢ Except for bottom layer, each layer's job is made by software it has installed. Bottom layer
is mostly hardware-based.
➢ A layer may comprise sub-layers. These sub-layers work together within a layer to achieve
overall goal of that layer in communication process.

O-A Level Computer Science By Engr M Kashif 03345606716 paperscambridge.com


CS Made Easy

➢ Any user interaction will take place using protocols associated with highest level layer
(Application Layer) in stack.
➢ Any direct access to hardware is confined to lowest layer in the stack.
TCP/IP Protocol Suite
TCP/IP is dominant protocol suite for Internet usage.
 TCP – Transmission Control Protocol:
➢ Role: TCP operates at the Transport layer and is responsible for ensuring that data
is reliably transmitted over a network. When you send data from one computer to
another over the internet, TCP breaks this data into smaller units called "packets."
➢ Breaking Data into Packets: Suppose you're sending a large file. Instead of sending
it all at once, TCP divides this data into smaller, manageable packets. Each packet
contains a piece of data, along with information about where it fits in the overall
sequence and error-checking data to ensure it arrives correctly.
➢ Ensuring Reliable Delivery:
✓ Sequencing: TCP numbers each packet so that receiving computer knows how to
reassemble them in correct order, even if they arrive out of sequence.
✓ Acknowledgments: After a packet is received, receiver sends acknowledgment
back to sender. If sender doesn't receive this acknowledgment, it will resend
packet.
✓ Error Checking: TCP includes mechanisms to detect errors in packets. If an error
is detected, packet is resent.
 IP – Internet Protocol:
➢ Role: IP is responsible for addressing and routing of packets between computers on
different networks. IP determines where packets should go and how they should get
there.
➢ Addressing: Every device connected to internet has a unique IP address. This address
ensures that data is sent to correct destination.
➢ Routing: Once TCP has broken data into packets, IP is responsible for forwarding
these packets from one network to another until they reach their destination. This
process is known as routing. IP decides best path for packets to travel through a
series of routers and networks.
➢ Packet Delivery: IP does not guarantee that packets will arrive in correct order or
even that they will arrive at all. It simply forwards them based on IP address.
This is where TCP comes in, as it ensures that all packets are accounted for and
properly ordered.
Layers of TCP/IP Protocol Suite Oct 18 P31
Using layers breaks down process into manageable self-contained modules, making it easier
to develop and easier to make software and hardware compatible. This process is known as
Decomposition. Each of layers is implemented using software.

Computer Science IGCSE, O & A level By Engr M Kashif 03345606716


14.1 Protocols Notes

When Sending Data across internet (network), layers are used in order layer 4 to layer 1.
When Receiving Data across internet (network), layers are used in order layer 1 to layer 4.

Application Layer
Application layer in TCP/IP protocol suite is topmost layer responsible
for providing network services directly to end-user applications. Application layer contains all
programs that exchange data, such as web browsers or server software. It sends files to
transport layer. This layer allows applications to access services used in other layers and also
defines protocols that any app uses to allow exchange of data. Application layer makes sure
that data is sent in a format that will be understandable by recipient.
Examples of Application Layer Services:
✓ Web Browsing: Using HTTP or HTTPS protocols.
✓ Email Services: Through protocols like SMTP, IMAP, or POP3.
✓ File Transfers: Via FTP or SFTP.
✓ Remote Access: Using protocols like SSH or Telnet.
Protocols Associated with Application Layer: P32 May 22
 Hypertext Transfer Protocol (HTTP):
HTTP is application layer protocol used for transmitting data over web. It defines rules
for how messages are formatted and transmitted, and how web servers and browsers should
respond to various commands. It is used when fetching an HTML document from a web
server.
HTTP is a client/server protocol: request messages are sent out to web servers which then
respond. Web browser (which is part of application layer) initiates web page request and also
converts HTML into a format which can be displayed on user’s screen.
What happens when a user requests a web page from a website?
Ans:
➢ User keys URL into their browser.
➢ HTTP(s) transmits request from application layer to transport layer.
➢ TCP creates data packets and sends them (via port 80) to destination port.
➢ DNS server stores a database of URLs and matching IP addresses.

O-A Level Computer Science By Engr M Kashif 03345606716 paperscambridge.com


CS Made Easy

➢ DNS server uses domain name typed into browser to look up IP address of website.
➢ Server TCP sends back an acknowledgement.
➢ Once communication has been established, web server sends web page back in
HTML format to browser.
➢ Browser interprets page and displays it on user Screen.
 File Transfer Protocol (FTP) P31 Oct21
FTP is the application-layer protocol that can handle any
file transfer between two end-systems. File transfer is not simple if the end-systems
have different operating systems with different file systems. FTP handles this by
separating the control process from data-transfer process.
Additional Features of FTP:
➢ Anonymous FTP: This allows a user to access files without need to identify who they
are to FTP server.
➢ FTP Commands: A user is able to carry out actions that can change files stored on FTP
server.
➢ FTP Server: FTP server is a type of computer software that allows you to transfer files
between computers over a network. It acts as a central hub for storing and sharing
files, and it provides a way for users to upload, download, and manage files from
remote locations. FTP servers are commonly used for tasks like website maintenance,
sharing large files, and managing files on a remote server.
 Simple Mail Transfer Protocol (SMTP): P31 Oct21
SMTP is text-based and connection-based protocol used when sending
emails. It is referred to as a push protocol because a client opens a connection to a server
and keeps connection active all time; client then uploads a new email to server.
As SMTP is text-based only, it doesn’t handle binary files (binary file is a file containing
media/images as well as text).
If an email contains attachments made up of images, video, music then it is necessary to use
multi-purpose internet mail extension (MIME) protocol instead. MIME header is used at
beginning of transmission. Clients use this header to select which media player is needed
when attachment is opened.
 POP3/4 and IMAP P31/O/N/21
Post office protocol (POP3/4) and internet message access protocol
(IMAP) are protocols used when receiving emails from email server. IMAP and POP3/4 are
known as pull protocols because Client periodically connects to a server; checks for and
downloads new emails from server – connection is then closed. This process is repeated to
ensure client is updated.

Computer Science IGCSE, O & A level By Engr M Kashif 03345606716


14.1 Protocols Notes

IMAP is a more recent protocol than POP3/4, but both have really been superseded by
increasing use of HTTP protocols. However, SMTP is still used when transferring emails between
email servers.
Main difference between POP3/4 and IMAP is synchronization.
Difference Between POP3/4 and IMAP
Post Office Protocol (POP3/4) Internet Message Access Protocol (IMAP)
POP3/4 does not keep server and client in IMAP keeps server and client in
synchronization. When emails are downloaded synchronization. Only a copy of email is
by client, they are then deleted from server downloaded with original remaining on
which means it is not further updated. server until client deletes it. P32 Oct22

Summary of Protocols Associated with Application Layer


HTTP Hypertext transfer protocol; this is a protocol responsible for correct transfer of
files that make up web pages on world wide web. P31 Oct23
SMTP Simple mail transfer protocol. When sending email messages towards the
intended destination. P31 Oct23
POP3/4 Post office protocol; this handles the receiving of emails
IMAP internet message access protocol; when retrieving email messages from a mail
server over a TCP/IP connection. P31 Oct23
FTP file transfer protocol; used when transferring messages and attachments

Transport Layer
P31 Oct 22
1. Transport Layer divides data into smaller, manageable packets (performs segmentation).
2. It sequences these packets and attaches relevant information to packet header.
3. It sends the packets to Internet/Network Layer and receives data from Application Layer.
4. It manages the flow of packets to ensure smooth communication.
5. It detects and handles packet loss and acknowledges the receipt of error-free packets.
Protocols associated with Transport Layer:
➢ UDP (User Datagram Protocol) provides simpler but unreliable service by sending
packets from one host to another. UDP is connection less protocol and doesn’t
guarantee delivery. UDP is used in real time application (streaming audio / video).
Example while streaming a video; loss of few bytes of information is acceptable as this
does not harm the user experience much.
➢ TCP (Transmission Control Protocol) is responsible for safe delivery of message to
receiver. TCP protocol creates sufficient packets to hold all of data. Each packet consists
of a header plus user data. It uses positive acknowledgement with re-transmission
(PAR) which means it automatically re-sends a data packet if it has not received a
positive acknowledgement.

O-A Level Computer Science By Engr M Kashif 03345606716 paperscambridge.com


CS Made Easy

TCP protocol is connection-oriented since it establishes end to end connection between


two hosts using handshaking. Initially one packet of sequence is sent to network layer.
Once network layer returns acknowledgement to Transport layer indicating that
connection has been established, TCP sends other packets and receives response packets
containing acknowledgement. This allows missing packets to be identified and re-sent.
Messages are split up into small groups of bits called packets.
Router is used to transmit packets of data; routers contain connections to many other
routers; when packets arrive at a router it decides where next to send them.

Internet (Network) Layer P31 Oct 22


➢ Internet (Network) Layer's role is to determine correct destination for data. It identifies
both network and specific host by using IP addresses.
➢ Once Internet Layer has processed data, it passes packets down to Data Link Layer.
Internet Layer prepares packets for this transmission by encapsulating them in a suitable
format.
➢ Internet Layer is responsible for choosing best path for each packet to travel across
network to reach its destination. This process, known as routing, allows packets to take
different paths depending on current network conditions, such as congestion, ensuring
efficient and reliable data delivery.
➢ Each packet that Internet Layer processes is given source IP address, indicating where it
came from, and destination IP address, indicating where it needs to go.
➢ To ensure that data reaches correct application on destination host, Internet Layer
combines destination IP address with a port number to create a socket.
Socket is a unique identifier for a network connection, allowing multiple applications to
run on same device while keeping their communications separate.

IP (Internet Protocol)
Function of Internet (Network) Layer, which uses IP protocol, is to ensure correct routing
over Internet. To do this it takes packet received from transport layer and adds a further
header. This header contains IP addresses of both the sender and receiver.
IP packet, which is called a 'datagram', is sent to data-link layer. Data-link layer assembles
datagrams into 'frames'. At this stage, transmission can begin. Once IP packet has been sent
to data-link layer, IP has no further duty. IP functions as a connectionless service.

Link Layer
Link layer of TCP/IP protocol stack plays a crucial role in facilitating
communication over a physical network. P31Oct 23

Computer Science IGCSE, O & A level By Engr M Kashif 03345606716


14.1 Protocols Notes

✓ Link layer ensures that data is transmitted over network according to specific
protocols.
✓ Link Layer provides interface for higher layers to send and receive data over physical
medium, ensuring that data packets can be transmitted across physical network.
✓ Link Layer manages delivery of frames (data units at link layer) between devices on
same network, ensuring that data is correctly routed to intended destination.
✓ Link layer takes data from Internet layer and formats it into frames, which are
structured data packets suitable for transmission over physical network. Each frame
includes headers, footers, and error-checking information, ensuring that data can be
interpreted by receiving device.
✓ Link layer map logical IP addresses (used by network layer) to physical MAC addresses
(used by link layer). This process, known as Address Resolution Protocol (ARP),
ensures that data packets are delivered to correct physical device on network.
✓ Protocols used at this layer include Ethernet, ARP (Address resolution protocol) etc.

Link Layer Protocols


➢ Ethernet Protocol
Ethernet is LAN Protocol used to connects a number of computers together to form a LAN. It
uses protocols to control movement of frames between devices and to avoid simultaneous
transmission by two or more devices.
It is local protocol and does not provide any means to communicate with external devices;
this requires use of IP which sits on top of the Ethernet protocol.
This Protocol is popular because of high speed, reasonable cost, ease of installation, wide
acceptance in market place and support all famous protocols.
➢ ARP (Address resolution protocol)
ARP protocol used within TCP/IP suite to map an IP address (a logical address used at
network layer) to a MAC (Media Access Control) address (a physical address used at data link
layer). This mapping is essential for communication between devices on same local network.
Wireless (WiFi) Protocols

Wireless LANs use a MAC protocol called carrier sense multiple access with collision
avoidance (CSMA/CA) (not to be confused with CSMA/CD considered in P1, since this is
totally different concept).
CSMA/CA uses Distributed Control Function (DCF) to ensure a WiFi device can only transmit
when there is a free channel available. Since all transmissions are acknowledged when using
DCF, if a device does not receive an acknowledgement it will assume a collision will occur
and waits for a random time interval before trying again. This is an important protocol to
ensure the security and integrity of data being sent over a wireless network (WLAN).

O-A Level Computer Science By Engr M Kashif 03345606716 paperscambridge.com


CS Made Easy

Bluetooth Protocols It uses standard IEEE 802.15 protocol for short-range data
communication. Bluetooth use electromagnetic radiation as carrier of data transmission.
Bluetooth sends and receives radio waves in a band of 79 different frequencies (channels).
Devices using Bluetooth automatically detect and connect to each other, but they do not
interfere with other devices since each communicating pair uses a different channel (from 79
options). When a device wants to communicate, it picks one of 79 channels at random. If
channel is already being used, it randomly picks another channel. This is known as Spread
Spectrum Frequency Hopping.
Peer-To-Peer File Sharing / Bit Torrent Protocol
BitTorrent protocol is used at application layer which is based on Peer-to-Peer networking.
A Peer-to-Peer (P2P) network is created when two or more computers are connected and
share resources directly with each other, without need for a centralized server. Each
computer, known as a "peer," functions as both a client and a server. This means that each
peer can request and provide resources, making them both endpoints in network.

BitTorrent protocol utilizes Peer-to-Peer (P2P) file sharing to distribute large amounts of
data over internet. By using BitTorrent, load on servers and networks is significantly reduced,
as users do not have to download a file from a single central server. Instead, users join a
"swarm," where they download different chunks of file from other users (peers) in network.
How Application Use Bit Torrent to exchange data. SP/21
✓ BitTorrent Client Software: Users install BitTorrent client software on their computers to
participate in Peer-to-Peer file sharing.
✓ Joining a Swarm: A computer joins a swarm by loading a torrent descriptor file (torrent file)
using BitTorrent client. Swarm is a group of computers connected to share a specific file.
Detail of Swarm are contained within a torrent descriptor file (torrent file).
✓ Tracker Server: A tracker server keeps records of all the computers in the swarm and shares
their IP addresses, allowing them to connect to each other.
✓ Initial Seed: At least one computer in swarm must have a complete copy of the file (torrent)
to be shared.
✓ File Segmentation: Torrent file is split into small pieces, which are then both downloaded and
uploaded by the computers in the swarm.
✓ Seeding: Once a computer has downloaded a piece of file, it can become a seed and start
uploading that piece to other peers in swarm.
✓ Leeching: Leeches are users who download much more data than they upload, contributing
less to the swarm.
Lurker is a peer that downloads many files but does not make available any new content for
community as a whole.

Computer Science IGCSE, O & A level By Engr M Kashif 03345606716


14.1 Protocols Notes

Leech is a peer that has a negative impact on swarm by having a poor share ratio, that is,
they are downloading much more data than they are uploading to others.

Tracker is central server that stores details about other computers that make up swarm; it
will store details about all peers downloading or uploading file, allowing peers to locate each
other using stored IP addresses.

***********

O-A Level Computer Science By Engr M Kashif 03345606716 paperscambridge.com

You might also like