Chapter Two
Chapter Two
Chapter 2
Contents
Characterization of Distributed
System
Networking and Internetworking
•Types of Network
•Network Principles
•Internet Protocols
Interposes Communication
Networks vs. Distributed
Systems
Networks: A media for interconnecting local
and wide area computers and exchange
messages based on protocols. Network
entities are visible and they are explicitly
addressed (IP address).
Distributed System: existence of multiple
autonomous computers is transparent
However,
– many problems (e.g., openness,
reliability) in common, but at different
levels.
• Networks focuses on packets, routing, etc.,
whereas distributed systems focus on
applications.
• Every distributed system relies on services
provided by a computer network.
Characteristics of Distributed
Systems
Parallel activities
– Autonomous components executing concurrent
tasks
Communication via message passing
– No shared memory
Resource sharing
– Printer, database, other services
No global state
– No single process can have knowledge of the
current global state of the system
No global clock
– Only limited precision for processes to
synchronize their clocks
Types of Networks
• Local Area Networks (LAN)
– floor/building-wide
– single communication medium
– no routing, broadcast
– segments connected by switches or
hubs
– high bandwidth, low latency
– Ethernet - 10Mbps, 100Mbps, 1Gbps
– Personal area networks (PAN) [ad-
hoc networks]: blue tooth, infra-red
for PDAs, cell phones, …
Types of Networks
Metropolitan Area Networks (MAN)
– City-wide, up to 50 km
– Digital Subscriber Line (DSL): 0.25 - 8
Mbps, 5.5km from switch
– Cable modem: 1.5 Mbps, longer range
than DSL
Types of Networks
Wide Area Networks (WAN)
– World-wide
– Different organizations
– Large distances
– routed, latency 0.1 - 0.5 seconds
– Commonly 1-10 Mbps (upto 600
Mbps)
Types of Networks
• Wireless local area networks (WLAN)
– IEEE 802.11 (WiFi)
– 10-100 Mbps, 1.5km
• 802.11 (1997): upto 2 Mbps, 2.4 GHz
• 802.11a (1999): upto 54 Mbps, 5 GHz, ~75
feet outdoor
• 802.11b (1999): upto 11 Mbps, 2.4 GHz, ~150
feet [most popular]
• 802.11g (2003): upto 54 Mbps, 2.4 GHz, ~150
feet [backward compatible with 802.11b,
becoming more popular]
• Wireless metropolitan area networks
(WMAN)
– IEEE 802.16 (WiMax)
– 1.5-20 Mbps, 5-50km
Types of Networks
Wireless wide area networks
(WWAN)
– worldwide
– GSM (Global System for Mobile
communications)
– 9.6 – 33 kbps
– 3G (“third generation”): 128-384
kbps to 2Mbps
Types of Networks
Internetworks
– connecting different kinds of
networks
– routers, gateways
Types of Networks
Example Range Bandwidth Latency
(Mbps) (ms)
Wired:
LAN Ethernet 1-2 km 10-1000 1-10
Network performance
Layer n
Layer 2
Layer 1
Sender Communication Recipient
medium
Protocol layers
Network principles
Application-layer message
Presentation header
Session header
Transport header
Network header
Application
Internetwork
Transport protocols
Internetwork
Internetwork packets
Network interface
Underlying
Network-specific packets network
protocols
Underlying network
Network principles
• Packet assembly
– header and data
– maximum transfer unit (MTU): 1500
for Ethernet
• addressing: transport address =
network address + port
– Well-known ports (below 1023)
– Registered ports (1024 - 49151)
– Private (up to 65535)
Network principles
• Routing
– LAN?
– Routing Algorithm
• decide which out-going link to forward
the packet
– for circuit switching, the route is determined
during the circuit setup time
– for packet switching, each packet is routed
independently
– Routing Table
• a record for each destination
• fields: outgoing link, cost (e.g. hop
count)
Network principles
A 1 B
Hosts 2
3 Links 4
or local C
networks 5
D 6 E
Routers
Router example
Network principles : Routing tables
Routings from A Routings from B Routings from C
To Link Cost To Link Cost To Link Cost
A local 0 A 1 1 A 2 2
B 1 1 B local 0 B 2 1
C 1 2 C 2 1 C local 0
D 3 1 D 1 2 D 5 2
E 1 2 E 4 1 E 5 1
IPv4 network
IPv6 IPv6
A B
Encapsulators
Tunneling
– communicate through an "alien" protocol
– “Hide” in the payload
– IPv6 traffic using IPv4 protocols
Internet protocols
• IP (Internet Protocol)
– network layer protocol
– IP addresses
• TCP (Transmission Control
Protocol)
– transport layer
– connection-oriented
• UDP (User Datagram Protocol)
– transport layer
– connection-less
Internet protocols : 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
Internet protocols: layer
encapsulation
Application message
IP header TCP
Ethernet header IP
Ethernet frame
Internet protocols: Internet
address structure
7 24
Class A: 0 Network ID Host ID
14 16
Class B: 1 0 Network ID Host ID
21 8
Class C: 1 1 0 Network ID Host ID
28
Class D (multicast): 1 1 1 0 Multicast address
27
Class E (reserved): 1 1 1 1 0 unused
32-bit
Internet protocols: Decimal
representation
163.118.131.9 (www.example.com)
octet 1 octet 2 octet 3 Range of addresses
Network ID Host ID
1.0.0.0 to
Class A: 1 to 127 0 to 255 0 to 255 0 to 255 127.255.255.255
Network ID Host ID
Class B: 128 to 191 0 to 255 0 to 255 0 to 255 128.0.0.0 to
191.255.255.255
Network ID Host ID
Class C: 0 to 255 0 to 255 1 to 254 192.0.0.0 to
192 to 223 223.255.255.255
Multicast address
Class D (multicast): 224 to 239 0 to 255 0 to 255 1 to 254 224.0.0.0 to
239.255.255.255
2-1
2-2
2-3
2-4
a) Parameter passing in a local procedure call: the stack before the call to read
b) The stack while the called procedure is active
Client and Server Stubs
2-8
a) A procedure
b) The corresponding message
Extended RPC Models
1. Doors
2. Asynchronous RPC
Doors
2-12
2-13
2-15
2-16
2-18
2-20
Primitive Meaning
Put Append a message to a specified queue
Block until the specified queue is nonempty, and remove the first
Get
message
Check a specified queue for messages, and remove the first.
Poll
Never block.
Install a handler to be called when a message is put into the
Notify
specified queue.
2-29
2-30
Primitive Description
MQopen Open a (possibly remote) queue
MQclose Close a queue
MQput Put a message into an opened queue
MQget Get a message from a (local) queue
2-35.2