OSI Layer Model

					ISO Layer Model



       Lecture 9
       October 16, 2000
The Need for Protocols

   Multiple hardware platforms need to have the ability to
    communicate.
   Writing communications code in this instance is non-
    portable (platform-dependent).
   Protocols provide a high-level interface method to the
    communications medium.
   The protocol itself is a set of rules by which the
    software and hardware must follow in order to
    communicate properly.
Need for Protocols (cont.)

   Multiple types of protocols exist.
   RS-232 is form of a protocol in the sense that strict
    rules must be followed for communication to occur
    between devices.
   Network protocols cover almost all communications
    between two or more computers.
    –   Transferring an ASCII file
    –   Point-to-point encryption
Protocol Suites

   A single, all-encompassing protocol is not only
    inefficient, but also wasteful on CPU, memory
    resources.
   Programmers have created smaller suites
    which provide the rule sets for communication
    within that protocol.
   The suites are also divided into smaller pieces,
    called layers.
The ISO Layer Model
Why the Layer Model?

   It is simple to visualize how software interacts
    with hardware.
   Topmost layer is closest to the user.
   Bottom layer is the furthest away from the user.
Layer Breakdown

   Layer 1: Physical
    –   The physical network hardware, medium.
   Layer 2: Data Link
    –   How data is organized into frames, and how to
        transmit those frames. Byte/bit stuffing, checksums.
   Layer 3: Network
    –   How addresses are assigned, and how packets are
        transmitted from one end of the network to the
        other.
Layer Breakdown (cont.)
   Layer 4: Transport
    –   How to reliably transfer data.
   Layer 5: Session
    –   How to start sessions (connections) with remote devices,
        machines. (Sockets)
   Layer 6: Presentation
    –   How to represent data. Does int, char replacements.
   Layer 7: Application
    –   How one user-level program requests a connection to another
        machine, and how the machine responds.
Protocol Stacks

   The protocol is divided into modules.
   Each module corresponds to a different level in
    the layer model.
   All of the modules put together is the “stack.”
   Theoretically, a given module can only
    communicate with the module above and
    below it.
Stack Examples
Communication With Stacks
Stack Interaction

   Because the stack dictates how computers
    communicate, machines utilizing one type of
    stack cannot communicate with a machine
    running another type of stack.
   Netware v. TCP/IP
   But machines can concurrently run more than
    one stack!
Layering

   At each level where the packet is processes,
    additional information beyond the actual data is
    added or removed.
   At the Layer 2, a checksum is added before
    being sent to Layer 1.
   When the Layer 2 of the receiving machine
    receives the packet, it strips off the header and
    the checksum footer.
A Layered Frame
Protocol Dependent Information

   The previous picture is a general idea.
   Some protocols specify that all additional
    information must be appended instead of
    prepended, etc.
Layering Overhead

   Because the sending computer adds
    information to the frame, the receiving machine
    must undo the changes before the frame is
    passed to the next layer.
   Because layers must undo changes that the
    counterpart creates, code for the other layers
    can be independently created and updated
    without affecting the other layers!
Data At Each Layer
Protocol Optimization Techniques

   Protocols utilize different methods depending
    on the focus and goal of the protocol.
   Sequencing
    –   To avoid out-of-order delivery
    –   To avoid duplicate packets
   Packet Retransmission
    –   When a packet is received, an ACK is sent back. If
        the ACK isn’t received by the transmitter, packet is
        resent. (Bound by time.)
Optimization Techniques (cont.)

   Avoiding Excessive Delay
    –   Each transmission is assigned an ID. Packets must
        contain a valid ID to be accepted for a given
        “conversation.” p. 213
   Flow Control to Avoid Overrun
    –   Machines do no communicate at the same rate.
    –   Sliding Window method.
The Sliding Window

   The sliding window concept greatly increases
    protocol throughput.
   All packets in a given “window” are sent
    sequentially, without waiting for an immediate
    ACK.
   Once all packets in a window have been sent,
    transmitter waits for all ACKs to be received
    before continuing on to next window.
Network Congestion

   If a single computer
    sends, no congestion on
    network link.
   If more than one
    computer sends, packet
    queuing must occur, so
    some congestion exists.
Network Congestion (cont.)

   If congestion persists over time, packets fill the
    switch’s memory, and will begin to be
    discarded.
   Retransmission can fix this problem, but if the
    congestion still exists when the retransmission
    occurs, those packets will also be discarded.
   This scenario is called congestion collapse.
Avoiding Congestion

   If a switch is having congestion, send a
    message back to the sender informing them of
    the congestion.
   Packet loss as an estimate of congestion.
   Rate control
    –   Temporary rate reduction
    –   Sliding window size reduction
Protocol Design

   Flow control vs. congestion control
    –   Flow control sends more packets to improve
        throughput
    –   Congestion control reduces the number of packets
   Sequence number
    –   Too small, miscommunication, confusion
    –   Too big, wasted bandwidth, overhead

				
DOCUMENT INFO