Chapter 2
Data Transmission
Packet Switching - when data is split into number of data packets. Each packet is then sent
from start to end independently. At destination packets are reassembled into correct order. data packets - Structure
- each packet follow its own path. Header
- routers at enderds end determine the path a packet take. (shortest possible path is choosen). IP address of sender
- packets reach reciever end skewed hence rearraged by router at recieving end. IP address of receiver
Advantages of Packets Switching: Sequence number of packet
1) no need to tie a single transmission line. packet size
2) overcome faulty, busy or failed trasmission lines by re-routing. Payload
3) high data transmission rate is possible. Actual data beign sent
Disadvantages of Packet Switching: Packet Trailer
1) packet scan be lost and need to be resent. Way of identifying packet's end
2) prone to errors with real time streaming. error checking method.
3) delay at reciving end due to data beign re-ordered.
Types of Data Transmission - Serial Transmission:
Simplex - data is sent in one direction only. - more relliable for longer distances.
Half duplex - data is sent in both direction, but not at same time. - no risk of skewing of data.
Full duplex - data sent in both direction at same time. Parallel Transmission:
Serial - one bit at a time- through a single wire. - fatser rate of transmission
Parallel - several bits if data throught several wires. - works of shorter distances.
Universal Serial Bus - USB
- device is automatically detected by computer and device drivers are loaded up. USB - C
- can fit only one way preventing incorrect connection. - Connector can fit either way around
- has become an industry standard over the years. - Smaller and thinner than original
- can support diffrent transmission rates. - Backward compatible.
- is backward compatible. - Becoming a new industry standard.
- Standard USB only support maxium cable length of 5 meters.
Methods of Error Detection:
Methods to check whether data has been changed or corrupted following transmission.
- Parity Check:
An even or odd parity is decided on before hand. Each byte contain a parity bit (the left most bit), it is set according to the parity
decided. After transmission the bytes are re checked according to parity if parity changed byte is flagged.
If bits have changed position or parity remain same even after change, it is impossible to know if data corrupted.
Hence parity blocks are used. Parity check is done horizontally and vertically.
- Check Sum:
Check sum value is calculated using an agreed algorithm at sender's end. The value is sent along side the data packets. The value
is recalculated at receiver end, if values match data transmitted is correct, otherwise request to resend data is made.
- Echo Check:
Data is sent to the receiver, receiver resends received data back to sender. Sender compare the data with the original data to
check if any error occured or not.
Hard to know if error occurred during first transmission or the second transmission.
Automatic Repeat Requests (ARQs):
It uses positive and negative acknowledgements alongside timeout.
The data is sent alongside an error detection code that reciever uses to find whether data contain transmission error or not.
If no error detected, a positive acknowledgement is sent. If error detected a negative acknowledgment is sent and request to
resend data is made. A time out is used by sender to wait a predetermined amount of time, if no acknowledgment received data
is resent automatically until a positive acknowledgment received.
Encryption:
Encryption make data unreadable, maintaining confidentiality even if data is intercepted.
Plain Text - original data beign sent.
Cipher Text - data after it has gone through encryption algorithm.
- Symmetric Encryption:
Uses the same encryption key to encrypt and decrypt data.
- Asymmetric Encryption:
It uses two keys public (made available to everyone) and private (only known to computer user).
An algorithm is used to generate matching keys by receiver. Public key is sent to sender who uses it to encrypt data and send
it to reciever. Receiver then uses the matching pair of private key to decrypt the message.
Both keys are mathematically linked but cannot be derived from each other.