Top Banner
1 COM 360
109

COM 360

Jan 05, 2016

Download

Documents

yestin

COM 360. Chapter 1. Foundation. 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, - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: COM 360

1

COM 360

                                           

Page 2: COM 360

2

Chapter 1

Foundation

Page 3: COM 360

3

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.

Page 4: COM 360

4

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)

Page 5: COM 360

5

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

Page 6: COM 360

6

Understanding How to Build a Network

Explores:1. The requirements that different people and

applications place on a network2. The network architecture that lays the

foundation3. The key elements in the implementation of

computer networks4. The key metrics that are used to evaluate the

performance of networks.

Page 7: COM 360

7

Applications

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

Page 8: COM 360

8

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)

Page 9: COM 360

9

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.

Page 10: COM 360

10

Videoconferencing

The Unix vic video application

Page 11: COM 360

11

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.

Page 12: COM 360

12

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.

Page 13: COM 360

13

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.

Page 14: COM 360

14

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.

Page 15: COM 360

15

Direct links

(a)

(b)

Point-to-point

Multiple access - often limited in size

Page 16: COM 360

16

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.

Page 17: COM 360

17

Links, Nodes and Clouds

A Switched Network

Switch

Page 18: COM 360

18

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.

Page 19: COM 360

19

Links, Nodes and Clouds

The clouds separate the nodes (switches) that implement the network from those nodes on the outside that use the network

Page 20: COM 360

20

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.

Page 21: COM 360

21

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.

Page 22: COM 360

22

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)

Page 23: COM 360

23

Multiplexing

L2

L3

R2

R3

L1 R1

Switch 1 Switch 2

Multiplexing logical flows over a single physical link

Page 24: COM 360

24

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

Page 25: COM 360

25

Switches

■ ■ ■

A switch multiplexing packets from multiple sources onto a single shared line

Page 26: COM 360

26

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.

Page 27: COM 360

27

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.

Page 28: COM 360

28

Channels

Host

HostHost

Channel

Application

Host

Application

Host

Processes communicating over an abstract channel

Page 29: COM 360

29

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.

Page 30: COM 360

30

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

Page 31: COM 360

31

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

Page 32: COM 360

32

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

Page 33: COM 360

33

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)

Page 34: COM 360

34

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.

Page 35: COM 360

35

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.

Page 36: COM 360

36

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.

Page 37: COM 360

37

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

Page 38: COM 360

38

Layered Networks

Hardware

Host-to-host connectivity

Request/replychannel

Message streamchannel

Application programs

Layered system with alternative abstractions

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

Page 39: COM 360

39

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.

Page 40: COM 360

40

Services and Peer InterfacesHost 1 Host 2

Serviceinterface

Peer-to-peerinterface

High-levelobject

High-levelobject

Protocol Protocol

Page 41: COM 360

41

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.

Page 42: COM 360

42

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

Page 43: COM 360

43

Protocol GraphHost 1 Host 2

Fileapplication

Digitallibrary

application

Videoapplication

Fileapplication

Digitallibrary

application

Videoapplication

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.

Page 44: COM 360

44

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.

Page 45: COM 360

45

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.

Page 46: COM 360

46

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.

Page 47: COM 360

47

Message EncapsulationHost Host

Applicationprogram

Applicationprogram

RRP

Data Data

HHP

RRP

HHP

Applicationprogram

Applicationprogram

RRP Data RRP Data

HHP RRP Data

High-level messages encapsulated inside low-level messages

Page 48: COM 360

48

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).

Page 49: COM 360

49

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

Page 50: COM 360

50

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.

Page 51: COM 360

51

OSI Architecture

One or more nodeswithin the network

End host

Application

Presentation

Session

Transport

Network

Data link

Physical

Network

Data link

Physical

Network

Data link

Physical

End host

Application

Presentation

Session

Transport

Network

Data link

Physical

Page 52: COM 360

52

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.

Page 53: COM 360

53

OSI Architecture4. 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.

Page 54: COM 360

54

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”

Page 55: COM 360

OSI Model

55http://computer.howstuffworks.com/osi1.htm

Page 56: COM 360

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.

56

Page 57: COM 360

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, voltage levels and timing. 57

Page 58: COM 360

58

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.

Page 59: COM 360

59

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

Page 60: COM 360

60

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.

Page 61: COM 360

61

Internet Protocol Graph

■ ■ ■

FTP

TCP UDP

IP

NET 1 NET 2 NET n

HTTP NV TFTP

Page 62: COM 360

62

Internet Architecture1. 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

Page 63: COM 360

63

Internet Architecture

TCP UDP

IPNetwork

ApplicationApplication Layer

Transport Layer

Internet Layer

Network Layer

5 Layer Internet Model

Physical layer (implied)

Page 64: COM 360

64

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.

Page 65: COM 360

65

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

Page 66: COM 360

66

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.

Page 67: COM 360

67

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.

Page 68: COM 360

68

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

Page 69: COM 360

69

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

Page 70: COM 360

70

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)

Page 71: COM 360

71

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

Page 72: COM 360

72

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.

Page 73: COM 360

73

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

Page 74: COM 360

74

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

Page 75: COM 360

75

Alternative Process Models

(a) (b)

a) Process-per-protocol b) Process-per-message

Page 76: COM 360

76

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

Page 77: COM 360

77

Protocol-to-Protocol Interface

sendIP (message) deliverTCP (message)

TCP

IP

Page 78: COM 360

78

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

Page 79: COM 360

79

Buffering

send()deliver()

Topmost protocol

Application process

Copying incoming/outgoing message between application buffer and network buffer

Page 80: COM 360

80

Message buffers

Example message data structure

Page 81: COM 360

81

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).

Page 82: COM 360

82

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

Page 83: COM 360

83

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.• Throughput is a measure of capacity NOT speed

Page 84: COM 360

84

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.

 

Page 85: COM 360

85

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.

Page 86: COM 360

86

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)

Page 87: COM 360

87

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. 

Page 88: COM 360

88

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)

Page 89: COM 360

89

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.

Page 90: COM 360

90

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

Page 91: COM 360

91

Bandwidth

1

(a)

1

(b)

Bits transmitted at a particular bandwidth have some width

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

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

Page 92: COM 360

92

Latency

Components of Latency:1. Speed-of-light propagation delay – light travels at

different speeds in different mediavacuum 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

Page 93: COM 360

93

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

Page 94: COM 360

94

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.

Page 95: COM 360

95

Perceived Latency10,000

5000

2000

1000

500

200

100

50

20

10

5

2

1

10010RTT (ms)

1-MB object, 1.5-Mbps link

1-MB object, 10-Mbps link

2-KB object, 1.5-Mbps link

2-KB object, 10-Mbps link

1-byte object, 1.5-Mbps link

1-byte object, 10-Mbps link

Page 96: COM 360

96

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

Page 97: COM 360

97

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.

Page 98: COM 360

98

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

Page 99: COM 360

99

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

Page 100: COM 360

100

Network as a Pipe

Bandwidth

Delay

Delay x Bandwidth Product

Page 101: COM 360

101

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

Page 102: COM 360

102

Relationship Between Bandwidth and Latency1-Mbps cross-country link

1-Gbps cross-country link

(b)

1 MB

.

.

.

(a)

Source

Source

.1 Mb

.1 Mb

.1 Mb

.1 Mb

Destination

Destination

With 1 MB file a) has 80 pipes of data b) has 1/12 of 1 pipe full of data

Page 103: COM 360

103

Relationship Between Bandwidth and Latency

Page 104: COM 360

104

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

Page 105: COM 360

105

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 KBAt 30 frames/sec it would need 75 MB/sec

• Data compression requires an average rate, rather than an individual frame rate ( See p. 49)

Page 106: COM 360

106

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

Page 107: COM 360

107

Network Induced Jitter

Network

Interpacket gap

Packetsource

Packetsink

1234 1234

Page 108: COM 360

108

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

Page 109: COM 360

Additional Resources

• OSI PowerPointhttp://www.cs.rpi.edu/~hollingd/netprog/notes/osi/osi.ppt

• Seven Layer Modelhttp://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/

109