Packets, Frames, and LANs
Tom Kelliher, CS 318
Feb. 7, 2000
Read Ch. 7, Chs. 9--12.
Cross site scripting
- Packets and frames.
Perl: minMax, parsing.
- Packet: a block of data.
- Why break data into packets?
- Improve error detection.
- Fairness: a network is a shared resource.
Examples: A 5MB ftp over a 56K line, telnet over the College's T1.
- A LAN is a broadband medium, use TDM to share.
An RS-232 ``frame:''
If we have two adjacent frames, they'll be separated by EOT/SOH, which is a
bit redundant. Why can't we just separate frames with a single SOH?
Suppose the payload is binary data and contains either SOH or EOT?
- Is that a problem?
- What can we do?
- Byte/bit stuffing: an ``escape'' sequence:
- SOH becomes ESC x.
- EOT becomes ESC y.
- Are we done? No: ESC becomes ESC z.
- Are we done? What about ESC z in the source block?
- Why do we need to do this? It's overhead, after all.
- Common types of errors: bit, vertical, burst.
- How do we detect errors?
- Must add redundancy.
- Goals: maximize detection, minimize overhead.
- Parity checking.
- What is it?
- Computed across bytes.
- How effective? (Only catches odd # of bit flips.)
- How costly? (12%)
- What is it?
- Computed across 16- or 32-bit chunks of data.
- Vulnerable to vertical errors.
- Better error detection at no additional (bandwidth) cost.
- Needed hardware: XOR gates, shift registers.
XOR truth table.
Shift register operations: initialize/clear, shift, (hold).
- Example CRC circuit:
- Complex interactions between bits in a packet. A single bit
``counts'' more than once.
- Minimize cost.
- High reliability.
- Point-To-Point networks.
- connections --- expensive.
- Does not scale well.
- Used for long-haul networks.
- LANs: a shared communication medium.
- Principle of locality: temporal, physical/spatial.
- Star: what you have with a hub.
Hub broadcasts everything.
Nodes on a ring retransmit data.
How can a star be a bus?
- Shared bus.
- Speeds: 10 Mbps, 100 Mbps, gigabit.
- CSMA --- ``carrier'' sense multiple access. Listen before
- CD --- collision detection. Listen to what you've transmitted.
- Binary exponential backoff. Upon collision, wait for up to d time
units, randomly chosen, before retransmitting.
The exponential part.
- What is a token?
- How do I transmit on the token ring?
- ``Pass'' nodes.
- How do I receive? How do I know it's for me?
Why is this efficient: Layering. The NIC is responsible for determining
which host a message is for, etc., not the CPU.
- Transmitter can do error detection.
(Asynchronous Transfer Mode)
- Star switch, not a bus.
- Full duplex, so two fiber strands needed. (Fiber doesn't allow for
- Fast: 155 Mbps and up.
Thomas P. Kelliher
Mon Feb 7 10:02:56 EST 2000