cs335 networking & network administration wednesday, april 7 packetspackets, frames, and error...

27
CS335 Networking & Network Administration Wednesday, April 7 Packets , Frames , and Error Detection

Post on 21-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

CS335 Networking &

Network Administration

Wednesday, April 7

Packets, Frames, and Error Detection

Packets

We have been talking in previous classes about lowest levels of data transmission

Computer networks do not transfer data as a string of continuous bits

Send small blocks called packets Packet switching networks

Packets

Sender and receiver need to coordinate to ensure that data arrives correctly If data is lost computers can determine which

packets have arrived intact On a network computers share access

Using small packets ensures fairness to the wire resource

Computers take turns sending packets so one set of computers don’t monopolize the network resource

Time division multiplexing

Breaking data into small parts ensures access to the resource

Packets and hardware frames

Ex: RS-232 encodes bits to transmit an ASCII character, doesn’t allow sender to signal start and end of a block of characters, hence ASCII 01(soh) and 04(eot)

Byte stuffing

If framing characters are in data

Byte stuffing

Replace reserved characters in data with mapped escape characters

Transmission errors

Interference causes data to be lost or changed

Lightning, electro-magnetic interference, power surges

Lost, changed, or spuriously appearing bits account for much of the complexity in networks

Parity bits

At the end of each character (remember ASCII is 7 bit characters)

Sender and receiver agree on odd or even parity Sum the total number of 1 bits in character and

make the parity bit a 1 or 0 to make the sum odd or even

Parity error checking can’t detect transmission errors that change an even number of bits

Error detection mechanisms

Adds overhead (additional bits are added to data)

Size of additional information Complexity of algorithm Number of bit errors that can be detected Error detection is approximate – a reasonable

effort to produce low probability of corrupt data

Checksum

Send a checksum along with each packet Treat the data as a sequence of binary

integers and compute the sum

Checksum

Advantage Size and ease of computation 16 or 32 bit checksum=small overhead Addition algorithm=small computation overhead

Disadvantage Can’t detect all common errors

Checksum error detection

CRC Errors (Cyclic Redundancy Checks) http://www2.rad.com/networks/1994/err_con/crc.htm or

http://www.mathpages.com/home/kmath458.htm Better than checksum Exclusive or (xor) Shift register

Shift register, XOR,CRC

A hardware 16 bit CRC

Common errors that CRC’s can detect

Vertical errors First two bits of each character are set to 0 These errors appear in a vertical column if the

characters are arranged in rows Burst errors

Small set of bits in one location (from emi)da Account for many errors

Frame format Networks associate error detection at frame level Sender calculates checksum or CRC and transmits the

extra data in the frame Receiver calculates the same value and compares it to

the additional information sent with the frame

Network topologies

Direct point-to-point Shared medium (LAN)

Locality of reference principle

Computer communication follows two distinct patterns. First, a computer is more likely to communicate with computers that are physically nearby than with computers that are far away. Second, a computer is more likely to communicate with the same set of computers repeatedly

LAN topologies

Star Ring Bus Logical connection vs. physical connection

For instance a ring topology need not be in a circle, but could follow a hallway or rise vertically to another floor

Star

All computers attach to a central point

Ring

Entire ring network is disabled if one node is cut

Bus

Single cable to which all computers attach Advantage/disadvantage

Ethernet

History Coax, 500 meters, 3 meters between

segments, operated at 10Mbps

Ethernet Transmission and Manchester Encoding

Edge triggered Rising or falling edges encode data Falling edge encodes 0; rising edge = 1 Preamble allows for time synchronization Receiver uses preamble(64 alternating bits

preceding the frame) to sync time slots

Sharing on ethernet

Bus topology shares access to wire CMSA = Carrier Sense Multiple Access Checks for transmission on wire before

sending data Wait until wire is empty to transmit

Collision detect

Interference between two signals Simultaneous transmit Garbles data Computers use exponential backoff to

choose which will proceed Random time delay before transmitting again