Docstoc

CPSC 463 Networks and Distributed Processing

Document Sample
CPSC 463 Networks and Distributed Processing Powered By Docstoc
					       CPSC 463
Networks and Distributed
      Processing

       Willis F. Marti




            1
          Course Overview

Syllabus/policy {handout}
Schedule {handout}
Comments on Term Project
Course Objectives
...
Opinions and Facts




                   2
                Class Admin

• Test taking

• Attendance & Job Searches

• Sympathy




                   3
                       Project

Purpose

Task
    Network Design

Approach {customer/boss/professor}

Teams {preferred size is 4 or 5}




                          4
             Course Objectives

                • Understand what a network is, especially
                  in the context of distributed systems
• Science       • Learn a good model for investigating
                  networks
                • Learn some network programming

• Engineering • Identify (some) real world components
                • How networks are built


• Attitude      • Understand there‟s more than one correct
                  solution
                • Understand “the map is not the territory”.



                          5
               Why Study Networks
• When computers were rare, we studied all the new facets
  of computers: operating systems, languages, ... As
  computers became common, we added the fields that
  have become computer engineering. Now that computers
  are ubitquitous, we add the study of how best for them to
  communicate: networking.
• A network is part of a distributed system. Part of computer
  science (and computer engineering) is learning how to
  build all the components.
• What is a network? Surprisingly, few people will give you
  a definition that always fits.
• How will we study networks? There are several methods...

                            6
        Is this a Distributed System?

Just insert a
network?


                                 Mass
                                 Storage
                Computing
                (CPU)


                            User
                            Interface




                       7
               Distributed System (!)
This represents our definition of a distributed system,
  focusing on delivery of services to end users. We will
  explore this more after we understand more about
  networks.
                              Services


                     Servers (Storage, Compute)


                               Network




                                            Users

                          User Interfaces
             Users




                                  8
                  Network Definition

"A network is a collection of media, devices and
protocols used to facilitate the exchange of information
between computing devices in a manner relatively
transparent to the end user."


                          Contrast:
  The Telephone Company (TELCO) & networks.:
  {network as a collection of media without regard to applications}




                                   9
      Still Defining a Network

• An ordered collection

• of media, devices and protocols

• used to facilitate the exchange of information

• between computing devices

• in a manner relatively transparent

• to the end user."



                      10
         Another Definition

• LAN vs WAN vs MAN vs CAN ...




              Geography




                  11
     Another Definition, cont.

• LAN - Local Area Network

• WAN - Wide Area Network

• MAN - Metropolitan Area Network

• CAN - A metal container




                    12
         LAN vs MAN vs WAN

• Historical Def‟n {physical proximity}
• Advance of Technology changes definitions
• Modern Definitions              Total Travel Time




                                                 LAN:
                                  Data Transmission Time
                                                           <= .01 to .05
                                      Total Travel Time


             Data Transmission Time




                            13
            LAN -- Key Points

• Historically, LANs meant fast speed.
   – Fast speeds meant short(er) distances.
   – Therefore LANs became defined by local {short}
     distances
• the REAL key points
   – Travel time about 1 to 5% of total time
   – LANs „tend‟ to use broadcast protocols; WANs „tend‟ to
     be point-to-point




                          14
         Studying Networking

•   by protocols & programs ...
•   by technology ...
•   by components ...
•   Layered Models of a System!

“The key to understanding networks is the idea
of layered architectures.”




                        15
        Layered Architectures
                 -Principles-


 Clearly Defined Interfaces
 Separation of Functions
 Peer to Peer Protocols
 Provide Services Up,
 Request Services Down




                     16
                    Layering
                                            Message
Message

                        TRANSPORT



                                             Pkts
                                             Packets
          Pkts
          Packets

                         NETWORK

                                    10010111001
          10010111001
                                       {Bits}
             {Bits}         LINK


                         PHYSICAL



                         {Signal}


                            17
             Packet Formats
                 Application “Header”     Data

               Presentation “Header”      Data

Stream         Session Header (?)        Data

Packets      Transport Header            Data

            Network Header              Data

           Link Header                  Data

          Framing                       Data

                         18
           Protocols and Services


                 <some function>
This:
          or

this...
          or

this...?


                      19
Protocols and Services
    -a better model


n+1                      n+1



n                        n



n-1                      n-1




         20
    Which Architecture to Study?

•   TCP/IP {Internet suite}
•   SNA
•   Novell
•   IEEE
•   OSI Reference Model




                       21
              Network Models

Standards & Committees
   ANSI
   IEEE {most important for LANs}
   EIA
   ISO {does more than just data standards}
   ITU-T {international PTT oriented. Formerly CCITT}
   etc

Standards & Users {cost, flexibility}

Purpose of the Open Systems Interconnection Model
{remember, it's just a model}


                        22
   Using Models for Understanding

Models are created by extracting key features, functions
 and information from a specific domain of interest so
 that the model contains essential attributes for
 understanding. Road maps are models. We extract
 positions of towns and cities and the roads that
 connect them. We ignore most terrain or reduce it to
 color. Road maps are good for planning trips by car but
 relatively useless for determining where to drill for oil. A
 key part of building a good model is ensuring that all
 features of interest are included, but only those. When
 using a model (network or otherwise), remember the
 limitation: "The map is not the territory."

                           23
             IEEE 802 Protocols

• .1 - Management
     – .1d - Bridge Spanning Tree
•   .2 - Link Layer
•   .3 - CSMA/CD [Ethernet]
•   .4 - Token Bus
•   .5 - Token Ring
•   .6 - DQDB
•   .7 - MAN



                            24
       (Partial) TCP/IP Stack

FTP


      TELNET      DNS

 TCP                             UDP



                     IP                ICMP
 ARP
      DIX Ethernet or ...




                            25
Why the OSI Reference Model?

• OSI RM is not the ISO protocol(s)

• Not tied to any specific protocol suite

• „Clean‟ start

• Completeness




                     26
  Example: OSI & the Internet

Application            NFS

Presentation          XDR


Session                RPC

Transport              UDP


Network                IP


 Data/Link           DIX Ethernet

 Physical              IEEE 802.3



               27
                             The OSI
                              Model
                                       7
{remember,
 enveloping at each layer}
                                       6

                                       5

                                       4

                                       3

                                       2


                                       1




                              28
           OSI Reference Model




{Each layer communicates with its peer by using the services of the
layer just below, and provides services to the layer above. Only the
physical layer has an actual connection}
                                29
                 OSI Model, cont
{there can be multiple, separate entities at each layer}




                                Gateway



                                Router



                                Bridge



                                Repeater




                                  30
                     Physical Layer
• Converts Bits -> Signals & sends signals across the media
• Recovers Bits from incoming Signal

Key Aspects of Physical layer specifications:

• Signaling Method
• Connectors
• Media
• Voltages/Power Levels

Media Considered -- Optical Fiber, Broadband Coax, baseband coax, UTP

Media not Considered -- Radio/Microwave/Satellite




                                 31
                     Data/Link Layer

• Gets bits from A to B along a (logically) single physical link
• Provides addressing and error detection.
• OSI model talks about error recovery -- not usually implemented in LANs,
 and only in some point-to-point networks (X.25 best example)

• Why no error recovery? In the case of an error in the packet, where did it
come from and where was it really addressed to...




                                  32
                     Data/Link Layer

• Gets bits from A to B along a (logically) single physical link
• Provides addressing and error detection.
• OSI model talks about error recovery -- not usually implemented in LANs,
 and only in some point-to-point networks (X.25 best example)

• Why no error recovery? In the case of an error in the packet, where did it
come from and where was it really addressed to...




                                  33
                    Network Layer

• End-to-end packets (each system on the network has a network address

BUT

each packet (is)(may be) treated separately


• This layer is supposed to hide all the messiness of differing link and
physical layer requirements from the upper layers




                                34
                   Transport Layer


• End-to-end messages

Usually provides reliable, sequenced byte stream to upper layers.
Does error recovery.

• There are options for non-guaranteed transport




                                35
                   Session Layer


• Control layer

• Manages 'sessions'




                       36
                 Presentation Layer

• Provides information transform services

-> translation
->encryption
->compression




                               37
                 Application Layer

                         TCP/IP        ISO

email                    SMTP          X.400

file transfer            FTP           FTAM

remote terminal/access   TELNET        VTS




                                  38
            Basic Network Concepts

Circuit switching - {basic TELCO service.          Guaranteed response
because resources are guaranteed. Inefficient for some applications}
Virtual-circuit packet-switching - {divide the info into packets to
multiplex}
Datagram packet-switching - {like the US Mail....}
Connectionless vs Connection-oriented
{At the Link layer, do we do acknowledgements? At the network layer,do
all the packets have to follow the same route?}

Multiplexing - {single media, multiple independent 'circuits'}
{putting multiple 'sessions' on a single media}




                                   39
                 Terminology

•   SAP -- Service Access Point {see Fig 1-9}
•   Connection Oriented
•   Connectionless
•   Datagram
•   Primitives




                        40
                        Modulation
 "Modification of a transmitted signal to encode information (bits)"

ASK - Amplitude Shift Keying {varying signal strength}
FSK - Frequency Shift Keying {varying signal frequency}
PSK - Phase Shift Keying {don't ask!}
{NB the above three methods are usually applied to signal carriers}

PCM/PWM - Pulse Code Modulation/ Pulse Width Modulation
{good for fiber}

Others




                                41
                       Switching

• Circuit Switching
   – Guaranteed resource
   – No size limit on information sent
• Packet Switching - Divides the information into packets;
  restricts sizes; also sharing of resources
    – Virtual Circuit // Connect-oriented
    – Datagram // Connection-less




                              42
               Multiplexing

TDM - {time division multiplexing}
       {low overhead, inefficient}

FDM - {frequency division multiplexing}


STDM - { statistical time division multiplexing}
       {some overhead, more efficient, may FAIL}




                      43
            Multiplexing Examples

2400
                 TDM             2400
   A
   B           BADCBADCBADCBAD
   C               9600
   D

 2400
        A          STDM          2400

        B      BACACBDCBDBABBD
        C          4800
        D




                          44
FDM




45
Multiplexing w/ Packets




 Like STDM, except NO "ROUND ROBIN"




               46
          Physical Layer Issues

• Theoretical Underpinning
   – or, Bandwidth 101
• Media Characteristics
   –   Optical Fiber
   –   Coax
   –   Copper Wire (Twisted Pair)
   –   Wireless
• Other Useful Ideas




                            47
                          Signals

• Propagation - {how fast does the signal travel in that media,
  esp. compared to light?}

• Frequency - {number of oscillations per second of the
  electromagnetic field of the signal}

• Bandwidth - {the width/size, in Hz, of the signal -- usually
  defined by where most of the energy is}

• Data Rate - {the number of bits per second.    Distinct from, but
  related to, frequency and bandwidth}

• Baud - {Changes per second in the signal. Limited by
  bandwidth.}


                              48
                 Freq/BW/DR
                    BW


Power




                     FREQ
                  Frequency


 {see Fig 2-1}




                       49
           Maximum Data Rates
• Nyquist:
   – DataRate <= 2*BandWidth * log2 V
   where „V‟ is the number of values which are encoded into
   the signal. In the On/Off, 0/1 world, V = 2. Your highspeed
   modem has V = 16.
• Shannon:
   – The real world is noisy, so Nyquist was an optimist.
• Marti:
   – Complexity costs money and adds fragility.
    So be choosy.

              DR ~ 2 * BW {Max by Theory}    <- In an On/Off world
                                                 (V = 2)
              DR ~ 1/2 * BW {Practical}

                           50
                Physical Effects


Bandwidth Limits - {Signals consist of many (infinite) different
sine waves, not all of which can be carried by the media}


Dispersion - {Particularly for multimode fiber, different parts of the
signal may move at different speeds, thus changing the shape of
the signal at the receiver}


Jitter - {Imperfect clock synchronization along the transmission path}

Noise - {Unwanted, external energy that may corrupt the signal}



                             51
      Framing & Synchronization
{Here synchronization refers to the sender's and receiver's clocks}
{Frames are packets added signal needed to transmit them on Physical Layer}

Synchronous - Sender and receiver somehow share a common clock.
good for longer runs of data; more efficient but requires the clock signal
somehow be sent along with the data



Asynchronous - Sender and receiver use different clocks so data runs
have to be shorter. Doesn't require the extra clock signal


Synchronous vs Asynchronous - Framing & clocks
Isochronous vs Aperiodic - Characteristics of traffic {beware of
confusion as each writer may mix terms}




                                 52
                 Specific Framing


Bit Stuffing - Used to ensure special framing and/or control
characters are not sent in the data. A problem because the 'clock' is
usually continuous but data may not be there, so we have to know when
the line is idle and when a frame starts {frame delimiter}


Manchester Encoding - Example of combining clock with data to
form a single signal -- no separate line is required. It does require twice
the bandwidth of the original signal




                               53
                         Manchester
                          Encoding

Ensures for each bit there is a clock transition. Data values (0 or 1)
are encoded by positive or negative clock transitions in the middle of
the bit time. Transitions are made at bit edges if needed so that the
correct transition can be made in the middle of the bit.




                                54
                    Media

• Optical Fiber {pg 87}
    Multimode
    Single Mode

• Coax {pg 84,85}
    Broadband
    Baseband

• Twisted Pair {pg 83}
     Shielded
     Unshielded


                     55
           Cost and Performance

Media Types:
UTP                  Increasing       Increasing
                     Bandwidth        Cost
Coax
 Baseband
 Broadband

Fiber
 Multimode
 Single Mode

But remember, cost includes
--material
--LABOR           Biggest part of installation cost
--electronics


                             56
                    Distances

Media Types:
UTP               Typically 100m +/-

Coax
 Baseband         200m-500m
 Broadband        up to 40km

Fiber
 Multimode        depends on power budget;
 Single Mode      can be 100s of km*



         * Most LANs use 2km between devices



                          57
                   Fiber Facts




Core
                 Cladding
                                 Protective Coating

       Core Cladding
       50     125    Multimode (microns)
       62.5    125      "         "
       8 to 10 n/a   Singlemode



                            58
                       Fiber Facts,
                          cont.

         Modes == Different paths thru core




"photons"

Since the photons travel at the same speed, but for different distances,
the energy is spread out, or dispersed, at the receiver

Fiber is specified as XX Mhz-km. So a specification of 800Mhz-km
means you could have a bandwidth of 400Mhz over a 2km distance
or 1.6Ghz over a 0.5km distance.

Dispersion has two components: modal and material


                               59
Traditional Baseband



Transceiver      Coax

                            Terminator
        Transceiver Cable


 Host




                   60
             CATV Systems

Translator                    Headend


                           "Forward" Signal
    "Return" Signal
                           Splitter



                                        Amplifier

     Network
     Interface
     Unit




                      61
              Twisted Pair

• Just copper wire where each two wires
  (“pairs”) have been twisted around each other
  in the cable. {Phone wire}
• Rejects common mode noise
• Minimizes antenna characteristics
• Shielded or Unshielded refers to a ground
  sheath around the whole cable.
• Cat 3 vs Cat 4 vs Cat 5




                    62
Physical Design Ideas




        63
            Wireless Overview

• Radio
   – Mobile
   – Cellular
• Microwave
• Satellite
• Infrared/Laser




                   64
        TELCO Architecture



                 Trunks



                           CO


 CO                       Users
                                  CO

Users
            CO
                                  Users
            Users




                     65
            TELCO Trunking

 Older, Analog World: Frequency Multiplexing




Current World: Digitizing & Time Multiplexing




                     66
                              ISDN

Integrated Services Digital Network

  "Think of defining ISDN by looking at the two pairs of words"



BRI • 2B+D        Basic Rate Interface
B = 64kbps each
D = 16kbp for TELCO signaling

  PRI • 23B+D

  BISDN: So fast it seems like broadband!



                               67
                        ISDN Nets
    Definition points


                                AT&T
               GTE




"User"




                          68
      Data/Link Layer Issues

• Protocol & Services

• Topology

• Error Detection & Recovery




                    69
       Topology vs Geography

Logical Layout              Physical Layout


"How devices talk to        How the signal
each other" -or-            actually travels
"How devices hear
each other"




                       70
Topologies




   71
                     BUS

• Every node hears every other node's transmission
directly.




                      72
                       Ring

• Series of unidirectional point-to-point links
without "store & forward", usually with a bypass
ability.




                       73
                        Star

• Switching functions all in central node




                        74
                     Mesh

• Each node independently routes over
(bi-directional) point-to-point links.




                      75
                IEEE & OSI


           LLC
                              2

          MAC

                              1
           PHY


LLC = Logical Link Control
MAC = Media Access Control
PHY = Physical




                         76
Link/Physical Layer Standards

• Ethernet
   – 10BASET, Fast Ethernet, Gigabit Ethernet
• Token Ring
   – 4/16MB
• FDDI
• ATM




                         77
           Ethernet & IEEE 802.3

What the IEEE standard covers- Physical layer and
interface to the link layer. IEEE 802.2 is the Link layer standard.


History- DEC/Intel/Xerox came up with it, then submitted to
IEEE for standardization. Some changes were made so
Ethernet is not identical to IEEE 802.3


Differences between Ethernet and 802.3
   There are some electrical and connector differences; most
   equipment uses IEEE 802.3.
   There is difference in the header. DIX uses TYPE, 802.3
   uses LENGTH. SInce the frame is limited in size, the two coexist.
   Most people use the DIX format.

                               78
                        Ethernet
• Work started back in 1973 by Bob Metcalfe and David Boggs from
  Xerox Palo Alto Research Center (PARC).
  – He studied the Aloha network and "fixed" the mathematics.
• Experimental Ethernet implemented in 1975.
• Cooperative effort between Digital, Intel, and Xerox produced
  Ethernet Version 1.0 in 1980.
   – This also became known as the Blue Book specification or DIX
     standard. Ethernet V2.0 adopted in 1982.
• Ethernet was adopted with modifications by the standards
  committees IEEE 802.3 and ANSI 8802/3.
• Ethernet allows for only connectionless communication.




                               79
                           CSMA/CD
"Carrier Sense/Multiple Access                        "Driving in Boston"
   with Collision Detection"




                                                                    BUS!
                                                      51.2 microseconds




"Many stations; Listen before talking; listen while talking; if a collision,
backoff and try again"



                                  80
Normal Ethernet Operation
          B                                   C

              Address mismatch                     Address mismatch
               packet discarded                     packet discarded

       Send data                                                    Address match
       to node D                                                   packet processed
                      Transmitted packet seen
                      by all stations on the LAN
 A                       (broadcast medium)                   D



Data




                              81
    Ethernet Collisions
    B                             C


                                      Collision




        Data transmission for A                       Data transmission
                                                          for C
A
                                                  D




                  82
   CSMA/CD - A Simple Definition
• A network station wishing to transmit will first check the cable
  plant to ensure that no other station is currently transmitting
  (CARRIER SENSE).
• The communications medium is one cable, therefore, it does allow
  multiple stations access to it with all being able to transmit and
  receive on the same cable (MULTIPLE ACCESS).
• Error detection is implemented throughout the use of a station
  "listening" while it is transmitting its data.
         • Two or more stations transmitting causes a collision
           (COLLISION DETECTION)
        • A jam signal is transmitted to network by the transmitting
          stations that detected the collision, to ensure that all
          stations know of the collision. All stations will "backoff"
          for a random time.
        • Detection and retransmission is accomplished in
          microseconds.

                               83
               Frame/Packet Format

 Preamble SFD Dst Src Type                       Data/Pad FCS
Size     7         1        6      6        2       46-1500    4
(octets)



In IEEE 802.3, the Type field is used as a Length field.



Addresses are generally (3) octets vendor code, (3) octets device number.




                                  84
                  Ethernet
                 Addressing

Each station recognizes three classes of addresses.
• Own address
• Broadcast address (all 1's)
• Optionally, one or more multicast addresses

Major reason for broadcast is address discovery.
Multicast addresses are used for specialized link
layer functions.




                      85
                  Ethernet Cable Names



 Name               Thick coaxial   Thin coaxial   Unshielded Twisted Pair       Fiber
Wire Type              RG-8           RG-58             22 - 26 AWG          62.5/125 micron
IEEE Name            10BASE5         10BASE2              10BASET              10BASEF
Standard Number     IEEE 802.3      IEEE 802.3a          IEEE 802.3i             N/A
Other names          Thick net        Thin net               UTP




                                     86
  Thick Coax Makeup

                                Thick braid for EMI
                                       Foil
                                              Thin braid for EMI
                                                   Thin foil bonded to insulation



                                                           Center conductor of tin plated
                                                              solid copper conductor

Jacket of PVC or Teflon


   Teflon is used for
   fire code regulations




                           87
     Thick Coaxial Connection
                                    500 meter maximum cable run


    Black marks
  every 2.5 meters
to show transceiver
     placement




                      Transceiver
                          cable
                                                     Transceiver




                                      Pierce clamp



                              88
                   Transceivers
• Transmitter/Receiver: AUI on one side, media on the other

• Used on all Ethernet networks and is the device that allows data to
  flow between the controller card and the network.

• Detects errors on the bus cable plant and reports them to the
  station's controller card.

• For thick coaxial cable, the transceiver is external to the controller
  card and attaches directly to the thick coaxial cable via a special
  cable known as the transceiver cable.

• External transceivers have a SQE function that enables the controller
  to determine the status of the transceiver.

• Usually has status indicators (LEDs) physically located on it to
  indicate the state of the transceiver (transmitting, receiving, collision,
  and power.)



                                 89
Thin Coaxial Cable Makeup

                                         Polyethylene foam




      Jacket made of PVC or Teflon                    Tinned copper wire




                                     EMI braided shielding




                   90
Thin Coaxial Connection
        Concatenation of network attachments




       Direct
    connection
      to card



             T connector


    BNC connector at each cable end

                   91
Thin Coaxial Connection (cont.)
                      On-board
                  transceiver logic    AUI connector




ASIC

                                                       T connector for connection
                                                           to cable plant
02608C




                                        BNC
                                      connector
         Interface to computer
                   bus




                           92
         UTP Makeup
• UTP was standardized by the IEEE 802.3 committee
  in October of 1990.

• Standardized by the EIA under TIA 568A.

• UTP for LANs is now classified as:
   –Category 3 - used for LANs up to 10 Mbps.
   –Category 4 - used for LANs up to 16 Mbps.
   –Category 5 - used for LANs up to 100 Mbps.

• Cable is made up of 8 strands of 24 AWG wire.
  – Only 2 pair are used for single 10BASET connection.


                             93
Unshielded Twisted Pair

                                                            Repeater unit
                                                             required


    Unshielded twisted
       pair cable




                                      100m max cable run
                              Straight through pins 1, 2, 3 and 6
                                  Unshielded twisted pair                RJ-45
            RJ-45
           Connector           atleast two (2) twists per foot          connector
             8 pin                                                          8 pin




                         94
 Concentrator (Hub) Management
• With the concentration of the wiring into a common point, network managers can manage the hub
  with specialized software.
• Network management software resides not only in the concentrator but on an external
  workstation‟s device (a PC, for example).
    – The workstation can query the concentrator for information.
• Concentrators also allow the control of individual ports.
• This software allows managers to extract information from each card that is inserted in the
  repeater. You could query the hub for statistics such as:
    – number of packets (bytes),
    – number of collisions (single and multiple),
    – number of framing errors,
    – number of time the particular card de-inserted itself from the network,
    – ability to turn on/off any repeater card in the hub, and
    – all information is time and date stamped.
• With 10BASET, all information is provided on an individual-connection basis, giving a manager
  information right from the desktop.




                                              95
         Ethernet Repeaters
• Extend the network by interconnecting multiple segments
   – Extend the physical domain of the network

• Governed by the IEEE 802.3c working group standard.
   – This governs the electrical specifications of a repeater.
   – The physical configurations of a repeater varied from vendor to
     vendor.

• Some repeaters contain the intelligence to:
   – detect collisions per cable plant (will not repeat collision
     fragments to other cable plants).
   – de-insert themselves from a wiring concentrator (when there are
     excessive errors on the cable plant).
   – submit network management information to a central controller.

• Repeaters have been transformed into wiring concentrators or hubs

• Repeaters can be used to interconnect different wiring types but not
  different access methods (i.e., not Token Ring to Ethernet).




                                   96
                IEEE802.3 Efficiency

"WARNING: Opinion"


% Utilization      Status

 0 - 10            Great!

10 - 40             OK

40 - 60            Performance Problems -- look at it

60+

                                                "Utilization"
                                  Signal
                                  On


                                                   Time

                             97
          Token Ring - IEEE 802.5


What the IEEE standard covers
"Physical layer standard (gives link layer format)"

History
Essentially an IBM standard 'given' to the industry"


Differences between 802.5 and 802.3
"Guaranteed response
 Priorities
Controlled delays"




                                 98
            Token Ring History

• Presented by IBM in 1982 to IEEE 802 committee.
• First prototype developed in 1983 in Geneva,
  Switzerland.
• Cabling System was announced in 1984.
• Officially announced in 1985.
• Standardized by IEEE in 1985.
• Only one adopted by the IEEE 802.5 committee.



                        99
   Token Ring Technology Summary
• Access method by which network attachments gain access to the cable plant
  by acquiring a special frame called the token. {Token is a special 24-bit pattern that
  continuously circulates the ring.}
• Token Ring is a broadcast medium. {To receive data, a destination station performs an
  address match.}
• The destination station merely copies the frame as it repeats it back to the
  ring.

• When the frame arrives back to the source station, it strips the frame from the
  ring and then releases the token (4 megabit operation only).
       » The token is allowed to be released prior to frame reception on 16-megabit
         rings.
• Token Ring originally ran at 4 Mbps. Upgraded in 1989 to 16 Mbps
• Maximum frame size for 4 Mbps is 4472.
   – This is based only on the fact a station cannot hold the token longer than
     10 milliseconds.
• Maximum frame size for 16 Mbps is 17,800.




                                        100
                    TRN Features
  "data rate of 4 or 16Mbps"


Traffic usually (always in 802.5) unidirectional
 "one frame on the net at a time..."
RAR (802.5) vs RAT (FDDI) for Token Passing

Recovery from lost token

Priorities

Frame Structure




                               101
Controller Attachment to a MAU

       The IBM 8228 MAU




        Shielded or UTP cable
             Lobe cables




                      102
          Cable Connectors                     Hermaphroditic or RJ-45
                                                 connectors on MAU




                          DB-9 connector


                                                           MAU
Token Ring controller
                                Media filter
                               for UTP only


                              RJ-11 or RJ-45
                                connector
       Media filter
     can be on-board




                        103
         Multiple MAU Connection


                      Ring out         MAU   Ring in




                      Ring out         MAU   Ring in
Type 6 patch cables




                      Ring out         MAU   Ring in


                                 104
                             MAU Operation
                                       Lobe cables


          Relays




                             Closed                             Closed   Closed



                                      MAU top view
                                                                                  Ring out
Ring in


                   MAU bus




                                      All stations are active
                                          105
      MAU Operation (Inactive Station)

                                 Lobe cables


     Relays




                        Closed                  Closed      Closed



                                 MAU top view
                                                                            Ring out
Ring in


              MAU bus



                                                         Inactive station




                                   106
               Token Ring Cable Types
• Type 1
   – A shielded data grade cable with two solid wire twisted pairs.
   – Available in indoor and outdoor versions.

• Type 2
   – A Type 1 indoor cable with four solid twisted pairs of 24 AWG wire.
   – Contains four voice grade wires along with four data grade wires.

• Type 3
   – Unused existing telephone wire or EIA category 3 wire (4 Mbps operation).
   – Category 4 is needed for 16 Mbps (speed of the Token Ring) operation.
   – Must use a special media filter.

• Type 5
   – 100/140 micron fiber cable used for fiber optic repeater links.

• Type 6
   – Often used for patch cables.
      » Patch cables can be used for MAU-to-MAU connection or from a wall outlet to a
         network attachment.




                                           107
               Type 3 Media Filter

• Type 3 cable requires a device known as a media filter.

• Its purpose is to filter out any unwanted signals.

• It is a small rectangular device that is usually part of the UTP cable
  itself.

• It can be a separate device that attaches to the UTP cable at the end
  of the cable that attaches to the controller card.

• It can be used on 16- or 4-mb Token Rings.

• It is only used with Type 3 (UTP) cable.




                                108
               802.5 Framing

• IEEE 802.5 uses special characters, but does
  not use bit stuffing!

                  Manchester




     “1” bit                   “0” bit




               Violations!




                         109
          Token Ring Frames
      Physical header                                       no preset size     Physical trailer


                                             Routing
                                                          IEEE
SD   AC     FC          DA     SA           Information              Data    FCS      ED      FS
                                                          802.2
                                              Fields


                                MAC or LLC Frame



                                 Token frame

                               SD     AC    ED


                             1 byte 1 byte 1 byte



                                 Abort frame

                               SD           ED




                             1 byte     1 byte



                                      110
Token Ring Frame Field Definitions
                                                                                   no preset size


                                                            Routing
                                                                           IEEE
 SD          AC              FC       DA        SA         Information                  Data        FCS     ED      FS
                                                                           802.2
                                                             Fields


 1 byte     1 byte          1 byte   6 bytes   6 bytes    <= 18 bytes                               4 bytes 1 byte 1 byte




                                                                   DSAP      SSAP          Control
      Legend

                                                                  1 byte    1 byte       1 or 2 bytes
  SD - Starting Delimiter
  AC - Access Control
  FC - Frame Control
  DA - Destination Address
  SA - Source Address
  FCS - Frame Control Sequence
  ED - Ending Delimiter
  FS - Frame Status




                                                         111
        The SD and the AC
             Fields


Field
         Bit 0    Bit 7
SD         JK0JK000
                                PPP - priority bits
 AC       PPPTMRRR              T - Token bit
                                M - Monitor bit
                                RRR - Reservation bits




                          112
The FC, ED, and FS Fields
 Field
         Bit 0           Bit 7
                                  FF - indicates a MAC or
                                  LLC frame.
 FC        FFrrZZZZ

                                  ZZZZ - indicates the type of
                                  MAC frame.


                                 I - Intermediate bit
 ED        JK1JK1IE


                                 E - Error bit



                                 A - Address recognized bits
 FS       AC r rAC r r


                                 C - Frame copied bits




                         113
              Bit Order Transmission
                   for Token Ring
• Bit 0 is the first bit transmitted.
   – Bit 0 is the left most bit of the byte.
      » Unlike Ethernet, the bits in the bytes are not reversed as they are
        transmitted.

• Example:
   – 40-00-12 are the first three bytes of a MAC address.
      » Translated to binary:
         01000000-00000000-00010010
     » As transmitted on a Token Ring:
        01000000-00000000-00010010
     » Compared to Ethernet transmission:
        00000010-00000000-01001000


                                 114
 Token Passing Policies (Defn)

• Multiple Token
   – RAT (FDDI): free token is appended to tail of last packet
• Single Token
   – ?: Token is released upon receipt of leading edge of own
     packet
• Single Packet
   – RAR (802.5):Token is released upon receipt of trailing
     edge of own packet




                           115
Token Passing Policies (Usage)

• Multiple Token
   – Allows multiple packets on the segment at one time.
     Good when packet length is less than ring latency
• Single Token
   – More efficient than RAR; when packet length is about the
     same as ring latency
• Single Packet
   – Least efficient, but allows controlling station knowledge
     of (un)successful transfer before the token is released
     (see pg. 224, 1st paragraph)




                          116
 Token Passing Policies (Perf.)

• Multiple Token
    – Always the best performer, but more complex
• Single Token
    – Closer to RAR than RAT
• Single Packet
    – „Worst‟ performance


KEY POINT: Ratio of ring latency to packet length, a, is real
  determiner of performance. For a << 1, RAR is OK.




                            117
Controller Operation - Phases 0 and 1
• Five-phase initialization
   – Phase 0 - Lobe test
      » The controller transmits frames between the controller card and the
        cable attached between the controller card and the MAU.
      » The controller tests to ensure that the lobe cable can successfully
        transmit and receive frames.
   – Phase 1 - Monitor Check
      » Station inserts into the ring (flips the relay in the MAU) and looks for
        special frames that are transmitted by the monitors.
      » Sets a timer to wait for these frames.
      » If the station does not receive any of the frames, the controller
        assumes:
           • it is the first ring station on the network,
           • there is not an Active Monitor present, or
           • inserting into the ring disrupted the ring.
           • The controller may initiate the token claim process.



                                     118
          Controller Initialization -
            Phases 2, 3, and 4
• Phase 2 - Duplicate address check.
   – Checks to ensure that it can successfully transmit and receive a
     frame and to detect other stations that might have the same MAC
     address.
       » The controller transmits a frame to itself.
       » If the frame returns with the address recognized bit set, it
         notifies one of the monitors and removes itself from the ring.
• Phase 3 - Participation in neighbor notification.
   – The station transmits a special frame that will identify itself to its
     downstream neighbor.
   – The station should receive a similar frame for its upstream
     neighbor.

• Phase 4 - Lan Network Manager Notification
   – Notifies LAN Network Manager about its presence on the ring

                                   119
                  Claim Token Process
• A ring cannot operate without a token circulating on the ring.
   – There is only one token per ring.

• The token-claiming process allows one station to insert the token onto the ring.
   – This station will be elected as the AM.
      » It will purge the ring (ability to transmit a frame to itself).
      » After purging the ring, it will insert a new token on the ring.

• The Token-Claim process can be started when the AM
   – detects a loss of signal,
   – a timer expires and it has not yet received its AM frame back, or the AM
   – cannot receive enough of its own Purge Ring MAC frames.

• It can be started when the SM
    – detects loss of signal or
    – detects expiration of its timer for receiving SM frames.




                                       120
 Details of the Claim Token Process
• If there is no token on the ring, all activity will cease on the ring.
    – The Active Monitor should be able to recover by purging the ring and issuing
      a new Token.
    – If the Active Monitor cannot recover, the token-claim process will begin.

• Any station will insert its master clock, a 24-bit delay, and start to transmit
  Token-Claim frames.
   – These frames are received by all stations on the ring.
   – The station will follow these frames with idle (clock) signals.
   – After transmitting the Token Claim frames, the station starts a timer.
      » If it does not receive its frames or someone else‟s claim frames, it will
        beacon the ring.
• Once the process is started other stations may participate.
   – Stations bid for the right to become the AM.
   – The station with the highest priority (MAC address) wins.
   – That station becomes the AM.
      » It will purge the ring and insert a new token.

                                      121
 Claim Token Process Example
                        Detected condition
            1                                                       4
      Token Claim              C                            B transmits its own
        frames                                              Token Claim frames




    Not             D                                  B            B has higher
participating                                                       priority than A



          2                                                     3
     Repeat frame                                      A transmits its own
                                A                      Token Claim frames

                           Higher priority
                           than C. Does
                           not repeat C’s               6                                          5
                                               Stops transmitting                            Continues
                                             its own Claim frames                           transmitting
                                                                                      C
                                                 and repeats B’s                               its own




                                                                D                            B




                                                        7
                                                   Repeats                            A                8
                                                   B's Token                                Stops transmitting its own
                                                  Claim frame                             and repeats B’s claim frames




                                                      122
          Token Ring Transmit Mode
• A station that needs to transmit receives the SD of approaching frame. This
  station quits transmitting idles (clock signals).

• Checks for priority.
   – If the priority in the frame is greater than the station's priority, then
        » the station sets reservation bits and awaits new token.

• If the priority in the frame is less than or equal to the station‟s priority then
    – the station changes the T bit in the AC field from a 0 to a 1,
    – appends its information to the rest of the frame and transmits the frame.
    – If the end of its transmission is reached and it has not received its current
      transmission back, the station
         » transmits idle characters and awaits current transmission.

• When the station receives its frame back it will strip the frame and release the
  token.

• The station enters normal repeat mode.


                                       123
             Token Ring Copy Mode
• The destination Token Ring controller recognizes its address in the
  destination field of a received frame and copies the frame into its
  buffer.

• If at any time an error is detected, the copy phase ends and the
  controller sets the A and E bits and repeats the frame back to the ring.

• If no errors are found, the destination sets the A and C bits and
  repeats the frame back to the ring.

• The destination station enters Normal Repeat mode.

• The frame travels on the ring until it reaches the originator and that
  station strips the frame off of the ring and submits the token to the
  ring.



                                 124
               Normal Repeat Mode
• A station in normal repeat mode checks current
  frames and token for signalling errors.
  – If any errors are found the station sets the E bit and repeats the
    frame back to the ring.

• A station in this mode also checks every frame for
  its address.
  – A duplicate address could be found.
  – If a duplicate address is found, the station will transmit a soft error
    MAC frame to one of the monitors.




                                 125
              The Active Monitor (AM)
• Functional address is C00000000001.


• It must be present in order for the ring to function properly.


• The AM is the kingpin of the ring.


• The AM:
   – tracks lost tokens and ensures that only one token exists on a single ring.
   – monitors frames and priority tokens that circulate the ring more than once.
   – initiates neighbor notification,
   – provides a latency buffer to recover the clock signal and so that at least 24
     bits (the size of the token) can be transmitted on the ring, and
   – supplies the master clocking .




                                       126
              Token Recovery

• Monitor Station
   – 1 station becomes responsible for monitoring the token
     for token loss or token busy
• Time Outs
   – Token time out („Beaconing‟)
   – No monitor (Claim frames (highest addr wins)




                         127
               Options for Token Ring
• For 16 megabit rings, early token release allows a ring station to release the
  token before receiving its original frame back.

   – It is based on the ring length
        » A station will not release the token when it is still transmitting its frame
          and it has started to receive its frame back.
   – Allows greater use of Token Ring bandwidth.

• Token Ring operates at 4 and 16 Mbps.
   – 4 and 16 Mbps controllers are not allowed on the same ring.
       » Ring will beacon when this condition occurs.

   – To have 4 and 16 Mbps ring interoperate, you must use a data forwarding
     device such as a bridge or a router.

• IBM is currently experimental with a new Token Ring controller which allow it
  to operate between 52 - 100 Mbps.




                                       128
                   Data Link Layer


Uses 'bit pipe' Physical Layer to send packets


Packet Formats - Generic: Framing (Layer 1), Addresses and
control information (layer 2), and data (info from layer 3 and up)


Point-to-Point vs Broadcast - Key idea is that not all
packet formats are alike. One needs to look at particluar technologies
to see what is needed.




                               129
           Data Link Services

• Unacknowledged Connectionless Service
  – Most LANs
  – Upper layers handle error recovery


• Acknowledged Connectionless Service
  – Odd duck. Example?


• Connection-oriented Service
  – Reliable Delivery ...




                            130
                   Link Protocols

Used to provide reliability. Basic idea can be
used at any layer
 Don't need to know details at this time, but know general operation
 and that they provide assured delivery.

ABP

SRP

GoBack N

Windowing & Flow Control


                              131
                 Performance

• Overhead vs Frame Length

• Error rate (bit error vs block error)

• Physical Layer
   – distance
   – propagation delay




                         132
                    Error Control


Error Detection - Methods: Parity, Checksum, CRC --
generically Frame Check Sequences



Error Correction - The basic idea is to add redundant information
so that the receiver can deocde the message even if some (specified)
number of bits are damaged (e.g., Hamming codes)


Error Recovery includes error correction but also includes actions taken
to get a message retransmitted




                              133
Connection Oriented Services

• Two modes of operation:
   – Operational
   – Non-operational

• Operational mode incorporates three functions:
   – Link establishment.
       » A source station sends a frame to a destination station
         requesting a connection.
       » The destination station may accept or reject the connection
         request.
   – Information transfer.
       » Allows information to be transferred after a connection is
         set up and the required handshaking has taken place.
       » Reliable information is transferred between the two stations.
   – Link termination.
       » Either side of the connection may terminate the connection
         at any time.


                              134
          IEEE & OSI {again}


           LLC
                               2

          MAC

                               1
           PHY


LLC = Logical Link Control
MAC = Media Access Control
PHY = Physical




                         135
                         IEEE 802.2 Fields
              Bit 0
                I/G D D D D D D D D    C/R S S S S S S S




                                                                      Length of the Information field
                                                                      is access method dependent

                                  DSAP        SSAP         Control             Information
                                 address     address
                                  1 byte       1 byte      1 or 2 bytes




Destination    Source         Length                        IEEE 802.2 field                            CRC
 address       address         field




                                                 136
SAP Types
•   E0 - Novell NetWare

•   F0 - NetBIOS

•   06 - TCP/IP

•   42 - Spanning Tree BPDU

•   FF - Global SAP

•   F4 - IBM Network Management

•   7F - ISO 802.2

•   00 - NULL LSAP

•   F8, FC - Remote Program Load

•   04, 05, 08, 0C - SNA

•   AA - SNAP

•   80 - XNS

•   FE - OSI



                  137
SubNetwork Access Protocol (SNAP)
    • Most common implementation of LLC1 is from a subsection of the IEEE 802.2
      standard known as SNAP.

    • At the time of IEEE 802.2‟s introduction, most network protocols were
      designed to use the Ethernet packet format.

    • SNAP allows for the migration of the standard network protocols to the IEEE
      802.2 format.

    • Supported by TCP/IP, NetWare, OSI, AppleTalk, and many other protocols.

    • The second purpose for the SNAP protocol is to allow those protocols that do
      not support the IEEE 802 standard to be able to traverse IEEE 802 LANs.

    • SNAP uses a reserved SAP: AA (for both the DSAP and SSAP).
       – It uses the unnumbered frame format: control field equal to 03.
       – Actual SNAP header consumes 5 bytes:
            » Three bytes for the Organizationally Unique Identifier (OUI) field, and
            » Two bytes for an Ethernet Type field.




                                       138
                         Protocol Discriminator

Destination   Source    Length                                   SNAP
                                 DSAP   SSAP    Control                             Data    Pad      CRC-32
 address      address    field                                   header
                                  AA     AA      03




                                                                          Type
                                                           OUI             field
                                                                                      Protocol discriminator
                                                      00-00-00            08-00
                                                          3 bytes         2 bytes




                                          139
                 Verification

• Finite State Machines

• Estelle & Other Languages

• Petri Nets

• Blind Faith (or, code it in C...)




                       140
Naming Conventions
  {and Confusion}




            141
Naming Conventions {cont}




          142
                   Intro to ATM

• Asynchronous Transfer Mode
• Text References
  –   Sect 2.6
  –   Sect 3.6.3
  –   Sect 5.6
  –   Sect 6.5




                      143
          ATM Background

• Outgrowth of TELCO transition to integrated
  services
• Only “real” >100Mbit standard
• Offers multiservice (voice video data)
  potential
• Switched architecture familiar to TELCOs, not
  to high speed data networks




                    144
What is ATM?


         Note: Tanenbaum considers
         this more a network layer
         technology.




   145
          ATM - A layered standard

AAL - ATM Adaptation Layer
    • Assembles and disassembles broadband servicesinto
     a stream of cells
    • Each cell has a header that contains routing information

ATM - Asynchronous Transfer Mode
   • Switches the cells around the network based on the routing
    information in the header

Physical Layer
    • Provides the physical transportation of cells across the
     network

(Note: CCITT reference model, p. 63)



                                146
 ATM - A Switched Architecture

• Cells (small, fixed length packets) are
  switched in a connection-oriented manner
  but not using circuits like today‟s voice.



              Switch          Switch




                                       Edge
         Edge
                                       Device
         Device




                       147
     What is ATM Switching?

• Why small cells?
  – (32+64)/2=48 + 5 header bytes
  – Mixed Traffic
• Packet (random)vs Circuit (TDM) Switching
• Q.2931
  – SVC, PVC




                        148
        Physical Layer Options

• SONET (US)/ SDH (Europe)
• SMDS
• DQDB

• Speeds from DS3 on up! (45Mbs to Gbps)
• OC-3c => 155.52Mbps => 149.76Mbps
  ^ optical carrier
      ^ 3rd level in heirarchy
       ^ full duplex (two strands of fiber)
• Also OC-12c (622Mbps), OC-48c (2048Mbps)

[Look at the interesting way to frame cells]

                       149
     ATM Adaptation Layer
           (AAL)
• Classes of Service: 1, 2, 3/4, 5
  1: circuit emulation
  2: variable bit rate service
  3/4: connection oriented data service
  5: connectionless data service

• SAR - Segmentation and Reassembly

• Convergence Sublayer
   the miscellaneous category



                      150
                          ATM Cell

• ATM cells are constant size packets of 53 bytes size.
   -- 48 bytes payload, 5 bytes header/overhead.
                                                 VPI - Virtual Path ID
                                                 VCI - Virtual Channel ID
                                                 Type - Payload type
                                                    (internal)
                                                 Res - reserved
                                                 CLP- Cell loss priority
                                                 HEC- Header Error
                                                       Control




                              151
              VCI/VPI Operation

• A Virtual Channel exists between two switching points




• A Virtual Path contains 'bundles' of VCs




                             152
      ATM Switch Architecture

•   Crossbar
•   Banyan
•   TDM busses
•   Buffering
    – Input
    – Output
    – Both?




                 153
           ATM Protocols

• UNI, NNI
• Services
• “LAN” Stuff




                154
              ATM Services

•   CBR
•   VBR (RT, NRT)
•   UBR
•   ABR




                    155
        ATM Quality of Service

•   QoS: A contract
•   Traffic Descriptors
•   Cell Rate Options (pg 462)
•   Traffic Shaping
•   Traffic Policing




                      156
      ATM Congestion Control

•   Admission Policy
•   Reservation System
•   Rate Based Control
•   Other




                    157
            ATM Flow Control


• The leaky bucket algorithm

• CLP in ATM header

• Frame Relay comparisons




                      158
                  Routing


•IISP (Interim Inter-switch Signaling Protocol)
•PNNI (Private Network-Network Interface)
   •Phase 1
   •Phase 2




                    159
                        IISP

• Interim
   – Allowed multi-vendor interoperability before
     completion of NNI
• Signaling
• Routing via manually configured NSAP
  prefixes




                        160
                          PNNI
• Topology abstraction
• Peer group(group of nodes)
   – One switch elected Peer Group Leader
   – All nodes in group have identical view of group
• Hierarchy of logical groups
   – Up to 105 levels of hierarchy




                           161
                  PNNI Routing

  A12                   A22                    B3

                   A21        A23
                                          B1            B2
 A11
            A13          A2
                                               B
       A1               NSAP Domain

                                                             B25
                         A12
A117
                                     A2             B
                  A11
                          A13       View from A117 at A11
                         162
           Sequence of Events

• A117 -> B25
• Forward to switch (A11)
   – Switch knows topology of A1 group
   – B reachable by A2 - A2 reachable by either A12 or A13
• DTL (Designated Transit List)
   – [A12][A2][B]
   – [A22][A23][B]
   – [B2]




                          163
           ATM “LAN” Stuff

• LAN == Link Layer Domain
• ELANs & VLANs
• LANE & MPOA
  – LECS, LES, BUS




                     164
                            LANE v1
• LAN Emulation
• No QoS (Quality of Service) Support
• Uses AAL5 signaling
    optimized for data transport
    entire cell payload available for user data
• LEC - LAN Emulation Client
• LAN Emulation Service
    LECS - LAN Emulation Configuration Server
    LES - LAN Emulation Server
    BUS - Broadcast and Unknown Server
• STP (Spanning Tree Protocol) supported




                                 165
   LEC - LAN Emulation Client

• Software process on any ATM-connected LAN switch,
  router, PC, or workstation
• Layer 2 process
• Prior knowledge of certain parameters
    LEC‟s ATM address
    LAN type to be emulated
    maximum data frame size
    any route descriptors (for SR bridging)
    whether it is willing to proxy (respond to LE-ARP)
    LAN name - SNMPv2 display string




                             166
       LECS - LAN Emulation
        Configuration Server
• One per administrative domain
• Gives identity of ELAN (Emulated LAN)
• Returns ATM address of LES, type of LAN emulated,
  and maximum PDU size of ELAN
• Controls which physical LANs are combined to form
  VLANs (Virtual LAN)
• LECS address known via ILMI or its well-known NSAP
  address




                      167
      LES- LAN Emulation Server

• Adds LEC‟s to ELAN
• Assigns LECID to joining LEC
• Table of address information of LEC
    MAC address
    proxy for MAC address
    Token Ring route descriptors
• LECs can communicate directly with each other only when
  they are connected to the same LES
• Multiple LESs on the same physical ATM LAN
• Answers LE-ARP requests from LECs




                              168
   BUS- Broadcast and Unknown
             Server
• During address resolution LEC forwards all frames to the BUS
    floods frames to all LECs
    after address resolved flush protocol used to guarantee order of cells
• All multicast and broadcast traffic sent through BUS
• Traffic limited to 10 frames/second
• Intelligent BUS
    resolve destinations
    CLS- connectionless server




                               169
LANE Setup




   170
                      Connections

• All SVC (switched virtual circuits)
• SVCs required:
    LECs and LECS
    LES and LECS
    Control Direct - LECs and LES
    pt-mpt Control Distribute - LES to LECs
    Multicast Send - LECs and BUS
    pt-mpt Multicast Forward - BUS to LECs
    Data Direct - LEC and LEC
• PVC (permanent virtual circuit) possible to connect LEC
  and LECS




                               171
                Virtual Channel Connections

                         LANE Server                                                    Broadcast and
                            (LES)                                                    Unknown Server (BUS)
            Control
             Direct                    Control
                                                                         Multicast                          Multicast
              VCC                       Direct
                                                                         Send VCC                           Send VCC
                                         VCC
  LANE Client
    (LEC)                                    LANE Client        LANE Client
                                               (LEC)              (LEC)                                            LANE Client
                                                                                                                     (LEC)
                          Control
                                                                                           Multicast
                      Distribute VCC
                                                                                         Forward VCC

                                                 LAN Switch
                                                                                       Data Direct VCC
                                                                                                              LAN Switch
ATM Host
                                                              ATM Host
                                       Configuration
    Configuration
                                        Direct VCC
     Direct VCC
                          LANE
                      Configuration
                      Server (LECS)




                                                        172
                              NHRP
•   Next Hop Resolution Protocol
•   Grew out of ATMARP
•   Only IP
•   Allows shortcut routes (pt-pt)
     direct VCCs across ATM network
• Address resolution across multiple IP networks
• If network unknown, request forwarded to other NHSs
  (Next-hop Server)
     NHS with knowledge will forward response to source router
• Router must have ability to bypass default route




                               173
                             RSVP
• Resource Reservation Protocol
• Provides QoS (Quality of Service) guarantees
• Operates in simplex
    each direction has separate reservation
    maps well to ATM (two individual VCCs)
• Built on IP, but no data transport built-in
• Only if resources available and does not conflict with policy
• Flowspec (bandwidth and delay) and filterspec (type of
  packets) transmitted downstream
    hop by hop




                               174
                           MPOA
• Multiprotocol over ATM
• EDFG (Edge Device Functional Groups)
    existing LAN segments via LAN switches
• AHFG (ATM-attached Host Functional Groups)
    ATM-connected host
• Layer 3
• Only supports IP for now
• Uses LANE for Layer 2 forwarding within a single Layer 3
  subnet
• Adaptation of NHRP to provide connectivity between hosts
  in different subnets




                             175
MPOA Operation




     176
     Competing Technologies

• “Fast Ethernet”
   – 100BASE-TX, 100BASE-FX,100BASE-T4, 100BASE-VG
• FDDI, FDDI- II
• HPPI
• Gigabit Ethernet (IEEE 802.3z)




                      177
                       ATM Issues

• SONET/SDH duplication of services

• ATM overhead

• ATM granularity and bandwidth management

• ATM & connectionless service

• End point synchronization

• Flow Control !!! (bandwidth allocation, correlated traffic)

• ATM Forum

                              178
            “Internetworking”

• Bridges
   – Transparent bridges
   – Source Routing - Transparent Bridges


• Routers (Network Layer)
                                                3

• Brouters                                  2       2
                               2
                                            1       1
                         1         1



                         179
               Why Bridges

• Isolation of Physical Layer Effects

• Bandwidth Multiplication

• Security or Traffic Isolation




                      180
  Segmenting Traffic
                                     File server




            Workstations
                                 LAN traffic




                                                   Bridge


                                 LAN traffic

               Terminal server           Host


Terminals




                  181
          Transparent Bridges
• Interconnect multiple cable segments to allow
  for extension of a network.

• Can be used to interconnect different access
  methods (Ethernet to Token Ring) and different
  physical layers.

• Operate at the data link layer.
• They are protocol transparent.
  –They are designed to operate regardless of
   the upper-layer protocol.
  –They operate on the source and destination
   address in the MAC header.
                       182
              T-L-F Bridges

• Bridges only forward traffic destined for other
  cable segments.

• They operate transparently to any stations
  that are active on the network.

• Packet formats and software drivers on the
  workstations remain the same.
• Bridges do not have to be programmed with
  the addresses of all the devices on the
  network.


                     183
Learning, Filtering, and Forwarding

                           Node D

                                                                  Node F


                                         Terminals                                 Node C



         Cable segment 1
                                                                            Node C, D and F are on this
                                    Port 2                                 cable segment through port 2.
                                       Bridge                                    Forwarding table

                                                Port 1                     Nodes A, B, and E are on this
                                                                           cable segment though port 1.
         Cable segment 2




            Node A                                       Node B                        Node E




                                      184
Filtering - An Example
 Node A                                                                              Node B




                                                                               Cable segment 2

                                   Port ID 1

                       A       1                C    2
                       B       1                D    2    Fowarding Table


                     Port ID 2                 Filtered
                                                                               Cable segment 1




          Packet transmitted




 Node C                                                                     Node D




                                   185
Forwarding - An Example


  Node A                                                                       Node B

                                                                              Cable segment 2
              Forwarded
                                   Port ID 1

                          A   1                C   2
                          B   1                D   2   Forwarding table


                                   Port ID 2
                                                                              Cable segment 1




     Node C                                                               Node D




                                  186
Forwarding Beyond One Bridge

       Node B                                              Node A
                             Cable segment Z

                                       AB
                            Bridge 1

                                       CD

    Cable segment Y
                                       AB
                                   Bridge 2        Bridge table
                                       CD
    Cable segment X
                                       AB
                      Bridge 3

                                       CD


                                 Cable segment V




      Node D                                              Node C




                                 187
                   Loops
• Complexity of bridging arises when two or more
  bridges interconnect the same two cable segments.
• This is called providing redundancy or providing a
  loop.
• There are problems with this type of design
  including:
   –duplicate packets,
   –broadcast packets, and
   –unknown destination packets.



                      188
Duplicate Packets
   Node A                                                Node B




                     Two packets received



Cable segment 2


                  Bridge 1               Bridge 2




Cable segment 1




                        Single packet transmitted




       Node C                                       Node D




                     189
         Broadcasts

                               Packet received and
                               transmitted back by
                                  second bridge

      Node A                                                         Node B


Cable segment 2
                                      Loop
                           Bridge 1              Bridge 2




Cable segment 1




                           Broadcast packet transmitted

                  Node C                                    Node D




                            190
Unknown Destination Address
            Node A                                             Node B



                           Packet received and
                           transmitted back by
                              second bridge




    Cable segment 2
                                 Loop
                      Bridge 1                Bridge 2




    Cable segment 1




                        Destination Z packet transmitted




            Node C                                         Node D




                      191
             Spanning Tree Algorithm
• Bridged networks must allow for redundancy. Only
  one path should be enabled to any destination on
  the network.
• STA is a protocol unto itself. Don‟t confuse it with
  the transparent bridge protocol. IEEE 802.1d
• In an active STA topology certain bridges are allowed to forward
  packets.
   – Other bridges will participate in the STA but do not forward
     packets.
   – These are backup bridges that dynamically become available.
• Bridges that do not forward packets are placed in blocking mode.
   – These bridges still participate in the spanning tree protocol.


                                192
            Source Routing Bridges
• Developed as a bridge protocol for Token Ring LANs.
• Source routing gained popularity due to IBM‟s support of it.
   – It is easy to install a source route network.
   – It is not easy to grow a source route network into a large network.

• Invented due to technical limitations of the source route chip set..
  Early source route chip sets could not be set for promiscuous mode.
• Source routing was also invented to allow two non-routing protocols
  to be placed on a LAN: NetBIOS and SNA.
• Source Routing does not build forwarding tables based on MAC
  addresses.

• Most of the intelligence for this algorithm is found in the network
  stations.

• Each frame carries complete route information with it.

                               193
                Source Routing
                   Features
• Source routing requires split intelligence to be carried in the node and
  the bridge.

• All frames contain routing information, which does produce more
  overhead.

• Uses STA to configure which bridges will forward single route
  broadcast frames.

• All paths are active which legally allows loops to be designed.

• Provided a routing solution for those protocols that could not be routed
  (NetBIOS).

• Easy to follow ring/MAC address for troubleshooting.


                                 194
Source Routing Features (cont.)

 • Source Routing originated as an alternative to
   transparent bridging

 • Originally, Token Ring could not be placed in
   promiscuous mode ( requirement for transparent
   bridging) and therefore an alternative model was
   created

 • Allowed for SNA and NetBIOS traffic an attempt to
   enjoy the benefits of routing
    – As a data link layer implementation.




                        195
          Source Routing Overview
• Each separate ring is assigned a unique ring number, assigned on the
  source route bridge port and not on the ring station.
• Each bridge is assigned a bridge number. There is a single number for
  the whole bridge, no matter how many ports it has.
• End stations try to find destination ring stations by broadcasting
  special discovery frames.
• A frame will contain source route information based on one bit in the
  source address.
• A source route frame may not cross more than seven bridges.
   – At the eighth bridge, the frame is discarded.




                               196
           MAU
                    Source Routing Example
                                     MAU




               2
           Find a
          station off     Bridge 5
             ring




Node 1                    Bridge 6            Node 2
                1
            Find a
           station on
         the local ring

                          Bridge 7



          Ring 4                     Ring 3

                          197
      Routing Information Field

                                              Routing Information Indicator (RII)




                                                              Optional
                                                Source        Routing       Destination Service     Source Service
Starting    Access    Frame     Destination                                                         Access Protocol   Rest of Token
Delimiter   Control   Control    Address        Address     Information      Access Protocol                           Ring frame
                                                                Field             (DSAP)               (SSAP)




                                               2 bytes           Up to 8 RD fields


                                              Routing         Route                     Route
                                                                           ......
                                              Control       Designator                Designator




                                                                                      Ring number         Bridge
                            BBBLLLLL            DFFFrrrr                                                  number

                                                                                          12 bits           4 bits
                                                                                         1 - 4095           1-F
                                                                                                         bridge IDs
                                                                                           rings




                                                         198
             The Route Designator

                                  Bridge 1

                Discovery
                frame




              Ring B                                    Ring A




             RC                                       RC         RD1 RD2
Token                   Token                Token    Routing 00B1 00A0 Token
Frame      Routing      Frame                Frame                      Frame
           Control                                    Control
Header                  Trailer              Header                     Trailer
           Routing
         Information
             Field
                                                             Routing
                                                           Information
                                                               Field

                                    199
      Source Route Frame Types
• Four types of Source Route frames:

  –Single Route Explorer (SRE)
    »Also known as Spanning Tree Explorers (STE)
      •So named by the IEEE 802.5 working group
  –All Routes Explorer (ARE)
  –Specifically Routed Frame (SRF)
  –Single Route Explorer with a specific route return.



                       200
Token Ring to Ethernet Conversion


 Token Ring frame                      Copy and
                                       bit reverse                        SNAP header

                  SD     AC       FC   DA    SA      RIF    DSAP SSAP CTRL OUI     Type Info   FCS   ED   FS


                                                                Discard     Copy
 Ethernet frame


                       Preamble        DA     SA     Type    Info   FCS




                                                     201
Ethernet to Token Ring Conversion


                       Copy and
                       bit reverse     Ethernet frame


       Preamble        DA      SA    Type    Info FCS



                                                        Copy



  SD     AC       FC   DA     SA     RIF    DSAP SSAP CTRL OUI       Type Info   FCS   ED   FS
                                                 Insert
  Token Ring frame                                             SNAP header




                                               202
          Token Ring to IEEE
           802.3 Conversion


               Copy and
               bit reverse            Token Ring frame


SD   AC   FC   DA    SA      RIF      DSAP SSAP CTRL Info   FCS   ED   FS

                              Cut
                             Insert            Copy



Preamble SFD   DA     SA     Length   DSAP SSAP CTRL Info   PAD FCS


                             IEEE 802.3 frame




                                      203
IEEE 802.3 to Token Ring Conversion

                     Copy and
                     bit reverse         IEEE 802.3 frame


    Preamble   SFD   DA     SA     Length   DSAP SSAP CTRL Info   PAD FCS


                                    Cut
                                   Insert           Copy



    SD   AC     FC   DA    SA      RIF      DSAP SSAP CTRL Info   FCS   ED   FS


                                      Token Ring frame




                                              204
     Network Layer Functions

• Key Layer in Internet Architecture
• End-to-end Packets
• Adapt to lower layers



                        3
                    2       2
                    1        1


                    205
                    Network Layer
• Design Goals
   – „Independent‟ of layer 1 & 2 implementations
   – Hide layer 1 & 2 details from upper layers
• Architecture
   – Connection oriented
   – Connectionless
   – (where should reliability be done?)
• Services
   – Routing (Path selection)
   – Adaptation to different lower layers




                              206
              Routing Algorithms
• Goals
  –   Optimality
  –   Fairness
  –   Stablility
  –   Robustness
  –   Correctness
  –   Simplicity
• Adaptive vs Static
• Congestion Control




                       207
             Adaptive Routing

• Centralized

• Isolated

• Distributed




                  208
                 Distributed Routing
• Metric - Vector Algorithms
   –   sometimes called shortest path
   –   Bellman-Ford most famous
   –   Knowledge of immediate neighbors
   –   Result is “first step” in path to ultimate destination
• Link State Algorithms
   – OSPF {Open Shortest Path First}
   – Knowledge of network layer map (connectivity)




                                 209
        Congestion Control

RESEARCH ISSUE!
• Resource Reservation

• Packet Discarding

• Flow Control




                      210
Routers - Directly Attached Networks

                                       Node D




                                                         Step 4
                                                Router forwards packet
                                                 to network station D

                                                                    Network 100

                 Step 2            C
             Send packet
              to router Z         Router Z

                                   B



                            Step 1                                       Network 1
                        Find network 100             Step 3
                                                Packet is given
                                                 to the router




    Node A
                              211
     Routers - Non-Directly Attached
                Networks
• If the destination network is not directly attached to the router, the router will forward
  the packet to another router in the forwarding path of the destination network.
• Router-to-router communication is directly MAC addressed.

• Will all routers in the path perform the same decisions as the previous router?

• The last router in the path to the destination will forward the packet directly to the
  destination.

• Important to note that the data link MAC headers will constantly change while the
  packet is being forwarded.
   – Very little information in the network header will change.
      » The network layer header in the packet will contain the originator‟s full address
        and final destination address of the packet.
      » The full address of a network station is the combination of the network ID and
        its MAC address.
           • This uniquely identifies any station on the internet.




                                         212
             Multiprotocol Routers
• LANs currently operate with many different types of protocols.
   – Apple Computers can use AppleTalk.
   – UNIX workstations use TCP/IP.
   – Client/Server applications could use Novell NetWare.

• To require one router for each protocol on the LAN is not efficient.

• Multiprotocol routers were invented to handle this.
   – Arrived around 1986.
   – Routes not only based on the network IDs but are able to pass the
     packet to the correct protocol processor by examining the Type of
     packet.




                                 213
   Multiprotocol Routers - A Block
              Diagram
                    Bridge                             Router
                  Forward on
                  MAC address                      Route on
                                                  network IDs




                                  Combine both
                                    into one
                                      box
                                Can packet be routed
Incoming packet                 based on protocol type?         Bridged or routed packet


                                Bridge packet if not




                                        214
Routing Diagram

                                                        Network 4
                                                    G
                                         Router X
          H
                                                    F

                          E                             Network 3
                  Router Y

                         D



                                                        Network 2

                                C
  MAC addresses               Router Z

                                B


                                                        Network 1
          A




                       215
       Routing Information Protocol
                   (RIP)
• Known as a routing table update protocol

• Developed by Xerox and gained widespread acceptance by the proliferation
  of TCP/IP‟s implementation of it in UNIX.

• Other protocols (AppleTalk, NetWare) adopted RIP as their standard routing
  update protocol.

• Known as a distance vector protocol.
   – Vector is an adjacent router and the distance is how far away (hops) the
      network is.
   – One hop is considered one router traversed.

• Devised for relatively stable, small-to-medium size networks (less than 16
  routers in diameter) .



                                    216
          Calculating the Cost
                                                                                     Network 4
                                                    Internal routing
                                                         table         Network            Hops
                                                                         3                  1
                                      Router C
                                                                         4                  1
                                                                         2                  2
                                                                         1                  3

                                                                                     Network 3

                   Router B           Transmitted           Network          Hops
                                        routing               2                1
                                         table
                                                               3                 1
                                                               1                 2


                                                                                     Network 2
                  Transmitted
                    routing
Network    Hops      table
  1          1
  2         1                   Router A

  3         2




                                                                                     Network 1




                                217
               IP Routing

• Making Decisions
• Gathering Information
• ICMP




                   218
            Routing Table


Network   Mask Router   Hops   Age   Port ID
   3       255   C      1      30         1
   4       255   C      1      30         2
   2       255   B      2      15         2
   1       255   B      3      45         2




                  219
             Example: TCP/IP

•   Not the only way to do things ...
•   But well tested in the field
•   Brief History
•   TCP/IP vs ISO protocols




                       220
              References TCP/IP
• Overall -- Douglas Comer
   –   Internetworking with TCP/IP, Vol I, 3d ed.
   –   Internetworking with TCP/IP, Vol II
   –   Internetworking with TCP/IP, Vol III (Sockets)
   –   Internetworking with TCP/IP, Vol III (TLI)
• Unix Programming -- W. Richard Stevens
   – Unix Network Programming
   – Advanced Unix Network Programming
• Stevens & Wright
   – TCP/IP Illustrated Vol I
   – TCP/IP Illustrated Vol II
   – TCP/IP Illustrated Vol III



                             221
                        TCP/IP Stack
OSI
        FTP

 5 -7
              TELNET      DNS


 4       TCP                              UDP



 3                           IP                 ICMP
         ARP
 2
              DIX Ethernet or ...
 1



                                    222
       Notes on TCP/IP Suite

• TCP/IP preceded the OSI Reference Model
• Layers 1 & 2 are not part of the standard
• Functions above the Transport Layer are
  consolidated




                    223
               Brief Definitions

•   ARP -- Address Resolution Protocol
•   IP -- Internet Protocol
•   ICMP -- Internet Control Message Protocol
•   UDP -- User Datagram Protocol
•   TCP -- Transmission Control Protocol
•   DNS -- Domain Name System
•   FTP -- File Transfer Protocol
•   TELNET -- remote terminal




                        224
        Other TCP/IP Protocols

•   Routing Protocols -- RIP, OSPF, EGP, GGP
•   BOOTP - Bootstrap Protocol
•   RARP - Reverse ARP
•   TFTP - Trivial FTP
•   HTTP - Hyper Text Transfer Protocol
•   SMTP - Simple Mail Transfer Protocol
•   SNMP - Simple Network Management
    Protocol



                     225
            Layer Protocols
DNS
Query                             DNS
                                  Reply


            SYN

               SYN/ACK
Caller                            Callee
                         ACK
            {TCP Establishment}

  ARP
  Request                         ARP
                                  Reply



                       226
              IP Functionality

•   Presents single, virtual network to user
•   Connectionless Delivery
•   Packet Routing
•   Interface to Lower Layers




                       227
                    IP Addresses
• “Dotted Decimal”
   32 bit (4 byte) address, written by taking each
     byte as an unsigned number
• Address Classes                        [first octet]
   – A - <net> < > <host> < >        1-126
   – B - <net> < > <host> < >        128-191
   – C -< > <net> < > <host>         192-223
   – D - special subset of C         224-239
     multicast
   – E - reserved                 240-254
• Netmask
   – a 32 bit value which, when ANDed with an address, selects
     only the network part

                             228
              Netmask Usage
“Do a bitwise AND then compare for equality of
  results”

<src addr> & netmask =?= <dst addr> & netmask


                   Same netmask
if comparison is equal, then both src & dst are
   on same (sub)net.




                        229
           Netmask Examples
S=        128.194.100.10           D=        128.194.200.10
M=        255.255.255.0            M=        255.255.255.0
result    128.194.100.0            result    128.194.200.0
                      Not Equal

S=        128.194.12.10           D=        128.194.12.110
M=        255.255.255.0           M=        255.255.255.0
result    128.194.12.0            result    128.194.12.0
                           ?
 S=        67.194.18.10           D=        67.194.10.10
 M=        255.255.240.0          M=        255.255.240.0
 result    67.194.16.0            result    67.194. 0.0
                           ?

                           230
          Special Address Conventions

            all 0’s                     • This host
all 0’s               host              • Host on this net
           all 1’s                      • Limited broadcast
 net                   all 1’s          • Directed broadcast
127        anything (usually 1)         • Loopback




                                  231
                             IP Header
0        4       8                       16      19      24         31

VERS     HLEN    SERVICE TYPE                    TOTAL LENGTH

         IDENTIFICATION                  FLAGS    FRAGMENT OFFSET

TIME TO LIVE         PROTOCOL                 HEADER CHECKSUM

                             SOURCE IP ADDRESS

                       DESTINATION IP ADDRESS

       IP OPTIONS (IF ANY)                                PADDING

                                  DATA

                                   ...


                                 232
             IP Packet Handling (rcv)

                                                   Sockets

                    Transport Layer (TCP or UDP)

            Other
                        IP


                Link {DIX Type or 802.3 DSAP}



                    Physical
receiving

                               233
          IP Packet Handling (xmit)

sending               Local or Non-Local ?


                                             Search Routing
                                             Table
           ARP


                                   Found!            Missing!

          Send locally...
                                                     ICMP Error




                             234
                    Bridges or Routers


                               Address & Netmask
                               1: 131.122.24.12 255.255.255.0
1
                               2: 131.122.31.253 255.255.255.0
                               3: 131.121.18.12 255.255.240.0
            3                  4: 131.121.24.18 255.255.240.0
    A                          5: 131.121.31.254 255.255.240.0


        B                C
2                                   5



        D
                4


                         235
                                                   ICMP
• ping
       – ECHO Request/Reply
• traceroute
traceroute to falcon.ece.utexas.edu (128.83.196.10),
     30 hops max, 40 byte packets
 1 exit_133 (128.194.133.254) 2 ms 2 ms 2 ms
 2 exit_128 (128.194.128.254) 2 ms 3 ms 2 ms
 3 FDDI-T3.TAMU.EDU (128.194.1.13) 3 ms 3 ms 3 ms
 4 FDDI-WAN.TAMU.EDU (165.91.128.17) 5 ms 4 ms 6 ms
 5 sprint-gw-h1-0.the.net (129.117.16.161) 20 ms 5 ms 5 ms
 6 ut8-h1-0.the.net (129.117.16.241) 8 ms 9 ms 21 ms
 7 129.117.20.12 (129.117.20.12) 7 ms 11 ms 7 ms
 8 ens.gw.utexas.edu (128.83.7.132) 16 ms 23 ms 21 ms
 9 ece-e0.gw.utexas.edu (128.83.249.251) 12 ms 9 ms 9 ms
10 * * *




                                                    236
                      Project

• Purpose
• Options
   – Network Design
   – Software (?)
• Approach {customer/boss/professor}
• Teams {prefered size is 3}




                       237
              Project Phases
             "almost a joke, but too often true!"

1. Enthusiasm

2. Disillusionment

3. Panic

4. Search for the Guilty

5. Punishment of the Innocent

6. Praise and Honors for the Non-participants



                          238
                       Project Schedules
        "don't let yourself plan like this"




Start                                             End
                                              *




  * A miracle occurs

                                     239
                   Network Design

• An iterative, interactive process
"you have to ask questions, & you'll never get it all in one
meeting with the customer"


• More than just selecting the media
"remember you're designing a system -- make sure you look at
something for all 7 layers of the OSI model"


• More than one right answer
"don't be dogmatic. stay open to other soltuions than the one you
feel is technically best."




                                240
            Network Design,cont
                           "Do them in order. Each step is important"
Time

       • What does the customer want to do?
       • What does the customer want to use?

       {tentative design time}

       • What are the customer's desires (biases)?
       • Check for                • Check for
       completeness...             integration...


       • Implementation Plan

                           241
                           Functions
  "the 2 main reasons for a network are connectivity and resource sharing"


Electronic Mail                        Connectivity
                                        • Remote login
File Sharing
    • Transfer
    • Virtual disk/files

Resource Sharing                       Software Management
 • Printers/plotters etc
 • Modems
 • CPU
 • Disk


                                 242
                       Resources
"Remember to be precise!"


Systems
    Qty        Mfg          Version   Software


Geography
   Distances
   Constructions Standards




                            243
             Tentative Design

• Meant to bring out Key features ...
• ... and Decision points ...
        with the Customer.
• Provide your “best” solution, and be ready
  with alternatives.
   – Features vs “Costs”
• CYA, or “say it with memos”




                           244
                      User Input

"listen.

understand that you are the expert, responsible for making
sure both sides understand each other.

But there are many different solutions to any networking
problem."




                           245
                   Completeness

"Have you covered all the functions needed?"




                     Integration

"Does it all work together?"




                               246
              Implementation
                   "Make sure it can be built."


Sequence of actions

(1) Identify key points in schedule

(2) Provide alternative plans for problems



• Plan   • Build      • Test       • Turn over




                             247
               Project “Hints”

• READ the lecture slides
   – Ask the user closed end questions
   – Don‟t try to ask too much at one session
   – No preconceived scenarios
• Remember Inventory (equip., s/w, space)
• Tentative Design
   – Informal
   – High Level
   – Drawings are “Good Things”




                          248
                    More Hints

• Look in catalogs
• Report Format;
   – Problem statement: don;t just repeat what I said
   – Solution HIghlights
       » Alternatives considered
       » Word Description (logical, physical)
• Bill of Materials
   – Specific Items (model, brand)
   – Costs aren;t very important




                          249
              Transport Layer

• Services
  – Reliable Delivery
  – or Not!
• Protocols
  – Internet: TCP, UDP
  – ISO: TP0 thru TP4




                         250
                   Transport Services
                         Application “Header”     Data

                       Presentation “Header”      Data

User                   Session Header (?)        Data

Provider             Transport Header            Data

                    Network Header              Data

                   Link Header                  Data

              Framing                           Data
  {see page 481}
                                 251
           Delivery Services

• First layer that can really provide reliability
• Reliability means sequencing, error recovery,
  acknowledgements
• Not every application needs (wants) reliability




                     252
            Quality of Service

• New idea from the voice, video folk
• Not (yet) part of Internet protocols
   – RSVP in process
• Unclear which layer guarantees QoS




                       253
    Generic Transport Service
            Primitives

• Listen
   – notify Transport layer a call is expected
• Connect
   – establish Transport layer connection
• Send (or Write)
• Receive (or Read)
   – Both could be connectionless
• Disconnect (or Close)




                           254
             Berkeley Sockets

• „Sockets‟ are one of the 2 major Unix network
  programming application programming
  interfaces.
• The other is the System V Transport Layer
  Interface (TLI).
• Sockets are biased towards Unix and C.
• Good references are Doug Comer‟s Vol III
   – both of them!




                     255
                Unix File I/O

• Unix treats a file as a „stream of bytes‟

• API calls: open, creat, read, write, lseek, close

• All operate on file descriptors

• File descriptors are int‟s, but represent a
  more complex structure



                       256
                      Socket I/O

• Transport layer also provides „stream of
  bytes‟ type service to the upper layers
• API calls:
   –   socket: Initialize data structure
   –   bind: set addresses
   –   listen: specify a queue
   –   accept: wait for connection
   –   connect: initiate a connection
   –   read, write, recv, send: transfer data
   –   close, shutdown: terminate connection
   –   recvfrom, sendto: datagrams



                           257
                  Overview -- connection
           Server                                                   server blocks



socket()          bind()            listen()                                  read()
                                                       accept()




       socket()            bind()              connect()          write()




           Client

                                                  Optional(!!)




                                                 258
           Overview -- connectionless
           Server                                     server blocks



socket()          bind()            recvfrom()                  sendto()




       socket()            bind()          sendto()                    recvfrom()




           Client




                                             259
             Socket Paradigm

• Setup is „client/server‟ because someone has
  to start the conversation
• BUT, communication is bidirectional (either
  end can read or write)

• Sockets (in Unix) are multiprotocol:
   – TCP/IP, UNIX, XNS {address families}




                         260
                 Server Types

• Iterative
   – Receive request, process it, go to next on queue
   – Best in connection-less environment


• Concurrent
   – Receive request, fork process, reset socket
   – Best when extended interaction is needed




                          261
              Socket „Details‟

• If you don‟t want to block on a read, look at
  the select system call.
• You‟ll need the following includes:
   – #include <sys/types.h>
   – #include <sys/socket.h>
• Program examples are available on net.




                         262
        Managing Connections

•   Addressing
•   Identifying duplicate TPDUs
•   Three-way handshakes
•   Flow control
•   Crash recovery (largely ignored)




                      263
                      TCP

•   Reliable, sequenced stream of bytes
•   Virtual circuit
•   Buffered transfer
•   Unstructured
•   Full Duplex




                      264
         TCP - How it Works

• Positive Acknowledgements w/
  Retransmission
• Sliding Windows
• Pages 531, 532 give the programmer‟s state
  machine info




                    265
                     TCP Features
•   A protocol, not a package
•   Ports (Well Known Ports)
•   Out of Band, or URGENT, data
•   Timeouts
     – RTT Estimation (Karn‟s Algorithm) (pg 541)
• Congestion
     – Slow-Start Methodolgy
• Limitations




                               266
                         TCP Header
0    4              10                16             24             31

    SOURCE PORT                            DESTINATION PORT

                         SEQUENCE NUMBER

              ACKNOWLEDGEMENT NUMBER

HLEN RESERVED       CODE BITS                    WINDOW

         CHECKSUM                             URGENT POINTER

           OPTIONS (IF ANY)                               PADDING

                                DATA

                                  ...


                                267
 TCP Connection Management

• Three Way Handshake
  – SYN, SYN/ACK, ACK
• May be viewed as two Simplex connections
• Window management
  – Advertising Zero Window Size
  – Nagle‟s algorithm
  – Silly Window Syndrome




                        268
                          UDP
    • Your basic datagram
    • No acknowledgements, no reliability
    • Why use it?
0                               16                      31

     SOURCE PORT                     DESTINATION PORT

     MESSAGE LENGTH                  CHECKSUM

                          DATA

                            ...




                          269
    Transport Layer Performance

•   Timeout Values
•   Inadvertent Synchronized Loads
•   Latency (Bandwidth-delay product)
•   MTU, MSS values
•   Router impact




                      270
            Performance Hints

• CPU normally is the bottleneck
   – most time is spent in protocol stacks, not on the wire
• Per-packet overhead means big packets are
  much more efficient…
• But delays to create big packets impact
  interactive applications
• Easy to increase bandwidth, impossible (?) to
  reduce propagation delay




                           271
     Performance Challenges

• Gigabit networks
• Satellites




                     272
         Packet Tracing --
        Putting it all together

• Packet tracing: the actions of observing
  packets as they appear on the media and
  deriving the activities occuring on hosts; or,
  knowing the top-level commands issued and
  predicting the packets that will appear on the
  media.




                     273
 Motivations for Packet Tracing

• Understanding network protocols
• Debugging your network
• Debugging applications that work over the
  network




                    274
            Layer Protocols
DNS
Query                             DNS
                                  Reply


            SYN

               SYN/ACK
Caller                            Callee
                         ACK
            {TCP Establishment}

  ARP
  Request                         ARP
                                  Reply



                       275
                   Examples - 1
• Assumptions:
Host A, IP Address 128.194.1.2
Host B, IP Address 128.194.1.3
netmask 255.255.255.0
ARP caches and bridge tables are empty
All hosts know DNS Server is 128.194.1.3

Trace command “DNS Query” initiated on Host A


          A                                B

                           1




                            276
                 Answer - 1

Seg   DAE   SAE   “type”      SAIP   DAIP

1     FF    EA    ARP Req     1.2    1.3
1     EA    EB    ARP Reply   1.3    1.2
1     EB    EA    DNS Q       1.2    1.3
1     EA    EB    DNS R       1.3    1.2




                   277
                       Examples - 2
    • Assumptions:
    Host A, IP Address 128.194.1.2
    Host B, IP Address 128.194.1.3
    Host C, IP Address 128.194.1.4
    netmask 255.255.255.0
    ARP caches and bridge tables are empty
    All hosts know DNS Server is 128.194.1.3

    Trace command “DNS Query” initiated on Host A
                                                B
C                     A

    2                                     1



                                278
                 Answer - 2

Seg   DAE   SAE   “type”      SAIP   DAIP

1     FF    EA    ARP Req     1.2    1.3
2     FF    EA    ARP Req     1.2    1.3
1     EA    EB    ARP Reply   1.3    1.2
1     EB    EA    DNS Q       1.2    1.3
1     EA    EB    DNS R       1.3    1.2




                   279
                    Examples - 3
• Assumptions:
Host A, IP Address 128.194.1.2
Host B, IP Address 128.194.1.3
netmask 255.255.255.0
ARP caches and bridge tables are empty
All hosts know DNS Server is 128.194.1.3

Trace command “telnet 128.194.1.3” initiated on Host A


          A                                   B

                            1




                            280
                 Answer - 3

Seg   DAE   SAE   “type”      SAIP   DAIP

1     FF    EA    ARP Req     1.2    1.3
1     EA    EB    ARP Reply   1.3    1.2
1     EB    EA    TCP SYN     1.2    1.3
1     EA    EB    SYN/ACK     1.3    1.2
1     EB    EA    TCP ACK     1.2    1.3




                   281
                    Examples - 4
• Assumptions:
Host A, IP Address 128.194.1.2
Host B, IP Address 128.194.1.3
netmask 255.255.255.0
ARP caches and bridge tables are empty
All hosts know DNS Server is 128.194.1.3

Trace command “telnet B” initiated on Host A


          A                                    B

                            1




                            282
                 Answer - 4

Seg   DAE   SAE   “type”      SAIP   DAIP

1     FF    EA    ARP Req     1.2    1.3
1     EA    EB    ARP Reply   1.3    1.2
1     EB    EA    DNS Q       1.2    1.3
1     EA    EB    DNS R       1.3    1.2
1     EB    EA    TCP SYN     1.2    1.3
1     EA    EB    SYN/ACK     1.3    1.2
1     EB    EA    TCP ACK     1.2    1.3


                   283
                      Examples - 5
• Assumptions:
Host A, IP Address 128.194.1.1
                                                             3
Host B, IP Address 128.194.2.2
Host X, IP Address 128.194.1.254 on segment 1            2       2
Host X, IP Address 128.194.2.254 on segment 2            1       1
netmask 255.255.255.0
ARP caches and bridge tables are empty
All hosts know DNS Server is 128.194.1.3

Trace command “telnet 128.194.2.2” initiated on Host A

                                  X
                A                                 B

                  1                               2

                            284
              Examples - 5 cont.

Routing table on A:
Net               Mask            Router
0.0.0.0           0.0.0.0         128.194.1.254
Routing table on B:
Net               Mask            Router
0.0.0.0           0.0.0.0         128.194.2.254


Routing table on X:
Net               Mask            Router




                            285
                  Answer - 5
Seg   DAE   SAE   “type”      SAIP    DAIP

1     FF    EA    ARP Req     1.1     1.254
1     EA    EX1   ARP Reply   1.254   1.1
1     EX1   EA    TCP SYN     1.1     2.2
2     FF    EX2   ARP Req     2.254   2.2
2     EX2   EB    ARP Reply   2.2     2.254
2     EB    EX2   TCP SYN     1.1     2.2
2     EX2   EB    SYN/ACK     2.2     1.1
1     EA    EX1   SYN/ACK     2.2     1.1
1     EX1   EA    TCP ACK     1.1     2.2
2     EB    EX2   TCP ACK     1.1     2.2




                      286
                                Problem A -1
Use the data and diagram to show the packets resulting from the command "telnet B" being
executed on host C. Assumptions: The diagram consists of 8 numbered ethernet segments,
5 bridges (unlabeled rectangles), two routers (X, Y) and hosts A, B, C. ARP caches are
empty. Tables on bridges are empty. Routing entries are as shown below. Host A is the
DNS nameserver and its IP address is known to all machines.
Netmask for 128.194 is 255.255.255.0.

A- 128.194.15.1, ethernet e1
B- 128.194.99.2, ethernet e2
C- 128.194.12.3, ethernet e3



X- seg 7:128.194.15.100, ethernet e5
   seg 3:128.194.12.100, ethernet e6
Y- seg 8:128.194.99.101, ethernet e7
   seg 4:128.194.12.101, ethernet e8




                                            287
Problem A - 2




    288
                      Problem A - 3

Host   Network           Netmask         Router
A:     0.0.0.0           0.0.0.0         128.194.15.100

B:     128.194.12.0      255.255.255.0   128.194.99.101

       128.194.15.0      255.255.255.0   128.194.99.101
C:     128.194.15.0      255.255.255.0   128.194.12.100

       0.0.0.0           0.0.0.0         128.194.12.101
X:     128.194.99.0      255.255.255.0   128.194.12.101

       0.0.0.0           0.0.0.0         128.194.12.101
Y:     128.194.15.0      255.255.255.0   128.194.12.100

       0.0.0.0           0.0.0.0         128.194.12.100




                            289
               Decode Example - 1

33 cfl02 -> h-207-200-71-52.netscape.com TCP D=80 S=1977 Syn Seq=1011631 Len=0 Win=0


    0: 0000 ef03 efb0 00a0 2435 5343 0800 4500    ........$5SC..E.

   16: 002c 6f03 0000 3c06 f2c2 80c2 8547 cfc8    .,o...<......G..

   32: 4734 07b9 0050 000f 6faf 0000 0000 6002    G4...P..o.....`.

   48: 0000 036d 0000 0204 05a0 0000              ...m........




                                       290
               Decode Example - 2

36 h-207-200-71-52.netscape.com -> cfl02         TCP D=1977 S=80 Syn Ack=1011632
 Seq=1144453529 Len=0 Win=49152

    0: 00a0 2435 5343 0000 ef03 efb0 0800 4500     ..$5SC........E.

   16: 002c 914c 4000 3206 9a79 cfc8 4734 80c2     .,.L@.2..y..G4..

   32: 8547 0050 07b9 4436 f999 000f 6fb0 6012     .G.P..D6ù...o.`.

   48: c000 0577 0000 0204 05b4 15f8               ...w.......ø




                                       291
                Decode Example - 3

37 cfl02 -> h-207-200-71-52.netscape.com TCP D=80 S=1977    Ack=1144453530 Seq=1011632
  Len=0 Win=2880

     0: 0000 ef03 efb0 00a0 2435 5343 0800 4500    ........$5SC..E.

    16: 0028 6f04 0000 3c06 f2c5 80c2 8547 cfc8    .(o...<......G..

    32: 4734 07b9 0050 000f 6fb0 4436 f99a 5010    G4...P..o.D6ù.P.

    48: 0b40 d1f4 0000 0204 05a0 0000              .@..........




                                        292
                                        Decode Example - 4
56 cfl02 -> h-207-200-71-52.netscape.com TCP D=80 S=1977                   Ack=1144453530 Seq=1011632 Len=374 Win=2880

       0:   0000   ef03   efb0   00a0   2435   5343   0800   4500   ........$5SC..E.
      16:   019e   6f08   0000   3c06   f14b   80c2   8547   cfc8   ..o...<..K...G..
      32:   4734   07b9   0050   000f   6fb0   4436   f99a   5018   G4...P..o.D6..P.
      48:   0b40   a905   0000   4745   5420   2f65   7363   6170   .@....GET /escap
      64:   6573   2f73   6561   7263   682f   696d   6167   6573   es/search/images
      80:   2f68   6f72   697a   6f6e   7461   6c62   6172   2e67   /horizontalbar.g
      96:   6966   2048   5454   502f   312e   300d   0a49   662d   if HTTP/1.0..If-
     112:   4d6f   6469   6669   6564   2d53   696e   6365   3a20   Modified-Since:
     128:   5765   646e   6573   6461   792c   2031   362d   4170   Wednesday, 16-Ap
     144:   722d   3937   2030   303a   3430   3a31   3620   474d   r-97 00:40:16 GM
     160:   543b   206c   656e   6774   683d   3534   0d0a   5265   T; length=54..Re
     176:   6665   7265   723a   2068   7474   703a   2f2f   686f   ferer: http://ho
     192:   6d65   2e6e   6574   7363   6170   652e   636f   6d2f   me.netscape.com/
     208:   6573   6361   7065   732f   7365   6172   6368   2f6e   escapes/search/n
     224:   7473   7263   6872   6e64   2d31   2e68   746d   6c0d   tsrchrnd-1.html.
     240:   0a43   6f6e   6e65   6374   696f   6e3a   204b   6565   .Connection: Kee
     256:   702d   416c   6976   650d   0a55   7365   722d   4167   p-Alive..User-Ag
     272:   656e   743a   204d   6f7a   696c   6c61   2f32   2e30   ent: Mozilla/2.0
     288:   2028   5769   6e31   363b   2049   290d   0a48   6f73    (Win16; I)..Hos
     304:   743a   2068   6f6d   652e   6e65   7473   6361   7065   t: home.netscape
     320:   2e63   6f6d   0d0a   4163   6365   7074   3a20   696d   .com..Accept: im
     336:   6167   652f   6769   662c   2069   6d61   6765   2f78   age/gif, image/x
     352:   2d78   6269   746d   6170   2c20   696d   6167   652f   -xbitmap, image/
     368:   6a70   6567   2c20   696d   6167   652f   706a   7065   jpeg, image/pjpe
     384:   670d   0a43   6f6f   6b69   653a   204e   4554   5343   g..Cookie: NETSC
     400:   4150   455f   4944   3d31   3030   3065   3031   302c   APE_ID=1000e010,
     416:   3132   3336   3139   6130   0d0a   0d0a                 123619a0....




                                                                           293
                                Decode Example - 5
58 h-207-200-71-52.netscape.com -> cfl02                         TCP D=1977 S=80      Ack=1012006 Seq=1144453530 Len=280 Win=49152


    0:   00a0   2435   5343   0000   ef03   efb0   0800   4500     ..$5SC........E.
   16:   0140   92eb   4000   3206   97c6   cfc8   4734   80c2     .@..@.2.....G4..
   32:   8547   0050   07b9   4436   f99a   000f   7126   5018     .G.P..D6ù...q&P.
   48:   c000   3e23   0000   4854   5450   2f31   2e31   2032     ..>#..HTTP/1.1 2
   64:   3030   204f   4b0d   0a53   6572   7665   723a   204e     00 OK..Server: N
   80:   6574   7363   6170   652d   456e   7465   7270   7269     etscape-Enterpri
   96:   7365   2f33   2e30   0d0a   4461   7465   3a20   5375     se/3.0..Date: Su
  112:   6e2c   2032   3420   4175   6720   3139   3937   2030     n, 24 Aug 1997 0
  128:   383a   3135   3a33   3820   474d   540d   0a43   6f6e     8:15:38 GMT..Con
  144:   7465   6e74   2d74   7970   653a   2069   6d61   6765     tent-type: image
  160:   2f67   6966   0d0a   4c61   7374   2d6d   6f64   6966     /gif..Last-modif
  176:   6965   643a   2054   7565   2c20   3135   2041   7072     ied: Tue, 15 Apr
  192:   2031   3939   3720   3233   3a34   303a   3136   2047      1997 23:40:16 G
  208:   4d54   0d0a   436f   6e74   656e   742d   6c65   6e67     MT..Content-leng
  224:   7468   3a20   3534   0d0a   4163   6365   7074   2d72     th: 54..Accept-r
  240:   616e   6765   733a   2062   7974   6573   0d0a   436f     anges: bytes..Co
  256:   6e6e   6563   7469   6f6e   3a20   6b65   6570   2d61     nnection: keep-a
  272:   6c69   7665   0d0a   0d0a   4749   4638   3961   0b00     live....GIF89a..
  288:   1400   9100   00ff   ffff   6699   9900   0000   0000     ........f.......
  304:   002c   0000   0000   0b00   1400   0002   0f8c   8f01     .,..............
  320:   cbed   0fa3   9cb4   da8b   b3de   9c17   003b            .............;




                                                                      294
               Decode Example - 6

59 cfl02 -> h-207-200-71-52.netscape.com TCP D=80 S=1977    Ack=1144453810 Seq=1012006
 Len=0 Win=2880

    0: 0000 ef03 efb0 00a0 2435 5343 0800 4500    ........$5SC..E.

   16: 0028 6f09 0000 3c06 f2c0 80c2 8547 cfc8    .(o...<......G..

   32: 4734 07b9 0050 000f 7126 4436 fab2 5010    G4...P..q&D6..P.

   48: 0b40 cf66 0000 0204 05a0 0000              .@.f........




                                       295
               Decode Example - 7

60 h-207-200-71-52.netscape.com -> cfl02         TCP D=1977 S=80 Fin Ack=1012006
 Seq=1144453810 Len=0 Win=49152

    0: 00a0 2435 5343 0000 ef03 efb0 0800 4500     ..$5SC........E.

   16: 0028 92ec 4000 3206 98dd cfc8 4734 80c2     .(..@.2.....G4..

   32: 8547 0050 07b9 4436 fab2 000f 7126 5011     .G.P..D6ú...q&P.

   48: c000 1aa5 0000 6915 9192 0000               ......i.....




                                       296
               Decode Example - 8

61 cfl02 -> h-207-200-71-52.netscape.com TCP D=80 S=1977    Ack=1144453811 Seq=1012006
 Len=0 Win=2880

    0: 0000 ef03 efb0 00a0 2435 5343 0800 4500    ........$5SC..E.

   16: 0028 6f0a 0000 3c06 f2bf 80c2 8547 cfc8    .(o...<......G..

   32: 4734 07b9 0050 000f 7126 4436 fab3 5010    G4...P..q&D6ú.P.

   48: 0b40 cf65 0000 0204 05a0 0000              .@.e........




                                       297
          Top Three Layers

• Session Layer

• Presentation Layer

• Application Layer




                      298
          Session Layer Design

• Marks the division between “upper layers and
  lower layers”
     – lower layers:= end to end communications
     – upper layers:= user-oriented services
•   Invented by ISO
•   Can support transport layer QoS
•   Not explicitly used by TCP/IP
•   “Generally connection-oriented”




                           299
  Mission of the Session Layer

• Provides a way for the session users to
  establish connections, called sessions, and
  transfer data over the sessions in an orderly
  way.
• Examples:
   – remote logins
   – file transfers
   – Remote Procedure Calls




                        300
           Session Layer &
           Transport Layer

• Usually a transport connection is required to
  establish a session
• Session Layer provides Control. It says what
  to do, not necessarily how to do it.
• Can provide redundancy and multiplexing of
  transport layer resources
• Administrative control point




                    301
               Data Exchange
• Same three phases as transport layer
   – establishment
   – use
   – release
• In many cases the session layer simply
  passes the primitive requests to the transport
  layer.
• orderly (graceful) release vs. abrupt release
   – abrupt release is analogous to hanging up the phone
   – orderly release uses a full handshake, (not provided in
     transport layer)




                          302
         Dialog Management

• In principle, all OSI connections are full
  duplex
• Some upper layer software is structured to be
  half-duplex
• This is to simplify the software and has
  nothing to do with hardware limitations
• The session layer supports data token
  schemes to support half-duplex
  transmissions



                    303
           Synchronization

• Transport layer provides error recovery only
  from communication errors
• Synchronization in the transport layer
  provides for returning the session entries
  back to the last known correct state.
• Example: Session established and large file
  transmitted; receiving end has no storage and
  directly prints the incoming data. The printer
  dies and data is lost.
• Session users could split the text into pages
  and insert a synchronization point between
  each page.
                    304
            Activity Management

• Users split the message stream into activities

• delimiters are added in the session to
  separate activities



            First
            File           Second File Sent
            Sent                                     Session

                           Start              Stop
    Start           Stop


                                   305
       Remote Procedure Calls

•   Based on the connectionless model
•   Generally outside the OSI model
•   Can be implemented in the application layer
•   Multiple Flavors
     – {Sun} ONC RPC
     – {OSF} DCE RPC




                       306
    “RPC School of Thought”

• Clients sending messages are viewed as
  procedure calls with the reply being the
  return from the procedure
• Contrast this to the more “conventional”
  school which views I/O with primitives such
  as X-DATA.request and X-DATA.return as I/O
  and interrupts respectively.




                   307
                       RPC Invocation
Client   Client Stub   Network         {Portmapper}       Server Stub       Server


                                                      1


                                                                        2

                                 3



                                 4



                                 5                                      6




                                 7




                                 308
   RPC Semantics and Orphans
• Operations
  – exactly once
  – at most once
  – at least once
• Handling crashes:
  – 1. Hang forever, waiting for reply that never comes
  – 2. Time out and raise an exception
  – 3. Time out and retransmit
• Orphans
  –   extermination
  –   expiration
  –   reincarnation (kill & restart)
  –   gentle reincarnation (selectively kill and restart)

                               309
    Session Layer Conclusions

• Not used in ARPANET or USENET
• Some debate on including it in the ISO model
Closest Internet example of an OSI (not ISO) stack:

                      NFS
                      XDR
                      RPC
                      UDP
                      IP

                      whatever



                             310
          Presentation Layer


                 Information
               Transformation



Network                                           Local
Format                                            Format




            “few standards, but a lot of ideas”


                       311
       Presentation Functions

These are examples!

• Syntax (format) conversion

• Compression

• Encryption
   – Sub-issue: Does it belong here?




                         312
     Presentation Layer, cont.

• Providing a way to specify complex data
  structures

• Managing the set of data structures required

• Converting data between internal and external
  form




                    313
         Data Representation

• ASCII vs. EBCDIC

• two‟s complement vs. one‟s complement

• FFF0 hex is -15 1‟s complement; -16 2‟s
  complement

• byte order right left vs. left right

• Text File formats

                       314
    Abstract Syntax Notation 1
             (ASN.1)

• Data Structures
• Abstract Syntax
• Transfer Syntax
• International Standard 8825
• Notation used to encode, transfer and decode
  data structures across a wide range of
  applications
• Both connection-oriented and connectionless
  primitives



                    315
            Data Compression

• Encoding a Finite Set of Equally Likely
  Symbols
   – Finiteness of the set of symbols.
• Frequency Dependent Coding
   – The relative frequencies with which the symbols are
     used.
• Context Dependent Encoding
   – The context in which a symbol appears.




                          316
                 Compression

• Elimination of Redundancy
  – (increased susceptibility to error)


• Examples
  –   Run Length Encoding
  –   Predictive Codes
  –   Huffman
  –   LZW




                          317
 Frequency Dependent Coding

• In English, “E” occurs ~100 times more than
  the letter “Q”

• So give common symbols short codes and
  longer symbols longer codes.

• Theoretical minimum encoding often requires
  fractional bits, but close approximations
  available.




                    318
               Huffman Coding

• 1. Write down all symbols and associated probability of
  each. Eventually a binary tree is built on these nodes, with
  the symbols representing terminal nodes.
• 2. Find the two smallest nodes and mark them. Add a new
  node with arcs to each of the nodes just marked. Set the
  probability of the new node to the sum of the probabilities of
  the two nodes connected to the new node.
• 3. Repeat until all symbols are marked except one. The
  probability of the unmarked node will always be 1.0.
• 4. The encoding for each symbol is found by tracing the path
  from the unmarked symbol to that symbol, recording the
  sequence of left and right branches taken. The code is the
  path, left = 0, right = 1.



                           319
  Context Dependent Encoding

• Uses conditional probability instead of
  independent probability.
• What is P(u|q)?
• So determine the conditional probability for
  each possible predecessor and store in a
  table.
• For k symbols this requires k2 entries.




                     320
 Network Security and Privacy

• Protecting data from being read by
  unauthorized persons.

• Preventing unauthorized persons from
  inserting and deleting messages.

• Verifying the sender of each message.

• Allowing electronic signatures on documents.



                    321
                Cryptography

• Traditional Cryptography
   – Substitution Ciphers
   – Codes
   – Transposition Ciphers
• Data Encryption Standard
• Key Distribution
• Public Key Crytography
   – MIT Algorithm
• Authentication & Digital Signatures
   – Federal Standards



                         322
           Cryptography Users

• Military

• Diplomatic

• Diarists

• Lovers

• Curmugdeons



                  323
         Cyptography Terms

• Ciphertext or Cryptogram -- encrypted
  message

• Cryptanalysis -- breaking ciphers

• Cryptography -- devising ciphers

• Cryptology := Cryptanalysis and
  Cryptography



                    324
                    Encryption Model
              Passive Listener




Plaintext                Ciphertext                         Plaintext




            Key-1
                                  Active Intruder   Key-2



                                 325
                     Keys

• If Key-1 is the same as Key-2, then it has to be
  a secret key process. They can differ, making
  it a Public Key Process.

• Big Problems: key distribution and key
  security




                     326
      Fundamental Truths of
           Cryptology

• Potential intruders know the general
  encryption method.

• Message contents may be guessed.

• Cryptographic systems may be changed, but
  rarely are.

• Non-technical compromises always
  outnumber successful cryptanalysis.


                    327
                         Ciphers

• Substitution (preserve order, disquise)
   –   Caesar code = “shift 4”
   –   Alphabet shifted by k letters --”enigma”
   –   Exhaustive search infeasible
   –   Words and phrases may be guessed
• Codes
   – Purple code, Japanese translated into Latin
   – Navajo talkers
• Transposition Ciphers (reorder, do not
  disguise)
   – Game is up when key length is guessed
   – Once close, easy to guess

                            328
      Data Encryption Standard

•   Developed by IBM in 1977
•   Implemented in hardware
•   Widely used
•   128 bit key proposed, 56 bit key specified
    Any guesses why?




                       329
       Public Key Encryption

• Applying the decryption key to an encrypted
  message must return the plaintext message.

• The decryption key can‟t be guessed from an
  encyption key.

• The encryption key cannot be broken by a
  plaintext attack.

• Key Point: the decryption key must be
  privately held.

                    330
             RSA Algorithm

• 1. Choose two large primes, p and q, each
  greater than 10100.

• 2. Compute n = p * q and z = (p - 1) * (q - 1).

• 3. Choose a number relatively prime to z and
  call it d.

• 4. Find e such that e * d = 1 mod z.




                      331
     Implementation of the MIT
            Algorithm

• To encrypt
   – divide plaintext P into k bits where k is the largest
     integer for 2k < n.
   – compute C = Pe(mod n)
• To decrypt
   – P = Cd(mod n)
• Encryption requires e and n (public key)
• Decryption requires d and n (private key)
• If n can be factored, then this yields p an q,
  then z.
• Euclid‟s Algorithm will derive e and d from z.

                           332
          Digital Signatures

• A‟s secret key must remain secret

• B has A‟s public key and A has B‟s public key

• B received a encypted message from A that
  he decypts with A‟s public key

• B can later show that lacking A‟s private key
  that he could not have produced the
  encrypted message


                     333
       Politics of Cryptography

•   Software as Munition
•   “Clipper” Chip
•   Digital Telephony Bill
•   Digital Signature Standard
•   Other Countries

• Current Legislation




                      334
             Application Layer
• File Transfer, Access and Management
   – virtual file store
   – file servers and requesting clients
• Electronic Mail
   – process to process traffic expected to dominate Internet
   – actually email dominates the Internet
• Virtual Terminals
   – representing the abstract state of the real terminal
• Remote Job Execution
   – JTM: Job Transfer and Manipulation




                           335
                ISO Applications

•   FTAM ~ FTP File Transfer, Access & Manipulation
•   VTS ~ TELNET Virtual Terminal Service
•   JTM ~ ??? Job Transfer & Manipulation {maybe rsh, RPC?}
•   MHS ~ SMTP Message Handling System (X.400)




                            336
                 ISO Terminology


                 “applications”

               SASE            SASE

                               CASE




[Specific|Common] Application Service Elements

“think of them as programming libraries or APIs”




                              337
        ISO Service Elements
             (examples)

• Association Control Service Element
  (primitives)

• Commitment, Concurrency and Recovery
   – atomic actions
   – two phase commit




                        338
                    File Servers

• 1. File Structure

• 2. File Attributes
   – e.g. identifier, size of storage, access control
• 3. File Operations
   – create, delete move
   – OSI has defined virtual filestore operations




                            339
               Replicated Files

• Why multiple file servers?
   – 1. To split the workload over multiple servers.
   – 2. To allow file access to occur even if one file server is
     down
   – 3. To increase reliability by having independent backups
     of each file

• Updates

• Voting



                           340
            Electronic Mail

• Motis and X.400
  CCITT has aligned them for compatibility
  May replace SMTP

• The user agent
  user interface

• Message transfer agent
  post office




                    341
          Virtual Terminals

• Scroll mode terminals
  no local resources; dumb display and
  transmission
• Page mode terminals
  25 x 80 character display
  screen editing via termcap
• Form mode terminals
  local processing enabled
• Bitmapped terminals
  like X stations
• Browsers!
                   342
        Case Study: Internet

• File Transfer

• Electronic Mail

• Virtual Terminals




                      343
            Getting Started

•   RARP
•   BOOTP
•   TFTP
•   DHCP




                 344
       Domain Name System

• A heirarchial, distributed database
• A service primarily aimed at mapping names
  to IP addresses
• Partitioned for ease of administration




                   345
         DNS Structure (partial)
                                     .

                                                        gov
          edu                        com




utexas          tamu                     ibm




                   cs                          austin


         mac1          solar                   mac1

                               346
          DNS -- How it Works

•   DNS Servers in a logical tree
•   DNS clients on every host
•   Iterative Queries
•   Recursive Queries




                       347
                          ARP

• Address Resolution Protocol {translate network
  layer address to physical address}


• Part of general resolution procedure:

                    name {e.g., neuron.cs.tamu.edu}
        DNS

                    IP Address {e.g., 128.194.133.1}
        ARP

                    Ethernet address {e.g., 08:00:20:08:58:78}


                          348
         File Transfer Protocol

• FTP recognizes four file types:
• 1. Image
   – bit by bit transfer
• 2. ASCII
• 3. EBCDIC
• 4. Logical Byte files
   – binary files which use byte size other than 8 bits




                           349
            Electronic Mail

• Pioneered by ARPANET

• RFC 822 (widely used)

• Simple Mail Transfer Protocol (SMTP)

• Supports only ASCII text

• name@domain addressing



                    350
    Virtual Terminals - TELNET

• Designed for scroll mode terminals

• Hit a key , 8-bit bytes are sent

• 95 ASCII and 7 control characters legal




                      351
    USENET--HOW TO AVOID
        GRADUATION

• Internet compatible (now)

• Variety of newsgroups

• Moderated newsgroups

• NNTP, Network News Transfer Protocol,
  allows selective downloading of messages
  to multiple sites



                    352
                     The Web

• “the” killer application for the Internet
• Two components for popularity
   – http combines multiple access (gopher, ftp, etc) methods
   – hypertext interface supports point-and-click interface
• Who will organize the information?
   – No one...
   – Database experts
   – Librarians (!)




                          353
           Web Terminology
• Web Browsers
  – Netscape
  – Mosaic
• Web Servers
  – http daemon
      » httd.conf - main server config file
      » srm.con - server resource config file
      » access.conf - global access control file
• Home Page
  – Eg., www.cs.tamu.edu
• HTML
  – HyperText Markup Language


                         354
                HTML Document
<HTML>
<HEAD>
<TITLE>Willis Marti‟s Homepage</TITLE>
<LINK REV=“OWNER” HREF=“mailto:willis@cs.tamu.edu”>
</HEAD>
<BODY>
<IMG SRC=“my-logo.gif” ALT=“logo”>
<H1> Sample HTML Document</H1>
<EM> To demonstrate HTML </EM>
<HR>
....




                          355
       Web Future Directions

• HTML Enhancements

• Secure Transactions

• Uniform Naming

• Librarians & Brokers

• Information “push” or “pull”

                    356
           Layer 7 Summary

• Service Element Model

• Not all Apps belong here...

• Common Network Services




                     357
       What is a Distributed System?

Just insert a
network?


                                 Mass
                                 Storage
                Computing
                (CPU)


                            User
                            Interface




                       358
    Distributed System

                 Services


        Servers (Storage, Compute)


                  Network




             User Interfaces
Users

                               Users



                   359
          D.S. Design Issues

• Transparency

• Flexibility

• Reliability

• Performance

• Scalability




                 360
        More Design Issues

• Global Clocks?

• Causality

• Information Consistency




                   361
            Distributed Control

• Master/Slave (Issue: Response Time)
    – Polled
    – Command -> <-Response
    – Schedule under control of server
• Client/Server (Issue: Server Size)
    – Interrupt, or Event, Driven
    – Aperiodic Scheduling
• Peer-to-Peer (Issue: Coordination)
    – No single critical node
    – Hard to describe or predict




                           362
         Distributed System:
          Why or Why not?

• Performance

• Economics

• Reliability

• Security




                363
          D. S. Architectures

• Cooperating Peers
• Client-Server
• Tiered Client-Server
   – Data Repository
   – Compute Servers
   – Client Stations




                       364
                   “Intranets”

• Definition
   – Using Internet protocols, especially Web tools, for
     internal MIS
• Motivation
   – Information “push” vs “pull”
• Problems
   – User Capabilities
   – Corporate Policy or Personal Opinion




                          365
          Key Protocol Areas

•   Directory Services
•   RPCs
•   Security/Authentication
•   (Performance) Management
•   Programming Models




                   366
                   References

• ISO RM-ODP
   – ITU-T X.901/ISO 10746-1/2/3/4
• Amjad Umar Distributed Computing: A
  Practical Synthesis
   – PTR Prentice-Hall, Englewood Cliffs, NJ, 1993
• Sape Mullender Distributed Systems, 2d ed.
   – Addison Wesley, 1993




                         367
         Network Management
              Definition

"...deploying and coordinating resources in
order to plan, operate, administer, analyze, evaluate,
design and expand communication networks to
meet service-level objectives at all times, at a
reasonable cost, and with optimum capacity."




                      368
      Network Management
        Functional Areas

• Fault Management
 detect -- diagnose -- repair
•Configuration/Name Mgmt
 a database problem...
•Performance Mgmt
 measure and predict
•Accounting Mgmt
 look at individual usage
•Security Mgmt
 access control and encryption




                         369
      Management Protocols

• SNMP - Simple Network Management
  Protocol
  – Internet
• CMIP - Common Management Information
  Protocol
  – ISO
• TMN - Telecommunications Management
  Network
  – ITU-T




                  370
       Management Protocols
           Philosophy

• SNMP - Simple Network Management
  Protocol
  – keep it simple! (cf the Internet toaster)
• CMIP - Common Management Information
  Protocol
  – the bazaar: whatever you want
• TMN - Telecommunications Management
  Network
  – actually a separate network specification




                           371
   SNMP vs CMIP {round 1}

SNMP                      CMIP




        Requirements from
        various vendors and
        user communities




              372
        ISO Management Overview
Fault      Configuration Performance Security Accounting
Management Management Management Management Management



               System Management Functions
Object Mgmt Alarm Mgmt Event Report Mgmt Workload Monitoring
State Mgmt Log Control Security Alarm        Security Reporting
Measurement Summarization         Bill Verification   Billing
Resource Utilization     Test Mgmt                    Relation Mgmt




                      CMISE Services
Initialize Event Report   Terminate        Action Create Abort
Set Get Delete Cancel     Confirmed Event Report Confirmed Get


                               373
         SNMP Architecture

• Keep the agent as simple as possible
• Support remote management operations to
  the fullest extent possible
• Plan for future additions & expansion
• Be independent of specific hosts or devices
• Operate at the Application level




                    374
    Internet Management Model


                      Managed
              Agent
                      Entities

Network
Management

              Proxy      Managed
              Agent      Entities




              375
                           SNMP

• Intersection of vendor/user requirements
• Few „verbs‟:
   –   get / get-next
   –   get-bulk {SNMPv2}
   –   set
   –   trap
• Polled, Master-Slave, Request-Response




                           376
                SNMP Format

• <header><verb><value><variable>[<verb><value><variable>]
• ASN.1 subset to describe value format
• MIB-II{Management Information Base} to
  identify variables
• UDP as a Transport layer
• Now out! SNMPv2




                         377
                 The MIB

• Standard set of data for managing network
  devices
• Variable names are part of the ISO/CCITT
  object identifier namespace
• Provides globally unique identifiers
• Variables governed by Structure of
  Management Information (SMI) specification




                   378
        Accessing MIB Data

• SNMP Communities
• SNMP Views
• SNMP Authentication




                  379
      Abstract Syntax Notation 1
               (ASN.1)
• Data Structures
• Abstract Syntax
• Transfer Syntax
• International Standard 8825
• Notation used to encode, transfer and decode
  data structures across a wide range of
  applications
• Both connection-oriented and connectionless
  primitives


                       380
    Example SNMP PDU using
             ASN.1
SEQUENCE       len=41 INTEGER          len=1 vers=0
   30          29         02           01       00
string len=6 p         u      b        l        i           c
   04    06    70      75     62       6C       69          63
getreq. len=28 INTEGER len=4 -------request ID----------------
   A0    1c    02      04     05       AE       56          02
INTEGER len=1 status INTEGER len=1 error index
   02    01    00      02     01                00
SEQ.    len=14 SEQ     len=12 objectid          len=8
   30    0E    30      0C     06                08
1.3     6      1       2      1        1        1           0
   2B 06       01      02     01       01       01          00
null    len=0
05      00

                           381
            SNMP vs SNMPv2

• History in Brief
• More features (more complex)
• BIG increase in security
  – authentication and integrity
  – access controls
  – security and privacy
• Better access controls in Views
• Trap confirmations
• Knowledge of multiple managers



                         382
      Enterprise Architecture

• SNMP is designed for simple, manager-to-
  agent communications
• CMIP is complex and bulky, but complete
• Most Enterprise networks can‟t be managed
  directly from a single place




                   383
           Enterprise Management

    CMIP
                                   Separate
    Managers
                                   Organization




SNMP
Managers

Local
Networks




                   384
           Management Tools

•   Packet Analyzer
•   Media Analyzers (TDR, OTDR, BER Tester)
•   RMON devices
•   Hosts (?)




                     385
           Software Tools

• Hosted on PCs

• Hosted on Unix Workstations

• Commercial Packages




                   386
                Decent Books


• Network Management Standards 2d ed
   – Uyless Black
• The Simple Book, 2d ed
   – Marshall T. Rose
• Communication Networks Management, 2d ed
   – Kornel Terplan
• Internetworking with TCP/IP, Vol I, 3d ed
   – Douglas E. Comer




                        387
       Defining Network Security

Security is prevention of unwanted information
  transfer
• What are the components?
   –   ...Physical Security
   –   …Operational Security
   –   …Human Factors
   –   …Protocols




                          388
          Areas for Protection

•   Privacy
•   Data Integrity
•   Authentication/Access Control
•   Denial of Service




                     389
   Regulations and Standards

• Computer Crime Laws
• Encryption
• Government as “Big Brother”




                   390
                 Security

Threat, Value and Cost Tradeoffs

• Identify the Threats
• Set a Value on Information
• Add up the Costs (to secure)

             Cost < Value * Threat




                    391
                  Threats

•   Hackers/Crackers (“Joyriders”)
•   Criminals (Thieves)
•   Rogue Programs (Viruses, Worms)
•   Internal Personnel
•   System Failures




                    392
               Network Threats

•   IP Address spoofing attacks
•   TCP SYN Flood attacks
•   Random port scanning of internal systems
•   Snooping of network traffic
•    SMTP Buffer overrun attacks




                       393
      Network Threats (cont.)
• SMTP backdoor command attacks
• Information leakage attacks via finger, echo,
  ping, and traceroute commands
• Attacks via download of Java and ActiveX
  scripts
• TCP Session Hijacking
• TCP Sequence Number Prediction Attacks




                     394
Threat, Value and Cost Tradeoffs



•   Operations Security
•   Host Security
•   Firewalls
•   Cryptography: Encryption/Authentication
•   Monitoring/Audit Trails




                              395
               Host Security

•   Security versus Performance & Functionality
•   Unix, Windows NT, MVS, etc
•   PCs
•   “Security Through Obscurity” L




                      396
        Host Security (cont)

• Programs
• Configuration
• Regression Testing




                   397
          Network Security

• Traffic Control
• Not a replacement for Host-based
  mechanisms
• Firewalls and Monitoring, Encryption
• Choke Points & Performance




                    398
                     Access Control
• Host-based:
   –   Passwords, etc.
   –   Directory Rights
   –   Access Control Lists
   –   Superusers L
• Network-based:
   –   Address Based
   –   Filters
   –   Encryption
   –   Path Selection




                              399
  Network Security and Privacy

• Protecting data from being read by unauthorized persons.

• Preventing unauthorized persons from inserting and deleting
  messages.

• Verifying the sender of each message.

• Allowing electronic signatures on documents.




                          400
                FIREWALLS
•   Prevent against attacks
•   Access Control
•   Authentication
•   Logging
•   Notifications




                      401
            Types of Firewalls
• Packet Filters                 Application
   – Network Layer
                                 Presentation
• Stateful Packet Filters          Session
   – Network Level
                                  Transport
• Circuit-Level Gateways           Network
   – Session Level
                                  Data Link
• Application Gateways             Physical
   – Application Level




                         402
             Packet Level

• Sometimes part of router
                               ROTW
• TAMU “Drawbridge”


                  Drawbridge   Router


 Campus




                    403
              Circuit Level

• Dedicated Host
• Socket Interfaces
  Local                 FW

                              ROTW




                      404
            Application Level

  • Needs a dedicated host
  • Special Software most everywhere


                  Firewall
telnet
                                       ROTW




                      405
Firewall Installation Issues

                 FTP   DNS    Web   Mail




INTERNET                 Router




           406
     Firewall Installation Issues
•   DNS Problems
•   Web Server
•   FTP Server
•   Mail Server
•   Mobile Users
•   Performance




                   407
       Address Transparency
• Need to make some addresses visible to
  external hosts.
• Firewall lets external hosts connect as if
  firewall was not there.
• Firewall still performs authentication




                     408
           Network Address Translation

               128.194.103.0




                                          10.0.0.0
 Gateway




Internet                       Firewall

                                409
        Network Address Translation
Host B: External Host           Gateway Host      Host A: Internal Host


                                  gw control
            ftpd                                          ftp
                                   proxy ftp
            TCP                                          TCP
             IP                        TCP
                                                          IP
         Data Link                     IP
                                                       Data Link
         Hardware                 Data Link
                                                      Hardware
                                  Hardware



           A GW      Datagram                  A B Datagram
                                 410
           IP Packet Handling
•   Disables IP Packet Forwarding
•   Cannot function as a insecure router
•   eg. ping packets will not be passed
•   Fail Safe rather than Fail Open
•   Only access is through proxies




                      411
                      DNS Proxy Security


                              INTERNET


                                                      External DNS Server


                     DNSd
                                      Eagle Gateway
                                      eagle.xyz.com




finance.xyz.com   sales.xyz.com   marketing.xyz.com
                                      412
                       Virtual Private Tunnels




Encapsulate    Hello                   INTERNET                 Hello   Decapsulate


Authenticate   Hello                                            Hello   Authenticate


Encrypt        Hello        !@@%*       !@@%*        !@@%*      Hello   Decrypt


                        Creates a “ Virtual Private Network “
                                       413
         VPN Secure Tunnels
• Two types of Tunnels supported
   – SwIPe and IPsec tunnels
• Encryption
   – DES, triple DES and RC2
• Secret key used for used for authenticatio
  and encryption
• Trusted hosts are allowed to use the tunnel
  on both ends




                        414
            Designing DMZ‟s

               DMZ                INTERNET




                       Web    Screening
                               Router
                       FTP



Company                Mail
 Intranet        415
              Firewall Design Project
                                                       San Jose
                                                                     File Server
INTERNET
                             Mail Server



                                           Wide Area Router
                                                Dallas


   Internet   Raptor Eagle
    Router
                                                                  Raptor Remote
                                                                  Hawk Console



                                416
                Monitoring

• Many tools exist for capturing network traffic.
• Other tools can analyze captured traffic for
  “bad” things.
• Few tools are real-time.




                     417
                Summary

• Security must be comprehensive to be
  effective.
• Remember threat, value, cost when
  implementing a system.
• Security is achievable, but never 100%.
• Make your system fault tolerant.




                    418
         Where Do the 7 layers “fit”?
                             7


Or, where is                 6
the dividing line                       ?
between hdw &                5
s/w?
                             4

                             3

                             2          ?

                             1




                    419
Implementing the Model
   User Space Software




                         OS Space
                         Software




        Firmware
           Hardware

             420
         Some More Definitions

• User Space Software - Code that executes as any
  program that a normal user could compile and run
• OS Space Software - Code that executes on the host
  CPU but in a mode or with special access that normal users can
  not use
• „Firmware‟ - Code that executes on a processor (special or
  general purpose) that is different from the host CPU; may be in
  PROM or RAM downloaded from another source
• Hardware - Generally special purpose VLSI and analog/linear
  interface components




                             421
Assigning the 7 layers

      • Performance

           • vs

       • Flexibility




         422

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:9
posted:8/14/2011
language:English
pages:422