Docstoc

Week 1 -- Introduction to Networks

Document Sample
Week 1 -- Introduction to Networks Powered By Docstoc
					             Introduction to Networks

                             CS-4513
                 Distributed Computing Systems
        (Slides include materials from Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne and
                               from Modern Operating Systems, 2nd ed., by Tanenbaum)




CS-4513, D-Term 2007                               Networks                                 1
                                  Context

• Networking was formerly regarded as ―just
  another form of I/O‖
• Today, focus is Distributed Computing
            • Shared files and other resources among physically
              separated systems on networks
                   – NFS, remote printing, etc.
            • Integrated computations across network
                   – Airline reservations, ATMs, etc.
            • Interactive games and multimedia
            •…
• Note: this topic overlaps with CS-4514
CS-4513, D-Term 2007                 Networks           2
                             Topics

• Fundamentals
            • Socket interface
            • Protocol Stack
            • Kinds of network connections
• Kinds of Communication
            • Remote Procedure Call
            • Message-oriented communication
            • Stream-oriented communication
• Naming
            • Names, addresses, routes
CS-4513, D-Term 2007          Networks         3
                                                 Computer C



                                                     Process j

 Computer A
                                  The Network

        Process k

                       Computer B



                          Process i
CS-4513, D-Term 2007                  Networks   4
                        Network Goal

• Allow activities on multiple computer
  systems to communicate with each other
            • Shared memory, files, or data
            • Message passing
            • Remote Procedure Call
• Create abstractions that make these
  (relatively) transparent


CS-4513, D-Term 2007           Networks       5
             Principal Abstraction – Socket

• Originally created in BSD Unix
• Subsequently, part of most operating systems
• Allows opening a connection between two
  processes across network
• Connection:
      – a serial conversation between two end points
            • e.g., processes, threads, tasks on different machines
      – organized as a sequence of messages or datagrams
      – distinct from all other connections

CS-4513, D-Term 2007                Networks                  6
                                                  Computer C

                                                  Process c

                                                      Process j

 Computer B
                                   The Network
  Process b

        Process k

                       Computer A

                       Process a

                           Process i
CS-4513, D-Term 2007                   Networks   7
                       Definition — Protocol

• Formal set of rules that govern the formats,
  contents, and meanings of messages from
  computer to computer, process to process,
  etc.

• Must be agreed to by all parties to a
  communication

• May be defined in terms of other protocols
CS-4513, D-Term 2007           Networks        8
          There are many, many protocols

• TCP, UDP, IP, NCP, SMTP, SNNP, NNTP,
  FTP, TFTP, POP, IMAP, HTTP, VMRL, …
• Appletalk, Netware, …
• Remote Procedure Call, NFS, …
• CORBA, GLOBE, JINI, …
• Network Streaming, …
• …
   How to make sense out of all of them?
CS-4513, D-Term 2007   Networks     9
                            Network Stack

• 1983 – Open System Interconnection (OSI) 7 layer
  Reference Model
      – Working group of the International Standards
        Organization (ISO)
      – Defines seven layers
            • Describe how applications communicate with each other
                   – Via network-aware devices
      – Most day-to-day protocols
            • work on a slightly modified layer system
            • E.g. TCP/ IP uses a 6-rather than a 7-layer model


CS-4513, D-Term 2007                  Networks              10
                       OSI 7-layer model
•   Primarily a software and protocol architecture
•   Layers of model correspond to layers of abstraction
•   Each layer has a well-defined function
•   Layers chosen so that …
      – international standards can be defined
• Boundaries between layers chosen to …
      – minimize information flow across interfaces
• Number of layers:–
      – Large enough
            • Distinct functions need not be thrown together
      – Small enough
            • Architecture does not become unwieldy

CS-4513, D-Term 2007                 Networks                  11
                       The OSI 7-layer model
                           (in a nutshell)
                              Application
                                 Layer
                              Presentation
                                 Layer
                                Session
                                 Layer       Silbershatz, §§16.6-16.7
                               Transport
                                 Layer
                                Network
                                 Layer
                               Data Link
                                 Layer
                               Physical
                                Layer

CS-4513, D-Term 2007           Networks          12
             Annotated OSI 7-Layer Stack




                                         Silbershatz,
                                         page 630




CS-4513, D-Term 2007    Networks    13
           The OSI 7-layer model (continued)
Application             • Layer 1 – Physical Layer
   Layer                   – Defines the physical and electrical
Presentation                 characteristics of the network.
   Layer
                              • Transmitting of raw bits over the communication
  Session                       channel
   Layer
 Transport              • Layer 2 – Data Link Layer
   Layer                   – Take the raw transmission facility and
  Network                    transform it into an abstract link that appears
   Layer                     free of errors to layer 3.
 Data Link
                              • Error correcting coding (e.g. FEC)
   Layer
                              • Rate Control (Slow device not overrun by high
 Physical                       speed device)
  Layer

 CS-4513, D-Term 2007                 Networks                14
          The OSI 7-layer model (continued)
Application            • Layer 3 – Network Layer
   Layer
Presentation             –   Controlling the operation of the subnet
   Layer                 –   How packets are routed
  Session
   Layer                 –   Congestion Control
 Transport               –   Accounting function (billing)
   Layer                      • Network Statistics
  Network
   Layer                 – Example - IP layer (IPv4, IPv6)
 Data Link                    • Differences between v4, v6 source/destination
   Layer                        addressing
 Physical                         – V4 – 32 bit addressing
  Layer                           – V6 – 128 bit addressing

CS-4513, D-Term 2007                   Networks                15
          The OSI 7-layer model (continued)
Application      • Layer 4 – Transport Layer
   Layer
                       – Accept data from higher layers
Presentation
   Layer                  • Split it up into smaller units if need be
  Session                 • Passes these to the network layer
   Layer                  • Ensures that the packets all arrive correctly at the
 Transport                  destination in the right order
   Layer                  • Isolates higher layers from changes in the underlying
  Network                   hardware
   Layer               – Type of service to provide
 Data Link                • Reliable or unreliable delivery
   Layer
                       – True end-to-end layer
 Physical
  Layer                – Example:– TCP or UDP

CS-4513, D-Term 2007                Networks                  16
          The OSI 7-layer model (continued)
Application            • Layer 5 - Session Layer
   Layer                  – Allows users on different machines to establish sessions
Presentation                between them
   Layer                  – Example SSL, RPC
  Session              • Layer 6 – Presentation Layer
   Layer
                          – Performs certain functions that are requested sufficiently
 Transport
                            often to warrant finding a general solution for them rather
   Layer
                            than letting each user solve the problem
  Network
                          – Example – encoding data
   Layer
 Data Link             • Layer 7 – Application Layer
   Layer                  – User layer protocol, multiple protocols required
 Physical                 – Example – http, ftp, smtp
  Layer

CS-4513, D-Term 2007                  Networks                 17
                       Example of OSI Model
             Sending                                                 Receiving
             Process                                                  Process
                                                         Data

       Application                                                    Application
                                                  AH     Data
          Layer                                                          Layer
       Presentation                          PH        Data           Presentation
          Layer                                                          Layer
         Session                                                        Session
                                        SH          Data
          Layer                                                          Layer
        Transport                                                      Transport
                                   TH             Data
          Layer                                                          Layer
         Network                                                        Network
                              NH              Data
          Layer                                                          Layer
        Data Link                                                      Data Link
                         DH                  Data               DT
          Layer                                                          Layer
         Physical                                                         Physical
                                             Bits
          Layer                                                            Layer

CS-4513, D-Term 2007                     Networks                    18
               The TCP/IP Protocol Layers
                                    TCP/IP




CS-4513, D-Term 2007     Networks            19
                       Some Terms
• Packet:
      – A unit of communication at Data Link layer
      – aka datagram
• IP Address:
      – A four-part ―number‖ used by Network Layer to route a
        packet from one computer to another
• Port:
      – A 16-bit number used within one computer to identify
        who/where to send packet to
• Well-known port:
      – A port with number < 1024, used by agreement for
        standard services (telnet, ftp, smtp, pop, etc.)
CS-4513, D-Term 2007        Networks            20
                       More Terms

• Socket:
      – End point of a communication
      – Usually used in pairs, one for each direction
      – Comprises [IP Address: Port #]
• Connection:
      – A logical linkage between pairs of sockets at
        two endpoints for purposes of a particular
        communication between those endpoints

CS-4513, D-Term 2007      Networks          21
                  Establishing a Connection
• Process a on machine m creates a socket
            • OS assigns a new port number q to that socket
• Process a attempts to open a connection to machine n:p
            • p is a well-known port
• Process b on machine n is listening on p
            • Receives request from m:q
• Process b forks a process or spawns a thread c to talk with
  m:q, then resumes listening on p
• Thread/process c
            • Creates a new socket r for this connection
            • Replies to m:q with return address n:r
• a and c continue to communicate over this pair of sockets
  until they are finished.
CS-4513, D-Term 2007                   Networks               22
                       Reliable Connections

• Transport layer partitions messages into packets
            • TCP – Transmission Control Protocol
            • Sequence number of current packet
            • Sequence number of last packet received correctly
• Receiver keeps track of seq. # of packets
            • Reassembles in right order
            • Notify sender of missing, broken packets
• Sender keeps copy of each packet until receipt
  acknowledged
            • Retransmits packets if no acknowledgement


CS-4513, D-Term 2007              Networks                23
          Connection-less communication

• UDP – User Datagram Protocol
      – Used when a certain number of errors can be
        tolerated
            and also
      – Where recovery from those errors is easy


• Example in future topic – NFS, the Network
  File System

CS-4513, D-Term 2007     Networks         24
                       Summary

•   Socket, connection
•   Network stack, 7-layer model
•   Establishing a connection
•   Reliable transmission

• Reading assignment
      – Silbershatz Chapter 16

CS-4513, D-Term 2007     Networks   25

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:10/16/2011
language:English
pages:25