SDSUCS 696 Emerging Technologies: Distributed Objects
Spring Semester, 1998

To Lecture Notes Index
© 1998, All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 21-Apr-98

Contents of Doc 1, Networks

  1. References
  2. Networks
    1. How Information is Transmitted in a Network
    2. Store-and-Forward Packet-Switching Networks
    3. Multiple-Access Networks
    4. Classes of Communication Services
    5. ISO OSI Model
      1. Physical Layer
      2. Data Link Layer
      3. Network Layer
      4. Transport Layer
      5. Session Layer
      6. Presentation Layer
      7. Application Layer
    6. Layers Pattern
      1. Context
      2. Problem
      3. Forces
      4. Solution
      5. Dynamics
      6. Implementation
      7. Consequences
      8. Variants
    7. Our View of Network Communication with TCP/IP


Communication Networks: A First Course by Jean Walrand, 1991, chapters 2 - 4, 6, 7

Unix Network Programming by W. Richard Stevens, 1990, selected pages

Internetworking with TCP/IP Volume 1 Principles, Protocols, and Architecture, Third Edition, by Douglas E. Comer, selected pages

RFC 1700, Assigned Numbers by J.Postel

Pattern-Oriented Software Architecture: A System of Patterns, by Buschmann, Meunier, Rohnert, Sommerlad, Stal, 1996, pages 31-52

Doc 1, Networks Slide # 2


Dedicated link between two computers

Communication Network
A set of communication nodes that are interconnected to permit the exchange of information

Doc 1, Networks Slide # 3

Information transferred to medium

Network Protocols - handshaking


Store and forward

Flow control


Doc 1, Networks Slide # 4

How Information is Transmitted in a Network

Information is transformed into electrical or optical signals

All signals are corrupted during transmission

Transmission adds noise to the signal

Digital data helps over come noise
Slightly corrupted 1's are distinguishable from slightly corrupted 0's
Digital data allows for error-control

Dynamic data like audio or video normally requires continuous transmission

Doc 1, Networks Slide # 5

Stream of bits is divided into separate packets
Kermit Packet Structure

Start of packet, usually control A

length of packet in ASCII characters

Packet sequence number mod 64

D = data
Y = acknowledge (ACK)
N = negative acknowledge (NACK)
S = send initiate
R = receive initiate

The data if any


Doc 1, Networks Slide # 6
Student Net
Packet order
Lost packets
Multiplexing of channels

Doc 1, Networks Slide # 7

Store-and-Forward Packet-Switching Networks

What paths should the packets follow in the network

Flow Control
How to regulate the flow so parts of the network don't become congested

How to specify addresses of devices on the network

Maintain privacy of information on the network

Needs standards to allow multiple vendors to build compatible hardware and software
Enable many different types of terminal equipment to communicate

Doc 1, Networks Slide # 8

Circuit switching
A direct line between to users is established
The users "own" the line until they drop the connection
Virtual - circuit switching
All packets of a stream follow the same route
Used by ATM (Asynchronous Transfer Mode )
Datagram packet - switching
Each packet is routed individually
All packets of a stream may or may not take the same route
Used by TCP/IP

Doc 1, Networks Slide # 9

Multiple-Access Networks

Multiple computers share a single communication channel

Token Ring

Multiplexing - How to share a communication channel
Frequency - Division Multiplexing ( FDM )
Assign different frequencies to different users
Time - Division Multiplexing ( TDM )
Divide the time into small slices
Each user gets every N'th time slice
Statistical Multiplexing
Give each user a label
Mark packets with label
Mix packets from different users on channel

Doc 1, Networks Slide # 10
Local Air Net


Doc 1, Networks Slide # 11

Classes of Communication Services

End-to-end services as seen by the users:

Synchronous communications
Bit stream is delivered with a fixed delay and given error rate
Each bit reaches the destination with the same time delay after leaving the source

Asynchronous communications
Bit stream is divided into packets
Packets are received with varying delays, so packets can arrive out of order
Some packets are not received correctly
Packets are delivered in order
System confirms delivery and put packets in order
Error free
Packets are treated individually
Program has to worry about order, error and lost packets
Expedited Data
Faster delivery than normal


ISO - International Organization for Standardization

OSI - Open Systems Interconnection reference model

Doc 1, Networks Slide # 13

Physical Layer

Transform bit to signal and signal to a bit

Medium used to transmit signal
twisted pair
coaxial cable
optical fiber

Attenuation - signal decreases in strength
Dispersion - signal changes


Doc 1, Networks Slide # 14

Data Link Layer

Makes sure that a packet arrives properly between two ends of a wire

ACK -acknowledgment of packets

Error detection

Store and forward

Network Layer

Deals with getting a packet from the source node to destination node in the network

Addresses of physical devices

Doc 1, Networks Slide # 15

Transport Layer

Controls the delivery of messages between the end nodes in the network

Divide message into packets
If required reorder packet that arrive out of order
If required resend lost or damaged packets
End to end flow control

Doc 1, Networks Slide # 16

Session Layer

Negotiates the rules used in the session

Full duplex or half-duplex, etc.

Presentation Layer

Syntax translation between computers

Byte order


Data compression

Application Layer

Whatever the program was designed to do

Doc 1, Networks Slide # 17

Layers Pattern


A large system that requires decomposition


Designing a system that is primarily a mix of low- and high-level issues

Examples of low level issues
Reading bits from a file
Reading electrical signals from a wire
Hardware traps
Sensor input
Hardware dependencies

Doc 1, Networks Slide # 18


Late source code changes should not ripple through the system

Interfaces should be stable

Parts of the system should be exchangeable

May build other systems with same low-level issues

Similar responsibilities should be grouped to help understandability and maintainability

No standard component granularity

Complex components need further decomposition

Crossing component boundaries may impede performance

System will be build by a team of programmers and work has to be subdivided along clear boundaries

Doc 1, Networks Slide # 19


Divide system into layers

Layer K provides services to Layer K+1

Layer K may delegate subtasks to Layer K - 1

Layer K interacts with only K+1 and K-1 for K = 2, 3, ..., N-1

Doc 1, Networks Slide # 20


1. Complete Top-Down
Client issues request to Layer N
This causes subrequests to sent to:
Layer N-1, then to
Layer N-2, then to
Layer N-3, etc. to
Layer 1
Layer N then returns response to client

2. Top-Down
Client issues request to Layer N
This causes subrequests to sent to:
Layer N-1, then to
Layer N-2, then to
Layer K > 1, which can satisfy all subrequests
Layer N then returns response to client

3. Complete Bottom-Up
Layer 1 detects some event
Layer 1 notifies layer 2
Layer 2 notifies layer 3
Layer N notifies client

Doc 1, Networks Slide # 21
Dynamics Continued

4. Bottom-Up
Same as complete bottom-up but some layer K is able to deal with the event

5. Communicating stacks of layers

Doc 1, Networks Slide # 22


Define the abstraction criterion for grouping tasks into layers

Determine the number of abstraction level

Name the layers and assign tasks to each of them

Specify the services

Refine the layering

Specify an interface for each layer

Structure individual layers

Specify the communication between adjacent layers

Decouple adjacent layers

Design an error-handling strategy

Doc 1, Networks Slide # 23



Reuse of layers

Support for standardization

Dependencies are kept local


Cascades of changing behavior

Lower efficiency

Unnecessary work

Difficulty on establishing the correct granularity of layers

Doc 1, Networks Slide # 24


Relaxed layered system
Each layer can use the services of all layers below it
This may gain flexibility and/or performance but losses in maintainability

Layering through Inheritance
Ties higher level to lower level

Doc 1, Networks Slide # 25

Our View of Network Communication with TCP/IP

TCP - Connection-oriented

UDP - Connectionless

TCP gives us a "pipe" between machines to allow us to send messages between machines
Addresses and Names

IP address is a 32 bit number

Machines on a network need a unique IP address

Domain Name System ( DNS )
Domain NamesMeaning
COMCommercial organizations
EDUEducational institutions
GOVGovernment institutions
MILMilitary groups
NETMajor network support groups
ORGOrganizations not list above
INTInternational organizations
country codes2-letter code per country

IP addresses and names are assigned by Internic

Doc 1, Networks Slide # 26

Each TCP/IP machine has multiple logical communication channels called ports

Ports are numbered from 0 - 65536

A connection between two machines is uniquely defined by:
the protocol (TCP or UDP)
the IP address of local machine
the port number used on the local machine
the IP address of remote machine
the port number used on the remote machine
reserved port numbers1 - 1023
port numbers used by system1024 - 5000
Some Interesting Servers
ServicePort Number
echo 7
discard 9
character generation 19
daytime 13
time 37

See RFC 1700 for a complete list for reserved ports and services they provide

Doc 1, Networks Slide # 27
Telnet a Simple Client

On rohan type:
telnet saturn 13

Or try:
telnet www-rohan 80
then type anything followed by <CR>

Or try:
telnet www-rohan 80
then type:
GET / HTTP/1.0 <CR>


Request for Comments define the internet protocols


visitors since 27-Jan-98