COM 360 - PowerPoint PPT Presentation

1 / 195
About This Presentation
Title:

COM 360

Description:

GSM- Global System for Mobile Communication in the rest of the world. ... Flag denotes the start-of-text character, address and control fields contain default values. ... – PowerPoint PPT presentation

Number of Views:190
Avg rating:3.0/5.0
Slides: 196
Provided by: sfr4
Learn more at: http://faculty.sjcny.edu
Category:
Tags: com | flags | of | printable | the | world

less

Transcript and Presenter's Notes

Title: COM 360


1
COM 360
2
Chapter 2
  • Direct Link Networks

3
Network Technologies
  • Point-to-Point Links
  • Carrier Sense Multiple Access ( CSMA) (for
    example the Ethernet)
  • Token Rings (for example IEEE 802.5 and FDDI )
  • Wireless (for which 802.11 is the emerging
    standard)

4
Problems
  • Connecting computers is a first step.
  • There are additional problems to solve before
    they can exchange packets
  • Encoding bits into the transmission medium
  • Framing the bits so they can be understood
  • Error detection
  • Reliable delivery, in spite of occasional errors
  • Media access control

5
Hardware Building Blocks
  • Networks are constructed from nodes and links
  • Nodes are general purpose computers such as
    workstations, multiprocessors or PCs as well as
    special purpose switches, routers.
  • Memory finite must be managed
  • Network Adapter (NIC) and its device driver
  • Links implemented on physical media, such as
    twisted pair, coaxial cable, optical fiber

6
Nodes
Example workstation architecture
7
Links
  • Physical media are used to propagate signals as
    electromagnetic waves, traveling at the speed of
    light.
  • Properties of EM waves
  • Frequency- or oscillations, measured in hertz
  • Wavelength distance between adjacent maxima and
    minima, measured in meters

8
Electromagnetic Waves
  • Wavelength speed / frequency
  • Voice grade phone lines carry waves ranging from
    300 Hz to 3300 Hz
  • Voice-grade example 300Hz in copper wire
  • Wavelength Speed in Copper/ Frequency
  • 2/3 x 3 x 108 /300
  • 667 x 103 meters

9
Electromagnetic Spectrum
10
Links
  • A link is a physical medium carrying signals in
    the form of electromagnetic waves.
  • Binary data is encoded in the signal.
  • Lower layer is concerned with modulation, varying
    the frequency, amplitude or phase of the signal
  • Upper layer is concerned with encoding the data

11
Link Attributes
  • Another link attribute is how many bit streams
    can be encoded on it, at a given time.
  • One bit stream- connected nodes share access
  • Point-to-point often two bit streams at once
  • Full duplex - two directions simultaneously
  • Half duplex one direction at a time
  • Simplex one direction

12
Cables
  • Type of cable depends on technology
  • Coaxial ( thick and thin) within buildings
  • Category 5 ( CAT 5) twisted pair, thicker gauge
    than telephone wire
  • Fiber plastic or most often glass, more
    expensive, but used to connect buildings, and
    transmits light instead of electrical waves.

13
Local Link Cables
14
Leased Lines
  • To connect nodes on opposite sides of the
    country, or at great distances, you must lease a
    dedicated line from the telephone company.
  • DS1, DS3, T1, and T3 are relatively old
    technologies, defined for copper
  • STS-N links are for optical fiber (Synchronous
    Transport Signal), also called OC-N for Optical
    Carrier
  • Originally designed for voice, today can carry
    data, voice and video

15
Common Bandwidths
16
Last-Mile links
  • Leased lines range in price from 1000/month to
    dont ask
  • Last mile links span the last mile from the
    network service provider to the home or office.
  • Conventional modem- POTS (plain old telephone
    service)
  • ISDN (Integrated Services Digital Network)
    uses CODEC ( coder/decoder) to encode analog to
    digital signal
  • xDSL (Digital Subscriber Line)
  • Cable modem- uses cable television (CATV)
    infrastructure, available to 95 of US households

17
Common Available Services
18
xDSL
  • Collection of technologies, able to transmit data
    at high speeds over standard twisted pair lines
  • ASDL ( Asymmetric Digital Subscriber Line)-
    different speeds in different directions
    (upstream and downstream) called local loop
  • VDSL- (Very high rate Digital Subscriber Line)-
    runs over shorter distances fiber to
    neighborhood

19
ADSL
downstream
upstream
ADSL connects the subscriber to the central
office via the local loop.
20
VDSL
VDSL connects the subscriber to the optical
network that reaches the neighborhood.
21
Shannons Theorem
  • Shannons theorem gives an upper bound to the
    capacity of a link, in terms of bits per second.
  • C B log2 (1S/N)
  • where C is channel capacity, B is Bandwidth, S
    is signal power, N is noise and S/N is the signal
    to noise ratio expressed in decibels, related as
  • dB 10 x log10 (S/N)

22
Shannons TheoremExample
  • dB ratio pf 30 dB
  • S/N 1000
  • Bandwidth 3000Hz
  • C B x log2 ( 1S/N)
  • C 3000 x log2 (1001)
  • C 30 Kbps
  • roughly the limit of a 28.8 modem
  • How are 56 Kbps modems possible? See p. 76

23
CATV
  • A subset of CATV channels are made available for
    transmitting digital data
  • A single CATV channel has a bandwidth of 6 MHz
  • Like ADSL, CATV is asymmetric with downstream
    rates much greater than upstream
  • 40 Mbps downstream ( 100 Mbps max)
  • 20 Mbps upstream ( roughly half as much)
  • Unlike DSL, bandwidth is shared among all
    subscribers in a neighborhood.

24
Network Adaptor
Signals travel between signaling components. Bits
flow between adaptors. Network interface cards
are called NICs.
25
Network Adaptors
  • Nearly all the functions in this chapter are
    implemented in the network adaptor (NIC)
  • framing, error detection and the media access
    protocol.
  • The exceptions are the point-to-point automatic
    repeat-request schemes(ARQ), which are
    implemented at the lowest level protocol running
    on the host.

26
Block Diagram of a Network Adaptor
27
Interrupts
  • The host only pays attention to the network
    device when the adaptor interrupts the host, (for
    example, when a frame has been transmitted or one
    arrives).
  • A procedure is invoked by the operating system,
    and an interrupt handler is invoked to take the
    appropriate action.
  • While servicing this interrupt, the OS disables
    other interrupts.

28
Direct Memory Access vs. Programmed I/O
  • There are two ways to transfer the bytes from the
    frame between the adaptor and host memory
  • Direct Memory Access (DMA)- the NIC directly
    reads/writes to the hosts memory without CPU
    involvement, using a pair of buffer descriptor
    lists.
  • Programmed I/O (PIO)- network adaptor (NIC)
    copies message into its own buffer, until CPU can
    copy it into the host memory.

29
Programmed I/O
30
Memory Bottleneck
  • Host memory is often a limiting factor in network
    performance.
  • I/O bus speed corresponds to its peak bandwidth
    (bus width x clock speed).
  • Real limitation is the size of the data block
    being transferred ( See p. 145)
  • Memory/CPU bandwidth is same as bandwidth of I/O
    bus.
  • Must be aware of limits memory puts on network

31
Memory Bandwidth on Modern PC
32
Wireless Links
  • AMPS- Advance Mobile Phone System- standard for
    cellular phones
  • PCS- Personal communication Services digital
    cellular services in US and Canada
  • GSM- Global System for Mobile Communication in
    the rest of the world.
  • They use a system of towers to transmit signals
    and are moving toward ringing the globe with
    satellites.

33
Local Wireless Links
  • Radio and infrared portions of the spectrum can
    be used over short distances.
  • Technology- limited to in-building environments
  • Radio bands at 5.2 GHz and 17 GHz are allocated
    to HIPPERLAN in Europe and 2.4 GHz for use with
    the IEEE 802.11 standard, which supports data
    rates up to 54 Mbps.
  • Bluetooth radio, operates in the 2.45 GHz band
  • Used for all devices, printers, PDAs, phones
  • Networks of these devices are called piconets

34
Bit Rates and Baud Rates
  • Rate at which the signal changes is called the
    baud rate.
  • When one bit is transmitted on a signal, the bit
    rate and baud rate may be equal.
  • Often multiple bits are encoded onto a signal,
    where for example with 4 bits per signal, the
    baud rate may be 4 times the bit rate

35
Encoding
  • First step in turning nodes and links into usable
    building blocks is to understand how to connect
    them so that bits can be transmitted.
  • Next encode binary data that the source want to
    send into signals that the links can carry and
    then decode the data back into the corresponding
    data at the receiving end.
  • The high and low signals correspond to 2
    different voltages on a copper based system or 2
    different power levels on an optical link.

36
NRZ Encoding
  • NRZ non-return to zero, maps the data value 1
    to the high signal and 0 to the low signal
  • A sequence of several consecutive 1s means that
    the signal stays high for a prolonged period of
    time.
  • Two fundamental problems
  • Baseline wander makes it difficult to detect a
    significant change in the signal
  • Clock recovery needs frequent changes from high
    to low to be enabled
  • Sender and receiver clock must be precisely
    synchronized.

37
NRZ Encoding
38
NRZI Encoding
  • NRZI non-return to zero inverted, addresses the
    previous problem, by having the sender make a
    transition from the current signal to encode a 1
    and stay at current signal to encode a 0. (
    Solves the problem of consecutive 1s, but not
    0s)

39
Manchester Encoding
  • Merges the clock with the signal by transmitting
    the exclusiveOR of the NRZ encoded data.
  • Results in 0 being encoded as a low-to-high
    transition and 1 encoded as a high-to-low
    transition. Because both 0s and 1 result in a
    transition, the clock can be recovered at the
    receiver.
  • Problem doubles the rate at which transitions
    are made on the link, which gives receiver half
    the time to detect them.

40
Encoding Strategies
41
4B/5B Encoding
  • Attempts to address the inefficiency of
    Manchester encoding.
  • It inserts extra bits into the bit stream to
    break up long sequences of 0s and 1s
  • Every 4 bits of data are encoded in a 5 bit code
  • (See table 4B/5B encoding on p. 79)

42
Packets and Frames
  •   Packet is generic'' term that refers to a
    small block of data.
  •   Each hardware technology uses a different
    packet format.
  •   Frame or hardware frame denotes a packet of a
    specific format used on a specific hardware
    technology.

43
Framing
  • Blocks of data (frames), not bit streams, are
    exchanged between nodes.
  • The network adapter (NIC) enables the nodes to
    exchange frames.
  • Recognizing what set of bits constitutes a frame,
    and where the frame begins and ends, is the
    challenge faced by the network adapter.

44
Frame Format
  •    Need to define a standard format for data to
    indicate the beginning and end of the frame
  •    Header and trailer used to frame'' the data
    (SOH and EOT)
  •   Can choose two unused data values for framing
    for example, if data is limited to printable
    ASCII characters, you can use
  •   start of header'' (soh)
  •   end of text'' (eot)

45
Frame Format
  • Framing in Practice
  •   Incurs extra overhead - soh and eot take time
    to transmit, but carry no data
  •   Accommodates transmission problems
  •   Missing eot indicates sending computer crashed
  •   Missing soh indicates receiving computer
    missed beginning of message
  •   Bad frame is discarded

46
Framing
  • Suppose A wishes to transmit a frame to B
  • It tells adapter to transmit a frame from the
    nodes memory
  • A sequence of bits is sent over the link
  • The adapter on B then collects the sequence of
    bits arriving on the link and deposits them in
    Bs memory.

47
Framing
Bits flow between adaptors, frames between hosts
48
Framing
  • There are several approaches to the framing
    problem
  • Byte-Oriented Protocol (PPP)
  • Sentinel Approach (frame start and end)
  • Byte counting
  • Bit Oriented Approach (HDLC)
  • Clock-based framing (SONET)

49
Byte-Oriented protocols
  • One of the oldest approaches to framing is to
    view each frame as a collection of bytes
    (characters) rather than bits.
  • BISYNC (Binary Synchronous Communication)
    protocol is a byte-oriented approach developed by
    IBM in 1960s
  • DDCMP ( Digital Data communication Message
    Protocol) was used in Digital Equipments DECNET.
  • These are examples of the sentinel approach and
    the byte counting approach.

50
Sentinel Approach
  • A packet is a sequence of labeled fields.
  • Above each field is a number indicating the
    number of bits in the field.
  • Packets are transmitted beginning with the
    leftmost field. The beginning of the frame is the
    SYN (synchronization) character.
  • Data is contained between sentinel characters
    STX (start of text) and ETX (end of text).
  • The header begins with a SOH (start of header)
    field.
  • It ends with a CRC (cyclic redundancy check)
    field.

51
BISYNC Frame Format
52
Framing problem
  • ETX character may appear in the data.
  • BISYNC overcomes this by using byte-stuffing or
    character-stuffing by preceding the ETX character
    with an escape character or DLE (data link
    escape (similar to \n or \t in programming)
  • CRC (cyclic redundancy check) is used to detect
    transmission errors.

53
Point-To-Point Connection
  •  The first computer communication systems were
    connected by communication channels that
    connected exactly two computers.
  •  Called a mesh or point-to-point network
  •  Had three useful properties
  • 1. Each connection was independent and different
    hardware could be used. (bandwidth, modems, etc.
    did not have to be the same)
  • Allow for greater flexibility.
  • 2.  The connected computers have exclusive access
    and could decide how to send data across the
    connection. The can determine the frame format
    and size, error detection mechanism, etc.
  • 3.  Since only two computers share the channel it
    is private and secure.

54
Disadvantages of Point-To-Point
  • 1.  Number of wires grows as the number of
    computers increases
  • 2.  The total number of connections exceeds the
    number of computers being connected.
  • The number of connections needed is proportional
    to the square of the number of computers, since
    the new computer must have a connection to each
    of the existing computers. So to add the Nth
    computer requires N-1 new connections.

55
Disadvantages of Point-To-Point
  • For N computers
  • Connections (N2 - N)
  •   2

56
Point-to-Point Protocol
  • Point-to-Point Protocol (PPP) is run over dialup
    modem links and is similar to BISYNC.
  • Flag denotes the start-of-text character, address
    and control fields contain default values.
  • The protocol is the high level protocol, such as
    IP or IPX.
  • Payload size is usually 1500 bytes.
  • Checksum field is either 2 or 4 bytes long.

57
PPP Frame Format
58
PPP Framing
  • PPP framing is unusual in that several of the
    field sizes are negotiable rather than fixed.
  • The negotiation is conducted by the LCP (Link
    Control Protocol) Protocol.
  • PPP and LCP work in tandem
  • LCP sends control messages encapsulated in PPP
    frames denoted by an LCP identifier
  • Changes PPs frame format based on the
    information contained in the control messages.
  • LCP also establishes a link between the peers
    when both sides detect the carrier signal.

59
Byte-Counting Approach
  • The alternative to detecting the end of a file
    with a sentinel value is to include the number of
    items in the file at its beginning.
  • This is true in framing- the number of bytes in a
    frame can be included in the header.
  • DDCMP protocol uses this approach and the COUNT
    field specifies the number of bytes in the
    frames body.

60
DDCMP Frame Format
61
Framing Errors
  • A transmission error could corrupt the COUNT
    field and the end of the frame would be
    incorrectly detected.
  • A similar problem exists with the ETX field being
    corrupt.
  • This is called a framing error.
  • The receiver waits for the next SYN character to
    collect data for the next frame.
  • A framing error may cause back-to-back frames to
    be incorrectly received.

62
Bit-Oriented Protocols
  • Bit-oriented protocols are not concerned with
    byte boundaries. It views the frame as a
    collection of bits.
  • Synchronous Data Link Control ( SDLC), developed
    by IBM is a bit-oriented protocol, later
    standardized as the High Level Data Link Control
    (HDLC).
  • Uses bit sequence 01111110 to denote beginning
    and end of a frame.
  • It is also transmitted when the link is idle.

63
HDLC Frame Format
64
Data Stuffing
  • Networks usually insert extra bits or bytes to
    change data for transmission and this is called
    Data Stuffing
  •  Bit stuffing and byte stuffing are two
    techniques for inserting extra data to encode
    reserved bytes
  •  Byte stuffing translates each reserved byte
    into two unreserved bytes

65
Byte Stuffing
  •   Can use esc as prefix, followed by x for soh,
    y for eot and z for esc

66
Byte Stuffing
  •   Sender translates each reserved byte into the
    appropriate encoding pair of bytes
  •   Receiver interprets pairs of bytes and stores
    encoded byte in buffer
  • Data still framed by soh and eot

67
Bit Stuffing
  • Anytime 5 consecutive 1s are transmitted, the
    sender inserts a 0 before sending the next bit.
    On the receiving side.
  • When the receiver detects 5 consecutive 1s, it
    assumes the next 0 was stuffed and removes it.
  • If the next bit is a 1, either this is the end of
    frame marker or an error has occurred.
  • Size of the frame is dependent on the data being
    sent in the frame payload.

68
Clock-Based Framing
  • Third approach to framing is the Synchronous
    Optical Network (SONET) standard, called
    clock-based framing.
  • SONET was proposed by Bell Communications
    Research (Bellcore) for digital transmission over
    an optical fiber.
  • Addresses the framing and encoding problems as
    well as multiplexing low speed links onto a high
    speed link.
  • More complex protocol

69
SONET Framing
  • SONET Frame has special information that
    indicates where the frame starts and ends.
  • No bit stuffing is used
  • How does receiver know where the frame starts and
    ends?
  • Frame consists of 9 rows of 90 bytes each.
  • First 3 bytes of each row are overhead.
  • First two bytes of frame contain special bit
    pattern
  • Use of overhead bytes is complex

70
SONET STS-1 Frame
First two bytes of the frame contain a special
bit pattern that indicates the start of the frame
71
STS-1 Multiplexing
Three STS-1 frames are multiplexed onto one STS-3
frame.
72
SONET Frames Out of Phase
73
Error Detection
  • Bit errors occur in frames due to electrical
    interference or thermal noise.
  • Detecting errors is one part of the problem
    correcting errors is the other.
  • What happens when an error is detected?
  • Two basic approaches
  • Notify the sender that message is corrupt so the
    sender can retransmit it ( most often used in
    every day applications)
  • Use an error-correcting code to reconstruct the
    correct message

74
Transmission Errors
  •  External electromagnetic signals can cause
    incorrect delivery of data
  •  Data can be received incorrectly
  •   Data can be lost
  •  Unwanted data can be generated
  •   Any of these problems are called transmission
    errors

75
Error Detection
  • Detecting Transmission Errors basic idea is to
    add redundant information to a frame that can
    determine if errors have been introduced.
  • Two-dimensional parity based on a simple parity
    bit added to balance the number of 1s
  • Checksums code created based on addition
  • Cyclic Redundancy Check (CRC) based on a
    complex mathematical algorithm and used in nearly
    all link level protocols.

76
Parity
  •   Parity refers to the number of bits set to 1
    in the data item
  •   Even parity - an even number of bits are 1
  •   Odd parity - an odd number of bits are 1
  •   A parity bit is an extra bit transmitted with
    a data item,chose to give the resulting bits even
    or odd parity
  •   Even parity - data 10010001, parity bit 1
  • Odd parity - data 10010111, parity bit 0

77
Parity and Error Detection
  •   If noise or other interference introduces an
    error, one of the bits in the data will be
    changed from a 1 to a 0 or from a 0 to a 1
  •   Parity of resulting bits will be wrong
  •   Original data and parity 100100011 (even
    parity)
  •   Incorrect data 101100011 (odd number of 1s)
  •   Transmitter and receiver agree on which parity
    to use
  •   Receiver detects error in data with incorrect
    parity

78
Limitations of Parity Checking
  •   Parity can only detect errors that change an
    odd number of bits
  •   Original data and parity 100100011 (even
    parity)
  •   Incorrect data 101100111 (even parity!)
  •   Parity usually used to catch one-bit errors

79
Two-Dimensional Parity
  • Two-dimensional parity involves adding on extra
    bit to balance the number of 1s in each byte
    (making the total either even or odd).
  • Two-dimensional parity does a similar calculation
    for each bit position across all the bytes in the
    frame, resulting in adding an extra parity byte
    for the frame as well as an additional parity bit
    for each byte.
  • Two-dimensional parity catches all the one, two
    and 3 bit errors and most 4 bit errors.

80
Two-Dimensional Parity
81
Probability and Error Detection
  •   All error detection methods are approximate
    and aim at a low probability of accepting
    corrupted data.
  • Parity can detect a single bit error, but not all
    possible errors, especially where two bits ( or
    an even number of bits) are changed.
  •   Many alternative schemes exist
  •    Detect multi-bit errors
  •    Correct errors through redundant information
  • Checksum and CRC are two widely used techniques

82
Internet Checksum Algorithm
  • Simple idea add up all the words that are to be
    transmitted and then transmit the sum, called the
    checksum, with the data.
  • The receiver performs the same calculation and
    compares it to the checksum received. If they do
    not match, an error has occurred.
  • Does not detect all errors
  • Algorithm is easy to implement ( See p. 94)

83
Checksum
  •   Sum of data in message treated as array of
    integers
  •   Can be 8-,16- or 32-bit integers
  •   Typically use 1s-complement arithmetic
  •   Example -16-bit checksum with 1's complement
    arithmetic

84
Advantages of Checksum
  •    Fastest implementations of 16-bit checksum
    use 32-bit arithmetic and add carries in at end
  •    Easy to do - uses only addition
  •    Small size of checksum means cost of
  • transmitting it is small.
  • Ease of computation to create and verify
    checksum.

85
Checksum Limitations
  •  Does not detect all common errors (like
    reversed bits)

86
Cyclic Redundancy Check (CRC)
  • CRC uses powerful mathematics ( finite fields) to
    give strong protection against common bit errors
    in messages that are thousands of bytes long.

87
Detecting Errors with Cyclic Redundancy Checks 
  •  Consider data in message as coefficients of
  • a polynomial
  •  Divide that coefficient set by a known
  • polynomial
  •  Transmit remainder as CRC
  •  Good error detection properties
  •  Easy to implement in hardware

88
CRC Hardware
  •   The hardware used to computer a CRC is a shift
    register, which act like a tunnel through which
    bits move in a single file from right to left.
  •   The shift register holds a fixed number of
    bits so when a new bit moves in, another bit
    moves out.
  •   The output gives the value of the leftmost
    bit.
  •   When a bit changes, the output changes.
  •   The shift register has two operations
    initialize and shift.
  •   Initialize sets all bits to zero
  •    Shift moves all bits one position to the
    left.

89
CRC Hardware
  • X-Or and Shift Registers

90
CRC Hardware
  • CRC Hardware consists of 3 shift registers
    connected with X-Or units.
  • Output from the leftmost unit goes to 3 places
    simultaneously - the
  • 3 X-Or units.
  • To compute the CRC values in all registers are
    initialized and the bits are shifted one at a
    time.
  • One bit of the message is applied to the input
    unit and all three registers perform a shift.
    This repeats for each bit of the message.

91
CRC Calculation using Shift Registers
92
CRC Computation
  • After an entire message has been input, the shift
    registers contain the 16 bit CRC for the message.

93
CRC Computation
  • A CRC can compute more errors that a simple
    checksum because
  •   An input bit is shifted through 3 registers
  •   The hardware uses feedback so that the effect
    from a single bit cycles through the shift
    registers more than once.
  • Mathematically a CRC uses a polynomial to divide
    the message
  • P(X) x 16 X 12 X 5 1

94
Example CRC
  • A message is treated as a long binary
    polynomial, P.
  • Before transmitting, the data link layer divides
    P,
  • by a fixed polynomial function G(x), resulting
    in a
  • whole quotient Q and a remainder R/G. The
  • remainder is appended to the message and
  • transmitted.
  • It is checked by the receiver to see if R agrees
    with the locally generated  value for R. (See
    Tanenbaum p.208-210 for analysis)  
  •  

95
Example CRC
  • Frame P 1101011011
  • Generating function G(x) 10011
  • Message after appending 4 zero bits
    11010110110000
  • Divide P by G to get remainder R
  • 1100001010 with R
    1110  
  • 10011 11010110110000  
  •  
  • Transmitted frame with remainder R appended
    11010110111110

96
Accuracy of CRC
  • CRC actually adds 8, 16, 24, or 32 bits to the
    message.
  • This method detects up to 99.969 of errors with
    CRC-8 and nearly 99.9 with CRC-16 or CRC-24.  

97
Another CRC Example
See text. Pp. 94-95
98
Error Correction or Error Detection?
  • When error is detected, frame is discarded and
    resent, using bandwidth and causing latency,
    waiting for its arrival.
  • Error correction requires additional bit to be
    sent with every frame.
  • Correction is useful when
  • 1) errors are probable or
  • 2) the cost of retransmission is too high

99
Reliable Transportation
  • A data link level protocol that wants to deliver
    frames reliably must recover from discarded (
    lost) frames.
  • Acknowledgements - (ack) is a small control frame
    that a protocol sends back to report that it has
    received the frame. If the sender does not
    receive a frame in a reasonable amount of time,
    it retransmits.
  • Timeouts -waiting a reasonable mount of time is
    called a timeout

100
Automatic Repeat Request
  • Using acknowledgements and timeout to implement
    reliable delivery is called automatic repeat
    request (ARQ).
  • The simplest ARQ scheme is the Stop and Wait
    algorithm.

101
Stop and Wait
  • After transmitting one frame the sender waits for
    an ACK before transmitting the next frame.
  • If it does not arrive in a reasonable time, the
    sender retransmits the original frame.

102
Stop and Wait Algorithm
a) Arrives
c)ACK lost
b) Frame lost
d) Timeout too soon
103
Duplicate Frames
  • If a frame is late arriving another frame might
    be retransmitted, resulting in duplicate frames.
  • To correct this, a header usually contains a
    sequence number (0,1), which is used for
    alternate frames.
  • When sender retransmits frame 0, the receiver can
    see that it is a second copy of frame 0, not
    frame 1.

104
Timeline for Stop and Wait
105
Sliding Window Protocol
  •  Allows sender to transmit multiple packets
    before receiving an acknowledgment
  •  Number of packets that can be sent is defined
    by the protocol and called the window
  •  As acknowledgments arrive from the receiver,
    the window is moved along the data packets hence
    sliding window''
  •  Sliding window protocol can increase throughput
    dramatically

106
Sliding Window Protocol
  • Sliding window algorithm allows the transmission
    of a frame at about the same time as the ACK
    arrives.
  • Sender assigns a sequence number (SeqNum) to each
    frame and maintains 3 variables
  • Send window size (SWS) - of unacknowledged
    frames that sender can transmit
  • Last acknowledgement received (LAR)
  • Last frame sent (LFS)
  • LFS - LAR lt SWS

107
Sliding Window
108
Timeline for Sliding Window
109
Sliding Window
  • When ACK arrives, the sender moves LAR to the
    right, allowing the sender to transmit another
    frame.
  • Sender buffers up to SWS (send window size)
    frames (in case they need to be retransmitted).
  • It also associates a timer with each frame it
    transmits, so it can retransmit if an ACK is not
    received in time.
  • LAR Last Acknowledgement Received
  • LFS Last Frame Sent
  • See pp. 105-115 for details and for interactive
    demo see
  • http//www2.rad.com/networks/2004/sliding_window/d
    emo.html

110
Sliding Window on Sender
111
Sliding window
  • The receiver maintains 3 variables
  • The receive window size ( RWS) the upper bound
    on the number of out of order frames that the
    receiver can accept.
  • The sequence number of the largest acceptable
    frame (LAF)

112
Sliding Window on Receiver
113
Sliding Window Algorithm
  • When frame with sequence number SeqNum arrives,
    the receiver does the following
  • If SeqNum lt LFR or SeqNum gtLAF then frame is
    outside the window and is discarded.
  • If LFR lt SeqNum lt LAF, then it is accepted.
  • SeqNumToAck is largest not yet acknowledged
  • Receiver acknowledges receipt of SeqNumToAck and
    sets LFR SeqNumToAck
  • LAFLFR RWS

114
Comparison of Sliding Window and Stop Wait
115
Frame Order and Flow Control
  • Sliding Window can be used for
  • To reliably deliver frames on an unreliable link
  • To preserve the order in which the frames are
    transmitted, using the sequence numbers
  • To support flow control- a feedback mechanism by
    which the receiver is able to throttle the sender
    to keep it from overrunning the sender.

116
Concurrent Logical Channels
  • ARPANET Data Link protocol, or concurrent logical
    channels, is an alternative to sliding window
    protocol and can keep pipe full while using the
    simple stop and wait protocol.
  • It multiplexes several logical channels onto a
    single point-to-point link and runs the stop and
    wait protocol on each.

117
Ethernet (802.3)
  • The Ethernet is the most successful local area
    networking technology.
  • 1973- Developed at Xerox Park by Bob Metcalfe and
    David Boggs, it is a general form of the Carrier
    Sense Multiple Access with Collision Detection
    (CSMA/CD) technology.
  • Based on Aloha, early packet network developed at
    the University of Hawaii to support communication
    across the islands.

118
Bob Metcalfe
  • Developed the Ethernet with David Boggs
  • 1979 Founded 3COM Corporation, which makes
    wirelesss access points
  • Founded Infoworld
  • Authored numerous books and articles
  • Recipient of many awards including the National
    Medal of Technology (2005) and induction into the
    National Inventors Hall of Fame for his
    contributions to the welfare of mankind.
  • Spoke at the CCSCE Conference at SJC, October,
    2007 ETHERNET IS THE ANSWER WHAT IS THE
    QUESTION?

119
Ethernet (802.3)
  • Digital Equipment Corporation (DEC), Intel and
    Xerox joined to form the 10 Mbps Ethernet
    standard in 1978.
  • This standard formed the basis of the IEEE
    standard 802.3
  • It has recently been extended to include a 100
    Mbps version, called Fast Ethernet and a 1000
    Mbps version called Gigabit Ethernet.

120
Ethernet (802.3)
  • The Ethernet is a multiple-access network meaning
    that a set of nodes send and receive frames over
    a shared link.
  • The carrier sense means that the nodes can
    distinguish between a busy and idle link.
  • Collision detect means that a node listens as
    it transmits and can detect when a transmitting
    frame has interfered (collided) with a frame
    transmitted by another node.
  • When a collision occurs, both nodes back off,
    wait a random amount of time and then attempt to
    send again.

121
Physical Properties
  • An Ethernet is typically implemented on coaxial
    cables of up to 500 meters.
  • (On older versions, called thick-net or 10Base5,
    a transceiver connected hosts to the cable and
    then to the network adapter or NIC card.)
  • Newer versions, 10Base2, connect directly through
    the NIC, where all the logic is contained.
  • 10BaseT, for twisted pair, uses Cat 5 cable and
    is limited to 100meter.
  • Base refers to the baseband system.

122
Ethernet Transceiver and Adapter
123
Thick Ethernet Wiring
  •   Uses thick coax cable
  •   AUI cable (or transceiver or drop cable
    connects from NIC to transceiver
  •   AUI cable carries digital signal from NIC to
    transceiver
  •   Transceiver generates analog signal on coax
  • Wires in AUI cable carry digital signals, power
    and other control signals

124
Ethernet Wiring
  •        Uses thin coax that is cheaper and easier
    to install than thick Ethernet coax
  •     Transceiver electronics built into NIC NIC
    connects directly to network medium
  • Coax cable uses BNC connector

125
Ethernet Wiring
  •    Coax runs directly to back of each connected
    computer
  • T connector attaches directly to NIC

  Useful when many computers are located close
to each other   May be unreliable - any
disconnection disrupts entire net
126
Twisted Pair Ethernet
  •  Variously called 10Base-T, twisted pair or TP
    Ethernet
  •  Replaces AUI cable with twisted pair cable
  • Replaces thick coax with hub

127
Physical Properties
  • Multiple Ethernet segments are joined by
    repeaters, which forward a digital signal.
  • No more than 4 repeaters may be connected to any
    pair of hosts, limiting an Ethernet to a maximum
    of 2500 meters.
  • An Ethernet can support a maximum of 1024 hosts.
  • Any signal placed on the Ethernet is broadcast to
    all hosts.
  • Terminators are attached to the end of each
    segment to absorb the signal.
  • The Ethernet uses Manchester encoding.

128
Ethernet repeaters




Repeater
Host
129
Ethernet Hubs
The common 10BaseT configuration is to have
several point-to-point segments connected to a
hub or switch. This is also true for 100Mbps
Ethernet, but not for Gigabit Ethernet.
130
HUBS
131
Access Protocol
  • On an Ethernet, all hosts are competing for
    access to the same shared link.
  • The media access control (MAC) algorithm controls
    access to the link.
  • It is implemented in hardware on the network
    adapter.

132
Network Adapter Cards (NIC)
  •   CPU can't process data at network speeds
  •   Computer systems use special purpose hardware
    for network connection
  •   Typically a separate card in the backplane
  •   Network adapter card or network interface card
    (NIC)
  •   Connector at back of computer then accepts
    cable to physical network

133
Network Interface Hardware
134
NIC Cards
The sockets for the NIC cards are usually
located near the back of the cabinet and a
network cable attaches to the end of the NIC.
135
NIC Cards and Wiring
NICS can provide all three connection technologies
136
Ethernet Frame Format
  • Taken from the Digital-Intel-Xerox Ethernet
    Standard
  • Each Ethernet frame is defined by the following
    format where the preamble allows the receiver to
    synchronize with the signal.
  • Both source and destination hosts are identified
    by addresses
  • Packet type identifies the protocol
  • Each packet can contain up to 1500 bytes of data
    (46bytes minimum)
  • 32-bit CRC for error detection

137
Addresses
  • Each host on an Ethernet has a unique Ethernet
    address.
  • Technically the address belongs to the adaptor,
    not to the host and is usually burned into the
    NIC card ROM.
  • Each NIC card has a unique prefix and makes sure
    it assigns unique addresses
  • Addresses can be assigned statically, dynamically
    or can be configurable and assigned by the
    network administrator

138
Assigning Addresses
139
Addressing Scheme Comparison
Addressing Scheme Advantages
Disadvantages
140
Address Types
  • Each frame on an Ethernet is received by every
    connected adaptor.
  • Each adaptor recognizes the frames addressed to
    it and passes those frames to it host. These are
    unicast addresses.
  • A broadcast address, consisting of all 1s, is
    recognized by all NIC cards.
  • A multicast address, with first bit set to 1, is
    recognized by a subset of NIC cards.
  • Running in promiscuous mode, means that a NIC
    card will pass all messages to its host.

141
Ethernet Address Summary
  • An Ethernet adaptor receives all frames and
    accepts
  • Frames addressed to its own address
  • Frames addresses to the broadcast address
  • Frames addressed to a multicast address, if it is
    part of that subset
  • All frames if it is in promiscuous mode

142
Transmitter Algorithm
  • Receiver side is simple.
  • Sender side implements Ethernet protocol.
  • When NIC has frame to send and the line is busy,
    it waits for the line to become idle.
  • Because there is no centralized control, two (or
    more) adaptors may send at once, causing a
    collision. When a collision is detected, a
    jamming sequence is sent to stop transmission.
  • The adaptors wait a random amount of time before
    trying again.
  • Each time there is a collision, the delay
    interval doubles called exponential backoff.

143
Worst Case Scenario
144
Success of the Ethernet
  • Extremely easy to administer, no switches to
    fail, no routing or configuration tables
  • Easy to add additional hosts
  • It is inexpensive, since cables are relatively
    cheap.
  • Most new LAN switching technology is based on the
    Ethernet

145
Token Rings (802.5, FDDI, RPR)
  • Token Rings are the other significant class of
    shared media networks.
  • IBM Token Ring, was the original followed by
    the IEEE 802.5 standard, which was nearly
    identical, and finally the newer FDDI (Fiber
    Distributed Data Interface) Standard, which is
    declining in use.
  • Resilient Packet Ring or RPR (802.17) is nearly
    standardized.

146
Token Ring
  • Token ring Network consists of a set of nodes
    connected in a ring.
  • Data flows in a particular direction around the
    ring so that each node receives a packet from its
    upstream neighbor and forwards it to its
    downstream neighbor.
  • Similar to Ethernet in that it involves an
    algorithm which controls when a node can
    transmit, and all nodes see all frames.
  • Sending a message differs from that of the
    Ethernet.

147
Token Ring Network
148
Implementing a Token Ring
149
Tokens
  • Access to the network is controlled by a token.
  • A token is a special sequence of bits, which
    circulates around the ring.
  • Each node receives the token, and when it has the
    token, that node may send a packet and then
    forward the token to the next node in a
    round-robin fashion.
  • This is fair, since each node gets a turn to send.

150
Physical Properties
  • Any link or node failure makes the whole network
    useless.
  • When relay is open, the station is included in
    the ring if the relay closes, the ring bypasses
    the node.
  • Several relays are packed into a single
    multi-station access unit ( MSAU) required by
    IBM token ring.
  • Data rate is 4 or 16 Mbps and uses Manchester
    differential encoding
  • Twisted pair is required for IBM and not
    specified for 802.5

151
Relay on Token Ring
b) Relay closed-host bypassed
a) Relay open host active
152
Multimedia Access Unit
Used only in electrical rings to compensate for
node failure.
153
Token Ring Media Access Control
  • Network adapter contains a receiver, transmitter,
    and one or more bits of data storage.
  • When no node is sending, the token circulates.
  • A sending station, seizes the token and sends
    data. Token holding time (THT) is the time the
    node can hold the token. Default THT 10ms.
  • 802.5 also supports a strict priority scheme
  • Sending node can reinsert token immediately
    following its frame (early) or after the frame
    circles the ring and is removed (delayed) release.

154
Token Release
a) early
b) delayed
155
Token Ring Maintenance
  • Token rings have a station designated as the
    monitor.
  • Procedures are defined to elect a monitor when
    the ring is first connected or when the monitor
    fails.
  • Monitor must make sure there is always a toke in
    the ring and that there is sufficient delay.
  • It also checks for corrupted or orphaned frames.
  • It also checks for dead stations.

156
Token Ring Frame Format
  • Uses differential encoding codes in start and end
    delimiters.
  • Access control byte includes the frame priority
  • Frame control byte identifies the higher-level
    protocol
  • Like Ethernet, addresses are 48 bytes long
  • Includes a 32- bit CRC and A and C bits for
    reliable delivery

157
FDDI
  • Fiber Distributed Data Interface (FDDI) is
    similar to 802.5 and IBM token ring.
  • Significant differences are that it runs on
    fiber, not copper and makes use of some newer
    innovations
  • It is usually a dual ring where each ring
    transmits in the opposite direction.
  • The second ring is only used if the primary ring
    fails and there is a loop back toform a
    complete ring.
  • Instead of a monitor all nodes participate
    equally in maintaining the ring.

158
Dual Fiber Ring
a) Normal operation
b) Failure of primary ring
159
Physical Properties
  • FDDI network consists of a dual ring- two rings
    that transmit data in opposite directions. The
    second ring is only used if the primary ring
    fails.
  • Nodes attach to the ring with a single cable
    called single attachment stations (SAS). A
    concentrator attaches several SASs to the ring.
  • FDDI is a 100 Mbps network and is limited to 500
    hosts.
  • FDDI uses 4B/5B encoding
  • Token holding algorithms are more complex than
    802.5

160
FDDI Frame Format
  • Similar to 802.5 with these exceptions
  • Uses 4B/5B encoding instead of Manchester
  • Has a bit in the header to distinguish
    synchronous from asynchronous traffic
  • Lacks the access control bits present in 802.5

161
Resilient Packet Ring (RPR)
  • Relatively recent technology IEEE (802.17)
  • Resiliency- the ability to recover quickly from a
    link or node failure was its key design goal.
  • Other goals were bandwidth efficiency and Quality
    of Service (QoS) support.
  • Like FDDI it uses 2 rings, but unlike FDDI , both
    are used for normal service.
  • Uses buffer insertion instead of a token.
  • Used in MANs but metro Ethernet is coming

162
Wireless
  • Wireless is the rapidly evolving technology for
    connecting communication devices
  • Bluetooth
  • Wi-Fi -802.11
  • Wi-MAX 802.16
  • and 3G cellular wireless
  • They differ in how much bandwidth they can
    provide, how far apart nodes can be and which
    part of the electromagnetic spectrum they use.

163
Wireless Technologies
164
Wireless
  • The most widely used wireless links are
    asymmetric the two endpoints are different
    kinds of nodes
  • One endpoint acts as a base station and has no
    mobility and is wired to the Internet or other
    network.
  • The client not is often mobile and relies on its
    link to the base station to communicate with
    other nodes.

165
(No Transcript)
166
Wireless
  • Notice that wireless naturally supports point to
    multipoint communications becaues radiio waves
    sent out by one device can be simultaneously
    received by many devices
  • However communication between client nodes is
    routed through the base node

167
Example Wireless Network
168
Levels of Mobility
  • No mobility- when a receiver must be in a fixed
    location to receive a directional transmission
    from a base station (true of the initial WiMAX)
  • Mobility within the range of a base as in the
    case of Bluetooth
  • Mobility between bases as is the case with cell
    phones and Wi-Fi

169
Mesh or Ad hoc Network
  • A wireless mesh is an alternative topology
  • Nodes are peers ( there is no base station)
  • Messages are forwarded through a chian of peers
    as long as each peer is within range of the
    preceeding node.
  • This allows a wireless portion of a network to
    extend beyond the limited range of a single radio.

170
(No Transcript)
171
Bluetooth
  • Bluetooth provides very short range communication
    between mobile phones, PDAs, notebook computers
    and other peripheral devices.
  • It is a convenient alternative to connecting with
    a wire.
  • It has a range of only 10 m and operates at 2.45
    GHz
  • Because devices usually blong to an individual or
    group it is often called a PAN ( personal area
    network)
  • Network connects up to 7 devices to a master and
    is called a piconet.

172
Bluetooth piconet
173
Wireless ( 802.11)
  • Like Ethernet and Token Ring, 802.11 is designed
    for use in a limited geographical area (homes,
    office buildings, campuses).
  • Primary challenge is to mediated shared access
    through space.
  • 802.11 supports additional features (time-bound
    services, power management and security)

174
Physical Properties
  • 802.11 was designed to run over three different
    media- two based on spread spectra and one based
    on diffused infrared.
  • The radio based versions run at 11 and 54 Mbps.
  • A chipping sequence spreads the signal over a
    wide frequency using a random sequence and makes
    the signal look like noise to any receiver that
    does not know the sequence.
  • Infrared signals are diffused so the sender and
    receiver do not need to be aimed at each other,
    but must be within buildings.

175
4-Bit Chipping Sequence
176
Collision Avoidance
  • The protocol is more complex than Ethernet, since
    all nodes are not always within reach.
  • Consider 4 nodes A,B,C,D that are able to send
    to a node to its immediate left or right,so B
    can reach A and C but not D.
  • If A and C both send to B they collide, but are
    unaware of each other and are called hidden nodes.

177
Hidden node problem A C can collide at B
178
Collision Avoidance
  • Another related problem is the exposed node
    problem.
  • Suppose B is sending to A and C is aware of this.
    It is a mistake for C to think it cannot
    transmit.
  • It is not a problem for C to transmit to D
    because it will not interfere with As ability to
    receive from C

179
Exposed node problem B can
transmit to A and C can transmit to D
180
Collision Avoidance
  • 802.11 addresses these two problems with a
    Multiple Access Collision Avoidance algorithm.
    (MACA)
  • Sender and receiver exchange control frames
    before transmitting data
  • Sender sends a request to transmit (RTS) frame.
  • Receiver relies with a clear to send (CTS) frame.
  • Receiver also sends an ACK after successfully
    receiving the frame. All nodes must wait for this
    before trying to transmit.
  • CTS frames can collide and both must wait before
    transmitting, similar to Ethernet backoff.

181
Distribution System
  • Since an advantage of a wireless system is that
    nodes are free to move around, reachable nodes
    may change over time.
  • Some nodes may roam and some, called Access
    Points (AP) are connected to the network
    infrastructure by a distribution system.
  • Distribution system runs at layer 2 of the ISO
    architecture and does not depend on higher layers.

182
Access Points connected to a Distribution Network
Each node associates itself with one access point.
183
Communication Example
  • For node A to communicate with node E
  • A first sends a frame to its access point AP-1,
    which forwards the frame across the distribution
    system to AP-3, which finally transmits the frame
    to E

184
Selecting an AP
  • Technique called scanning
  • The node sends a Probe frame
  • All APs within reach reply with a Probe Response
    Frame
  • The nodes selects one of the access points and
    sends that AP an Association Request Frame.
  • The AP replies with an Association Response Frame
  • A node uses this when it joins the network and
    when it becomes unhappy with current AP ( weak
    signal, etc.)

185
Active and Passive Scanning
  • After a node has probed the network, it
    associates itself with an Access Point. This is
    called active scanning.
  • APs also periodically send a Beacon Frame that
    advertise the capabilities of the Access Point,
    including transmission rates. A node can change
    to this point by sending an Association Request
    Frame to the access Access Point . This is called
    passive scanning.

186
Node Mobility
187
802.11 Frame Format
48 bit Source and Destination addresses ( addr1,
addr2) Two additional address fields depends on
the ToDS, From DS settings Control fields Type,
ToDS, FromDS Type fields indicates whether the
frame is RTS, CTS or data CRC for error detection
188
802.11 Frame Format
189
WiMAX (802.16)
  • WiMAX stands for Worldwide Interoperability for
    Microwave Access
  • It is a metropolitan area network(MAN) with a
    range of 1-30 miles.
  • It odes not yet inclued mobility, but that will
    be added as 802.16e
  • Its clients are multiplexers for a building and
    to adapt to different frequencies it uses
    different physical layer protocols.

190
Cell Phone Technologies
  • Frequency bands vary around the world
  • Europe 900 and 1800 MHz bands
  • North America 850 and 1900 MHz bands
  • Cost is high to users because of licensed
    spectrum
  • Incompatible cell phone standards
  • Phones designed to carry voice now carry video,
    and audio which require high bandwidth

191
Cell Phone Technologies
  • Relies on use of base stations that are part of a
    wired network
  • Geographic area served by the base stations
    antenna is called a cell
  • Cells overlap and a base station can serve more
    than one cell using multiple antennae.

192
Handoff
  • As a phone begins to leave a cell, it moves into
    an area of overlap with other cells
  • The current base station senses the weakening
    signal and give control to whichever base station
    is receiving the stronger signal from it.
  • If a phone is receiving a call, the call must be
    transferred over to the new base station in what
    is called a handoff.

193
Cell Phone Generations
  • 1G analog
  • 2G digital -most of the current technology,
    some are referred to as 2.5 G not quite third
    generation, but more advanced. These are GSM-
    Global System for Mobile Communications
  • 3G Based on CDMA (code division Multiple Access
  • Satphones- class of phones that are not cellular,
    but are satellite phones

194
Summary
  • Five key problems so that links can exchange
    information
  • Encoding problem for physical links carrying
    signals
  • The framing problem determines how to package
    bits into frames
  • The error detection problem using CRC, parity,
    and checksums
  • Problem of recovering lost frames discarded
    because of errors
  • Problem of mediating access on shared media
    (Ethernet, token ring and wireless)

195
Further Reading
  • Metcalfe, Robert. and Boggs, David, Ethernet
    Distributed Packet Switching For Local Computer
    Networks, Communications of the ACM,
    19(7)395-403, July, 1976
  • http//standards.ieee.org/ for status of IEEE
    standards
  • See p. 145 for more complete list
Write a Comment
User Comments (0)
About PowerShow.com