Professional Documents
Culture Documents
CS-4513, D-Ter
m 2010
Networks and
Communication
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.
Networks and
Communication
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-Ter
m 2010
Networks and
Communication
Computer C
Process j
Computer A
The Network
Process k
Computer B
Process i
CS-4513, D-Ter
m 2010
Networks and
Communication
Network Goal
Allow activities on multiple computer
systems to communicate with each other
Networks and
Communication
Networks and
Communication
Computer C
Thread r
Process j
Computer A
The Network
Process p
Process k
Computer B
Task q
Process i
CS-4513, D-Ter
m 2010
Networks and
Communication
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-Ter
m 2010
Networks and
Communication
Networks and
Communication
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
CS-4513, D-Ter
m 2010
Networks and
Communication
10
Number of layers:
Large enough
Distinct functions need not be thrown together
Small enough
Architecture does not become unwieldy
CS-4513, D-Ter
m 2010
Networks and
Communication
11
Silbershatz, 16.6-16.7
Coulouris et al, 3.3.4
Physical
Layer
CS-4513, D-Ter
m 2010
Networks and
Communication
12
Silbershatz,
page 630
CS-4513, D-Ter
m 2010
Networks and
Communication
13
Physical
Layer
CS-4513, D-Ter
m 2010
14
Physical
Layer
CS-4513, D-Ter
m 2010
15
Physical
Layer
CS-4513, D-Ter
m 2010
16
Physical
Layer
CS-4513, D-Ter
m 2010
17
18
Receiving
Process
Data
AH
PH
Data
SH
TH
NH
DH
Data
Data
Data
Data
Data
DT
Application
Layer
Presentation
Layer
Session
Layer
Transport
Layer
Network
Layer
Data Link
Layer
Physical
Layer
Bits
Networks and
Communication
19
Layered Protocols
OSI 7-layer model was intended to be a
foundation of a family of international
standard protocols
Those protocols never gained much
acceptance
Role of Session and Presentation layers is
murky, at best.
Internet protocols (TCP/IP, etc.) are
dominant
CS-4513, D-Ter
m 2010
Networks and
Communication
20
CS-4513, D-Ter
m 2010
Networks and
Communication
21
Subsumed by middleware
Defined by manufacturers,
industry sub-groups, and
separate standards bodies
CS-4513, D-Ter
m 2010
Networks and
Communication
22
Modified Layers
CS-4513, D-Ter
m 2010
Networks and
Communication
23
Examples of Middleware
Authentication protocols
Commit protocols for atomic transactions
Multimedia protocols
Remote Procedure Call protocols (RPC)
CS-4513, D-Ter
m 2010
Networks and
Communication
24
Styles of Communication
Message-oriented
Remote Procedure Call
Streaming
CS-4513, D-Ter
m 2010
Networks and
Communication
25
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 e.g.,
telnet (23), ftp (21), smtp (25), pop (110)
CS-4513, D-Ter
m 2010
Networks and
Communication
26
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
i.e., a serial conversation between endpoints
Usually two-way
CS-4513, D-Ter
m 2010
Networks and
Communication
27
Connection
The backbone of most message-oriented
communication protocols
Each party retains knowledge of the other
Each party retains information about state of the
other (vis a vis the protocol itself)
Each party knows if connection is broken
Note: some popular protocols are connectionless
one side retains no state information about other side
CS-4513, D-Ter
m 2010
Networks and
Communication
28
Establishing a Connection
Process a on machine m creates a socket
OS assigns a new port number q to that socket
Networks and
Communication
29
Create socket
On server side
Bind
I.e., connect socket to port # (usually well-known port)
Listen
Sit and wait for a communication to come in
Accept
Create new socket for purpose of responding to this caller
CS-4513, D-Ter
m 2010
Networks and
Communication
30
Notes
Responder to request for connection does
not have to be the original server machine
Delegate workload to other server systems
Networks and
Communication
31
Reliable Connections
Transport layer partitions messages into packets
TCP Transmission Control Protocol
Sequence number of current packet
Sequence number of last packet received correctly
Networks and
Communication
32
Packet i+k
recd i
time
CS-4513, D-Ter
m 2010
Networks and
Communication
33
Packet i+k
recd i
recd i
time
CS-4513, D-Ter
m 2010
Networks and
Communication
34
Packet i+k
recd i
recd i
recd i+2
time
CS-4513, D-Ter
m 2010
Networks and
Communication
35
Packet i+k
lost
recd i
recd i
recd i+2
recd i+2
time
CS-4513, D-Ter
m 2010
Networks and
Communication
36
Result
CS-4513, D-Ter
m 2010
Networks and
Communication
37
Reminder
How do we know if a packet is received
correctly?
Cyclic Redundancy Check (CRC)
Polynomial computed from packet header and
body
Usually 16 or 32 bits, computed by hardware
Appended to message
Recomputed on reception, compared with
transmitted CRC
Equal packet received correctly
CS-4513, D-Ter
m 2010
Networks and
Communication
38
CS-4513, D-Ter
m 2010
Networks and
Communication
39
Connection-less communication
Some communication protocols dont need the
overhead of reliable connections
When some number of errors can be tolerated
Where recovery from those errors is easy
CS-4513, D-Ter
m 2010
Networks and
Communication
40
Examples
HTTP (HyperText Transport Protocol)
Web server responds directly to requests
If client does not get response, retries request
CS-4513, D-Ter
m 2010
Networks and
Communication
41
Summary
Socket, connection
Network stack, 7-layer model
Establishing a connection
Reliable transmission
Reading assignment
Coulouris, Chapter 3
CS-4513, D-Ter
m 2010
Networks and
Communication
42