Protocols Notes A level
Protocols Notes A level
1 Protocols
Protocols are a set of rules for data transmission which are agreed by the sender and receiver.
i.e. sets of rules which computers make use of when they communicate over a network. A network
communication protocol is a standard method for transmitting data from one computer to another
across a network
1|Page
A protocol stack
For a protocol suite the protocols can be viewed as layers within a stack.
There are a number of aspects relating to this concept.
- Each layer can only accept input from the next higher layer or the next
lower layer.
- There is a defined interface between adjacent layers which constitutes
the only interaction allowed between layers.
- A layer is serviced by the actions of lower layers
- With the possible exception of the lowest layer the functioning of a
layer is created by installed software
- A layer may comprise sub-layers
- Any user interaction will take place using protocols associated with the
highest level layer in the stack
- Any direct access to hardware is confined to the lowest layer in the
stack
NB: packets are known as frames at the data-link layer, datagrams at the internet
layer and segments at the transport layer. Different names are used as each layer adds
its own header to the packet.
Application layer
The application layer provides user services.
The application layer is where data is sent from software applications into the
protocol stack. At the other end of the communications link, the application layer
passes the data to the receiving application.
The application layer contains all the programs that exchange data, such
as web browsers or server software; it sends files to the transport layer.
This layer allows applications to access the services used in other layers
and also defines the protocols that any app uses to allow the exchange of
data.
anonymous FTP – this allows a user to access files without the need to identify who they are
to the ftp server; for example, ‘331 Anonymous access allowed’ would be a message received
to confirm anonymous access
2|Page
FTP commands – a user is able to carry out actions that can change files stored on the ftp
server; for example, delete, close, rename, cd (change directory on a remote machine), lcd
(change directory on a local machine)
FTP server – this is where the files, which can be downloaded as required by a user, are
stored.
POP3 – handles the receiving of emails. i.e. for receiving/downloading emails /pull protocol
POP3
used by email clients to retrieve email messages // a pull protocol
POP3/4 does not keep the server and client in synchronisation; when emails are
downloaded by the client, they are then deleted from the server which means it
is not further updated
IMAP (Internet Message Access Protocol) – handles the receiving of emails i.e. for
receiving/downloading emails /pull protocol
IMAP Protocol
• used by email clients to retrieve email messages // a pull protocol
• from a mail server (over a TCP/IP connection)
• keeps the server and client in sync (by not deleting the original email). // allows
a copy of the email to be downloaded from the mail server.
SMTP – handles the sending of emails i.e. for sending/uploading emails /push protocol
Simple mail transfer protocol (SMTP) is a text-based (and connection-based) protocol
used when sending emails. It is sometimes referred to as a push protocol (in other words, a
client opens a connection to a server and keeps the connection active all the time; the client
then uploads a new email to the server).
Since SMTP is text-based only, it doesn’t handle binary files (a binary file is a file containing
media/images as well as text and is regarded as being computerreadable only). If an email
contains attachments made up of, for example, images, video, music then it is necessary to
use the multi-purpose internet mail extension (MIME) protocol instead. A MIME header is
used at the beginning of the transmission; clients use this header to select which media
player is needed when the attachment is opened.
Swarm – a group of peers connected together is known as a swarm; one of the most
important facts when considering whether or not a swarm can continue to allow peers to
complete a torrent is its availability; availability refers to the number of complete copies of
torrent contents that are distributed amongst a swarm. Note: a torrent is simply the name
given to a file being shared on the peer-to-peer network.
Seed – a peer that has downloaded a file (or pieces of a file) and has then made it available
to other peers in the swarm.
3|Page
Tracker – this is a central server that stores details about other computers that make up the
swarm; it will store details about all the peers downloading or uploading the file, allowing
the peers to locate each other using the stored IP addresses.
Leech – a peer that has a negative impact on the swarm by having a poor share ratio, that is,
they are downloading much more data than they are uploading to the others; the ratio is
determined using the formula:
If the ratio > 1 then the peer has a positive impact on the swarm; if the ratio < 1 then the
peer has a negative effect on the swarm. one then the peer has a positive impact on the
swarm; otherwise, the peer has a negative effect on the swarm.
Lurker – a peer that downloads many files but does not make
available any new content for the community as a whole.
routing information protocol; this is the protocol routers use to exchange routing information over
RIP
an IP network
simple network management protocol; protocol used when exchanging network management
SNMP information between network management and network devices (such as routers, servers and other
network devices)
The main protocols associated with the transport layer are transmission
control protocol (TCP), user datagram protocol (UDP) and SCTP
TCP
Transmission Control protocol
Working at the transport layer
Sets up and maintains a connection between two nodes
Ensures delivery of data between two nodes on the internet
4|Page
The term host has been used previously; this refers to a computer or device that
can communicate with another computer/device (host). Hosts can include clients
and servers that send/receive data, provide services or apps.
Link Layer
The link layer is responsible for transporting IP packets across each of the individual
links that make up the path between two communicating computers. These links
could be a combination of Ethernet, WiFi, 4G, satellite or fibre.
An IP packet will travel across many different physical and/or wireless links between
the original source and the final destination. Each different type of physical link uses
a different technology and, each has its own protocol. Each of the protocols adds its
5|Page
own headers to the IP packets to create frames. These frames are just used to carry
the IP packets across that particular link.
Ethernet is a common link layer protocol used in local area networks. It governs the
way data packets are transmitted on a shared channel.
The link layer at one end of a link communicates with the link layer at the end by
converting the frame into an electrical, electromagnetic (wireless) or light signal and
then sending this out onto the media.
At the link layer, we call the data structures frames to distinguish them from
'packets', which is the term used at the internet layer.
The frames carry, or encapsulate, the packets from the layer above.
If the link layer is Ethernet, the frames are called Ethernet frames. The header of an
Ethernet frame contains the source and destination MAC addresses. The source
MAC address is the device sending the frame, which is typically your computer. The
destination MAC address is the device on the Ethernet LAN receiving the frame,
typically your router.
The destination device then retrieves the packet and discards the frame, before
processing the packet, or sending it on its way across the next link where it will be
encapsulated by a new frame.
TCP
Transmission Control Protocol is an internet protocol suite which breaks up the message
into TCP Segments and reassembling them at the receiving side.
IP
An Internet Protocol address that is also known as an IP address is a numerical label. It is
assigned to each device that is connected to a computer network which uses the IP for
communication. Its routing function allows internetworking and essentially establishes
the Internet. Combination of IP with a TCP allows developing a virtual connection
between a destination and a source.
SNMP
SNMP stands for Simple Network Management Protocol. It is a framework which is used
for managing the devices on the internet by using the TCP/IP protocol.
Description
Packet switching is a method of transmission in which a message is broken up into a number of
packets that can be sent independently to each other from start point to end point. The data packets
will need to be reassembled into their correct order at the destination.
Each packet follows its own path.
Routing selection depends on the number of datagram packets waiting to be processed at
each node (router).
The shortest path available is selected.
Packets can reach the destination in a different order to that in which they are sent.
Pros
No need to tie up a communication line.
It is possible to overcome failed or faulty lines by simply re-routing packages.
Circuit switching charges the user on the distance and duration of a connection, but packet
switching charges users only for the duration of the connectivity.
High data transmission is possible with packet switching.
Packet switching always uses digital networks which means digital data is transmitted directly
to the destination.
Packets can be rerouted if there are problems.
More secure as harder to intercept messages.
Cons
The protocols for packet switching can be more complex than those for circuit switching.
If a packet is lost, the sender must re-send the packet (which wastes time).
Does not work well with realtime data streams.
The circuit/channel has to share its bandwidth with other packets.
There is a delay at the destination while packets are reassembled.
Needs large amounts of RAM to handle the large amounts of data.
Circuit switching
7|Page
Description
Circuit switching uses a dedicated circuit which lasts throughout the connection: the communication
line is effectively 'tied up'. When sending data across a network, there are three stages:
1. First, a circuit/channel between sender and receiver must be established.
2. Data transfer then takes place (which can be analogue or digital); transmission is usually
bidirectional.
3. After the data transfer is complete, the connection is terminated.
Pros
The circuit used is dedicated to the single transmission only.
The whole of the bandwidth is available.
The data transfer rate is faster than with packet switching.
The packets of data (frames) arrive at the destination in the same order as they were sent.
There is no need to reassemble packets.
A packet of data cannot get lost since all packets follow on in sequence along the same single
route.
It works better than packet switching in realtime applications.
Less secure as only one route used.
Cons
It is not very flexible (e.g., it will send empty frames and it has to use a single, dedicated
line).
Nobody else can use the circuit/channel even when it is idle
The circuit is always there whether or not it is used.
If there is a failure/fault on the dedicated line, there is no alternative routing available.
Dedicated channels require a greater bandwidth.
Prior to actual transmission, the time required to establish a link can be long.
Application
Public/private telephone networks
Private data networks
Routing
Routing tables contain the information necessary to forward a package along the shortest/best route
to allow it to reach its destination. As soon as the packet reaches a router, the packet header is
examined and compared with the routing table. The table supplies the router with instructions to
send the packet (hop) to the next available router. Routing tables include
number of hops
MAC address of the next router where the packet is to be forwarded to (hopped)
metrics (a cost is assigned to each available route so that the most efficient route/path is
found)
network destination (network ID) or pathway
gateway (the same information as the next hop; it points to the gateway through which
target network can be reached)
8|Page
netmask (used to generate network ID)
interface (indicates which locally available interface is responsible for reaching the gateway)
9|Page