Uploaded by Kathryn Ann Florentino

Network 2 Module

advertisement
CS 454/654 Distributed Systems
Computer Networks
Module 2 – Overview of
Computer Networks
Networks and Communication
Give me names of all employees
Who earn more than $100,000
intranet
ISP
backbone
satellite link
desktop computer:
server:
network link:
CS454/654
2-2
1
CS 454/654 Distributed Systems
Computer Networks
Issues
Q
How do the request and response get transmitted between the
requestor and the server?
O
O
Q
Protocols to facilitate communication
Moving the request and reply messages through the network
What are the modes of communication between the requestor
and the responder?
O
O
Connectionless service
Connection-oriented service
2-3
CS454/654
What is a protocol?
Q
Q
A protocol defines the format and the order of messages sent
and received among network entities, and the actions taken on
message transmission and receipt
Human protocols:
O
O
O
Q
“What’s the time?”
“I have a question”
introductions
Network protocols:
O
O
machines rather than humans
all communication activity in Internet governed by protocols
CS454/654
2-4
2
CS 454/654 Distributed Systems
Computer Networks
What’s a protocol?
Human protocol
Computer protocol
Hi
TCP connection
req.
Hi
TCP connection
reply.
Got the
time?
2:00
Get http://www.cs.uwaterloo.ca/
time
<index.html>
2-5
CS454/654
Layered Protocols
Q
Q
Divide functionality to
different layers and let each
layer provide one function.
ISO OSI Layered network
architecture
O
O
O
Function layers
Interfaces
Protocols at each layer
CS454/654
From Tanenbaum and van Steen, Distributed Systems: Principles and Paradigms
© Prentice-Hall, Inc. 2002
2-6
3
CS 454/654 Distributed Systems
Computer Networks
Message Format
CS454/654
From Tanenbaum and van Steen, Distributed Systems: Principles and Paradigms
© Prentice-Hall, Inc. 2002
2-7
Message Transmission
(Assume only 3 layers)
CS454/654
2-8
4
CS 454/654 Distributed Systems
Computer Networks
OSI Protocol Summary
Layer
Application
Presentation
Session
Transport
Network
Data link
Physical
Description
Protocols that are designed to meet the communication requirements of
specific applications, often defining the interface to a service.
Protocols at this level transmit data in a network representation that is
independent of the representations used in individual computers, which may
differ. Encryption is also performed in this layer, if required.
At this level reliability and adaptation are performed, such as detection of
failures and automatic recovery.
This is the lowest level at which messages (rather than packets) are handled.
Messages are addressed to communication ports attached to processes,
Protocols in this layer may be connection-oriented or connectionless.
Transfers data packets between computers in a specific network. In a WAN
or an internetwork this involves the generation of a route passing through
routers. In a single LAN no routing is required.
Responsible for transmission of packets between nodes that are directly
connected by a physical link. In a WAN transmission is between pairs of
routers or between routers and hosts. In a LAN it is between any pair of hosts.
The circuits and hardware that drive the network. It transmits sequences of
binary data by analogue signalling, using amplitude or frequency modulation
of electrical signals (on cable circuits), light signals (on fibre optic circuits)
or other electromagnetic signals (on radio and microwave circuits).
CS454/654
Examples
HTTP,FTP , SMTP,
CORBA IIOP
Secure Sockets
(SSL),CORBA Data
Rep.
TCP, UDP
IP, ATM virtual
circuits
Ethernet MAC,
ATM cell transfer,
PPP
Ethernet base- band
signalling, ISDN
From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed.
© Addison-Wesley Publishers 2000
2-9
Internet Protocols
Application (7)
Presentation (6)
HTML, CGI,
Java, …
FTP Telnet NFS SMTP …
HTTP
Session (5)
Transport (4)
TCP
Network (3)
Data Link (2)
Physical (1)
CS454/654
HTTP
UDP
IP
X.25
Ethernet RNIS
ATM
FDDI
…
2-10
5
CS 454/654 Distributed Systems
Computer Networks
TCP/IP Layers
Message
Layers
Application
Messages (UDP) or Streams (TCP)
Transport
UDP or TCP packets
Internet
IP datagrams
Network interface
Network-specific frames
Underlying network
From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed.
© Addison-Wesley Publishers 2000
CS454/654
2-11
Internet Protocol Stack
Q
application: supporting network
applications
O
Q
transport: host-host data transfer
O
Q
ip, routing protocols
link: data transfer between
neighboring network elements
O
Q
tcp, udp
network: routing of datagrams from
source to destination
O
Q
ftp, smtp, http
application
message
transport
segment
network
datagram
link
frame
physical
ppp, ethernet
physical: bits “on the wire”
CS454/654
2-12
6
CS 454/654 Distributed Systems
Computer Networks
Applications and ApplicationLayer Protocols
Q
Application: communicating,
distributed processes
O
O
O
Q
application
transport
network
data link
physical
running in network hosts in “user
space”
exchange messages to implement
app
e.g., email, file transfer, the Web
Application-layer protocols
O
O
O
one “piece” of an app
define messages exchanged by
apps and actions taken
use services provided by lower
layer protocols
application
transport
network
data link
physical
application
transport
network
data link
physical
router
server
CS454/654
workstation
mobile
2-13
Application-Layer Protocols (cont).
Q
API: application programming interface
O
O
Defines interface between application and transport layer
socket: Internet API
¯
Q
two processes communicate by sending data into socket, reading data out
of socket
What transport services does an application need?
O
Data loss
¯
¯
O
Bandwidth
¯
¯
O
some apps (e.g., audio) can tolerate some loss
other apps (e.g., file transfer, telnet) require 100% reliable data transfer
some apps (e.g., multimedia) require a minimum amount of bandwidth to
be “effective”
other apps (“elastic apps”) make use of whatever bandwidth they get
Timing
¯
CS454/654
some apps (e.g., Internet telephony, interactive games) require low delay to
be “effective”
2-14
7
CS 454/654 Distributed Systems
Computer Networks
Transport Service Requirements of
Common Applications
Data loss
Bandwidth
Time Sensitive
file transfer
e-mail
Web documents
real-time audio/video
no loss
no loss
no loss
loss-tolerant
no
no
no
yes, 100’s msec
stored audio/video
interactive games
financial apps
loss-tolerant
loss-tolerant
no loss
elastic
elastic
elastic
audio: 5Kb-1Mb
video:10Kb-5Mb
same as above
few Kbps up
elastic
Application
yes, few secs
yes, 100’s msec
yes and no
2-15
CS454/654
Internet Transport Protocol
Services
TCP service:
Q
Q
Q
Q
Q
connection-oriented: setup required
between client, server
reliable transport between sending
and receiving process
flow control: sender won’t
overwhelm receiver
congestion control: throttle sender
when network overloaded
does not provide: timing, minimum
bandwidth guarantees
CS454/654
UDP service:
Q
Q
unreliable data transfer
between sending and receiving
process
does not provide: connection
setup, reliability, flow control,
congestion control, timing, or
bandwidth guarantee
2-16
8
CS 454/654 Distributed Systems
Computer Networks
Internet Apps: Their Protocols and
Transport Protocols
Application
e-mail
remote terminal access
Web
file transfer
streaming multimedia
remote file server
Internet telephony
Application
layer protocol
Underlying
transport protocol
smtp [RFC 821]
telnet [RFC 854]
http [RFC 2068]
ftp [RFC 959]
proprietary
(e.g. RealNetworks)
NFS
proprietary
(e.g., Vocaltec)
TCP
TCP
TCP
TCP
TCP or UDP
TCP or UDP
typically UDP
2-17
CS454/654
TCP Message Encapsulation over
an Ethernet
Application message
TCP header
port
IP header TCP
Ethernet header IP
Ethernet frame
CS454/654
From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed.
© Addison-Wesley Publishers 2000
2-18
9
CS 454/654 Distributed Systems
Computer Networks
The programmer's conceptual view
of a TCP/IP Internet
Application
Application
TCP
UDP
IP
From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed.
© Addison-Wesley Publishers 2000
CS454/654
2-19
Internet Address Structure
7
Class A:
0
Class B:
1 0
Class C:
1 1 0
24
Network ID
Host ID
14
16
Network ID
Host ID
21
8
Network ID
Host ID
28
Class D (multicast):
1 1 1 0
Class E (reserved):
1 1 1 1 0
Multicast address
27
CS454/654
unused
From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed.
© Addison-Wesley Publishers 2000
2-20
10
CS 454/654 Distributed Systems
Computer Networks
Decimal Representation of Internet
Addresses
octet 1
octet 2
Network ID
octet 3
Range of addresses
Host ID
Class A:
1 to 127
Class B:
128 to 191
Class C:
192 to 223
0 to 255
Class D (multicast):
224 to 239
0 to 255
Class E (reserved):
240 to 255
0 to 255
0 to 255
0 to 255
1.0.0.0 to
127.255.255.255
0 to 255
0 to 255
128.0.0.0 to
191.255.255.255
0 to 255
1 to 254
192.0.0.0 to
223.255.255.255
0 to 255
1 to 254
224.0.0.0 to
239.255.255.255
0 to 255
1 to 254
240.0.0.0 to
255.255.255.255
0 to 255
Network ID
Host ID
0 to 255
Network ID
Host ID
Multicast address
CS454/654
From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed.
© Addison-Wesley Publishers 2000
2-21
IP Packet Layout
header
IP address of source
CS454/654
IP address of destination
up to 64 kilobytes
From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed.
© Addison-Wesley Publishers 2000
data
2-22
11
CS 454/654 Distributed Systems
Computer Networks
How to Transfer Data Through the
Network
Q
Q
Network is a mesh of
interconnected routers
Two ways of setting up a
connection between two
computers
O circuit switching: dedicated
circuit per call: telephone
net
O packet-switching: data sent
thru net in discrete “chunks”
2-23
CS454/654
Circuit Switching
End-end resources
reserved for “call”
Q
Q
Q
Q
link bandwidth, switch
capacity
dedicated resources: no
sharing
circuit-like (guaranteed)
performance
call setup required
CS454/654
2-24
12
CS 454/654 Distributed Systems
Computer Networks
Circuit Switching
Q
Network resources (e.g.,
bandwidth) divided into
“pieces”
O
O
O
pieces allocated to calls
resource piece idle if not used
by owning call (no sharing)
dividing link bandwidth into
“pieces”
¯
¯
frequency division
time division
2-25
CS454/654
Packet Switching
Q
each end-end data stream divided into packets
O
O
O
Q
resource contention:
O
O
Q
user A, B packets share network resources
each packet uses full link bandwidth
resources used as needed
aggregate resource demand can exceed amount available
congestion: packets queue, wait for link use
store and forward: packets move one hop at a time
O
O
transmit over link
wait turn at next link
CS454/654
2-26
13
CS 454/654 Distributed Systems
Computer Networks
Packet Switching
10 Mbs
Ethernet
A
B
C
statistical multiplexing
1.5 Mbs
queue of packets
waiting for output
link
45 Mbs
D
E
2-27
CS454/654
Message Switching
Q
Q
Q
Message switching = Packet-switching without segmentation
Packet switching: Store and Forward
Message remains intact as it traverses the network
0
Message
5
Message
10
Message
Message
15
Time (sec.)
CS454/654
2-28
14
CS 454/654 Distributed Systems
Computer Networks
Packet switching vs Circuit Switching
Q
Q
Packet switching allows
more users to use
network!
1 Mbit link; each user:
O
O
100Kbps when “active”
active 10% of time
N users
Q
circuit-switching:
O
Q
1 Mbps link
10 users
packet switching:
O
CS454/654
35 users,
probability > 10 active less
than .004
2-29
Packet Switching vs Circuit Switching (2)
Q
Q
Q
Packet switching is great for bursty data
O resource sharing
O no call setup
It incurs excessive congestion: packet delay and loss
O protocols needed for reliable data transfer, congestion
control
How to provide circuit-like behavior?
O bandwidth guarantees needed for audio/video apps
O still an unsolved problem, but solutions such as ATM have
been developed
CS454/654
2-30
15
CS 454/654 Distributed Systems
Computer Networks
Delays in Packet Switching
Q
Q
Packets experience delay on end-toend path
Sources of delay at each hop:
O
Nodal processing
¯
¯
O
time waiting at output link for
transmission; depends on
congestion level of router
B
Transmission delay
R=link bandwidth (bps), L=packet
length (bits)
¯ time to send bits into link = L/R
¯
O
transmission
A
Queuing
¯
O
check bit errors
determine output link
propagation
nodal
processing queueing
Propagation delay
d = length of physical link, s =
propagation speed in medium
(~2x108 m/sec)
¯ propagation delay = d/s
¯
2-31
CS454/654
Routing
Q
Q
Q
Goal: move packets among routers from source to destination
It is an issue in packet switched networks
datagram network:
O
O
O
Q
destination address determines next hop
routes may change during session
analogy: driving, asking directions
virtual circuit network:
O
O
O
each packet carries tag (virtual circuit ID), tag determines next hop
fixed path determined at call setup time, remains fixed thru call
routers maintain per-call state
CS454/654
2-32
16
CS 454/654 Distributed Systems
Computer Networks
Routing in a Wide Area Network
A
1
3
Links
B
2
Hosts
or local
networks
4
C
5
D
6
E
Routers
From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed.
© Addison-Wesley Publishers 2000
CS454/654
2-33
Routing Tables
Routings from A
To
Link
Cost
A
local
0
B
1
1
C
1
2
D
3
1
E
1
2
Routings from B
To
Link
Cost
A
1
1
B
local
0
C
2
1
D
1
2
E
4
1
Routings from D
To
Link
Cost
1
A
3
B
3
2
C
6
2
D
local
0
E
6
1
CS454/654
Routings from C
To
Link
Cost
A
2
2
B
2
1
C
local
0
D
5
2
E
5
1
Routings from E
To
Link
Cost
A
4
2
B
4
1
C
5
1
D
6
1
0
E
local
From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed.
© Addison-Wesley Publishers 2000
2-34
17
CS 454/654 Distributed Systems
Computer Networks
Network Taxonomy
telecommunication networks
Circuit-switched
networks
FDM
Packet-switched
networks
TDM
Networks
with VCs
connectionoriented
CS454/654
Datagram
Networks
connection-oriented
& connectionless
2-35
18
Download