SDSU CS 596 Client-Server Programming
Networks

[To Lecture Notes Index]
San Diego State University -- This page last updated February 20, 1996
----------

Contents of Networks Lecture

  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. Our View of Network Communication with TCP/IP

References


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

Networks




Point-to-point
Dedicated link between two computers



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

StringNet

Information transferred to medium

Network Protocols - handshaking

Duplex

Store and forward

Flow control

Routing

Outline

Types of networks
LAN
WAN
Store and forward
Multiple-Access

Routing

Switching

Types of service

ISO - OSI

TCP/IP

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

Packets

Stream of bits is divided into separate packets
Kermit Packet Structure

Mark
Start of packet, usually control A

Len
length of packet in ASCII characters

Seq
Packet sequence number mod 64

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

Data
The data if any

CKS
Checksum

Student Net
Show:
Packet order
Lost packets
Multiplexing of channels

Store-and-Forward Packet-Switching Networks


Routing
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

Addressing
How to specify addresses of devices on the network

Security
Maintain privacy of information on the network

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

Switching

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


Multiple-Access Networks


Multiple computers share a single communication channel

Examples
Ethernet
Token Ring
Appletalk
Starlan



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

Local Air Net

Show:
FDM
TDM

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
Connection-oriented
Packets are delivered in order
System confirms delivery and put packets in order
Error free
Connectionless
Packets are treated individually
Program has to worry about order, error and lost packets
Expedited Data
Faster delivery than normal

ISO OSI Model


ISO - International Organization for Standardization

OSI - Open Systems Interconnection reference model

Physical Layer


Transform bit to signal and signal to a bit

Medium used to transmit signal
radio,
twisted pair
coaxial cable
optical fiber

Issues
Noise
Attenuation - signal decreases in strength
Dispersion - signal changes
Echoes

Examples
modems
RS-232
V.24

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

Issues
Routing
Congestion
Addresses of physical devices

Transport Layer


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

Issues
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

Session Layer


Negotiates the rules used in the session

Full duplex or half-duplex, etc.

Presentation Layer


Syntax translation between computers

Byte order

Encryption

Data compression

Application Layer


Whatever the program was designed to do

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
130.191.226.1

Machines on a network need a unique IP address

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

IP addresses and names are assigned by Internic
Ports

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
telnet23
gopher70
WWW80

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

On rohan type:
telnet saturn 13


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

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

RFC's

Request for Comments define the internet protocols

See:

http://www.yahoo.com/Computers_and_Internet/Standards/RFCs/

http://www.cis.ohio-state.edu/hypertext/information/rfc.html
----------