CH 1

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 108

Chapter 1

Foundation

1
Building a Network
• What available technologies would be the building blocks ?
• What software architecture would you design to integrate these
building blocks into an effective communication service?
• Which has the potential
– to grow to global proportions,
– to support diverse applications
• such as teleconferencing,
• video-on demand,
• electronic commerce,
• distributed computing and
• digital libraries?
• Answering this question is our goal.
2
What distinguishes a computer
network from other networks?
• At one time a network meant serial lines used
to attach dumb terminals to mainframes.
• To others it is a voice telephone network, or
the cable network used to disseminate video
signals.
• Each of these is specialized to handle one
particular kind of data (keystrokes, voice,
video)

3
What distinguishes a computer
network from other networks?
• Most important characteristic of a computer
network is its generality:
– Built from general-purpose programmable
hardware
– Is able to carry many different types of data
– Supports a wide, every growing range of
applications

4
Understanding How to Build a
Network
Explores:
1. The requirements that different people and
applications place on a network
2. The network architecture that lays the
foundation
3. The key elements in the implementation of
computer networks
4. The key metrics that are used to evaluate the
performance of networks.

5
Applications
• Most people know the Internet through its
applications:
– World Wide Web
– Email
– Streaming Audio and Video
– Chat Rooms
– Music and File Sharing

6
World Wide Web
• The web presents an intuitively simple interface.
• Users view pages of text and graphics, click on objects and
another page appears.
• Each page is bound to an identifier or Uniform Resource
Locator (URL) which uniquely names the page.
( For example, http://www.mkp.com/pd4e )
• Most are unaware that by clicking on the URL as many as 17
messages are sent across the Internet to translate the server
name, set up the TCP connection, get the HTTP request,
respond with the requested page, and to tear down the
connection. ( See p.4)
7
Streaming Audio and Video
• Video files can be fetched like web pages, this
involves waiting.
• Streaming video implies a source that generates a
stream (using a video capture card), sends it across
the Internet in messages, and then the sink
displays it.
• Video is not an application, it is a type of data.
Video-on-demand, which reads from an existing
disk and transmits it over a network. Another
application is videoconferencing, which has tight
time constraints and is bi-directional. 8
Videoconferencing

The Unix vic video application


9
Videoconferencing Tools
• Suite of tools developed at Lawrence Berkeley
Laboratory and UC Berkeley:
– vic for videoconferencing
– wb - a whiteboard application to send sketches and
slides to each other
– vat - a visual audio tool
– sdr – a session directory, used to create and advertise
videoconferences.
• These are all freely available for Unix systems.
10
Requirements
• Need to identify the set of constraints and
requirements that influence the design, and which
depend on your perspective:
• Application programmer - needs services such as a
guarantee of delivery without error
• Network designer - requires cost effective design,
efficient utilization, and fair allocation.
• Network Provider - wants a system that is easy to
administer and manage, in which faults can be
isolated, and where usage can be accounted for.
11
Connectivity
• A network must provide connectivity among a set
of computers.
– Sometimes limited in size connecting only a few
machine
– Private and corporate are often limited for reasons of
security.
– Other networks (like the Internet) are designed to grow
in a way to potentially connect all computers in the
world.
• A system designed to support growth to an
arbitrarily large size is said to scale.
12
Links, Nodes and Clouds
• Network connectivity occurs at different levels.
• A network can consist of 2 or more computers
connected by a physical medium (coaxial cable
or optical fiber) called a link.
• The computers it connects are called nodes.
• Pairs of links are called point-to-point.
• More than two nodes which share a physical
link are called multiple access.
13
Direct links
Point-to-point

(a)

(b)

Multiple access - often limited in size

14
Links, Nodes and Clouds
• If computers networks were limited to situations
where all nodes were directly connected to each
other, the networks would be very limited or the
wires would become both unmanageable and very
expensive.
• Connectivity does not always require a direct
physical connection – indirect connectivity may
be achieved among a set of cooperating nodes.

15
Links, Nodes and Clouds

Switch

A Switched Network
16
Links, Nodes and Clouds
• In a switched network, there are nodes that
run software, which forwards data received
on one link, out onto another.
– Circuit switched - used by the phone company
– Packet switched – used by computer networks
• Packet switched networks send discrete
blocks of data (file, email message, image)
and use a store and forward protocol.

17
Links, Nodes and Clouds

The clouds separate the nodes (switches) that


implement the network from those nodes on the
outside that use the network 18
More Indirect Connections
• A set of independent networks (clouds) can also
be indirectly connected to form an internetwork
or internet.
• A node connected to 2 or more networks is called
a router or gateway and acts like a switch to
forward messages from one network to another.
• We can recursively build arbitrarily large
networks by interconnecting clouds to form larger
clouds.
19
Addressing
• Just connecting hosts does not provide connectivity.
Each node must be able to specify the node it wants
to communicate with. This is done by assigning an
address to each node.
• An address is a byte string that identifies a node.
• The process of determining how to forward messages
toward the destination is called routing.
• Networks must support sending messages to one node
(unicast), to some subset (multicast) or to all
(broadcast) and must support all these forms of
addressing.
20
Kinds of Networks
According to size:
• SANs ( System Area Networks) –single room,
connect components of large system- because they
sometimes connect massively parallel systems to
storage servers, called storage area networks
• LANs ( Local Area Networks) < 1 km, mile
• MANs ( Metropolitan Area Networks) -miles
• WANs ( Wide Area Networks) – worldwide –
(original type of network)

21
Multiplexing

L1 R1

L2 R2
Sw itch 1 Sw itch 2

L3 R3

Multiplexing logical flows over a single physical link

22
Cost-Effective Resource Sharing
• Multiplexing –system resource is shared among
multiple users
– Synchronous Time-Division multiplexing (STDM)
• Divides time into equal size quanta and in round robin order gives
each system a chance to send data
– Frequency-Division Multiplexing (FDM)
• Transmits at different frequencies (like TV channels)
– Statistical Multiplexing – most efficient
• Transmits like STDM, except on demand, without wasted cycles
• Uses a limited size block called a packet

23
Switches

■■■

A switch multiplexing packets from multiple sources onto a


single shared line
24
Switching
• Deciding which packet to send next can be made
in a number of different ways:
• By switch in a packet switched network
– First-in-first-out ( FIFO)
– Round robin (as in STDM) -fair, ensures certain share
of bandwidth, supports Quality of Service ( QoS)
• When switch receives packets faster that it can
transmit them it, it may run out of buffer space
and is said to be congested.
25
Support for Common Services
• Applications must be able to communicate
in a meaningful way.
• Challenge is to identify the right set of
services.
• Goal is to hide the complexity of the
network, without constraining the
application designer.

26
Channels
Host
Host Application

Channel
Host
Application

Host Host

Processes communicating over an abstract channel

27
Channels
• Network provides logical channels over
which application level processes can
communicate with each other.
• Think of a channel as a “pipe” connecting
applications.
• Determine the functionality that the channel
should provide: guaranteed delivery, correct
sequence, encrypted and secure, etc.

28
Common Communication Patterns
• FTP – File Transfer Protocol
• NFS – Network File System
• Requires a pair of processes
– Client – requests access to a server
– Server process that supports access to the file
• Reading – client sends a request message and the
server responds with a large message containing
data.
• Writing –client sends large data message and server
responds, confirming the write to disk
• A Digital library works in similar manner 29
Common Communication
Patterns
• Types of channels may be used together:
– Request/reply channels for file transfer and digital
library applications – to guarantee that only one copy of
the message was sent and received, and to protect
privacy
– Message /stream channel- used by video-on-demand
and videoconferencing could support one and two way
traffic, and support different delay properties.
– New types of channels will continue to be designed

30
Channel Functionality
• What functionality channel provides
• Where that functionality is implemented
– Often seen as a “bit-pipe with high level
semantics provided at the end hosts ( keeps the
network simple)
– Alternative is to push functionality onto
switches, allowing hosts to be “dumb” devices

31
Reliability
• Reliable message delivery is one of the most
important functions that a network provides.
• Major requirement of a network is to hide
failures and make it appear reliable.
• Classes of failure
– Bit errors, burst errors
– Packet loss
– Node or link level failure (computer crash)

32
Network Architecture
• Networks must provide general, cost-effective, fair,
robust connectivity among a large number of
computers.
• These networks must evolve over time to
accommodate changes in technologies and
applications.
• General blueprints, called a network architecture,
guide the design and implementation of a network.

33
Layering and Protocols
• When system gets complex
– Define unifying model that captures and important
aspect of the system,
– Encapsulates this model in an object that provides an
interface
– And hides the details of how the object is implemented
from the users
• We provide an abstraction for applications that
hide the complexity of the network from
application writers.
34
Layering and Protocols
• Abstractions lead to layering, since you start
with the services offered by the hardware, and
then add layers, each providing a more abstract
(higher) level of services.
• High level services are implemented in terms of
low layers.
• Layering provides two features:
– It decomposes the problem of building a network
into more manageable components.
– It provides a more modular design.
35
Layered Networks

Application programs
Process-to-process channels
Host-to-host connectivity
Hardware

The service offered by a higher layer is


implemented by a lower layer

36
Layered Networks
Sometimes there are multiple abstraction provided by a level,
Providing different services and building on the same lower level.

Application programs
Request/reply Message stream
channel channel
Host-to-host connectivity
Hardware

Layered system with alternative abstractions


37
Protocols
• The abstract objects that make up the layers of of a
network system are called protocols.
• A protocol provides a communication service that
higher level objects use to exchange messages.
• Each protocol defines two interfaces:
– A service interface to other objects that defines
operations that local objects can perform.
– A peer interface to its counterpart (peer) on another
machine, that defines the form and meaning of messages
exchanged between protocol peers.
38
Services and Peer Interfaces
Host 1 Host 2

Service
High-level interface High-level
object object

Protocol Peer-to-peer Protocol


interface

39
Protocols
• In other words, a protocol defines a
communication service that it exports
locally, along with a set of rules governing
the messages that the protocol exchanges
with its peers.
• Simply a protocol is a set of rules,
governing communication on a network.

40
Protocol Graph
• Except at hardware level where peers communicate
directly, peer-to-peer communication is indirect-
peers pass messages to a lower level protocol,
which then delivers it to its peer.
• Represent the suite of protocols that make up a
network system with a protocol graph.
– The nodes correspond to protocols
– The edges represent a depends-on relation

41
Protocol Graph
Host 1 Host 2

Digital Video File Digital Video


File
library application application library application
application
application application

To send a message to host2 using protocol RRP (Request/Reply Protocol), invoke


HHP (Host-to-Host Protocol 0, which transmits message to its peer on host2.
HHP passes it to RRP and then to the file application. 42
Protocols
• “Protocol” used in two different ways:
– Abstract interfaces – the operation defined by
the service interface and the form and meaning
of the messages between peers. ( Usually called
the protocol specification.)
– Module that actually implements these two
interfaces.

43
Protocols and Network
Architecture
• Standardization bodies establish policies for
protocol graphs:
• ISO – International Standards Organization
• IETF –Internet Engineering Task Force
• Set of rules governing the form and content
of a protocol graph is called a Network
Architecture.

44
Encapsulation
• When a message is sent ( such as from the RRP
(Request/Reply Protocol) to the HHP (Host-To-
Host Protocol) it is sent as a string of bytes.
• RRP must communicate to its peer, how to handle
the information. It attaches a header with control
information.
• The data being transmitted is called the body or
payload.
• We say that the data is encapsulated in the new
message.
45
Message Encapsulation
Host Host

Application
Application Application
Application
program
program program
program

Data Data

RRP RRP

RRP Data RRP Data

HHP HHP

HHP RRP Data

High-level messages encapsulated inside low-level messages


46
Multiplexing and Demultiplexing
• Fundamental idea of packet switching is to
multiplex multiple flows of data over a single
physical link.
• The same idea applies up and down the protocol
graph.
• We can think of RRP as implementing a logical
communication channel with messages from 2
applications multiplexed, and then demultiplexed
at the host ( using a demux key).
47
OSI Architecture
• The ISO was one of the first organizations
to formally define a common way to
connect computers.
• The Open Systems Interconnect (OSI)
partitions a network into 7 layers, where
one or more protocols implement the
functionality assigned to each layer.
• It is a reference model for a protocol graph

48
OSI Architecture
• A second standards organization, the
International Telecommunications Union
(ITU), publishes a set of protocol
specifications based on the OSI architecture
and called the”X dot” series since the
networks have names like X.25, X.400, etc.

49
OSI Architecture
End host End host

Application Application

Presentation Presentation

Session Session

Transport Transport

Netw ork Netw ork


Netw ork Netw ork

Data link Data link Data link Data link

Physical Physical Physical Physical

One or more nodes


w ithin the netw ork 50
OSI Architecture
• Starting from the bottom up:
• (Remember: “Please Do Not Throw Sausage Pizza Away”)
1. Physical Layer transmits raw bits over a
communication link
2. Data link Layer collects a stream of bits into a frame.
Frames are delivered to hosts.
3. Network Layer handles routing within a packet
switched network. Packets are exchanged between
hosts.
Lower 3 layers are implemented on all network nodes.
51
OSI Architecture
4. Transport Layer implements a process-to-process
channel and is responsible for reliable delivery. A
message is the unit of data exchanged.
5. Session Layer provides a namespace to define
different transport streams.
6. Presentation Layer is concerned with the format of
the data , for example the size of an integer or how a
video stream is formatted.
7. Application Layer defines while file applications
can interoperate and includes protocols such as FTP,
HTTP, etc.
52
7 Layer Model
Layer Functions
7 Application How application uses network
6 Presentation How to represent & display data
5 Session How to establish communication
4 Transport How to provide reliable delivery (error
checking, sequencing, etc.)
3 Network How addresses are assigned and packets are
forwarded
2 Data Link How to organize data into frames & transmit
1 Physical How to transmit “bits” 53
OSI Model

http://computer.howstuffworks.com/osi1.htm 54
Functions of the 7 Layers
• Application Set
– Layer 7: Application - This is the layer that actually interacts
with the operating system or application whenever the user
chooses to transfer files, read messages or perform other
network-related activities.
– Layer 6: Presentation - Layer 6 takes the data provided by the
Application layer and converts it into a standard format that the
other layers can understand.
– Layer 5: Session - Layer 5 establishes, maintains and ends
communication with the receiving device.

55
Functions of the 7 Layers
• Transport Set
– Layer 4: Transport - This layer maintains flow control of data and
provides for error checking and recovery of data between the devices.
Flow control means that the Transport layer looks to see if data is
coming from more than one application and integrates each
application's data into a single stream for the physical network. It
provides reliable delivery of the data ( error checking, etc.)
– Layer 3: Network - The way that the data will be sent to the recipient
device is determined in this layer. Logical protocols, routing and
addressing are handled here.
– Layer 2: Data - In this layer, the appropriate physical protocol is
assigned to the data. Also, the type of network and the packet
sequencing is defined.
– Layer 1: Physical - This is the level of the actual hardware. It defines
the physical characteristics of the network such as connections,
56
voltage levels and timing.
OSI Headers
Multiple Nested Headers
Each layer (except the physical) places additional
information in a header before sending data to a lower layer.
The header corresponding to the lowest level protocol occurs
first.

57
Internet Architecture
• Also called the TCP/IP Architecture
• Evolved from the packet switched
ARPANET ( Advanced Research Projects
Agency) of the Department of Defense.
• Influenced the OSI model
• Usually shown as a 4 or 5 layer model

58
Internet Architecture
Special Features
1. Does not imply strict layering
2. Has “hourglass shape” design philosophy- with
IP as its central feature ( See protocol graph)
3. To propose a new protocol, both a protocol
specification and at least one representative
implementations must be provided.

59
Internet Protocol Graph

FTP HTTP NV TFTP

TCP UDP

IP

■■■
NET 1 NET 2 NET n

60
Internet Architecture
1. At lowest or Network Layer there are many
protocols, called NET1, NET2, NET3, etc.,
implemented by a combination of hardware (Ethernet
or Fiberoptics)
2. Internet Layer - Internet Protocol (IP) supports
connection of multiple networks
3. Transport Layer –reliable Transmission Control
Protocol (TCP) and unreliable User Datagram
Protocol (UDP) –alternative logical channels to
applications.
4. Application Layer – FTP, SMTP, Telnet, HTTP
61
Internet Architecture
5 Layer Internet Model

Application Layer Application


Transport Layer TCP UDP
Internet Layer IP
Network
Network Layer
Physical layer (implied)

62
Implementing Network Software
• Number of computers connected to the
Internet has been doubling every year since
1981 and is approaching 350 million
• Number of people who use the Internet is
over 1 billion
• Since 2001, the number of bits transmitted
over the Internet has surpassed the
corresponding data for the phone system.

63
Why Is the Internet so
Successful?
• Good architecture
• So much of its functionality is provided by
software running in general purpose computers,
so new functions can easily be added
• Massive increase in computing power available
• Scalable

64
Application Programming
Interfaces (Sockets)
• To implement a network application, start with the
interface called the Application Programming
Interface (API).
• Nearly all systems implement their network protocols
as part of their Operating System.
• Socket interface, part of Berkeley Unix, is now
supported by all OSs.
• Just because two systems support the same API, does
not mean that their file system, process, or graphic
interfaces are the same. 65
Application Programming
Interfaces (Sockets)
• A Socket is the point where a local
abstraction process attaches to the network.
• The interface defines operations for creating
a socket, attaching the socket to the
network, sending/receiving messages
through the socket, and closing the socket.

66
Using Sockets with TCP
• Create a socket
int socket(int domain, int type, int protocol);
• Next step depends on whether you are a client
or a server;
– Server – passive operation – prepared to accept a
connection
– Client – performs an active open operation

67
Server
• Invokes three operations:
int bind(int socket,struct sockaddr *address, int addr.len)
int listen(int socket,int backlog)
int accept( int socket,struct sockaddr *address,int addr.len)

• Bind –binds socket to local address


• Listen defines how many connections can be pending
• Accept carries out the passive operation

68
Client
• On the client machine, the application process
performs an active open operation:
int connect(int socket,struct sockaddr *address, int addr.len)
• The operation does not return until TCP has
successfully established a connection
• Then the application process invokes:
int send( int socket, char *message, int msg.len, int flags)
int recv( int socket, char *buffer, int buf.len, int flags)

69
Example Application
• Uses the socket interface to send messages over
a TCP connection ( simplified version of the
Unix talk program, similar to web chat room)
• Client – calls gethostbyname –translates remote
host name to IP address
– Constructs address data structure (sin), and socket,
using the TCP port 5432 (server port)
– Calls socket and connects, then reads text from input
and sends it over the socket
70
Example Application
• Server
– Constructs the address data structure, filling in its port
number
– Does not specify IP address, willing to accept
connection from any local host’s IP address
– Creates the socket, binds it to the local address, and sets
the maximum number of pending connections allowed.
– Finally waits for remote hots to connect, then receives
and prints out characters that arrive on connection.

71
Protocol Implementation Issues
• Tempted to use the API ( eg. Sockets) between
every pair of protocol in the proctol stack, but
that is inefficient.
• Two primary differences between the network
API and the protocol-to-protocol interface:
– Process models
– Message buffers

72
Process Model
• Most OSs provide a process abstraction or a thread.
Each process runs independently of others, allowing
concurrent execution and requiring context
switches.
• Process-per-protocol model each protocol is
implemented by a separate process, passed from one
protocol to another, requiring context switch
• Process-per-message model treats each process as
a static piece of code, associated with the message,
requiring only a procedure call – more efficient than
context switch 73
Alternative Process Models

(a) (b)

a) Process-per-protocol b) Process-per-message
74
Process Model
• Relationship between the service interface and the
process model
• For outgoing message-high level protocol invokes a
send operation with the message, on the lower level
protocol
• For incoming messages, high level protocol invokes the
receive operation and waits for message to arrive,
forcing a context switch.
• Most implementations replace receive with deliver
operation, for efficiency
75
Protocol-to-Protocol Interface

TCP

sendIP (message) deliverTCP (message)

IP

76
Message Buffers
• Application process provides a buffer into which
messages are copied for send and receive operations.
• Copying is a very expensive operation
• Instead- define an abstract data type that is shared by
all protocols.
• Permits messages to be passed up and down protocol
graph, and permits manipulating them by adding and
removing headers, etc.
• Usually involve a linked list of pointers to message
buffers
77
Buffering
Application process

send()
deliver()

Topmost protocol

Copying incoming/outgoing message


between application buffer and network buffer
78
Message buffers

Example message data structure

79
Performance
• Networks are expected to perform well.
• Old adage “first get it right, then make it fast”
somewhat necessary
• Today it is necessary to “design for performance”.
• Performance is measured in
bandwidth (also called throughput) and
latency (also called delay).

80
Network Performance
Characteristics -Delay
 Delay is the time it takes for a bit of data to travel
across the network form one computer to another
 Propagation delay - time to travel across medium,
usually proportional to the distance
 Switching delay - time for network component (hub,
bridge, packet switch) to forward data ( waits for all
bits in a packet and then chooses the next hop)
 Access delay - time to get control of medium
(CSMA/CD, token)
 Queuing delay - time enqueued in packet switches on
a store and forward WAN
81
Network Performance
Characteristics -Throughput
 Throughput measures rate at which data can be
transmitted in network
 300 bps (bits per second) - old modems
 1 Gbps (gigabit [109] bits per second = 1000Mbps) -
fastest today
 Bandwidth - limit of underlying hardware
• Effective throughput - real data delivery, slightly less
than throughput, upper bound of throughput
• Throughput is sometimes called the "speed" of the
network, but delay and throughput are separate ideas.
82
• Throughput is a measure of capacity NOT speed
Highway Analogy
• Imagine a network is like a road between two cities.

• The packets are like the cars traveling on the road.

• The throughput rate determines how many cars can


enter the road each second.
• The delay determines how long it takes a single car
to travel the entire road from one town to another.

83
Highway Analogy
• A road that can accept one car every 5 seconds
has a throughput of 0.2 cars/sec.
• If a car requires 30 seconds to travel the entire
road, the road has a delay of 30 seconds.
• What happens if you add a second lane? You
double the capacity. Now 2 cars can enter
every 5 seconds, so the throughput has
doubled to 0.4 cars/sec.
• The delay remains the same since it still takes
30 seconds to travel the entire distance.
84
Delay and Throughput
• Remember:
• Network delay is measured in seconds
and specifies how long a bit travels in
the network.
• Network throughput is measured in
bits per second and specifies how many
bits can enter the network per unit time.
(Network capacity)

85
Delay-Throughput Relationship
• In theory delay and throughput are
independent; in practice they can be related.
Think of the highway analogy:
• If cars enter the highway at uniform time
intervals, and travel at uniform speed,
they are spaced uniformly along the road.
• If a car slows down, those behind it slow
down, causing congestion.
86
Calculating Delay

 As throughput approaches theoretical


maximum, delay increases
 Excessive traffic known as congestion
 Data entering a congested network will
experience greater delays.
 Effective delay, D, can be approximated:
D = D0
______
(1 - U)
87
Calculating Delay
• In this relation, D0 is the delay when the
network is idle, U is a value between 0 and 1
which denotes the network utilization and D
is the Effective Delay.
• When the network is idle, U =0 and the
effective delay is D0.
• As traffic approaches network capacity and U
approaches 1 the delay approaches infinity.

88
Bandwidth and Latency
• Bandwidth or Throughput – number of bits transmitted
in a unit of time (eg. 10 Mbps – 10 million bit per second);
– On a 10 Mbps network, it takes 0.1 microsecond (sec) to
transmit each bit
• Bandwidth is influenced by how often the software has to
handle and transform the data bits
• Can think of bandwidth as how many bits in a distance
• Latency or delay– how long it takes a message to travel
form one end of the network to the other. Measured in term
of time.
• RTT – round trip time –from one end to the other and back
89
Bandwidth
(a)

(b)

Bits transmitted at a particular bandwidth have some width

a) Bits transmitted at 1 Mbps ( each 1s wide)

b) Bits transmitted at 2Mbps (each 0.5s wide


90
Latency
Components of Latency:
1. Speed-of-light propagation delay – light travels at
different speeds in different media
vacuum 3.0 x 108 m/s
cable 2.3 x 108 m/s
fiber 2.0 x 108 m/s
2. Amount of time it takes to transmit a unit of data
(function of the bandwidth, and the size of the packet)
3. Network queuing delays
91
Latency
• Latency = Propagation +Transmit + Queue
• Propagation = Distance /Speed of Light
• Transmit = Size/Bandwidth

• If a message contains only 1 bit on a single


link then Transmit and Queue terms don’t
matter and Latency = Propagation
92
Perceived Latency
• Graph shows how long it takes to move
objects of different sizes (1byte, 2KB, 1MB)
across networks with RTTs of 1 to 100ms and
different link speeds.
• Latency or bandwidth can dominte in
different situations.

93
Perceived Latency
10,000
5000

2000

1000

500

1-MB object, 1.5-Mbps link


200
1-MB object, 10-Mbps link
100 2-KB object, 1.5-Mbps link
2-KB object, 10-Mbps link
50
1-byte object, 1.5-Mbps link
1-byte object, 10-Mbps link
20

10

1
10 100
RTT (ms) 94
How Big is Mega?
• Use b for bits, B for bytes
• milli (m) = 10-3
• Kilo (K) = 103 or 210
• Mega (M) = 106 or 220
• Giga (G) = 109 or 230
• Some useful approximations
– 100 ms cross country RRT
– 1 ms local area network RTT
95
Delay x Throughput Product
• Another interesting characteristic is the delay-
throughput (or delay-bandwidth) product.
• Again think of the highway analogy:
• When cars enter the highway at a fixed rate of T
cars per second, it takes a car D seconds to travel
the full road distance.
• T x D additional cars will have entered the road by
the time the first car has made a complete trip.
• Thus there can be a total of T x D cars on the road
at any one time. 96
Delay x Throughput Product
The product of delay and throughput measures the
volume of data that can be present on a network.
 Computed as delay time multiplied by effective
throughput
• Measures amount of data that can be present in
the network
• In fast networks with long delay times, sending
computer can generate large amounts of data
before destination receives first bit

97
Delay x Bandwidth Product
• Think of a channel also as a hollow pipe where
latency is length and bandwidth is the diameter
and product is the volume
• If latency (in time) is length and width of bits ( in
time) then product is how many bits fit in the
pipe.
• Channel latency 50 ms, bandwidth 45 Mbps can
hold:
50 x 10-3 sec x 45 x 106 bit/sec =2.25 x106 bits
98
Network as a Pipe

Delay

Bandw idth

Delay x Bandwidth Product

99
High Speed Networks
• Available bandwidths are increasing dramatically
• Latency does not improve at the same rate
• Latency starts to dominate network design
• Can think about more data being transmitted
during each RTT on a high speed network

100
Relationship Between Bandwidth and
Latency
1-Mbps cross-country link
Source Destination

.1 Mb

.1 Mb

.1 Mb
.
.
.

.1 Mb

(a)

1-Gbps cross-country link


Source Destination

1 MB

(b)

With 1 MB file a) has 80 pipes of data


101
b) has 1/12 of 1 pipe full of data
Relationship Between Bandwidth and Latency

102
Throughput and Latency
• Throughput = TransferSize/TransferTime
• TransferTime = RTT +1/Bandwidth x TransferSize

• Transferring a larger amount of data improves


the effective throughput
• An infinitely large transfer size causes the
effective throughput to approach the network
bandwidth
103
Application Performance Needs
• Application programs want as much bandwidth as
the network can provide.
• Some applications state an upper limit on the
bandwidth they need ( eg. Video)
– Image frame with resolution of 352 x 240 pixels, where
each pixel is 24 bits requires:
(352 x 240 x 24)/8 = 247.5 KB
At 30 frames/sec it would need 75 MB/sec
• Data compression requires an average rate, rather
than an individual frame rate ( See p. 49)

104
Jitter
• Delay requirements are more complex that “as
little delay as possible”.
• What often matters more than the delay is how
much the delay varies from packet to packet.
• Jitter is the variation in latency and is becoming
more important as networks are used for the
transmission of real time voice and video.
• Often caused by queuing delay in network
• Can smooth out jitter by storing frames in a buffer

105
Network Induced Jitter

Interpacket gap

4 3 2 1 4 3 2 1
Packet Packet
source
Network sink

106
Summary
• Network must provide cost-effective connectivity
among a set of computers.
• Need to define a layered architecture to be a design
blueprint. Central objects are protocols. Most widely
used architectures:
– OSI Architecture
– Internet Architecture
• Protocols and applications need to be implemented and
used an interface, usually a socket
• Networks must offer high performance, measured by
latency and throughput and using the delay x
bandwidth product for network design 107
Additional Resources

• OSI PowerPoint
http://www.cs.rpi.edu/~hollingd/netprog/notes/osi/osi.ppt
• Seven Layer Model
http://networking.ringofsaturn.com/Protocols/sevenlayer.php
http://en.wikipedia.org/wiki/OSI_model
http://www.rhyshaden.com/osi.htm
http://www.techexams.net/technotes/ccna/osimodel.shtml
• Practice Quiz ( from Certification Exam)
http://gocertify.com/quizzes/osi/
108

You might also like