Вы находитесь на странице: 1из 17

Network Design 16.

583/483 Spring 2010

University of Massachusetts Lowell

Network Design 16.583/483


Spring 2010

Class 2
Direct Link Networks

Prepared by: Dr. Hani Al-Dayaa (hani_aldayaa@uml.edu)

Lecture Outline
Hardware Building Blocks Encoding Framing Error Detection Reliable Transmission Ethernet Rings Wireless

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Hardware Building Blocks


Nodes
General-Purpose Computers (e.g. desktop workstation)
Can serve as a host that users run application programs on. Can be used inside a network as a switch that forwards messages from one link to another. Can be configured as a router that forwards internet packets from one network to another.

Workstation Architecture
Memory is finite. It is one of the two scarce resources in the network.
Q: What is the other one? A: Link Bandwidth

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

Hardware Building Blocks (contd)


Nodes (contd)
Network Adaptor
It connects the rest of the workstation to the link. It transmits data from the workstation onto the link and receives data from the link onto the workstation. It has two main components:
A Bus interface for how to communicate with the host. A Link interface for how to use the link.

It exports a Control Status Register (CSR) that is readable and writable from the CPU.

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Hardware Building Blocks (contd)


Nodes (contd)
Network Adaptor (contd)
There are 2 basic mechanisms of data transfer between adaptor and the host memory
Direct Memory Access (DMA): The adaptor directly reads and writes
the hosts memory without any CPU involvement.

Programmed I/O (PIO): The CPU is directly responsible for moving


data between the adaptor and the host memory.

There are 2 potential problems:


Overhead involved in each bus transfer Memory bandwidth limitations

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

Hardware Building Blocks (contd)


Links
Implemented on a variety of different physical media, including twisted pair, coaxial cable, optical fiber, and space (wireless). Used to propagate signals: electromagnetic waves traveling at speed of light
Frequency: Oscillation rate, measured in hertz. Wavelength: Distance between a pair of adjacent maxima or minima of
a wave, typically measured in meters.
Wavelength = SpeedOfLightInMaterial / Frequency

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Encoding

NRZ (NonReturn to Zero)


Map the data value 1 onto the high signal and the data value 0 onto the low signal. The Baseline Wander problem
Average of signal is used to distinguish between low and high signals: Lower than average leads to 0; higher than average leads to 1. Too many consecutive 1s or 0s cause average to change.

The Clock Recovery problem


Frequent transitions from high to low and vice versa is necessary to enable clock recovery. Transmitter and receiver clocks have to be precisely synchronized.
Network Design 16.583/483 Spring 2010 University of Massachusetts Lowell 7

Encoding (contd)
NRZI (NonReturn to Zero Inverted)
Make a transition from current signal to encode a 1 and stay at current signal to encode a 0. The problem of consecutive 1s is solved, but the problem of consecutive 0s is not.

Manchester Encoding (or Differential Manchester)


Transmit XOR of the NRZ-encoded data and the clock. Bit rate is half the Baud rate, so encoding is only 50% efficient.

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Encoding (contd)
4B/5B
Every 4 bits of data are encoded in a 5-bit code. 5-bit codes are selected to have no more than one leading 0 and no more than two trailing 0s. Thus, never get more than 3 consecutive 0s. Resulting 5-bit codes are transmitted using NRZI. It achieves 80% efficiency.
4-Bit Data Symbol
0000 0001 0010 0011 1100 1101 1110
Network Design 16.583/483 Spring 2010

5-Bit Code
11110 01001 10100 10101 11010 11011 11100
University of Massachusetts Lowell

1111

11101

Framing
Break sequence of bits into a frame. Typically implemented by network adaptor.

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

10

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Framing (contd)
Byte-Oriented Protocols
Sentinel-Based Approach
BISYNC: STX is a start of text pattern. ETX is end of text pattern.

PPP: Flag is a special pattern, usually 01111110.

Problem: Special pattern may appear in the payload. Solution: character stuffing
DLE: Data Link Escape. Preceding DLE .

Byte-Counting Approach
Include payload length in header. DDCMP Problem: Count field corrupted. Solution: Catch when CRC fails. University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

11

Framing (contd)
Bit-Oriented Protocols
Not concerned with byte boundaries SDLC (Synchronous Data Link Control) HDLC (High-Level Data Link Control)

Clock-Based Framing
Each frame is 125s long. SONET (Synchronous Optical Network)

Network Design 16.583/483 Spring 2010

STS-N (STS-1 runs at 51.84 Mbps) University of Massachusetts Lowell

12

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Error Detection
Two-Dimensional Parity
Add one extra bit to a 7-bit code to balance the number of 1s in the byte
Example: Even parity sets the 8th bit to 1 if needed to give a even
number of 1s in the byte.

Internet Checksum Algorithm


Add up all the words that are transmitted then transmit the result of that sum. The result is called the checksum. Receiver performs the same calculation on the received data and compares the result with the received checksum. Sum using 16-bit 1s-comp arithmetic. Take 1s-comp of result.
Network Design 16.583/483 Spring 2010 University of Massachusetts Lowell 13

Error Detection (contd)


Cyclic Redundancy Check (CRC)
Represent (n+1)-bit message by a n-degree polynomial.
Message = 10011010 corresponds to M(x) = x7 + x4 + x3 + x

Process:
Let k be the degree of divisor polynomial sender and receiver agree on. For example, C(x) = x3 + x2 + 1; k = 3. Transmit polynomial P(x) that is evenly divisible by C(x).
Shift left by k bits. i.e. Multiply by xk. T(x) = M(x)xk. Find R(x) remainder of T(x) / C(x). Subtract R(x) from T(x). i.e. T(x) R(x).

Receiver polynomial is P(x) + E(x)


E(x) = 0 implies no errors.

Divide (P(x) + E(x)) by C(x). Remainder is zero if:


E(x) was zero (no error), or E(x) is exactly divisible by C(x).

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

14

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Error Detection (contd)


Some Common CRC Polynomials
CRC-16; C(x) = x16 + x15 + x2 + 1 (final result = 0xb001). CRC-CCITT; C(x) = x16 + x12 + x5 + 1 (final result = 0xf0b8).

Selection of C(x)
All single-bit errors, as long as the xk and x0 terms have nonzero coefficients. All double-bit errors, as long as C(x) has a factor with at least three terms. Any odd number of errors, as long as C(x) contains the factor (x+1). Any burst error for which the length of the burst is less than k bits.

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

15

Reliable Transmission
Stop-and-Wait
After transmitting one frame, the sender waits for an acknowledgment before transmitting the next frame. If acknowledgment does not arrive after a certain period of time, the sender times out and retransmits the original frame. Problem: Only one outstanding frame on the link at a time.
Example:
1.5-Mbps link with 45-ms RRT. Delay x Bandwidth = 67.5 Kb 8KB One frame per RTT, with a frame size of 1KB, Maximum sending rate = Bits Per Frame / Time Per Frame = 1024 x 8 / 0.045 = 182 Kbps About 1/8th of the link capacity only!

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

16

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Reliable Transmission (contd)


Sliding Window
Allow multiple outstanding (un-ACKed) frames. Upper bound on un-ACKed frames is called window.

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

17

Reliable Transmission (contd)


Sliding Window Algorithm for Sender
Assign sequence number to each frame (seqNum) Maintain three state variables
Send window size (SWS) outstanding un-ACKed frames Last acknowledgment received (LAR) Last frame sent (LFS)

Maintain invariant: LFS LAR <= SWS

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

18

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Reliable Transmission (contd)


Sliding Window Algorithm for Receiver
Maintain three state variables Receive window size (RWS) Largest frame acceptable (LFA) Last frame received (NFE) Maintain invariant: LFA LFR <= RWS

Frame SeqNum arrives


If LFR < SeqNum <= LFA Accepted If SeqNum <= LFR or SeqNum > LFA Discarded

Send cumulative ACKs.

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

19

Reliable Transmission (contd)


Concurrent Logical Channels
Multiplex 8 logical channels over a single link. Run stop-and-wait on each logical channel. Maintain three state bits per channel
Channel Busy Current Sequence Number Out Next Sequence Number in

Header: 3-bit channel number; 1-bit sequence number


4 bits total Same as sliding window protocol

It separates reliability from order.

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

20

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Ethernet (802.3)
History
Developed by Xerox PARC in mid-1970s. Roots in Aloha Packet Radio Network. Standardized by Xerox, DEC, and Intel in 1978. Similar to IEEE 802.3 standard.

CSMA/CD
Carrier Sense: Nodes can detect between an idle and busy link. Multiple Access: A set of nodes send and receive frames over a
shared link.

Collision Detection: A node can detect when a frame it is transmitting


has interfered (collided) with a frame transmitted by anther node.

Frame Format

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

21

Ethernet (802.3) (contd)


Addresses
Unique, 48-bit uncast address attached to each adapter.
Example: 8:0:e4:b1:2

Broadcast: all 1s Multicast: First bit is 1 Bandwidth: 10Mbps, 100Mbps, 1Gbps Length: 2500m (500m with 4 repeaters) Problem: Distributed algorithm to provide fair access Physical Characteristics

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

22

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Ethernet (802.3) (contd)


Transmit Algorithm
If the line is idle
Send immediately Upper bound size message of 1500 bytes Must wait 9.6 s between back-to-back frames

If line is busy
Wait until idle and transmit immediately Called I-persistent (special case for P-persistent)

If collision
Jam for 32 bits then stop transmitting frames Minimum frame is 64 bits (header + 46 bytes of data) Delay and try again
1st time: 0 or 51.2 s
2nd time: 0, 51.2, or 102.4 s 3rd time: 51.2, 102.4, or 153.6 s nth time: k x 51.2 s, for randomly selected k = 0, 1, 2, 4, , 2n -1.
Network Design 16.583/483 Spring 2010 University of Massachusetts Lowell 23

Ethernet (802.3) (contd)


Transmit Algorithm (contd)
Worst-case scenario
(a) A sends a frame at time t. (b) As frame arrives at B at time t+d. (c) B begins transmitting at time t+d and collides with As frame. (d) Bs runt (32-bit) frame arrives at A at time t+2d.

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

24

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Rings (802.5, FDDI, RPR)


Examples
16 Mpbs IEEE 802.5 (based on earlier IBM ring)

100 Mbps Fiber Distributed Data Interface (FDDI) Resilient Packet Ring (RPR)

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

25

Rings (802.5, FDDI, RPR) (contd)


Concept
Frames flow in one direction, upstream to downstream. A special bit batter (token) rotates around ring. Must capture token before transmitting. Release token after done transmitting
Immediate release Delayed release

Remove your frame when it comes back around. Stations get round-robin service.

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

26

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Rings (802.5, FDDI, RPR) (contd)


Token Ring Maintenance
Token Holding Time (THT)
How long a given node is allowed to hold the token.

Token Rotation Time (TRT)


How long it takes the token to traverse the ring. TRT = NumStations x THT + RingLatency

Target Token Rotation Time (TTRT)


Agreed-up upper bound on TRT

Each station/node measures TRT between successive tokens


If TRT > TTRT, token is late; dont send. If TRT TTRT, token is early; ok to send.

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

27

Wireless
A Wireless Network Using a Base Station

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

28

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Wireless (contd)
A Wireless Ad-Hoc or Mesh Network

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

29

Wireless (contd)
Bluetooth (IEEE 802.15.1)
Very short range communication between mobile phones, PDA, notebook computers, or other personal or peripheral devices. It operates at 2.5 GHz. Range is about 10 m. Version 2.0 provides bandwidth up to 2.1 Mbps. Basic network configuration is called Piconet.

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

30

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Wireless (contd)
Wi-Fi (IEEE 802.11)
802.11b provides up to 11 Mbps. 802.11g uses OFDM (Orthogonal Multiplexing) and delivers up to 54 Mbps. Collision Avoidance
Same as Ethernet. Problem: The hidden node problem Problem: The exposed node problem

Frequency

Division

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

31

Wireless (contd)
Wi-Fi (IEEE 802.11) (contd)
Distribution System: Some nodes are allowed to roam (e.g. laptop),
and some are connected to a wired network infrastructure.

Frame Format

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

32

University of Massachusetts Lowell

Network Design 16.583/483 Spring 2010

Wireless (contd)
Wi-Max (IEEE 802.16)
Worldwide Interoperability for Microwave Access Last-mile technology, classified as a Metropolitan Area Network (MAN) Client systems are called subscriber stations and are not enduser computer devices but multiplex all the communication of the computing devices being used in a particular building.

Cell Phone Technologies


Obvious approach to mobile computer communication. The base station is called a cell. 1G standard was analog. 2G standard was digital and is referred to as GSM (Global System for Mobile Communications)
A combination of FDM and TDM Use of compression algorithms tailored to human speech

3G standard
Shaping a single international standard that would provide much higher data bandwidth

4G standard is in the works.


Network Design 16.583/483 Spring 2010 University of Massachusetts Lowell 33

For Next Class


Read Chapter 2 and Chapter 3 in the textbook. Solve Chapter 2 Exercises: 1, 2, 6, 19 and 41.

Network Design 16.583/483 Spring 2010

University of Massachusetts Lowell

34

University of Massachusetts Lowell

Вам также может понравиться