OSI Architecture o ISO OSI International Standard Organization

  • Slides: 93
Download presentation
OSI Architecture o ISO / OSI (International Standard Organization / Open Systems Interconnection) o

OSI Architecture o ISO / OSI (International Standard Organization / Open Systems Interconnection) o ISO n the ISO, usually in conjunction with ITU (International Telecommunications Union), publishes a series of protocol specifications (X dot) based on the OSI architecture n X dot series: X. 25, X. 400, X. 500 1

o OSI n defines a partitioning of network functionality into seven layers n not

o OSI n defines a partitioning of network functionality into seven layers n not a protocol graph, but rather a reference model for a protocol graph 2

Description of OSI Layers 3

Description of OSI Layers 3

OSI Network Architecture 4

OSI Network Architecture 4

o Operations n physical layer o handles the transmission of raw bits over a

o Operations n physical layer o handles the transmission of raw bits over a communications link n data link layer o collects a stream of bits into a larger aggregate called a frame n network adaptors, along with device drivers running in the node’s OS, typically implement the data link level n this means that, frames, not raw bits, are actually delivered to hosts 5

n network layer o handles routing among nodes within a packet-switched network o at

n network layer o handles routing among nodes within a packet-switched network o at this layer, the unit of data exchanged among nodes is typically called a packet rather than a frame n [note] o the lower three layers are implemented on all network nodes, including switches within the network and hosts connected along the exterior of the network 6

n transport layer o implements a process-to-process channel o the unit of data exchanged

n transport layer o implements a process-to-process channel o the unit of data exchanged is commonly called a message rather than a packet or a frame o the transport layer and higher layers typically run only on the end hosts and not on the intermediate switches or routers 7

n session layer o provides a name space that is used to tie together

n session layer o provides a name space that is used to tie together the potentially different transport streams that are part of a single application o example n it might manage an audio stream and a video stream that are being combined in a teleconferencing application 8

n presentation layer o concerned with the format of data exchanged between peers, for

n presentation layer o concerned with the format of data exchanged between peers, for example, n whether an integer is 16, 32, or 64 bits long n whether the most significant byte is transmitted first or last n application layer o protocols include things like the File Transfer Protocol (FTP), which defines a protocol by which file transfer applications can interoperate 9

Internet Architecture (TCP/IP Architecture) o The Internet architecture evolved out of experiences with an

Internet Architecture (TCP/IP Architecture) o The Internet architecture evolved out of experiences with an earlier packet-switched network called the ARPANET o Both Internet and ARPANET were funded by the Advanced Research Projects Agency (ARPA), one of the R&D funding agencies of the U. S. Department of Defense o Internet and ARPANET were around before the OSI architecture, and the experience gained from building them was a major influence on the OSI reference model 10

FTP HTTP NV TFTP UDP TCP IP o Internet n a four-layer model n

FTP HTTP NV TFTP UDP TCP IP o Internet n a four-layer model n the lowest level NET 1 NET 2 ■■■ NETn o a wide variety of network protocols: denoted NET 1, NET 2, and so on o these protocols are implemented by a combination of hardware (e. g. , a network adaptor) and software (e. g. , network device driver) o examples n Ethernet or FDDI protocols 11

FTP HTTP NV TFTP UDP TCP IP n the second layer NET 1 NET

FTP HTTP NV TFTP UDP TCP IP n the second layer NET 1 NET 2 ■■■ NET n o consists of a single protocol: Internet Protocol (IP) n the protocol that supports the interconnection of multiple networking technologies into a single, logical internetwork n the third layer o contains two main protocols n Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) § TCP and UDP provide alternative logical channels to application programs 12

§ TCP provides a reliable byte-stream channel § UDP provides an unreliable datagram delivery

§ TCP provides a reliable byte-stream channel § UDP provides an unreliable datagram delivery channel (datagram may be thought of as a synonym for message) § in the language of the Internet, TCP and UDP are sometimes called end-to-end protocols, although it is equally correct to refer to them as transport protocols FTP HTTP NV TFTP UDP TCP IP 13 NET 1 NET 2 ■■■ NETn

n the top layer o application protocols, such as FTP, TFTP (Trivial File Transport

n the top layer o application protocols, such as FTP, TFTP (Trivial File Transport Protocol), Telnet (remote login), and SMTP (Simple Mail Transfer Protocol, or electronic mail), that enable the interoperation of popular applications FTP HTTP NV TFTP UDP TCP IP NET 1 NET 2 ■■■ NETn 14

o the difference between an application layer protocol and an application n all the

o the difference between an application layer protocol and an application n all the available different World Wide Web browsers (Firefox, Safari, Internet Explorer, Lynx, etc) – application n a similarly large number of different implementations of web servers – application n we can use any one of these application programs to access a particular site on the Web is because they all conform to the same application layer protocol: HTTP (Hyper. Text Transport Protocol) – application protocol n confusingly, the same word sometimes applies to both an application and the application layer protocol that it uses (e g. , FTP) 15

FTP HTTP NV TFTP UDP TCP IP NET 1 NET 2 ■■■ Internet protocol

FTP HTTP NV TFTP UDP TCP IP NET 1 NET 2 ■■■ Internet protocol graph NET n Alternative view of Internet architecture 16

1. 4 Implementing Network Software o Application Programming Interface (Sockets) o Protocol Implementation Issues

1. 4 Implementing Network Software o Application Programming Interface (Sockets) o Protocol Implementation Issues 17

o Network architectures and protocols specifications are essential things o But a good blueprint

o Network architectures and protocols specifications are essential things o But a good blueprint is not enough to explain the success of the Internet 18

o What explains the success of the Internet n Good architecture n Much of

o What explains the success of the Internet n Good architecture n Much of its functionality provided by software running in general purpose computers o Electronic commerce, videoconferencing, packet telephony o With just a small matter of programming, new functionality can be added readily n The massive increase in computer power 19

o Knowing how to implement network software is an essential part of understanding computer

o Knowing how to implement network software is an essential part of understanding computer networks 20

Application Programming Interface (Sockets) o The place to start when implementing a network application

Application Programming Interface (Sockets) o The place to start when implementing a network application is the interface exported by the network n network application programming interface (API) o when we refer to the interface “exported by the network, ” we are generally referring to the interface that the OS provides to its networking subsystem o Socket interface n originally provided by the Berkeley distribution of Unix n now supported in virtually all popular operating systems 21

o Protocol-API-implementation n protocol o provides a certain set of services n API o

o Protocol-API-implementation n protocol o provides a certain set of services n API o provides a syntax by which those services can be invoked in this particular OS n implementation o responsible for mapping the tangible set of operations and objects defined by the API onto the abstract set of services defined by the protocol 22

o If you have done a good job of defining the interface, then it

o If you have done a good job of defining the interface, then it will be possible to use the syntax of the interface to invoke the services of many different protocols o Such generality was a goal of the socket interface 23

o Socket n the main abstraction of the socket interface n the point where

o Socket n the main abstraction of the socket interface n the point where a local application process attaches to the network o Socket interface defines operations of n n creating a socket attaching the socket to the network sending/receiving messages through the socket closing the socket 24

Socket API (TCP) o Create a socket int socket(int domain, int type, int protocol)

Socket API (TCP) o Create a socket int socket(int domain, int type, int protocol) o domain n specify the protocol family that is going to be used n examples § PF_INET = Internet family § PF_UNIX = UNIX pipe facility § PF_PACKET = direct access to the network interface (i. e. bypass TCP/IP protocol stack) 25

o type n indicate the semantics of the communication n examples § SOCK_STREAM =

o type n indicate the semantics of the communication n examples § SOCK_STREAM = a byte stream § SOCK_DGRAM =a message-oriented service, e. g. UDP o protocol n identify the specific protocol that is going to be used n example § UNSPEC (Unspecified) 26

o handle n the return value from newly created socket n an identifier by

o handle n the return value from newly created socket n an identifier by which we can refer to the socket in the future n it is given as an argument to subsequent operations on this socket 27

o Passive Open (on server machine) n the server says that it is prepared

o Passive Open (on server machine) n the server says that it is prepared to accept connections, but it does not actually establish a connection n operations int bind(int socket, struct sockaddr *addr, int addr_len) int listen(int socket, int backlog) int accept(int socket, struct sockaddr *addr, int addr_len) 28

n bind operation o binds the newly created “socket” to the specified “address” (the

n bind operation o binds the newly created “socket” to the specified “address” (the server address) o when used with Internet Protocols, “address” is a data structure that includes n the IP address of the server n a TCP port number § used to indirectly identify a process § usually some well-known number specific to the service being offered; e. g. , web servers commonly accept connections on port 80 29

n listen operation o defines how many connections can be pending on the specified

n listen operation o defines how many connections can be pending on the specified “socket” n accept operation o carries out the passive open o it is a blocking operation that does not return until a remote participant has established a connection, and when it does complete o it returns a new socket that corresponds to this justestablished connection 30

o the “address” argument contains the remote participant’s address o when accept returns, the

o the “address” argument contains the remote participant’s address o when accept returns, the original socket that was given as an argument still exists and still corresponds to the passive open; it is used in future invocations of accept 31

o Active Open (on client machine) n it says who it wants to communicate

o Active Open (on client machine) n it says who it wants to communicate with by invoking “connect” n operation int connect(int socket, struct sockaddr *addr, int addr_len) n connect operation o it does not return until TCP has successfully established a connection, at which time the application is free to begin sending data o “address” contains the remote participant’s address 32

o Sending/Receiving Messages n once a connection is established, the application processes invoke the

o Sending/Receiving Messages n once a connection is established, the application processes invoke the following two operations to send and receive data n operations int send(int socket, char *msg, int mlen, int flags) int recv(int socket, char *buf, int blen, int flags) 33

n send operation o it sends the given message over the specified socket n

n send operation o it sends the given message over the specified socket n receive operation o it receives a message from the specified “socket” into the given “buffer” n both “send” and “receive” take a set of “flags” that control certain details of the operation 34

o Section 1. 4. 2 Example Application 35

o Section 1. 4. 2 Example Application 35

Protocol Implementation Issues o The way application programs interact with the underlying network is

Protocol Implementation Issues o The way application programs interact with the underlying network is similar to the way a highlevel protocol interacts with a low-level protocol o Ex. , TCP needs an interface to send outgoing messages to IP, and IP needs to be able to deliver incoming message to TCP 36

o Since we already have a network API(e. g. , sockets), we might be

o Since we already have a network API(e. g. , sockets), we might be tempted to use this same interface between every pair of protocols in the protocol stack o Certainly an option, in practice, the socket interface is not used in this way 37

Protocol Implementation Issues o Process model n most operating systems provide an abstraction called

Protocol Implementation Issues o Process model n most operating systems provide an abstraction called a process, or alternatively, a thread n each process runs largely independently of other processes n OS is responsible for making sure that resources, such as address space and CPU cycles, are allocated to all the current processes 38

n the process abstraction makes it fairly straightforward to have a lot of things

n the process abstraction makes it fairly straightforward to have a lot of things executing concurrently on one machine, e. g. o each user application might execute in its own process, and various things inside the OS might execute as other processes n when the OS stops one process from executing on the CPU and starts up another one, we call the change a context switch (time consuming) 39

o Two types of process model o process-per-protocol model o process-per-message model 40

o Two types of process model o process-per-protocol model o process-per-message model 40

Process Procedure calls Interprocess messages Process Process-per-protocol Process-per-message Alternative process models

Process Procedure calls Interprocess messages Process Process-per-protocol Process-per-message Alternative process models

o Process-per-protocol model n each protocol is implemented by a separate process n as

o Process-per-protocol model n each protocol is implemented by a separate process n as a message moves up or down the protocol stack, it is passed from one process/protocol to another o the process that implements protocol i processes the message, then passes it to protocol i-1, and so one process/protocol passes a message to the next process/protocol depends on the support the host OS provides for interprocess communication 42

n typically there is a simple mechanism for enqueuing a message with a process

n typically there is a simple mechanism for enqueuing a message with a process n process-per-protoco 1 model is sometimes easier to think about o I implement my protocol in my process, and you implement your protocol in your process n cost o a context switch is required at each level of the protocol graph, typically a time consuming operation 43

o Process-per-message model n treats each protocol as a static piece of code n

o Process-per-message model n treats each protocol as a static piece of code n associates the processes with the messages n when a message arrives from the network, the OS dispatches a process that it makes responsible for the message as it moves up the protocol graph n at each level, the procedure that implements that protocol is invoked, which eventually results in the procedure for the next protocol being invoked, and so on n for outbound messages, the applications process invokes the necessary procedure calls until the message is delivered 44

n process-per-message model is generally more efficient o a procedure call is an order

n process-per-message model is generally more efficient o a procedure call is an order of magnitude more efficient than a context switch on most computer n cost o only a procedure call per level 45

A Second Inefficiency of The Socket Interface o Message buffers n the application process

A Second Inefficiency of The Socket Interface o Message buffers n the application process provides o the buffer that contains the outbound message when calling “send” operation o the buffer into which an incoming message is copied when invoking the “receive” operation n this forces the topmost protocol to copy the message from the applications buffer into a network buffer, and vice versa 46

Copying incoming/outgoing messages between application buffer and network buffer 47

Copying incoming/outgoing messages between application buffer and network buffer 47

n copy data from one buffer to another is one of the most expensive

n copy data from one buffer to another is one of the most expensive things because o while processors are becoming faster at an incredible pace, memory is not getting faster as quickly as processors are o relative to processors, memory is getting slower n instead of copying message data from one buffer to another at each layer in the protocol stack o most network subsystems define an abstract data type for messages that is shared by all protocols in the protocol graph 48

o not only does this abstraction permit messages to be passed up and down

o not only does this abstraction permit messages to be passed up and down the protocol graph without copying, but it usually provides copy-free ways of manipulating messages in other ways, such as n adding and stripping headers n fragmenting large messages into a set of small messages n reassembling a collection of small messages into a single large message 49

o the exact form of this message abstraction differs from OS to OS n

o the exact form of this message abstraction differs from OS to OS n it generally involves a linked-list of pointers to message buffers 50

Example message data structure 51

Example message data structure 51

1. 5 Performance o o o Performance metrics Bandwidth versus latency Delay ╳ bandwidth

1. 5 Performance o o o Performance metrics Bandwidth versus latency Delay ╳ bandwidth product High-speed networks Application performance needs 52

o Up to this point, we have focused primarily on the functional aspects of

o Up to this point, we have focused primarily on the functional aspects of a network o Computer networks are also expected to perform well n The effectiveness of computations distributed over the network often depends directly on the efficiency with which the network delivers the computation’s data 53

Performance Metrics o Network performance is measured in n bandwidth (also called throughput) n

Performance Metrics o Network performance is measured in n bandwidth (also called throughput) n latency (also called delay) o Bandwidth n literally a measure of the width of a frequency band n example o a voice-grade telephone line supports a frequency band ranging from 300 to 3, 300 Hz (Hz = the number of complete cycles per second) o it is said to have a bandwidth of 3, 300 Hz - 300 Hz = 3, 000 Hz 54

n bandwidth o the range of signals that can be accommodated measured in hertz

n bandwidth o the range of signals that can be accommodated measured in hertz n bandwidth of a communication link o the number of bits per second that can be transmitted on the link o example n the bandwidth of an Ethernet is 10 Mbps (10 million bits/second) 55

n bandwidth is sometimes thought in terms of how long it takes to transmit

n bandwidth is sometimes thought in terms of how long it takes to transmit each bit of data o example n on a 10 -Mbps network, it takes 0. 1 microsecond (μs) to transmit each bit 56

n we can think of o o a second of time:a distance that we

n we can think of o o a second of time:a distance that we could measure bandwidth:how many bits fit in that distance each bit:a pulse of some width example n each bit on a 1 -Mbps link is 1 μs wide n each bit on a 2 -Mbps link is 0. 5 μs wide 57

Bits transmitted at a particular bandwidth can be regarded as having some width: (a)

Bits transmitted at a particular bandwidth can be regarded as having some width: (a) bits transmitted at 1 Mbps (each bit 1 μs wide); (b) bits transmitted at 2 Mbps (each bit 0. 5 μs wide) 58

o Bandwidth requirements of an application n the number of bits per second that

o Bandwidth requirements of an application n the number of bits per second that it needs to transmit over the network to perform acceptably 59

o a useful distinction might be made between the bandwidth that is available on

o a useful distinction might be made between the bandwidth that is available on the link and the number of bits per second that we can actually transmit over the link in practice o Throughput n the measured performance of a system n because of various inefficiencies of implementation, a pair of nodes connected by a link with a bandwidth of 10 Mbps might achieve a throughput of only 2 Mbps 60

o Latency (delay) n corresponds to how long it takes a message to travel

o Latency (delay) n corresponds to how long it takes a message to travel from one end of a network to the other (one -way) n measured strictly in terms of time o example n a transcontinental network might have a latency of 24 milliseconds (ms) n i. e. , it takes a message 24 ms to travel from one end North America to the other 61

n Latency = Propagation delay + Transmit delay + Queuing delay o Propagation delay

n Latency = Propagation delay + Transmit delay + Queuing delay o Propagation delay = Distance / Speed. Of. Light n light travels across different mediums at different speeds § examples: 3. 0 × 108 m/s in a vacuum, 2. 3 × 108 m/s in a cable, and 2. 0 × 108 m/s in a fiber o Transmit delay = Packet size / Bandwidth o Queuing delay = the time the packet switches takes to store packets for some time before forwarding them on an outbound link 62

o Round-trip time (RTT) n how long it takes to send a message from

o Round-trip time (RTT) n how long it takes to send a message from one end of a network to the other and back 63

Bandwidth versus Latency o Relative importance (depends on applications) n latency dominates bandwidth (latency

Bandwidth versus Latency o Relative importance (depends on applications) n latency dominates bandwidth (latency bound) o example n a client sends a 1 -byte message to a server and receives a 1 -byte message in return n assuming that no serious computation is involved in preparing the response n the application will perform much differently on a transcontinental channel with a 100 -ms RTT than ti will on an across-the-room channel with a 1 -ms RTT 64

Bandwidth versus Latency n latency dominates bandwidth (latency bound) o example n a client

Bandwidth versus Latency n latency dominates bandwidth (latency bound) o example n a client sends a 1 -byte message to a server and receives a 1 -byte message in return n transmit delay § transmit delay for 1 Mbps = 8 μs § transmit delay for 100 Mbps = 0. 08 μs n 1 ms RTT vs 100 ms RTT dominates 1 Mbps vs 100 Mbps 65

n bandwidth dominates latency o example: a digital library program that is being asked

n bandwidth dominates latency o example: a digital library program that is being asked to fetch a 25 MB image o suppose that the channel has a bandwidth of 10 Mbps n it will take 20 seconds to transmit the image, making it relatively unimportant if the image is on the other side of a 1 -ms channel or a 100 -ms channel n the difference between a 20. 001 -second response time and a 20. 1 -second response time is negligible o 1 Mbps vs 100 Mbps dominates 1 ms vs 100 ms 66

o The following graph shows how long it takes to move objects of various

o The following graph shows how long it takes to move objects of various sizes (1 byte, 2 KB, 1 MB) across networks with n RTTs ranging from 1 to 100 ms n link speeds of either 1. 5 or 10 Mbps 67

68

68

Delay ╳ Bandwidth Product o Channel n between a pair of processes as a

Delay ╳ Bandwidth Product o Channel n between a pair of processes as a hollow pipe o Latency (delay) n the length of the pipe o Bandwidth n the diameter of the pipe o Delay × bandwidth n the volume of the pipe n i. e. the maximum number of bits that could be in transit through the pipe at any given instant 69

o Example n a transcontinental channel with a one-way latency of 50 ms and

o Example n a transcontinental channel with a one-way latency of 50 ms and a bandwidth of 45 Mbps can hold 280 KB (= 2. 25 × 106 bits) of data 70

Sample Delay ╳ Bandwidth Products Link type Bandwidth (Typical) (Distance (Typical) Round-trip Delay x

Sample Delay ╳ Bandwidth Products Link type Bandwidth (Typical) (Distance (Typical) Round-trip Delay x BW Dial-up 56 Kbps 10 km 87μs 5 bits Wireless LAN 54 Mbps 50 m 0. 33μs 18 bits Satellite 45 Mbps 35, 000 km 230 ms 10 MB Crosscountry fiber 10 Gbps 4, 000 km 40 ms 400 MB 71

o The delay ╳ bandwidth product is import to know when constructing high-performance networks

o The delay ╳ bandwidth product is import to know when constructing high-performance networks n Because it corresponds to how many bits the sender must transmit before the first bit arrives at the receiver n If we are interested in the channel’s RTT, then the sender can send up to two delay ╳ bandwidths worth of data before hearing from the receiver 72

o The bit in the pipe are said to be “in flight” o If

o The bit in the pipe are said to be “in flight” o If the receiver tells the sender to stop transmitting, it might receive up to a delay ╳ bandwidth worth of data before the sender manages to respond o The amount is 5. 5 × 106 bits of data in the above example. o Sender is not fully utilize the network if he does not fill the pipe o Most of time we are interested in the RTT scenario 73

High-Speed Networks o The bandwidths available on today’s networks are increasing at a dramatic

High-Speed Networks o The bandwidths available on today’s networks are increasing at a dramatic rate o What does not change as bandwidth increases: o The speed of light n This means the latency does not improves at the same rate as bandwidth o The transcontinental RTT of a 1 -Gbps link is the same 100 ms as it is for a 1 -Mbps link 74

o Example n transmit a 1 -MB file over a 1 -Mbps network vs.

o Example n transmit a 1 -MB file over a 1 -Mbps network vs. over a 1 -Gbps network, both of which have an RTT of 100 ms o 1 -Mbps network n delay × bandwidth = 0. 1 Mb n it takes 80 [= (1/0. 1)*8] RTTs to transmit the file n during each RTT, 1. 25% of the file is sent o 1 -Gbps network n delay × bandwidth = 12. 5 [= 0. 1 * (1000/8)] MB n it takes < 1 [= (1/12. 5)] RTT to transmit the file 75

Relationship between bandwidth and latency. A 1 -MB file would fill the 1 -Mbps

Relationship between bandwidth and latency. A 1 -MB file would fill the 1 -Mbps link 80 times, but only fill the 1 -Gbps link 1/12 of one time. 76

o The 1 -MB file looks like a stream of data that needs to

o The 1 -MB file looks like a stream of data that needs to be transmitted across a 1 -Mbps network, while it looks like a single packet on a 1 -Gbps network o The more data a high-speed network can transmit during each RTT, the more significance a single RTT becomes o A file transfer taking 101 RTTs rather than 100 RTTs becomes significant 77

o In other words, on a high-speed network, latency, rather than throughput, starts to

o In other words, on a high-speed network, latency, rather than throughput, starts to dominate our thinking about network design 78

o Throughput = Transfer. Size / Transfer. Time o Transfer. Time = RTT +

o Throughput = Transfer. Size / Transfer. Time o Transfer. Time = RTT + (1/Bandwidth) x Transfer. Size n Transfer. Time = one-way latency plus any additional time spent requesting or setting up the transfer n RTT = a request message being sent across the network and the data being sent back n in a high-speed network (infinite bandwidth), RTT dominates 79

o Example n a user wants to fetch a 1 -MB file across a

o Example n a user wants to fetch a 1 -MB file across a 1 -Gbps with a round-trip time of 100 ms n Transfer. Time = 100 -ms (RTT) + transmit time for 1 MB (1/1 Gbps × 1 MB = 8 ms) = 108 ms n effective throughput = 1 MB/108 ms = 74. 1 Mbps (not 1 Gbps) 80

o Discussions n transferring a larger amount of data will help improve the effective

o Discussions n transferring a larger amount of data will help improve the effective throughput n where in the limit, an infinitely large transfer size will cause the effective throughput to approach the network bandwidth 81

Application Performance Needs o Up to now, we have taken a network-centric view of

Application Performance Needs o Up to now, we have taken a network-centric view of performance n We have talked in terms of what a given link or channel will support n The unstated assumption is the application programs want as much bandwidth as the network can provide o This is true of the aforementioned digital library program that is retrieving a 25 -MB image 82

o Some applications are able to state an upper limit on how much bandwidth

o Some applications are able to state an upper limit on how much bandwidth they need n example o suppose one wants to stream a video image; that is one-quarter the size of a standard TV image; i. e. , it has a resolution of 352 by 240 pixels o if each pixel is represented by 24 bits of information (24 -bit color), then the size of each frame would be (352 × 240 × 24)/8 = 247. 5 KB 83

o if the application needs to support a frame rate of 30 frames per

o if the application needs to support a frame rate of 30 frames per second, then it might request a throughput rate of 75 Mbps o because the difference between any two adjacent frames in a video stream is often small, it is possible to compress the video by transmitting only the differences between adjacent frames 84

o this compressed video does not flow at a constant rate, but varies with

o this compressed video does not flow at a constant rate, but varies with time according to factors such as n the amount of action n detail in the picture n the compression algorithm o it is possible to say what the average bandwidth requirement will be, but the instantaneous rate may be more or less 85

o Just knowing the average bandwidth needs of an application will not always suffice

o Just knowing the average bandwidth needs of an application will not always suffice n Transmits 1 Mb in a 1 -second interval and 3 Mb in the following 1 -second interval, it will be of little help to a channel that was engineered to support no more than 2 Mb in any one second o It is possible to put an upper bound on how large a burst an application is likely to transmit 86

o If this peak rate (burst) is higher than the available channel capacity, then

o If this peak rate (burst) is higher than the available channel capacity, then the excess data will have to be buffered somewhere, to be transmitted later o Knowing how big of a burst might be sent allows the network designer to allocate sufficient buffer capacity to hold the burst o Discuss in Chap 6 87

o Analogous in a similar way to an application’s bandwidth, an application’s delay requirements

o Analogous in a similar way to an application’s bandwidth, an application’s delay requirements may be more complex than simply “as little delay as possible” o In the case of delay, it sometimes doesn’t matter whether the one-way latency is 100 or 500 ms as how much the latency varies from packet to packet 88

o Jitter n the variation in latency n example o the source sends a

o Jitter n the variation in latency n example o the source sends a packet once every 33 ms, as would be the case for a video application transmitting frames 30 times a second o if the packets arrive at the destination spaced out exactly 33 ms apart, then the delay experienced by each packet in the network was exactly the same 89

o if the spacing between when packets arrive at the destination (interpacket gap) is

o if the spacing between when packets arrive at the destination (interpacket gap) is variable, however, then the delay experienced by the sequence of packets must have also been variable, and the network is said to have introduced jitter into the packet stream o such variation is generally not introduced in a single physical link, but it can happen when packets experience different queuing delays in a multihop packet-switched network 90

Network-induced jitter 91

Network-induced jitter 91

o Relevance of jitter n suppose that the packets being transmitted over the network

o Relevance of jitter n suppose that the packets being transmitted over the network contain video frames, and in order to display these frames on the screen the receiver needs to receive a new one every 33 ms n if a frame arrives early, then it can simply be saved by the receiver until it is time to display it n if a frame arrives late, then the receiver will not have the frame it needs in time to update the screen, and the video quality will suffer; it will not be smooth 92

n if the receiver knows the upper and lower bounds on the latency that

n if the receiver knows the upper and lower bounds on the latency that a packet can experience, it can delay the time at which it starts playing back the video (i. e. , displays the first frame) long enough to ensure that in the future it will always have a frame to display when it needs it n the receiver delays the frame, effectively smoothing out the jitter, by storing it in a buffer 93