14 Communication & Internet Technologies
14 Communication & Internet Technologies
technologies
14 Communication and internet technologies
14.1 Protocols
328
14.1 Protocols
(packet) associated with the transport layer protocols. when sharing files between peers.
FTP – file transfer protocol. Peer – a client who is part of a peer-to-peer
SMTP – simple mail transfer protocol. network/file sharing community.
Push protocol – protocol used when sending emails, in Metadata – a set of data that describes and gives
which the client opens the connection to the server and information about other data.
keeps the connection active all the time, then uploads Pieces – splitting up of a file when using peer-to-peer
new emails to the server. file sharing.
Binary file – a file that does not contain text only. The Tracker – central server that stores details of all other
file is machine-readable but not human-readable. computers in the swarm.
MIME – multi-purpose internet mail extension. A Swarm – connected peers (clients) that share a
protocol that allows email attachments containing torrent/tracker.
media files as well as text to be sent. Seed – a peer that has downloaded a file (or pieces of a
POP – post office protocol. file) and has then made it available to other peers in the
IMAP – internet message access protocol. swarm.
TCP – transmission control protocol. Leech – a peer with negative feedback from swarm
members.
Pull protocol – protocol used when receiving emails,
in which the client periodically connects to a server, Lurker – user/client that downloads files but does not
supply any new content to the community.
4 APPLICATION LAYER
3 TRANSPORT LAYER
2 INTERNET (NETWORK) LAYER
1 LINK NETWORK
▲ Figure 14.1 Four layer structure for TCP/IP
329
14
(this process is known as decomposition), making it easier to develop and
easier to make software and hardware compatible.
When sending data across the internet (network), the layers are used in the
order layer 4 to layer 1; when receiving data across the internet (network), the
layers are used in the order layer 1 to layer 4. Each of the layers is implemented
using software.
Application layer
14 Communication and internet technologies
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.
There are several protocols associated with the application layer:
Important terminology: 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.
Do not confuse ‘frames’ in this context with ‘frames’ when discussing paging memory
management in Chapter 16.
330
Internet
The region is very Germanic in nature with many
towns and villages resembling the Bavaria region.
Click on the video link below to find out more.
web server
14.1 Protocols
Check out this video: video links
https://www.youtube.com/watch?MHsl34P90plm
advert links
Travel to Brazil with
Watson Travel Group
… visit our website
This makes use of hyperlinks (rules for the transferring of data over the
internet). HTTP is a client/server protocol: request messages are sent out to the
web servers which then respond.
HTTP protocols define the format of the messages sent and received. The web
browser (which is part of the application layer) initiates the web page request
and also converts HTML into a format which can be displayed on the user’s
screen or can be played through their media player.
The following summarises what happens when a user requests a web page from
a website.
331
14 » 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
» 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.
14 Communication and internet technologies
A session would be started by typing in the ftp host_name (of remote system),
followed by a user id and password. The user would then be able to use ftp
commands to carry out a number of actions.
Simple mail transfer protocol (SMTP)
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 computer-
readable 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.
POP3/4 and IMAP (post office protocol and internet message access protocol)
Post office protocol (POP3/4) and internet message access protocol (IMAP)
are protocols used when receiving emails from the email server. These are
known as pull protocols (the client periodically connects to a server; checks
for and downloads new emails from the server – the connection is then closed;
this process is repeated to ensure the client is updated). IMAP is a more a
recent protocol than POP3/4, but both have really been superseded by the
increasing use of HTTP protocols. However, SMTP is still used when transferring
emails between email servers.
Figures 14.3 and 14.4 give an overall view and a more detailed view of the
email protocol set up.
POP/IMAP SMTP
email server
(receive email) (send email)
332
client
14
recipient
14.1 Protocols
client’s ISP internet
email server
uses POP/IMAP
protocol
recipient’s domain
email server
POP3/4 IMAP
POP3/4 does not keep the server and IMAP keeps the server and client in
client in synchronisation; when emails are synchronisation; only a copy of the email
downloaded by the client, they are then is downloaded with the original remaining
deleted from the server which means it is on the server until the client manually
not further updated. deletes it.
▲ Table 14.2
Transport layer
The transport layer regulates the network connections; this is where data is
broken up into packets which are then sent to the internet/network layer (IP
protocol). The transport layer ensures that packets arrive in sequence, without
errors, by swapping acknowledgements and retransmitting packets if they
become lost or corrupted. The main protocols associated with the transport
layer are transmission control protocol (TCP), user datagram protocol (UDP)
and SCTP. We will only consider TCP.
Transmission control protocol (TCP)
TCP is responsible for the safe delivery of a message by creating sufficient
packets for transmission. 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. TCP is also connection-
orientated since it establishes an end-to-end connection between two host
computers using handshakes. For this last reason, TCP is often referred to as a
host-to-host transmission protocol.
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.
These are the steps taken when host computer ‘X’ communicates with another
host ‘Y’ (this is an expansion of what happens during TCP involvement shown in
the HTTP algorithm earlier on):
333
14
synchronisation sequence bits so that segments will be received in the
correct order.
» Host ‘Y’ will now respond by sending back its own segment (containing an
acknowledgement together with its own synchronisation sequence bits).
» Host ‘X’ now sends out its own acknowledgement that the segment from ‘Y’
was received.
» Transmission of data between ‘X’ and ‘Y’ can now take place.
14 Communication and internet technologies
Ethernet protocols
Ethernet is a system that connects a number of computers or devices together
to form a LAN. It uses protocols to control the movement of frames between
computers or devices and to avoid simultaneous transmission by two or more
devices. It is a local protocol and does not provide any means to communicate
with external devices; this requires the use of IP which sits on top of the
Ethernet protocol.
Figure 14.5 shows the make-up of a typical frame used by the Ethernet protocol.
If VLAN is used, the Ethernet data size increases from 1539 bytes to around
9000 bytes per frame.
The components that make up Ethernet data are
» destination – this is the MAC address of the destination computer or device
(it is possible to use the value FF:FF:FF:FF:FF:FF as the MAC address if the
334
14
if they do not know the MAC address of the destination device)
» source – this is the MAC address of the source computer (using the usual
MAC address format of 6 bytes)
» Ethernet type or length – if the frame length ≤ 1539 then the value here is
the length of the Ethernet frame; if the frame length > 1539 then the value
here is the Ethernet type (IPv4 or IPv6 in our example)
» frame check – this will include a checksum to provide a method of checking
data integrity following transmission of the frame.
14.1 Protocols
Wireless (WiFi) protocols
Wireless LANs (standard IEEE 802.11 protocol) use a MAC protocol called carrier
sense multiple access with collision avoidance (CSMA/CA) (not to be confused
with CSMA/CD considered in Chapter 2, since this is a 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 (such as WLAN).
Bluetooth protocols
Bluetooth was considered in Chapter 2; it uses the standard IEEE 802.15
protocol for short-range data transmission/communication. There are numerous
additional Bluetooth protocols due to the many applications that may use this
wireless connectivity; this is outside the scope of this textbook.
WiMax
Worldwide interoperability for microwave access (WiMax) runs under IEEE 802.16
protocol. This connectivity was designed originally for wireless MANs (WMAN).
Fixed WiMax networks are based on the IEEE 802.16-2004 protocol, whereas
mobile WiMax is based on IEEE 802.16-2005 protocol.
Peer-to-peer file sharing/BitTorrent protocol
The BitTorrent is a protocol which is based on the peer-to-peer networking
concept (this was covered in Chapter 2). This allows for very fast sharing of
files between computers (known as peers). While peer-to-peer networks only
work well with very small numbers of computers, the concept of sharing files
using BitTorrent can be used by thousands of users who connect together over
the internet. Because user computers are sharing files directly with each other
(rather than using a web server) they are sharing files in a way similar to that
used in a peer-to-peer network; the main difference is that the BitTorrent
protocol allows many computers (acting as peers) to share files.
Suppose computer ‘A’ wishes to share a file with a number of other interested
peers. How can we use the BitTorrent protocol to allow this file sharing?
Initially, to share a file, the peer (computer ‘A’) creates a small file called a
torrent (for example, MyVideoFile.torrent). The torrent contains metadata
about the file about to be shared.
The actual file is broken up into equal segments known as pieces (typically a
20 MiB file may be broken up into 20 × 1 MiB pieces).
335
14
connect to the appropriate tracker – a central server that contains data about
all of the computers connected to it.
As each peer receives a piece of file they then become a source for that piece
of file. Other peers connected to the tracker will, therefore, know where to find
the piece of file they need.
Once a peer has downloaded a file completely and they make the file (or
required pieces of the file) available to other peers in the swarm (a group of
peers connected together), they become a seed. The more seeds in the swarm,
14 Communication and internet technologies
336
peers acting
as seeds
upload/down
load pieces
download file
only
upload file
only
request for file
download
▲ Figure 14.6 The arrangement of peers during the download and upload of file (pieces)
Key terms
Circuit switching – method of transmission in which a dedicated circuit/channel lasts
throughout the duration of the communication.
Packet switching – method of transmission where a message is broken into packets
which can be sent along paths independently from each other.
Hop number/hopping – number in the packet header used to stop packets which
never reach their destination from ‘clogging up’ routes.
Header (data packet) – part of a data packet containing key data such as destination
IP address, sequence number, and so on.
Routing table – a data table that contains the information necessary to forward a
package along the shortest or best route to allow it to reach its destination.
337
Pros Cons
the circuit used is dedicated to the single it is not very flexible (for example, it will
transmission only send empty frames and it has to use a
single, dedicated line)
the whole of the bandwidth is available nobody else can use the circuit/channel
even when it is idle
the data transfer rate is faster than with the circuit is always there whether or not
packet switching it is used
the packets of data (frames) arrive at the if there is a failure/fault on the dedicated
destination in the same order as they were line, there is no alternative routing
sent available
a packet of data cannot get lost since all dedicated channels require a greater
packets follow on in sequence along the bandwidth
same single route
it works better than packet switching in prior to actual transmission, the time
real-time applications required to establish a link can be long
▲ Table 14.3 Pros and cons of circuit switching
device
R1
‘A’
R3
R2 R4 router
R5 ‘B’
router
‘A’ R7
R6
R10
R8
device
R9 ‘B’
The dedicated route from ‘A’ to ‘B’ is first of all established (shown in orange on
the diagram). The following connections are then partially implemented: A–R2,
R2–R5, R5–R8, R8–R7, R7–R10 and finally R10–B. All packets (frames) follow
this single route and communication will take place, provided ‘B’ is not busy.
The main uses of circuit switching include public telephone networks, private
telephone networks and private data networks.
338
computer
‘B’
computer
R1
‘A’
R3
R2 R4 router
R5 ‘B’
router
‘A’ R7
R6
R10
R8
R9
As Figure 14.8 shows, the message sent by computer ‘A’ was split into four
packets. The original packet order was: and they arrived in the order:
which means they need to be reassembled in the correct order at the
destination.
339
14 Pros
no need to tie up a communication line
Cons
the protocols for packet switching can
be more complex than those for circuit
switching
it is possible to overcome failed or faulty if a packet is lost, the sender must re-send
lines by simply re-routing packages the packet (which wastes time)
it is easy to expand the traffic usage does not work well with real-time data
14 Communication and internet technologies
streams
circuit switching charges the user on the the circuit/channel has to share its
distance and duration of a connection, but bandwidth with other packets
packet switching charges users only for the
duration of the connectivity
high data transmission is possible with there is a delay at the destination while
packet switching packets are reassembled
packet switching always uses digital needs large amounts of RAM to handle the
networks which means digital data is large amounts of data
transmitted directly to the destination
▲ Table 14.4 Pros and cons of packet switching
Sometimes it is possible for packets to get lost and keep ‘bouncing’ around
from router to router and never actually get to their destination. Eventually,
the network could grind to a halt as the number of ‘lost’ packets mounts up and
clogs up the system. To overcome this, a method called hopping is used. A hop
number is added to the header of each packet. Each packet is only allowed to
hop a finite number of times (this number is determined by the network protocol
and routing table being used). Each time a packet passes through a router, the
hop number is decreased by 1. If the packet has not reached its destination and
the hop number = 0, then it will be deleted when it reaches the next router.
Each packet also contains an error checking technique such as a checksum or
parity check. If a checksum is used, this value is calculated for each packet
and is added to the header. The checksum for each package is recalculated at
the destination to ensure no errors have occurred. If the checksum values are
different, then a request is made to re-send the packet. A priority value is
sometimes also added to a header. A high priority value indicates which packet
queue should be used.
340
14
being sent) if TCP/IP protocol is being used when sending packets:
sequence
IP number of
IP address current hop length of number
address of packets checksum
of source number of packet in to allow
destination in the value
computer data packet bytes reassembly
computer message
of packets
▲ Figure 14.9
Routing tables
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)
» netmask (used to generate network ID)
» interface (indicates which locally available interface is responsible for
reaching the gateway).
341
14
alternative
packet header router
routes
14 Communication and internet technologies
▲ Figure 14.10
Example 14.1 Suppose we are carrying out video conferencing using packet switching as the
method of routing data. The performance of the communication is not very good.
a) Describe some of the poor performance you might expect.
Give a reason for this poor performance.
b) What features of circuit switching could potentially improve the performance?
Solution
a) Answers might include: picture and sound may not be in synchronisation
(packets arriving at different times); video not continuous – pauses (time delay
in reassembling the packets of data); degraded quality of sound and video
(possibly caused by competing traffic in communication lines); possible drop
out (packets take different routes, so it is possible for packets to be lost).
b) Answers might include: only one route used in circuit switching; therefore,
all packets arrive in correct order; dedicated communication channel with
circuit switching; therefore, full bandwidth available; there is no loss of
synchronisation with circuit switching.
342
Solution
14
Answers might include
l the web page is divided up into data packets
l each packet has a header, which includes the IP address of the destination
l the router checks the header against values stored in the routing table …
ACTIVITY 14A
1 a) Name the four layers which show the TCP/IP protocols.
b) Name one protocol associated with each layer.
c) i) Describe the use of protocols when sending and receiving emails.
ii) What is the difference between SMTP and MIME when sending
emails?
2 a) What is an Ethernet?
b) Describe the contents of an Ethernet frame.
c) Ethernet protocols do not provide a means to communicate with
devices outside a LAN.
How can external devices be communicated with when using an
Ethernet?
3 a) Explain the following terms used in peer-to-peer BitTorrent.
i) peer iv) leech
ii) swarm v) seed
iii) tracker
b) Explain how it could be possible to deal with peers acting as leeches.
4 a) Describe the difference between a packet header and a routing table.
b) How are the packet header and the routing table used to route a
package?
5 A person is making a video call using VoIP software.
Explain how packet switching could be used and describe any problems
that might occur.
343
b) Copy and complete the diagram to show the layers in a TCP/IP protocol. [3]
c) Describe the protocols used when sending and receiving emails. [4]
2 a) An Ethernet frame contains a section called Ethernet data.
Copy and complete this diagram to show the other four items missing from
the Ethernet data section. [4]
Ethernet type
14
switching.
Copy the table and indicate which statements are true () and which are
false ().[5]
b) Explain the following terms and why they are used when sending packets
across a network.
i) hop number/hopping [2]
ii) checksum [2]
c) Describe how headers and routing tables are used to route packets efficiently
from a sender to recipient. [5]
345