By Patrick Piemonte
Index:
Wednesday September 10th, 2003
Network Parameters
Propagation Delay:
Time required for a signal to travel across a medium.
Bandwidth:
Maximum times per second a signal can change.
Throughput:
Number of bits per second that can be transmitted.
The larger the bandwidth the larger the throughput.
Nyquist Theorem
Relates Network bandwidth and throughput.
D - throughput (bits/sec)
B - bandwidth (Hz)
K - # of values that encode the data in each cycle.
D = 2B log2K
Example:
RS232
K = 2 (+15, -15 are used)
D = 2B log2(2) = 2B
Nyquist theorem does not consider noise, and therefore it only gives a maximum theoretical limit.
Shannon's Theorem
It considers noise to relate bandwidth and throughput.
C - Throughput (bits/sec)
B - Bandwidth (Hz)
S - Power of the signal
N - Power of noise
C = B log2(1 + (S/N))
(S/N) - Signal to noise ratio
Example:
Telephone System
Bandwidth 3000Hz (typical bandwidth used for voice)
Signal to Noise Ratio of 1000 (S/N)
Effective Capacity throughput
B = 3000Hz
(S/N) = 1000
C = 3000log2(1 + 1000) = 30, 000 bps
Result:
If S/N = 0 --> No Signal
The S/N ratio is usually given in decibels (dB).
S/N in decibels = 10log10(S/N)
Example:
S/N = 1000
S/N in dB = 10log10(1000)
= 10(3)
= 30dB
S/N = 20 dB
S/N = ?
20 = 10log10(S/N)
20/10 = log10(S/N)
102=(S/N)
S/N = 100
Multiplexing

Multiplexor
Demultiplexor
There are two ways to do multiplexing:
Time Division Multiplexing (TDM)
Frequency Division Multiplexing
Channel Use:


Example:
Cable TV - Each TV channel has a different frequency.
Wednesday September 10th, 2003
Multiplexing
TDM
FDM
TDM - Time division multiplexing
FDA - Frequency division multiplexing
Packets, Frames, and Error Correction
Why do we connect computers to a shared network?

The alternative is to have a one to one connection to each computer.

Disadvantage:
The disadvantage is that you will need n(n-1)/2
cost = O(n2)
Advantage:
Throughput is not divided, it is always the same across each pair of computers.
Example:
A sends to B at 10mbps
C sends to D at 10 mbps
simultaneously.
With a shared network

cost = O(n)
n = # of computers
Advantage:
Less expensive.
Disadvantage:
Throughput is shared at will divided.
If A, B and C, D exchange data simultaneously, then
A sends to B at 5 mbps
C sends to D at 5 mbps
Shared Networks are the only scalable option.
Problems with shared networks:
A shared network may introduce non-deterministic delays.
Solution for fairness
Packet Switching Steps

A wants to send a packet to C
The structure of the packet depends on the underlying network.
The format of the packet is also called the frame.
| SOH |
RS232 transmission consists of a sequence of characters.
SOH - Star of Header
EOT - End of Text
SOH and EOT are special characters used to delimit the message.
Problem:
If the data contains SOH or EOT then the receiver may confuse the start/end of transmission.
Solution: Use "stuffing"
Use as alternative representation of SOH and EOT.
If they appear in the data
| Character in Data | Character Sent |
| SOH | ESC-X |
| EOT | ESC-Y |
| ESC | ESC-Z |
Original Message:
| SOH | EOT | SOH | EOT |
Sent Message:
| SOH | EX X | EX X | EOT |
The receiver translates the sent message back to the original message.
Stuffed frame may be larger than original.
Handling Errors
Handling Errors
Data sent can be corrupted during transmission.
The frame of the packet includes some additional information to detect errors.
There is always a very small probability of having undetected errors but it works well in practice.
Parity Bit
One additional bit per character tells if the number of bits in the character is even or odd.
even parity --> total # of bits (including parity bit) is an even number.
odd parity --> total # of bits (including parity bit) is an odd number.
With Even Parity: (Parity Bit is Underlined)
1001001
00011011
If receiver receives
11000001 <-- received (There is an error)
Checksum
| 100 | 201 | 6 | 2 | 3 | 312 |
Check field above is 4 bytes. 312 is the checksum value.
Example:
Original
| 00100111 | |
| 10010100 | |
| Checksum | 10111011 |
Received
| 00100110X | |
| 10010101X | |
| Checksum | 10111011 |
X = Errors
Web Crawling - harvesting internet information.
Google added a protocol on top of TCP that does a more thorough analysis of the terabytes of web crawling information.
CRC
Cyclic Redundancy Check
Computing CRC
Basic operations
XOR Operator

| a | b | XOR |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Shift Operator
Before shift:
| 1 <-- (Out) | 1 | 0 | 1 | 1 | 0 | <-- 1 (In) |
After shift:
| 0<-- (Out) | 0 | 1 | 1 | 0 | 1 | <-- 1 (In) |
Example:
CRC Hardware

| 0000 | 0000000 | 00001 |
Input is 0
| 0000 | 0000000 | 00010 |
Input is 1
| 0000 | 0000000 | 00101 |
and so forth...
RS232:
| SOH | data | EOT | CRC |
Ethernet:
| ethhdr | data | CRC |
Ethernet Address is 6 bytes
IP Address is 4 bytes
CRC finds Error. CRC is slower than Checksum.