cs335 networking & network administration wednesday, april 7 packetspackets, frames, and error...
Post on 21-Dec-2015
213 views
TRANSCRIPT
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
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)
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
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
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
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
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