0% found this document useful (0 votes)
20 views40 pages

Distributed Systems Ch3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views40 pages

Distributed Systems Ch3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 40

CHAPTER 3

Networking and Internetworking

From Coulouris, Dollimore and Kindberg


Distributed Systems: Concepts and Design
Edition 5, © Pearson Education 2005

Dr. Aref Hassan Kurdali

CS 462 - Distributed Systems 1


Networking Issues (1)

 Performance:
 Latency (time between send and start to receive)
 Data transfer rate (bits per second) [max]
 Transmission time = latency + length / transfer rate
 System bandwidth, throughput [actual]: total volume of traffic in
a given amount of time
 Using different channels concurrently can make bandwidth >
data transfer rate
 traffic load can make bandwidth < data transfer rate
 network speed < memory speed (about 1000 times)
 Access to local disk is usually faster than remote disk
Networking Issues (2)

 scalability
 reliability
 corruption is rare
 mechanisms in higher-layers to recover errors
 errors are usually timing failures, the receiver doesn't have
resources to handle the messages
 security
 firewall on gateways (entry point to org's intranet)
 encryption is usually in higher-layers
 mobility--communication is more challenging: locating,
routing,...
 quality of service--real-time services
 multicasting--one-to-many communication
Types of Networks (1)

 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
 no latency guarantees (what could be the
consequences?)
 Personal area networks (PAN) [ad-hoc networks]:
blue tooth, infra-red for PDAs, cell phones, …
Types of Networks (2)

 Metropolitan Area Networks (MAN)


 city-wide, up to 50 km
 Digital Subscriber Line (DSL): .25 - 8 Mbps, 5.5km
from switch
 Cable modem: 1.5 Mbps, longer range than DSL
Types of Networks (3)

 Wide Area Networks (WAN)


 world-wide
 Different organizations
 Large distances
 routed, latency 0.1 - 0.5 seconds
 1-10 Mbps (up to 600 Mbps)
Types of Networks (4)

 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 [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 (5)

 Wireless wide area networks (WWAN)


 worldwide
 GSM (Global System for Mobile communications)
 9.6 – 33 kbps
 3G (“third generation”):
 2–14.4 Mbps while stationary and
 348 kbps while moving
Types of Networks (6)

 Internetworks
 connecting different kinds of networks
 routers, gateways
Network performance

Example Range Bandwidth Latency


(Mbps) (ms)
Wired:
LAN Ethernet 1-2 km 10-1000 1-10
MAN ATM 250 km 1-150 10
WAN IP routing worldwide .01-600 100-500
Internetwork Internet worldwide 0.5-600 100-500
Wireless:
WPAN Bluetooth (802.15.1) 10 - 30m 0.5-2 5-20
WLAN WiFi (IEEE 802.11) 0.15-1.5 km 2-54 5-20
WMAN WiMAX (802.16) 550 km 1.5-20 5-20
WWAN GSM, 3G phone nets worldwide 0.01-2 100-500
Network principles (1)

 Packet transmission
 before a message is transmitted it is subdivided into
packets.
 packet: is a sequence of binary of restricted length,
together with addressing information sufficient to
identify the source and destination computers.
 Packets of restricted length are used:
 To allocate sufficient buffer storage to hold the largest possible
incoming packet;
 To avoid the undue delays that would occur in waiting for
communication channels to become free if long messages were
transmitted without subdivision
Network principles (2)

 Data Streaming
 Streaming: is the transmission and display of audio and video in real
time.
 video stream need 120 Mbps (1.5 Mbps if compressed)
 UDP internet packets are generally used to hold video frames.
 play time: is the time at which video must be displayed
 for example, with frame rate 24 frames/second, frame N has a play
time that is N/24 seconds after the stream’s start time. Video
elements that arrive at their destination later than their play time are
no longer useful and will be dropped by the receiving process.
 The timely delivery of audio and video streams depends upon the
availability of connections with adequate quality of service
(bandwidth, latency and reliability)
 Using ATM and IPv6.
 Communication subsystems that provide quality of service: Resource
Reservation Protocol (RSVP), Real-time Transport Protocol (RTP).
Network principles (3)
 Switching schemes
1. Broadcast: (Example: Ethernet, Token ring, Wireless)
2. Circuit switching (Example: PSTN)
 Involves setup phase: circuit establishment, information transfer, circuit disconnect.
 Dedicated path between source and destination is needed.
 Information is transmitted at a fixed data rate with no delay.
 Blocking may be occur when all lines are busy.
3. Packet switching (connectionless) (Example: Ethernet)
 No setup phase .
 The message is divided into small units (packets).
 No resource dedicating; Each packet is sent independently of other packets.
 Data may be reach to the destination out of sequence
 Each packet contain the whole address of the source and the destination
 The packets has variable length
 There is no control on: delay, sequence, loss, and path.
4. Virtual circuit packet switching (connection-oriented) (Example: ATM)
Network principles (3)
 Switching schemes
1. Broadcast (Example: Ethernet, Token ring, Wireless)
2. Circuit switching (Example: PSTN)
3. Packet switching (connectionless) (Example: Ethernet)
4. Virtual circuit packet switching (connection-oriented) (Example: ATM)
 the unit of information is still Packet.
 Each packet contain an information about the path.
 All the packets has the same length
 Before any data to be transmit, a virtual circuit is established. Then all packet is
sent along this predefined path.
 After information is transferred, a virtual circuit is released.
 Example: ATM.
Network principles (4)

 Protocols
 Protocol: refers to a well-known set of rules and
formats to be used for communication between
processes in order to perform a given task.
 Protocol has two important parts:
 Sequence of messages
 Format of messages
Network principles (5)

 Protocol layers
 Network software is arranged in a hierarchy of layers. Each layer
presents an interface to the layers above it.
 Each layer appears to communicate directly with a layer at the
same level in another computer in the network.
 Each layer provides a service to the layer above it benefits from
the service provided by the layer below it.
Network principles (5)

 Protocol suites: is a complete set of protocol layers. There


is two model:
 ISO/OSI (Open Systems Interconnection): 7 layers
 TCP/IP (Internet protocol stack): 4 layers
 Figure 3.5 includes examples from protocols used in the
Internet,
 The implementation of the Internet does not follow the OSI
model in two respects:
 First, the application, presentation and session layers are not
clearly distinguished in the Internet protocol stack. Instead, the
application and presentation layers are implemented either as a
single middleware layer or separately within each application.
 Second, the session layer is integrated with the transport layer
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Network principles (6)

 Encapsulation in layered protocols


Application-layer message

Presentation header

Session header

Transport header

Network header
Network principles (7)

 ISO Open Systems Interconnection (OSI) model

Message sent Message received


Layers
Application
Presentation
Session
Transport Segment
Network Packet
Data link Frame
Physical bits
Sender Communication Recipient
medium
Network principles (9)

 Packet assembly
 Packets consist of: header and data field.
 the data field is variable in length, with the maximum length called
the maximum transfer unit (MTU).
 1500 bytes for Ethernet.
 8 to 64 Kbytes for IP protocol.
 ports: are software-defined destination points at a host
computer. They are attached to processes, enabling data
transmission to be addressed to a specific process at a
destination node.
 addressing:
 a socket is a software endpoint that acts as a communication
channel between two processes, typically running on different
machines.
 a socket is identified by its transport address, which consists of
two components: socket = IP-address + port
Network principles (11)

 Routing: is the process of selecting a path for data to


travel from its source to its destination in a network. It is
performed by routers.
 Routing protocols: Routers use routing protocols to exchange
information about the network and to determine the best paths to
reach different destinations. Common routing protocols include
RIP, OSPF, and BGP.
 Routing metrics: routing protocols use metrics such as hop count,
delay, and bandwidth to evaluate the quality of different paths.
 Routing algorithms: are used to calculate the best path based on
the available routing information and metrics.
 Routing tables: Routers maintain routing tables that contain
information about the network topology and the best paths to
reach different destinations
Network principles (12)

 Router example

A 1 B
Hosts 2
3 Links 4
or local C
networks 5
D 6 E
Routers
Network principles (13): 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

Routings from D Routings from E


To Link Cost To Link Cost
A 3 1 A 4 2
B 3 2 B 4 1
C 6 2 C 5 1
D local 0 D 6 1
E 6 1 E local 0
Network principles (14)

 RIP Routing protocol:


 RIP is a Distance-vector routing protocol:
Determines best path based on hop count.
 Periodic updates: Routers exchange routing tables
regularly.
 Simple to implement: Easy to configure and
manage.
 RIP shortcomings are:
 Slow convergence: Can take a long time to adjust to network changes.
 Routing loops: Can create circular paths, leading to data loss.
 Limited scalability: Not suitable for large networks due to slow
convergence and routing loops.
 Less efficient than newer protocols: OSPF and BGP offer better
performance and scalability.
Network principles (16)

 Congestion control
 high traffic load, packets dropped due to limited
resources
 reducing transmission rate: "choke packets" from
sender to receiver
Networking principles (17)

 Network connecting devices


 Repeater: repeats signals that travel via long
distances
 Hub: used in LANs to connects LAN
components with identical protocols. It can be
considered a multiport repeater. Hubs
forwards any traffic to all of the ports, so that
they are not smart devices.
 Switches: connects multiple devices such as
computers, wireless access points, printers in
a small business network. Switches work in
Layer 2 (Data Link Layer). It is a smart device
because it switches the traffic according to
the Mac address. Switches have many ports
they expand the network through endpoints.
Networking principles (17)

 Network connecting devices


 Router: connects multiple switches (i.e. different
networks), to form larger network, these networks may
be in a single location or across multiple locations.
Router allows networked devices and multiple users to
access the Internet. Router works on Layer 3. It
calculates the routes according to its routing algorithms
and then makes the route decision. Routers are smart
devices, it forward traffic based on the IP address.
 Gateway: regulate traffic between two different networks,
while routers regulate traffic between similar networks.
So that, Gateways converts packets from one protocol to
another.
Networking principles (17)

 Network connecting devices


 Modem: enables digital computers to communicate
across analogue telephone lines. This
communication includes both voice and data
communications.
 Bridge: connects different Local Area Networks
(LANs) that work on the same protocol. It has single
incoming port and single outgoing port. Bridges
works at Layer 2, Data-Link Layer. It can filter content
by reading the MAC addresses of source and
destination of the messages.
Networking principles (18)

 Tunneling: refers to the process of creating a secure,


private communication channel over an insecure public
network.
 Tunneling provides a way to protect sensitive data
transmitted over public networks, such as the internet.
 Data packets are wrapped within other packets to hide
their original content and destination.
 Tunneling is a core technology used in VPNs to create
secure connections between remote users and
corporate networks.
 Several protocols, such as IPsec, SSL/TLS, and SSH,
are commonly used for tunneling.
Networking principles (18)

 Tunneling

IPv6 encapsulated in IPv4 packets

IPv4 network
IPv6 IPv6
A B

Encapsulators
Internet protocols (1)

In distributed systems:
TCP protocol: is often used for applications that require
reliable communication, such as file transfer, remote login,
and database synchronization.
UDP protocol: is often used for applications that prioritize
performance over reliability, such as streaming media,
online gaming, and real-time control systems.
IP protocol: is the fundamental protocol for all
communication on the network and is used by both TCP
and UDP.
Internet protocols (1)

 TCP (Transmission Control Protocol)


 Layer: Transport
 Function: Provides reliable, connection-oriented communication.
 Advantages: Reliable delivery, error detection and correction, flow control.
 Limitations: Overhead, less efficient than UDP for applications that do not
require reliability.
 UDP (User Datagram Protocol)
 Layer: Transport
 Function: Provides connectionless, unreliable communication.
 Advantages: Low overhead, real-time performance.
 Limitations: Unreliable delivery, no error detection or correction.
 IP (Internet Protocol)
 Layer: Network
 Function: Addresses and routes data packets across the network.
 Advantages: Scalable, flexible, best-effort delivery.
 Limitations: Unreliable delivery, no error detection or correction.
Internet protocols (2): 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 (3): layer encapsulation

Application message

TCP header port

IP header TCP

Ethernet header IP

Ethernet frame
Internet protocols (4): Programmer’s view

Application Application

TCP UDP

IP
Internet protocols (5): Internet address structure

 32-bit
Internet protocols (6): Decimal representation
Internet protocols (9): Network Address Translation (NAT)

NAT is a technique used to translate private IP addresses


into public IP addresses. It allows multiple devices on a
private network (e.g., a home or office network) to share a
single public IP address.
 A NAT device (e.g., router) maintains a translation table that maps
private IP addresses to public IP addresses and port numbers.
 When a device on the private network sends a packet, the NAT
device replaces the private IP address with the public IP address
and assigns a unique port number.
 Incoming packets from the internet are translated back to the
original private IP address and port number.
 Advantages:
 Conserves IPv4 addresses: Allows multiple devices to share a single
public IP address.
 Enables private network connectivity: Allows devices on a private
network to access the internet.
 Improves security: Hides private IP addresses from the internet,
making it more difficult for attackers to target devices.
Internet protocols (10)

You might also like