Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

1.

3 EXCHANGING DATA

(b) The internet structure: The TCP/IP Stack; DNS; Protocol layering; LANs and WANs; Packet and circuit
switching.

The TCP/IP Stack

Definitions

The Transmission Control Protocol / Internet Protocol (TCP/IP) stack is a set of networking protocols which work
together as four connected layers and pass incoming and outgoing data packets throughout the layers during
network communication.

A protocol is a set of rules that must be followed to allow communication to happen between networked devices.

Layers

Terminal A Terminal B

Application Application

Transport Transport
Router Router
Terminal A Terminal B
Internet Internet Internet Internet

Link Link Link Link

The TCP/IP stack contains layers, of software and hardware, which are designed to successfully transfer data across
a network.

Packet Transmission

TCP/IP Packet Transmission


Terminal A (sending) Terminal B (receiving)
Application Format data Application Present data to user

Add port numbers Remove port numbers from IP addresses


Transport Spilt data into packets Transport Reassemble packets in correct order
Add error checking data Check error checking data
IP addresses removed
Internet Add source and destination IP addresses Internet IP addresses passed to transport layer

MAC address removed


Link Assign MAC address Link Pass packets to network layer

67

Matthew Robinson
1.3 EXCHANGING DATA

Application Layer (Software)

The application layer is uses protocols to format the data in a way which allows it to be used by the receiving
application.

Protocol Description
FTP File Transfer Protocol (FTP) is a standard network protocol, which operates in the application layer of the
TCP/IP stack, and is used for the transfer of data across a client-server network.

The FTP protocol can be used in modern web browsers and purpose-built FTP clients, such as FileZilla. Files
are transferred by dragging them from one location to another.

FTP sites can either:


require a username and password to authenticate a user; or
allow anonymous use where no authentication is required.

Uses of FTP:
updates which are large in file size from software companies; and
journalists to upload documents and photographs to a newspaper office.

HTTP HyperText Transfer Protocol (HTTP) defines how messages are formatted and transmitted, and what actions
web servers and browsers should take in response to various commands.

Websites using HTTP have a URL beginning with http://.

When a website is accessed, the web browser sends a request to the web server and it responds with a HTTP
status code.

Status Code Meaning


200 Successful request, the webpage exists.
301 Moved permanently, often redirected to a new URL.
401 Unauthorised request, authentication required.
403 Forbidden, access to this page or directory is not permitted.
404 Page does not exist.
500 Internal server error, often caused by an incorrect server configuration.

When a successful request has been made the website content, such as: text; images; styling; and JavaScript,
is rendered into a web page.

HTTPS HyperText Transfer Protocol Secure (HTTPS)

Websites using HTTP have a URL beginning with https://.

When a website is accessed, the web page data is encrypted so that only the correct key can decrypt and
read the data.

68

Matthew Robinson
1.3 EXCHANGING DATA

Protocol Description
Email A mail server, or email server, is a computer system that sends and receives email.

Mail servers comprise of a series of protocols:


POP3 Post Office Protocol v3 (POP3) allows emails from a mail server to be downloaded, deleted or
viewed offline by an email client. When an email is received, they are transferred to a local
computer system and deleted from the server.
Advantages Disadvantages
Emails can be viewed offline Can only manage one mailbox.
because they are downloaded
locally once received.
Size limit only determined by the Emails are not synchronised
size of the computer systems across multiple devices because
secondary storage since there is they are removed once
no reliance on web-based storage. downloaded.
Does not support complex
searching of emails on the server.
d
IMAP Internet Message Access Protocol (IMAP) allows emails from a mail server to be downloaded,
deleted or viewed offline by an email client. When an email is received, they are transferred to a
local computer system but also remain on the mail server.

Advantages Disadvantages
Can manage more than one Size limit determined by
mailbox. secondary storage on the mail
server.
Emails are synchronised across Difficult to maintain because it
multiple devices because they are requires use of the hosts
kept on the mail server and flags secondary storage space, storage
are set based on email status, quotas may be needed to restrict
such as read or deleted. email clients storage usage.
Email clients can choose to
download headers, full body or
attachments.
Supports complex searching, such
as criteria matching headers, full
body or attachments.
d
SMTP Simple Mail Transfer Protocol (SMTP) is used by the mail server to send and receive emails from
other mail servers. When a client is sending an email, the email is transferred from the email clients
computer system to the mail server. An outgoing email is transferred from one mail server to
another.

Advantages Disadvantages
Simple for the email client since Little security because SMTP is
the only required inputs is the text-based and any text can be
recipients email address. spoofed, therefore it may be
necessary to setup and maintain
firewalls.
Quick email delivery because
SMTP is develop from a simple
platform.
Reliable because if an email fails
to be delivered successfully, the
email will be marked as
temporarily failed and the send
operation will be repeated until
there is a success or time out.
d

69

Matthew Robinson
1.3 EXCHANGING DATA

Transport Layer (Software)

The transport layer uses the Transmission Control Protocol (TCP) to:
perform a handshake
to establish an end-to-end connection with the recipient computer;
split the data into packets;
label the packet with a packet number, the total number of packets and the port number through which the
packet should route to ensures that the packet is handled by the correct application on the recipient
computer system.
A timer is incremented until a maximum value is reached, called a time out. When this occurs, a request for the
retransmission of the lost packet is sent to the application layer. A receipt of packets received is recorded.

A handshake is an automated process that sets the parameters for communication between two communicating
computer systems before packets are transferred.

Handshake parameters can include:


Physical Protocols Logical Protocols
These are concerned with how the data will be transmitted. These are concerned with the data itself.
transmission medium wired or wireless error checking protocols:
(agreeing Wi-Fi frequency, 2.4Ghz or 5Ghz); o echo when a message is received, it
mode of data transmission: sends the message back to
o simplex unidirectional data transfer; compare with the original to
o duplex bidirectional data transfer; see if it has been transmitted
o half bidirectional data transfer which correctly;
duplex only allow once direction of data o parity check uses the even or odd scheme
transmission at once time. to detect whether data has
been transmitted correctly;
o checksum / also uses the even or odd
check-bit scheme to detect whether
data has been transmitted
correctly;
character set the methods of encoding characters,
such as ASCII or Unicode;
packet size;
information about data encryption;
bitrate of data transfer.

A packet, or datagram, is a piece of a message transmitted over a packet-switching network.


A Packet
Header Payload Trailer
source address destination packet protocol data error checking end of packet
address sequence information marker
number
Source address The IP address of the sending computer system.
Destination address The IP address of the recipient computer system.
Packet sequence number The position of the packet in the series of packets.
Protocol The protocol by which the packet is being sent, such as FTP.
Data The data inside the packet.
Checksum A calculated summary of such a data portion which is used to ensure the integrity of data portions.
End of packet marker Defines the end of the packet.
70

Matthew Robinson
1.3 EXCHANGING DATA

Internet Layer (Software)

The internet layer, also known as the network layer or IP layer, adds the source and destination IP address. Routers
operate on the network layer and will use the IP addresses to forward the packets to the correct destination. A
socket is formed, using the IP address and port number (e.g. 86.16.83.168:80), which specifies which device the
packet must be sent to and the application being used on that device. Since routers operate on the network layer,
source and destination MAC addresses are changed at each router node. Therefore, packets move up and down
the network layer and link layer as they pass through each router or switch between the client and the server.

Protocol Description
IP An Internet Protocol (IP) address is a unique address that is assigned to a network device. The IP address
indicates where a packet of data is to be sent or has been sent from. Routers can use IP addresses to direct a
packet to its destination.

Internet Protocol v4 (IPv4) allows each device to have a unique 32-bit binary number address. The binary
number is broken down into octets which are chunks of 8 digits.

IPv4 Address
0101 1001 1001 0001 0100 1101 0110 0110

89.145.77.102
IPv4 can assign addresses for up to 4.3 billion computer systems. However, there are a growing number of
computer systems and therefore more addresses will be required to allow all devices to be connected to the
internet IPv6 was introduced to solve this problem.

Internet Protocol v6 (IPv6) allows each device to have a unique 128-bit binary number address. The binary
number is arranged into groups of hexadecimal numbers separated by colons.

IPv6 Address
2001:0db8:85a3:0000:0000:8a2e:0370:7334
IPv6 can assign addresses for up to 2128 computer systems.

IPv4 and IPv6 can both coexist and therefore both be used by computer systems on the Internet.

An IP address can be either:


public used to assign a router to the Internet and can be accessed
through the Internet;
private used to assign a computer system to a route and cannot be
accessed directly through the internet.

71

Matthew Robinson
1.3 EXCHANGING DATA

Link Layer (Hardware)

The link layer is a physical connection between network nodes. The packets are converted into physical signals,
such as radio waves, and place on to the network medium which carries the data across the network. The unique
Media Access Control (MAC) addresses are added which identify the Network Interface Cards (NICs) of the source
and destination computer systems. Therefore, once a packet finds the correct network, it can locate the correct
piece of hardware.

Protocol Description
Ethernet Ethernet is a collection of protocols which are used for the transfer of data across a network cable.

The Ethernet protocol consists of:


hardware specifies the expected performance of network cables,
plugs and sockets;
data format describes the format of the data packets;
data states how data collisions will be handled, this occurs
collisions when two devices send data at exactly the same time.

Uses of the Ethernet protocol include:


a LAN.

Layer Hop

Packets hop between the Internet layer and the link layer when being transmitted between routers connected to
the Internet. Each time a packet hops, it is assigned a new MAC address for the next router to which it will be
transmitted. This process continues until the packet reaches the router with the destination IP address.

Protocol Layering
Protocol layering is a technique to simplify networking designs by dividing them into functional layers, and assigning
protocols to perform each layer's task.

This allows a developer or manufacturer to make changes to the protocol but they need only be concerned with
the layer on which the protocol operates.

The TCP/IP stack is a protocol layering model and therefore different developers will be concerned with different
layers on the stack:
application layer software developers;
transport layer
internet layer
link layer

72

Matthew Robinson
1.3 EXCHANGING DATA

URLs

Definition

A Uniform Resource Locator (URL) is the complete address of an Internet resource.

URL Structure

URL Structure
Method Host Location Resource

http://www.websitename.com/folder/subfolder/webpage.html#element

Internet Registrars
An Internet registrar holds records of all existing website names and the details of those domains that are available
to purchase. They act as resellers for domain names and must be accredited by their governing registry.

Internet Registries
Internet registries are five global organisations which are governed by the Internet Corporation for Assigned Names
and Numbers (ICANN) which host worldwide database containing the records of all the domain names currently
issued to individuals and companies and the individuals or companys details.

The details kept by internet registries include:


name;
type individual or company;
registered mailing address;
registrar which sold the domain; and
date of registry.

Internet registries also allocate IP addresses and keep records of which address or addresses a domain name is
associated with as part of their Domain Name Server (DNS).

73

Matthew Robinson
1.3 EXCHANGING DATA

DNS

Definition

A Domain Name System (DNS) provides the rules for assigning domains names to IP addresses by structuring the
domain names into a hierarchy of smaller domains, the smaller domains are written as a string and separated by
full stops.

Hierarchy

root

.com .org .edu Generic TLDs


Country TLDs .uk .de .fr Top Level Domains (TLDs)

.co .org .gov 2nd Level Domains (2LDs)

.bbc .ebay .ocr 3rd Level Domains (3LDs)

Domain Names

Each domain name has one or more equivalent IP addresses. A DNS server must then retrieve the correct
corresponding IP address.

Domain Name Structure


Host Website 2LD 3LD

ftp.websitename.co.uk
Website domain name

Fully Qualified Domain Name (FQDN)

A name server contains a database of corresponding domain names and IP addresses


Requesting a Web Page
Client inputs a domain name into their web browser.
Web browser cache is checked for matching web page.
If web page is not in the cache, domain is transferred to the
Client recursive name server, which is owned by the Internet Service
Provider (ISP) and contains the domain names and corresponding
Root NS IP addresses for web pages previously requested.
If the web page is not in the recursive name server, the recursive
2LD NS (.co) name server will perform queries on the root, 2LD name server,
Recursive Name 3LD name server and the web hosts name server until a match is
3LD (NS (.uk)
Server found and the domain has been resolved.
When the domain has been resolved, the name server containing
Host NS (.websitename) the domain will return the IP address to the recursive name server
which returns the IP address to the clients web browser.
Web
Host The clients web browser makes a data request to the web host
server, if the page is found, the web elements, such as: HTML;
CSS; and JavaScript, will be transmitted back to the clients web
resolving www.websitename.co.uk browser and displayed to the client.

74

Matthew Robinson
1.3 EXCHANGING DATA

Importance of DNS

A DNS makes the Internet easier to use for clients since they are able to request a web page using a URL. This is
user-friendly and intuitive since URLs are written using natural language and prevents the need for clients to
remember an IP address, which are 4 bytes of numbers in IPv4 and 16 bytes of hexadecimal in IPv6.

Local Area Network (LAN)

Definition

A Local Area Network (LAN) consists of a number of computing devices within a distinct geographical location,
such as on a single site or in a single building, which are connected together using cables.

Characteristics

Confined to a local geographical area.


Business LANs tend to be client-server.
Home LANs tend to be peer-to-peer.
The cables and equipment are owned by the business or private individual.

Examples

An office.
A school.
A hospital.
A library.

75

Matthew Robinson
1.3 EXCHANGING DATA

Wide Area Network (WAN)

Definition

A Wide Area Network (WAN) consists of two or more inter-connected Local Area Networks (LANs) that are in
different geographical locations.

Characteristics

Can spread over any geographical area.


Make use of external telecom infrastructure services for long distance network communications, these
can comprise of: fiber optic lines; satellite communication links; leased telephone lines; or microwave
links.
External operators are responsible for maintaining the WAN infrastructure
The cables and equipment are usually not owned by the business or private individual however some
multi-national companies, such as Google, may own their own WAN infrastructure.

Examples

The internet (the largest WAN and is not owned by any single organisation or private individual).
Defense organisations.
Banking firms.

76

Matthew Robinson
1.3 EXCHANGING DATA

Packet Switching

Definition

Packet switching is a method of transmitting packets of data across a network using inter-connected nodes on
which other communications are happening simultaneously.

How it works

Packet Switching Visualisation

Source Router
Router
Router

Router

Router
Destination Router

Examples

The Internet packets are transmitted from one router to another between the Internet layers and
link layers in the TCP/IP stack.

77

Matthew Robinson
1.3 EXCHANGING DATA

Evaluation

Advantages Disadvantages
Robust because if one router is not available which Latency can occur because packets are transmitted
causes a path to be incomplete, there is likely to be along random paths meaning that there is no
another path which the packet could route. guarantee that they will arrive within a specific time
period.
Efficient because each path is only occupied for the Packets can arrive in a random order because they
duration of the packet transmission and therefore the can be all transmitted along different paths therefore,
path is available to other transmissions once they must be reassembled once received.
completed. This means that data transmission is
possible during high traffic loads on a network.
Packets are subject to error checking through the use
of error correction codes which allow corrupted bits
to be corrected.
Resilient because network downtime will only require
the re-transmission of the lost packets rather the
entire data.
Secure because in the event of malicious data
interception, only segments of the data are available.

Circuit Switching

Definition

Circuit switching is a method of transmitting data across a network using a direct link between two devices for
the duration of the data transmission.

How it works

Circuit Switching Visualisation

Source Router Switching Node Switching Node Switching Node Destination Router

Examples

Public Telephone System when a caller dials a telephone number, various switches in telephone
exchanges set up a path between the caller and the recipient.

78

Matthew Robinson
1.3 EXCHANGING DATA

Evaluation

Advantages Disadvantages
No latency because the data is guaranteed to arrive Not robust because if one router fails, communication
within a specific time period. is lost.
Data arrives in order because it travels sequentially Inefficient because once a connection is made, the
along one path and therefore, the data does not need path cannot be used by another other transmissions
to be reassembled. even if no data is currently being transferred.
Slow setup because initiating the communication can Every connection has to support the bandwidth
be a slow process. required and therefore it is not suitable for some data
transmissions which require high amounts of
bandwidth.
Dedicated path prevents interruption from other Insecure because in the event of malicious data
data transmissions because there is a guaranteed interception, the entire data is available.
contention ratio, which is the number of users sharing
the same data capacity.

79

Matthew Robinson

You might also like