Chapter 2 - 021030
Chapter 2 - 021030
DATA PACKETS
Packet Structure
PACKET TRAILOR
# An error checking method, Cyclic Redundancy Check is used to check data packets (CRC)
# This involves the sending computer adding up all the 1-bits in a pay load and storing this as
hexadecimal values, in the trailer before it is sent.
# Once the packet arrives, the receiving computer recalculates the number of 1-bits in the
payloads.
# The computer then checks this value against the one sent in the tailor.
# If the two values match then no transmission error has occurred otherwise has to be resent.
Hopping
• Sometimes it is possible for packets to get lost because they keep bouncing around from
router to router and never actually reach their destination. This will congest the network and
almost freezing the network. Lost packets will clog and congest the system.
• To overcome this this, a method called hopping is used.
• A hop number is added to the header of each packet and this number is reduced by 1 every
time it leaves a router.
• Each packet has a maximum hop number to start with. Once a hop number reaches zero,
and the packet has not reached its destination, then the packet is deleted when it reaches
the next router.
• The missing (destroyed) packets will be resend.
DATA TRANSMISSION
Data transmission can be either over a short distance eg from a printer to a computer or it can
be over long distances eg from 1 computer to another computer in a global network.
There are 3 factors which need to be considered when transmitting data are:
TRANSMISSION MODE
-Occurs when data is sent one bit at a time over a single wire or channel
-Bits are sent 1 after another as a single stream
-Serial data transmission works well over long distances however the data is transmitted at a
slower rate than parallel data transmission
-Because only 1 channel or wire is used data will arrive at its destination fully synchronized that
is in the correct order e.g when connecting a computer to a printer via a USB connection
-Parallel data transmission
-Occurs when several bits of data (1byte) are sent down several channels or wires all at the
same time each wire transmits 1 bit.
NB: Parallel data transmission can be simplex, half duplex and full duplex
-Parallel data transmission works well over short distances, over long distances (over 20m) data
can be skewed (that is synchronized or out of order)
-It is however a fast method of data transmission that serial
NB: The internal circuits in a computer use parallel data transmission since the distance
travelled between components is very short and high-speed transmission is required
Serial Parallel
Less risk of external interference than Faster rate of data transmission or than serial
parallel.
Works well over long distance. Works well over short distances
Transmitted bits will not have the risk of being Preferred method when speed is important
skewed
Less expensive than parallel. More expensive than serial
PARITY CHECKS
-Parity Checking is a method used to check whether data has been changed or corrupted
following data transmission.
NB: THIS METHOD IS BASED ON THE NUMBER OF 1-BITS IN A BYTE
-The Parity can be either even (an even number of 1-bits in a byte) or odd (an odd number of 1-
bits in the byte)
-One of the bits in the byte (left-most bit) is reserved for a parity bit
01000101
-the underlined 0 is the parity bit
CHECKSUM
-It is a method used to check if data has been changed or corrupted following data transmission
-Data is sent in blocks and additional value called a checksum is sent at the end of the block of
data
-Checksum process is as follows
1. When a block of data is about to be transmitted.
2. The calculation is done using an agreed algorithm (between sender and receiver)
3. The checksum is then transmitted with the block of data
4. At the receiving end, the checksum is recalculated by the computer using the block of data
5. The recalculated checksum is the compared to the checksum sent with the data block
6. If the two checksums are the same, then no transmission area and if there is an error, the
data block is resent
Echo Check
Qns: What is echoes?
When data is sent to another device this data is sent back to the sender. The senders
compares the two sets of data to check if an error occurred during the transmission process.
NB: Qns : Is this method reliable?
Ans : not reliable .
Why: It is not known whether the error occurred when sending data in the first place or if the
error occurred whilst the receiver was sending back the echo.
Check digits
-A check digit is the final digit included in a code, it is calculated from all the other digits in the
code.
- Check digits are used on bar codes for products and on ISBN.
Check digits are used to detect the following errors:
1. An incorrect digit entered e.g. 5327 entered instead of 5307.
2. Transposition errors where two numbers have changed order e.g. 5037 instead of 5307.
3. A phonetic error e.g . 13 instead of 30.
4. Omitted or extra digits e,g 537 instead of 5307 or 53107 instead of 5307.
The number of different methods used to generate a digit. Two common methods are
1. ISBN 13
2. Modulo-11.
ISBN 13
Modulo-11
• ARQ use positive and negative acknowledgement [message send to receiver indicating that
data has or has not been received correctly] and time out [ the time interval allowed to lapse
before an acknowledgement is received.
• The receiving device receives an error detecting code as part of data transmission, the
[Cyclic Redundancy Check ] used to check if the received data and transmission error.
• If an error detected, a positive acknowledgement is send back to the sending data. However
if an error detected, the receiving device now sends a negative acknowledgement to the
sending device and request retransmission of data.
• If no acknowledgement has been received by the sender with this time limit it automatically
is resend.
• ARQ is often used by mobile phone networks.
Encryption
When data is being transmitted over any public network there is always a risk e.g. hacker
(eavesdropper). Encryption is the scrambling the data in a form that is unreadable to whom the
data is indented to. Encryption will not defend the data from being interrupted. We use on
sensitive data e.g. bank details, legal documents, credit cards , medical history .
Symmetric Encryption
• Symmetric Encryption uses an encryption key. The same key is used to encrypt and decrypt
the message.
• The sender after encryption the data will need to share the key with the receiver.
• NB : The problem is how do we share the key?
Suppose the encryption key is : 4291362856
Asymmetric Encryption
This was developed to overcome the security problems associated with symmetric encryption. It
makes use of two keys which are public key and private key.