You are on page 1of 294
Multimedia (Communication alications, Networks, tight of Fed Halal tobe identified as author of tis Work ha been asserted by him in accordance ‘the Copyright, Designs and Patents Act 1988, ‘nright ©2001 by Pearson Education, Ltd, sedition is published by arrangement with Pearson Education, Ltd. book s sold subject to the condition tha i shall no, by way of wade or otherwise, be lent, reso, ‘out, or otterwise circulated without the publisher's prior writen consent in any form of binding or oer than that in which itis published and without a similar condion including this cardtion being ‘sed onthe subsequent purchaser and without limiting the rights under copyright reserved above, no ofthis publication may be reproduced, stored ino introduced int a ereval syste, or tanemitted in foam or by any means (clectronc, mechanical, photocopying, recording or otherwise), without the prior ‘en permission ofboth the copyright owner and the above-mentioned publisher ofthis book. N97B-81-317-0994-8 {Umpression, 2007 ona Impression, 2008 ‘pression, 2008 ‘th Impression, 2009 ‘edion s manufactured in India and is authorized forsale only in Indi, Bangladesh, Bhutan, istan, Nepa, Sri Lanka and the Maldives. Circulation of his elton ouside ofthese territories AUTHORIZED. lished by Dorling Kindersley (Inds) Pv. Lt, licenses of Pearson Education in South Asia. 4 Ofie: 482, LE, Patparganj Delhi 110 092, India istered Office: 14 Local Shopping Cente, Panchshee! Park, New Deli 110 017, Inia, ted in india by Sawbh Printers shortcontents Prefice Acknowledgments chapter muftimedia communications Ad Iouesduetion ‘712 Nala information representation 713 Mulimedia neworks 714 Mulimmedia applications 15 Application and networking terminology 16 Summary chapter 2. multimedia information representation 221 Introduction 1/22 Digiaon principles Za Ten AB Audio conpresion “48 Video compresion et Summary 5 2s 2 Bn 25 4 53 n 7” 9 96 no us ry 138 138 139 146 ee 190 195 195 195 215 255 chapter5 standards for mattimedia communications 5. Introduction 5. Reference models 5.8 Standards relating to interpersonal 154 Standards relating to interactive applications ‘over the Internet. 5:5 Standard for entertainment applications 56 Summary chapter 6 digital communication basics 61 Introduction 62 Tranamison media, 63 Sources of signal impalement 644 Agmehronous wanamisson 65 Sychronous wansmision 66 Error detecon methods {67 Protocol basis 68 The HDLC protocol 6.9 Summary chapter circuit-switched networks 7 Inoducton 72 Transmission ateme 173 Switching stems 74 Signaling stems 73 Summary chapter 8 enterprise networks 81 tnoduction 82 LAN 3 Ethemney/EEESO2S 8.4 Token ring 261 261 262 268 200 275 283 309 309 313 sat 333 340 49 358 385 398 400 400 408 479 am a4 415 6 485 ‘eantets eed LAN rotocols te LAN interconnection Aogies ay the internet, grams entation and seassemby Trees snd RARP 1g algorithms support "PP ink ayer protocol ‘Pet imteroperabiliy sary © broadband ATM networks duction format and avitching principles charehltecures col architecture (LANs (MANS ‘caren ATM networks mary 11 entertainment networks ‘and high-speed modems duction te TV neworks Alte television networks restial televsion ners Inspeed PSTN access technologies mary 500 516 sa a3 49 559 6 68 sn 518 57 583 25, 620 637 655 660 668 60 os 679 69 703 m4 a ra a1 a2 139 ™ 78 785 chapter 12 transport protocols 7121 Introduction (A22 TCP/IP protocol suite ‘avs teP “124 Up (A2S RTP and RICP “126 Sunmary chapter 13 application support functions 13:1 Invodvetion 152 ASNI 133 Seeuriy 124 Data encryption 185 Nonrepudiation 135 Authentication 187 Public key cerification auhorides 138 Sommary chapter 14 Internet applications 141 Tawrodueton 142 Domain name sytem 143 Electronic ait M44 FIP M45 Tre 1146 Internet telephony 147 SNMP 148 Summary chapter 15 the We 181 Inodveton 152 URLeand HTTP 153 HTML 15a Audio and video 158 Java and JavaScript 156 Secarity 15.7 Web operation 15.8 Summary Appendix A ‘Appendix B Bibliography Index td Wide Web CRC implementation Forward ero control ‘a. fp contents 8 chapter 1 ry 352 ey est 67 ‘7 883 85 14 890, aot 15. 296 oT 908 925 sat a 16 chapter 2 an Laid 22 23 24 ‘multimedia communications Introduction ‘Multimedia information representation ‘Multimedia networks 1.3.1 Telephone nevworks 132 Data networks 1133 Broadcast television newworks 134 Integrated services digital nevworks 11355 Broadband multiservice networks ‘Multimedia applications 14.1 Interpertonal communications 1:42 Interactive applications over the Internet 1143 Entertainment applications “Application and neworking terminelogy 15.1 Media ypes 15.2 Cotimmunication modes 1.33 Network ypes 154 Mulépoint conferencing, 1.55 Network QoS 1.56 Application QoS Summary Exercises ‘multimedia information representation Introduction Digitization principles 2.3.1 Analog signals 2.2.2 Encoder design 22.3 Decoder design Text 23.1 Unformatted text 23.2 Formatted text 2.3.3 Hypertext Images 2.4.1 Graphics 2.4. Dightzed documents 2 om 2 26 2 2 38 M 46 5 53 36 st 63 6 n 8 ” » 80 89 oo 8 96 25 26 27 chapter 3 a 32 33 a chapter 4 ay a2 2.4.3 Digitized pictures Audio 25.1 PCM speech 25.2 CD-quality aio 25.3 Synthesized audio Video 26.1 Broadeast television 2.62 Digital video 263 PC video 2.64 Video content Summary Exercises text and image compression Tetroduetion Compression principles 32.1 Source encoders and destination decoders 32.2 Losses and losy compression 323 Enuropy encoding 324 Source encoding ‘Text compresion 331 State Huffman coding 33.2 Dynamic Huffman coding 333 Arithmetic coding 3.34 Lempel-Ziv coding 33.5 Lempel-ZivWelsh coding Image compression, 3.41 Craphies interchange format 3.42 Tagged image fle format 8.43 Digitized documents 8.4.4 Digitized pictures 3445 JPEG Summary Exercises audio and feo compression Ineroduction ‘Audio compression 42.1 Differential pulse code modulation 422 Adaptive differential PCM 423 Adaptive predictive coding 100 ne ue us ns us uo na 13 138 14 135 138 138 139 139 139 40 M3 146 146, 182 156 158 159 162 163 164 166 1m mm . 190 19 195 195, 195 196 199 201 4a 44 chapter 5 5a 52 58 54 424 Linear predictive coding 425 Codecxcited LPC 42.6 Perceptual coding 42.7 MPEG audio coders 4.2.8 Dolby audio coders ‘Video compression 43.1 Video compression principles 432 H261 433 269 43.4 MPEG 435 MPEG1 436 MPEG2 437 MPECA Summary Exercises standards for multimedia communications Inwodscon | Reference model 5.21 TCP/IP reference model 5.2.2 Protocol basics oe Standards relating to interpersonal comm 53.1 Circuitmode networks 5.32 Packevovitched networks 5.8 Electronic mail ser tener Suajdards relating to interactive applications over the Is 5.4.1 Information browsing 342 Elecironic commerce 5A Intermediate stems SAA Java and JavaScript ‘Standards for entertainment applications 5.5.1 Movie/videooniemand 555. Interactive slevision Summary Exercises igital communication basics Introduction ‘Transmission media 6.2.1 Tworwice open lines 82.2 Twisted pair lines cons | 9 201 203, 208 207 212 215 216 25 29 237 238 242 246 255, 237 261 261 262 365 261 268 270 278 286 200 291 203 295 207 298 3, 207 309 309) 313, au aie 63. 64 65 68 67 6s, 69 chapter 7 623 Coaxial cable 6.24 Optical fiber 6.25 Satellites 6.2.6 Terrestrial microwave 6.2.7 Radio 6.28 Signal propagation detay Sources of signal impairment 63.1 Auenvation 6.3.2 Limited bandwidth 6.3.4 Delay distortion 63.4 Noise Asynchronous transmission 64.1 Bitsmnchronization 6.42 Character smichronization 6.43 Frame synchronization Synchronous transmission 65.1 Bit smchronization 65.2 Characteroriented 853 Bicoriented Error detection methods 6.6.1 Parity 6.6.2 Block sum check 6.6.8 Cyclic redundancy check Protocol basics 62.1 Error control 6.2.2 Idle RQ 6.23 Continous RQ 6.2.4 Flow control 6.7.5 Séquence numbers 6.76 Layered architecture 6.2.7 Protocel specification 5.7.8 User service primitives ‘The HDLC protocol Summary Exercises circuit-switched networks Introduction Transinision systems 7.2.1 Analog subscriber lines 72.2 PSIN modems 72.8 Digital subscriber fines 724 Plesiochronous digital hierarchy an an 3 sie set 35 396 23. 14 15 chapter 8 88. 89 810 chapter 9 on 92 93 725 Synchronous digital hierarchy Switching systems 732 Time switching 732 Space switching, 7.33 Digital switching units Signaling systems TALL Access network signaling 742 Trunk network signaling Summary Exercises Introduction LANs Echerniet/1EEE8023 Token ring Bridges 85.1 Transparent bridges 85.2 Source routing bridges FDpI High specd LANs 87.1 Fast Ethernet 87.2 Switched Fast Ethernet 8.7.8 Gigabit Etherne LAN protocols 88.1 Physical layer 88.2 MAC sublayer 883 LLC cublayer 884 Network Iner : -Mullisite LAN interconnection technologies 89.1 Intersive gateways 8.9.2 ISDN switched connections 89.3 Frame relay 8.9.4 High bitrate leased Yines ‘Summary Exercises Introduction IP datagraras Fragmentation and reassembly ry 40 46 a8 “9 461 40 a am 45 476 485, 500 sor si 516 a1 sa 539 sar sis a8 545 580 551 54 587 564 568 sm Contents 4 95. 96 97 98 99 910 aan oe ‘chapter 10 ya 104 103 104 addresses 841 Subnets AARP and RARP 95.1 ARP 952 BARP 9353 ARP/RARP message formats 0 tans Routing algorithms 961 Satie routing 962 Flooding 9163 Distance vector routing 964 Linkstateshortentpathiiet rowing 9.65 Hierarchical routing 9656 Clasessinterdomain routing 96.7 Tunneling 868. Broadcast routing 9.69. Mulicas routing 96.10 IGMP 96.1 Mebone loMP 9.3.1 ICMP message formas and wansmision QoS support 9B. Invegrated services 28.2 Differentiated sersices The PPP link layer protocol 16 910. Datagram format 9810.2 Address structure 2.10.3 Extension headers 9.104 Autotontiguration 1146 /1Pv4 interoperability 9:1. Dual peotocots 9.112 Dual sacks and eneling 9.113 Translators Summary Exercises broatband ATM networks Introduction, Call format and switching principles Switch architectures Protocol architecture 104.1 ATM adaptation layer 30.42 ATM layer a ros ATM LANs ss 105.1 Cal procesing me 106 KEMMANS o so THD Subnet archi 262 Protocol arhiectre = 1083 Queved arbitrate aces protocol a 10.6.4 Bandwidth balancing oe 10.65 Peioritized distributed queuing oon 10.6.6 Sot and segmem Sorsats al 10.6.7 SMDS oo 10.7 Wide area ATM networks oes 108 Sumeary Exerelien sos 600 = yedems oa chopter 11 entertainment networks and highspeed os 111 Insodction ea 112 Cable TV networks e 11.2.1 HFC networks Ca 11.3. Satellite television networks oe 11.3.1 Broadcast television principles So 11132 Digital television na 11.33 Interactive services “a 114 Terrestrias television newworks ls os LAT Broadcast television prineipl ois 1142 Dig television a 11.43 Interactive services ies ee ALS Highapeed PSTN access technolog! oe 115.1 ADSL ea 11.5.2 VDSL_ = 11.6 Summary a Exercises 662 chapter 12 _ transport protocols ] 12.1 Introduction te 122 TCP/IP protocol suite a 123 TCP on 1281 User services om 1282 Protec operation oe 12.3.3 Additional features bald < 1284 Protocol specification Contents B x9 65 Ww 705 07 no m ns 78 720 ™ mm m8 a a 732 736 159 761 766 m0 ™ m ms TH 78 79 1 728 181 co 01 2 704 705 500 as 833, 124 125 126 chapter 13 11 132 133 134 135 136 137 138 chapter 14 4a M42 M3 upp 124.1 User services 12.42 Protocol operation RIP and RCP 1251 RIP application support functions Introduction ASN. 1821 Type definitions 132.2 Transfer syntax Security Data encryption 1841 Terminology 13.42 Basic techniques 13.43 The data eneryption standard 1344 IDEA 13.45 The RSA algorithm Nonrepuciation Authentication 136.1 Using a public key system 13.62 Using a private key stern Public key certification authorities Summary Exercises internet applications Introduction Domain name system 142.1 Name structure and administration 14.22 DNS resource records 142.3 DNS query messages 1424 Name servers 1425 Service requests Elecronie mail 14.3.1 Structure of email messages 14.8.2 Message content 143.3 Message wansfer 144 7 48 chapter 15, 151 152 153 4 155 156 187 FIP 14.41 Overview 14.42 File content representation 14.43 FIP operation 1444 Command and reply message format 1445 Example 1446 Anonymous FTP ‘TFIP 145.1 Protocol Internet telephony 1461 SP 1462 SDP 1463 GLP ‘SNMP 14.71 Structure of management information 14.72 Prowocol Summary Exercises ‘The World Wide Web Introduction URLsand HTTP 1521 URLs 1522 HTTP HTML 159.1 Text format directives 15.82 Lists 1533 Color 15.34 Images and lines 1535 Tables 153.6 Forms and OGI scripts 1537 Webmail 15.38 Frames ‘Audio and video 15.41 Streaming using a Web server 1542 Streaming servers and RTSP Java and JavaScript 155. Java 1552 JavaScript Security 156.1 SSL 1562 SET Web operation 5 925, 925 926 927 9 3st 931 932 935 937 939 ont 48 947 951 955, 956 987 960 966 967 970 73 7 78 985 98 987 990 995 997 1000 1000 1008, 1006 ae REN” 15.21 Seach Engines 106 1e12 Porat _ ss preface Bowne us ‘endix A CRC implementation 1015 endixB Forward error control 1019 graphy 1030 Index 108 Objectives ‘Multimedia communications embraces a range of applications and network: ing infrastuctures, The term multimedia is used to indicate that the information/data relating to an application may be composed of a number of different types of media which are integrated together in some way. The different media types are tex, images, speech, audio and video and some example applications are video telephony (speech and video), multimedia electronic mail (tex, images and audi for example), interactive television (text, audio and video), electronic commerce (text, images, audio and video), Web TV (text, audio and video) and many others In practice, there are a number of different types of network that are used to provide the networking infrastructure, These include not only net ‘works that were designed from the outset to provide multimedia communication services ~ normally referred to as broadband multiservice networks ~ but also nensorks that were designed initially to provide just 2 single type of service and its asa result of advances in various technologies that these can now support a range of other (multimedia) services. For exam- ple, public (and private) switched telephone networks (PSTNs) were ‘designed initially to provide a basic telephony service but they are now used to support a range of more advanced multimedia applications involving all of the different media types. Similarly, computer networks such as the Internet, ‘which were designed inivally to provide generat data communication services such as electronic mail and file transfers, can now support a much richer set ‘of multimedia applications, In terms ofthe different types of media, text and images are generated, and represented in a digital form, Speech, audio and video, however are gen ‘erated in the form of continuously varying ~ normally referred to a8 analog ~ signal. Hence in order to integrate al of the different media types together, itis necessary to fist convert the various analog signals into a digital form. ‘The integrated digital information stream can then be stored within a com- puter and transmitted over a network ina unified way. In addition, unlike {ext and images which are created in the form of a single block of digital information, since speech, audio and video are continuously varying signals, dighizaton process can produce large volumes of information which car Yies on increasing with time. Hence in most multimedia applications, in NS ES TET 0 MRL TS SENSIS Chabter mura cima 1.2 ‘The applications may involve either person-to-person communications or Persondosystem communications. In general, two people communicate with cach other through suitable terminal equipment (TE) while a person inter- acts with a system using either a multimedia personal computer (PC) or ‘workstation. Typically, dese are located either in the home of on a desktop nan office and the ystem isa server containing a collection of files or doct- ‘ments each comprising digitized text, images, audio, and video information either singly or integrated together in some wi. Alternatively, the server may contain a library of digitized movies/videos and the user interacts with the server by means ofa suitable selection device that is connected to the settop. box (STB) associated with a television, In practice, there are a numberof diferent types of network that are used to provide the networking infrastructure, These include not only networks {hat were designed from the outset to provide multimedia communication ser vies butalso networks that were designed initalyto provide just a single ype of service andit isasa result of advances in various technologies that these can "ow provide a range of other services. For example, public switched telephone ‘networks (PSTN) also known as general switched telephone networks (GSTNs) ~ were designed intially to provide a basic switched telephone ser vice but, as a result of advances in digital signal processing hardware and associated software, they now provide a range of more advanced services involving text, images, and video. Similarly, data networks that were designed Initially o support basic data applications such as electronic mail and file \wansfers, now support a much richer set of applications that involve images, audio, and video, In this chapter we shall present an overview of, firstly, how the different media types ae represented, secondly, the different types of network that are Used to provide multimedia communication services, and thirdly, a selection ofthe applications that these networks support. Finally, we describe the mean- ‘ng ofa range of terms tha are associated with multimedia communications. Multimedia information representation Appliationsinvoing ext and images comprise blocs of digi. data. tn de case of text for example a piel unt ira block of characters wir ec chara? ter presented bya fixed numberof binary dig (its) own a codeword. Similar dined image comprises ewodimensional Black of what are called pictre elements with each element represented bya fked number of bits Aso, since pial pplication ivohing text and images comprises short ‘eyes for sme afrmaton = efor example and le contents beng returned he dation ofthe overall ansaction seal shore Jn applicators involving audio and video, however, the audio and vidéo signals ry continuo ith time as the amplitade ofthe speech, abo or video signal Yares This ype of signal i known san alg signal and, yp cally the duration of applications that involve audio and/or ideo ean be 23 matimedla eters {25 relatively long. A typical tel one conversation, for example, can last for se * eral minutes while a movie (comprising audio and video) ean last for @ tuber of bour In applications tat ino usta ingle ype of mei the bas form of representation ofthe paral media pes ened Siar nape Sone tat nave eer tetandsnages or audhoandidco thr form is often wed since the wo media ypes in thee applications have the eae form of representation. However, it appicton tat involve he diferent tmeia ypes tegrated together in sme way, comes neces to pre sata four media pest digital frm Inte case of tet and age th is their standard form of representation. For audio and video, however, beast ther aie forms ct epresenation ae analog gal these mst be converted into a coresponing digital form before they can be negra wih de to other media pes ‘swe shal dexribe ir he next chapter, the dgization ofan dio signal produces egal sgl which, becaute the amplitude ofthe sig tales cominuoty ith nei ofa rlavey high bt rte This mesure in bits per second (ope) ad, in the cat of speech saga for example, a pia birt tps Noreover, becasesppicaionsinvling ae can be of long drain, his bic ate must be sstained over amex tong tine period The same applet the dghizaton of» ido signal excep tat tnuc highcr bit ates ane longer time duration are invobe. In genera, Romever swe shall xpand upon inthe next section, the commoncaon retorts that are wed t port appieton hat invole audio and ie Canmot suppor the very hgh bit estat are required for representing these media pes ina dgal form. Ava rl a techngue lon as com preston ise appied vo the dighied signals m order to reduce the Feraing bitrate to level which the various nebrorke ean support Gompresion iso applied to text and images in order to reduce the tne dei nemeen x req being made fr some information an the informa ton becoming aasle on ay the screen ofa computer We all esi ‘Secon ofthe compres agora tat are ued vil ext and ages in Ghapier and those wed vith audio and video in Chapter 4 Multimedia networks ‘There are five basic ypes of communication network that are used to provide ‘multimedia communication services: telephone networks, data nesworks, broadcast television nesworks, integrated services digital networks, ‘Ym broadband muldservice networks. 1-1 Muttinsia communications 131 [As the names imply, the first three network types were initially designe ® to provide justa single type of service: telephony, data communications, and broadcast television respectively. The last two network types, however, were designed from the outset to provide multiple services. We shall describe the essential features of each wype of network separately and, inthe case ofthe first three network types, the technological developments that have enabled them to provide additional services Telephone networks Public sviched telephone neoworks have been in existence for many years fh hove gone through many changes daring thie ime, They were designed to provide a tac sutched telephone service which, with the advent ofthe ‘ther network ypes has become known a plain ad telephone service or POTS. The term “iced” ned eo indicate data sbseiber can make a call t any other telephone thats connected tothe ‘oral network. nial, Soch networks spanned jus single county but ater the telephone neworks of deren counties were interconnected so thst they now provide an inter ‘anal oitched service The main components of the netrork are shown ia Gigrammati form in Figure 11(). ‘swe canst, telephones loested i the home orin a small busines are connected direct their nearest local exchange/end offic, Those located sn'a medium ole olfce/site are connected to agate siching office frown as private branch exchange or PBX, The PBX provides (re) Switched sevice between any two telephones that are connected tit Io Addon, the PBX s connected to is nearest local (publi) exchange which ables the telephones that are connected tothe PBX also to make calls through a PSTN. More recent, cellar phone networks have been into- duced which provide a similar service to mobile sunecribers by means of handsets tate linked to the celular phone network inrastrvctre by Tati The svitches used ina celular phone network are known 2s moi ‘itching centers (MSCs) and these, ike a PBX, ae alto connected 10 & Srthing office in'a PSTN which enables both set of sublerbers to make fall to one another Final, international als are rote to nd shed by {aternationalgteway exchanges (IGE), ‘swe indented cari, speech sgoal s analog sig sie it wares continuously with time according to the amplitde ard Feuency variations ofthe sound reuting from the speech, A lerophone rset conver this Sito an analog electra ina, Besse of thi, telephone networks operate inhatsaled a cet mode which means that, foreach ll separate cir tuts setup through the network ~ of the necesiry capacity ~ fr the Guration of the call The access cet that ink Ue telephone handsets fo a PSTN or PBX were designed, therefore, to carry the tworay analog sigals tssociated wth al Hence, although within a PSTN all the sitches and the {tansmision cies that interconnect them now operate in dig mode, 13 Mutimeda eters | 7 joccms Meckgonan ten/a PN ns an Gay, v ami Lissire oops et ~ rage stewie ‘eeshone roo — slog aces ew XE = be echonge/ond lice sth "= bi sec lepers a elaredaternh Fix pine tionsechonge EGSe © evap mle eiing coer Ge Bowartnd gsewoy echoes dor steers | alo ccs at Andon cca Hightawe —>] Chapter 1 ultieslaconmuriatons 13.2 to carry digital signal~a stream of binary Is and Ox ~ over the analog access circuits requires device known asa modem. The general scheme isshown in Figure 1.1(). Essentially, at the ending side, the modem converts the digital signal ‘output by the source cigital device into an analog signal that is compatible ‘with a normal speech signal. This is routed through the network in the sume way asa speech signal and, at the receiving side, the modem converts the analog signal back again into its digital form before relaying this othe dest- nation digital device. Modems also have the necessary circuits to set up and. terminate a call, Hence by using a pair of modems ~ one at each subseriber access point ~ a PSIN can also be used to provide a switched digital service. The early modems supported only avery low bit rate service of 30bps but a result of advances in digital signal processing cireuite, modems are now available that support bit rates of up to 56Rbps. As we shall expand upon in Chapter 4, this is sufficient to support, not only applications that comprise ‘ext and images integrated together, but also services that comprise speech, and low-resolution video, In addition, continuing advances in digital signal processing techniques ‘mean that modems are now available for use with the same access circuits ‘that provide a high bitrate channel which is in addition tothe speech chan nel used for telephony. Typically the bitrate of this second channel is such {dt it can support high-resolution audio and videa and hence they are used. to provide access to servers that support a range of entertainmentzelated. applications. The general scheme is shown in Figure 1.1(¢) and, a we shall, see in Chapter 4, such applications require bitrates in excess of 1.5 Mbps, ‘This illustrates the technological advances that have been made inthis area since the early modems were introduced in the early 1960s and, as we can deduce ffom this, a PSTN can now support not only speech applications but lso'a wide range of other multimedia communication applications Data networks Data networks were deigned to provide basic data Zommunication services such as eleéGaic tail (email) and general file ransfers. The user euip meni Yonfetted to thee networks, thefefore, iia computer such as a PC,a \woitsston, or an email/fle cetver. The two most widely deployed networks ‘of this ype are the X95 network andthe Internet. Because ofits operational mode, however, the X.25 network is restricted to relatively low bitrate data applications and hence is unsuitable for most multimedia applications. ‘The nent a up ofa vast collection of interconnected networs all of which operate using the me set of communication protooos, A communi cation protocol is an agreed set of rules that ate adhered to by all communicating parties for the exchange of information. The cules define noc only the sequence of messages that are exchanged between the communicating Parties but alo the syntox of these messages. Hence by using the same set of 1.2 A butettidn ofthe network types connected tothe Internet. 1.3 Multimedia networks | 29 ‘communication protocols, all the computers that are connected tothe Internet «can communicate freely with each other irrespective oftheir ype or manus: ‘turer. This also the origin of the term “open systems interconnection”. Figure es of inlerconnected network 1.2 shows selection ofthe different Das FC oan i Sever compar Gb brat bocion eh Des FC/wain Sacompus pi BS ack LAN = bel ona reat G/W= goxwoy IBDN = eg series dil ntverk swe can sein the ease ofa usr at home rin smal basines acces th the Internets through an intermediate Internet service provider (ISP) net ‘work. Normally, since this type of ser wants access to the Internet intermittently, the user devices are connected to the ISP network either through PSTN with modems or through an Jatograted services tgital network (ISDN} ‘hich, as we shall explain in Section 13-4, provides aces ata higher bitrate. ‘Aternaely busines users obtain aces either trough ate expat network ifthe business comprises only a single site of, if i comprises malipl tes ‘hong an enterprise private detworR. The sre approach used by most colleges and unierstes. In the case ofa single sit/campus, the newrork i ‘nom asa (priate) lea area network or LAN. Foran enteprsevide network comprising muliple tes the sts are interconnected together wing an nter- site backbone setwork to provide a set of enterprise wide communication Services. In aon, providing the eambnicaton protocols Used by ll the computes connected io the network ae the same as those defined for ie with the Interne, then ll the users alo have acess othe range of series provided. ty the faternet The enterprise network's then known as an intranet Since all internal services are provided using the same set of eommnicaon protocols a8 those defined for the Internet. The diferent types of neorork are ll connected to the Internet backbone network through an interworking uni called 9 gat ‘7a whic, because its responsible for routing and relaying all sages to and from the connected network, i also Rov as rottr. All data networks operate in what called packet mode, Eset, a padet isa container fora block of data and, ats head, ae adres ofthe Jntended recipient computer which i sed to roe the packet throogh the network, Tht mode of operation was chosen since the forat ofthe data associated wit data applications is normally i the form of dicrete blocks of text or binary data with varying time intervals becween each block. More recently, however, mnulimedia PCs have become available that support a range of other applications. For example, with the addiion ofa microphone nd a par of speakers ~ together with & sound card and astodated software digitize the speech ~ PCr are gow weed co support telephony and other speech-elated applications. Similarly, withthe addition of a video' camera and asocsted hardvare and software a range of other appliajons aok video ean be supported. Also, ince thei introdiction, higher titre ans smision cievits and rowing todes have Become availabe an eh ‘expand upon in Chapters 3 and 4, more efficient algorthins to reprenent speech, audio, and vdeo ina digital form. Collective therelor; th means that packet mode networks ~ and the Internet in partculat~ now sapport ‘noc onty general data communication applications but alia range-sB other mmulimedis communication applications Involving speech, ai, and video. Broadcast television networks Broadcast television neiworks were designed to support the diffusion of analog television and radio) programs throughout wide geographical areas In the case ofa large town or tify the byoadcass medium is normally cable 1.3 Multimedia netoris | 30 ‘network or sometimes 8 VCH fk Packet-mode ‘As we seein Figure 1,30, there are two ypes of packetmode network ounecionoriented (CO) aid connecdonkss (CL). The principe of pet = Gon of connecton-rinted aetwork i shown in Figure 1.20(8) and a P3 ae wcodt + WOH an se, it comprises an interconnected st of packstewiching exchanges : eee cn {PSts)."This ype of network is Known as packetovitched network and as witha Grcuiteytched network, each termi /compater tats connected to the peoyork has a unigue neworkode number addres asocaed with Wit a connection oriented network, asthe name implies, prior o sending Zn information, a connection i fs set up trough the network using the falesses of the source and destination terminals. However, in a pack Sriched newor, the conmecion/ereut Uats set opie only a arable portion ofthe bandwidth of each link and Bence the connection i known 3, eee {virta connection ox more usual, a vista cent (VC), Epon cere “To set up 2 VG, the source terminal/companer sends cll eit control packet oi local PSE which contains, in addition tothe adress ofthe Source and destination erminal/computer a short denier known a is tial crit identifier (VCI) Each PSE maintains a table that speciis the Chredatontig outgoing link that should be wed to reach each network adress and, on ec tecept ofthe call quest packet, the PSE. ss the destination address within the packet to determine the outgoing lin o be used The next fre ident fee (VCD for this ik is then selected and vo ene are made in routing tale The frst species the incoming ink’VCL and the coresponding owt going ink/VCl and the second, in order to route packets in the reverse directo, the inverse ofthese, a we showin the example in the Sigur. The call ropest packet is then forwarded on the selected outgoing link ard the Sine procedures ollowed at each PSEslng he route ul the despaion terminal compute i reached allecively, the VC hat areiused on the varius links for he cai an athe destination suming teal accepted al ele ‘it. The’ 02 ‘ug ole: VU/tnk) > VCs vend — voi fucket is requrned tothe source over the sme route/vrtal ire FRrormation tansfer phase ean ten start it, since a VCs now place, ly the VOI is needed in the packet heater insicad ofthe fll network-wide hres. Each PSE fst uses the incoming link/VCL wo determine the Out suing link/VCl rom the routing table. The exiting Vt inthe packet header Tent cre int replaced with that obtained fom the routing able andthe packets owe forwarded on the identified outgoing link. The same procedure is followed: mination odchest te return information in the reverse irecton and, when al information has bccn tanalerred exchanged, the VC is cleared and the appropriate VCIsare feleased by pasing a alr packet song the VC (b) connectionless, Chanter Multimedia communications In contrast, with connectionles network, the establishment of nection is ot required and the ovo communicating terminals/compu Can communicate and exchange information as and wen they wish. Io or to do this, however, a8 we show in Figure 1:20(D), each packet must carry fall source and destination addresses in its header in order for each Pf to route the packet onto the appropriate outgoing ink In a connectont network, therefore, the term router is normally used rather than pack Snitching exchange In both network types 8 each packet is received bya PSP/router on incoming link, tis stored in its entirety ina memory buffer. A check st made to determine if any transinission bit erors are present inthe pacl hheader~ thats the signal thats used to representa inary Os corrupted a fs inuerpreed by the receiver asa binary and vice erst ~and, ifan erry detected, the packet is simply discarded. The sevice offered by a pac britched network i std, therefore, to be a bestefort service. If no rors detected then the addresses/VCls carried in the packet header are read determine the outgoing link that shouldbe used and the packet i placed {queue read for forwarding on the elected outgoing link All packets are t ‘ited a the maximurn link bitrate. However, wih thismode of operation, i posible for a sequence of packets to be received on a numberof incom Fate al ofwhich need forvarding on the same outging ink. Hence a pal may experience an aditional delay while ii the ouput queve for ali vraiing to be transmitted Cleary, this delay will be variable since it depends the numberof packets that are currently present in the queue when an packet arrives for forwarding, This mode of operation is known as (pack Noreand forward and, as we can se, there isa packet store-andforward del in each PSE/router. The sum of the storeand-forward delays in PSE /router contributes to the overall transfer delay of the packet across network. The mean of this dela is known asthe mean packet transfer d tnd the variation about the mean the dlay variation ote. ‘An example of a packet-switched network that operates inthe conn tionless mode isthe Internet, which je shall describe in some detail Chapter 9. Two examples of networks that operate in the connect tented mode are the international X25 padkevsvitchingiebworkand A neworks. As we explained in SecHod 1.8.2, H2 X.25 network use pri iy for the wansfer of files containing text dhd binary dita betwegn lad “Computers. Because of the packet format that i used, the routing of pal is relatively slow with the effet tat the X25 network is unsuitable form tmullimedia applications. Ip comras, as we desried in Secipn 1.3.5, reworks have been designed from the outset © suppor all types of ml dia applications. This is achieved by using high bitrate interconnecting li Sd, once avrwal circuit has been setup, a very small fixedsized packet 53 bytes is used to transfer the information associated with the cal. E Small packet is known as a cell snd includes a short Sbyte header whi tables ells tobe suche atthe very high lnk bitrates that are use. I 1.9 Applicaton and metering termiology for this reaton that ATM necworks are also known as fast pack 3s Fast packet sitchin ‘works or sometimes cellswitching networks. We shall desente tie wen ‘Of ATM networks in Chapter 10 pera Multi ‘swe deeribedin Seton 1.4.1, malipoint conferencing fees inteipesonal applications including audio: and videorenferencng 1 sharing, and computer-supported cooperative working. Essentially h imvtve be exchange of information between thes oe a furs pace’ beemse of he diferent modes eae Sewresk per crutvitched and pachcrantched en a, ings implemented in ove of wo way convalzed snd oe ea Tis ceemeetd ea Wel yall ear aneger ee PSTN or an ISDN and, as we show in Figure 1.21 (a), with this mode z tcrminal/computer to be invaled in the confereneé nas Ren a eas nection to the server. Each terminal/computer then sends its ow = stream ~ comprising, say, audio, video, and data integrated together in g ways wer Sing ieesablahed connection eg er Toutes eter te media Sucamreeched froma ese oa ter or mix of the media seams recived from sever! term : computers back to all the other terminals/computers that Nes “Te dcenralzed mode i sed with packetaviched network hat portman communion Eras cel wera intraness, and the Internet. In this mode, as we show in Fi 1 ‘ win Figure 1210) culpa ofeach verminal/computcr i eccived bya he ener ese theconferene/mulean group. Hence conerae se used and Insicad it ix he reeponsibilty of each tercnralfec ne manage the information scams that reches ftom we ge ese trie nnn we yin shown Figure Ll (0 ands wwe cansee ts tnehene meee nali/computers that make up the conference are attached to diffe : sitet pes in dare dvd; ib confines ee pecketontched netk that oppor ulate ea ‘mode, a conference server is used and the o ve mpi euch ternal per iseno the sere either ve indidsl Creag eee centralized mode, it is the server that determines the output st a sent toeach terminal. ee {Asoc expand ln Seton 141 there re for ype of conferencing joint conferencing ‘= dar conferencing: this involves data only and examples include dats sharing and computeraupported coopertve woop ESSE SE SE “ey 2 | on ssi meni 15 pmtatnwdnentio umn | to With dat conferencing the information ow beten he arious partes is rlaively nfvequent Normal, Hrerefor, the conference server general purpose computer with the conference fonction implemented i fbitwar. ith the oer thee ype of conferencing, howe the into Gon flows demand the use of special pnpore Uni Inthe case of tdloconfeencing, the init alld an aud edge and piel nis supe port fom sx through to 43 conference parents, With video and fnutnedia conferencing, he unit ced a mulpent contol ni (MCU) tnd bess of the von and rate ofthe infortaton being exchanged, normaly te centred mode of working ted wi both neo pes “AN MCU consists of vo pats the at ow a the slp cow teller (MC) prt and is concerned vith the exablnhment of contections tach ofthe convene paripans and wi he negoaon ofan aged se Cf operational parameters ren teshuon,efiesh rate and soon, The Second part Vnown 5 the mip process (MP) and is concerned wth Peseta the dtGon ofthe information stems generated rng the conference es : ‘Tele incade such fncins 2 the ming o the ris meta Sens Leet intoan ograted seam wiveacite siting and continuous presence ‘When iting an audio bridge call scheduled for a prc date tim, and draion and everyone who iso lake pain the el signed 9 UserID and paswont Ac the appropriate ime al prspans call nad, afc they hate been vried tem he conference, ey ean hear and speak tothe caer paicipaa Ina sna yen wing an ML, eal che tied afr an sudo ridge and, once the contents sats, och gareipant tan hag sce and Sore data with the ctr porn Wi an CU, how tye in sii tothe poiipantealing I owas the latin mode income instances, the MCU eal the partcpants~ he dafout mode = which in genera provides beter eur. In te vokeactvated siching mode, the face of he parcipants die played in a window on the sercem ofthe prteipas erin computer Sd ins second window the face ofthe (ems) Patipant wha cu ees tenty taking, When anoter participant stars ofl the fce of te new Q - ema omic or : speaker replaces the lage of the current remote payilpant. In the event of tho. (or moe) panicipant sartng lke mete he MCU nor inal sect the fepion who spent the lew, Inte contin presence tmede, hover he femote window is dnded ino 9 munterof aller wi Gown each of which play the ae of he as ve of partion wo spoke or nko ar erent seating, With bch modes the speceh om al parce: ants normaly mined inte 8 single desman hens each Pateipan can Hvashea what iri by al the ther portant Crean or PINION ered 'W- audioconferencing: this involves ado (speech) only: , 1 videaconferencing: thie involves speech and video sichronivediand integrated together: |X multimedia conferencing: this involves speech, video, and data 15.5. Network QoS integrated together. F ‘The operational parameters associated with a communications channel through a network are known as the network Quality of Service (QoS) parameters and collectively they determine the suitability of the channel “ Chapter Multimedia communications in relation to its use for a particular application. In practice, the QoS par meters associated with a circuitswitched network are different fron those associated with a packet-switched network and hence we shall discus cach separately Gircuit-switched network “The QoS parameters associated with a constant bitrate channel that is set uf through a ciruitswitched network include: wm thebit rate, the mean bit error rate, ‘© the transmission delay “The mean bit error rate (BER) of a channel isthe probability ofa bi being corrupted during its transmission across the channel in a defined time interval Hence, fora constant bitrate channel, this equates tothe probabi ff a bit being corrupted in a defined number of bits. A mean BER of 10°} therefore, means that, on average, for every 1000 bits cha are transmitted, these bit il be corrupted. In some applications, providing the occurrence off bit errors i relatively infrequent, their presence is acceptable while in other applications itis Imperative that no residual bit errors are present in the eecived information. For example, ifthe application involves speech, then an ‘ceasional bit error will go unnoticed but in an application involving the tran fer of, ay, financial information, it is essential thatthe received informatio contains no errors. Hence with such applications prior to transmission t Source information is normally died ito blocks the maximum sizeof whic js determined by the mean BER of the communications channel For example, if the mean BER is 10%, then the number of bits in a blo must be considerably less thar! 1000 otherwise, on average, every block wi ‘Contain an error and will be discarded. Normally, however, bit errors ocet fandomly and hence, even with a block size of say, 100 bits, blocks may stil “Conti an error but the probably of this occurring is considerably less. i seer if he BER piobability is Pan the nusnber of bis ina block ‘ied alsuming random effors, the probability of 4 block containing a bi ertor, Py is gen By: a7" ry which approximates to NX Pif Nx Pis less than 1 ‘in practice, most networks ~ both circuitshitched and packevewitched provide an unreliable service which is also known asa besttry or beste Reyvice. This means that any blocks containing bit errors will be discarded tiiher within the network ~ packetawitched networks ~ or in the network {interface at the destination ~ both packetawitched and cicuitswitched ne svorks. Hence if the application dictates that only errorree blocks are 15 npteiranbttemionr | acceptable, it is necessary forthe sending terminal /compoter.o vide 2 ation into blogs ofa defined maximum sxe and forthe dest aan acct ae block is msg. When this ocus th destination x vo eG the source send ance copy of te ising block. The sr sera hen sid tobe a reliable service. Cleary, hs wil itroduce ad Cer rnsion procedure should be invoked relatively inten ene sacs nama lock sive Tis, however, leads to high overheads rei eget contin the aiionl information thas sociated wih can esha procedure, Noval therefore the choice of lock te ae pchoeen the increased dela resulting from a lage block carer aamanisions andthe los of transmission bandwidth rent ‘te high overheads of using a smaller block se ron rton delay sociated with a channel is determined not by nbsreu thats ured but also delays that occur inthe tersinal/+ Pier neon nerfs non a code dela, pls the propegaon: Pat al sigels they ps from the source othe desnation actos cao ernie determined bythe physica separation ofthe to com weeettsarices and the velocity of propagation of signal aco on ssn medium, In fee space, for example the Eater i equal eee ety (9x 10! ms whe tis ation ofthis in physical me ‘jpn vale being 210 ms Stace the propagation delay in each case is independent oft rate wfahe communieations channel and assuming de codee delay re cist same whether the bitrates 1s, Mbps or 1Chps Packet-switched network “The Qos parameters associated with a packetswitched network include 1m the maxiqum packet size, 1m the mean packet transfer rate, Example 1.2 86 | ener) uted cmon 1 the mean packet error rate, w= the mean packet transfer delay, the worst-case jitter, the transmission delay Ina packetitched neoork, although the rate at which pekis vranaered acon the neerrk i intuenced song by the Wi ate of imcreonnecing links, beeaie ofthe apa sopean formar dls i cach PSR, rou, the actual 1c o ance of Ethics tere the Hark also variable, Hence the mean packet transfer rale is a thedsuie of ‘he ei homer of pacies at ore enue se ee serworh pr lp aad Coupled wi the paket se eng we, defetmines he equalen mean foo the anne ‘The mean pact ror ato PERisthe probly of ected pad conainag one ot more bers sth te eer ab the lth ee fatcauocued wih screuictched network wich we dered in the pre Cus secon, Hence iis elated to both the maxima packet sean te trortave BER of he tanamison insta inerconnedt the PSE fut hme up te network 1.5 Agliationand networking teinoloay | 65 ‘We defined the meaning of the term "wean packet transfer delay” in Section 1.5.3 when we described the operation of packet mode networks. Is, the summation of the mean storeand-forward delay that a packet experi- fences in each PSE/router that it encounters along a route and the term sitter” is the worstease variation in this delay. As we ust explained, the trans- Inission delay isthe same whether the network operates in a packet mode or a {Greuit mode and includes the coder delay in each of the two communicating, ‘computes and the signal propagation delay. Application QoS “The network QoS parameters define what the particular network being used provides rather than what the application requires. The application itself, Fowever, also has QoS parameters astociated with it. Tn an application invol~ ing images, for example, the parameters may include a minimum image resolution and size, while in an application involving video, the digitization format and refresh rate may be defined. The application QoS parameters that relate to the network include: the required bitrate oF mean packet transfer rate, the maximum startup delay the maximum ené-toend delay, the maximum delay varition/jiter, roundtrip delay. For aplicaons involving the santero conwant Bitrate stream, the important parameters af te equied bit at/imean packet transfer rae, treendto-ead del and, equaly important, the delay valaton/jcr since Misco cesprbleasin the deinaon decoder i the rate of ara of Ue tnsets sai. For interact aplcaons, however, he startup delay tefnes the amount of time that elapecsbeteen an application making & junta srt tesion and he confirmation being reed rom the appr “Shomat hedesintion a serve for example = (hats prepase to accept She seat Hene ths aude in addto o the me require to establish jcmbnk contin si equi deiay introduced in both the dource and the Jeyingion computes while negoating Wat the sesion an ke pce, Ate lw eae n Scion 15, de roundtrip delay is impor tan ince, for humane computer imeracton to be successful, the delay Fitscens eques for some information teing made and the start ofthe information being seceved displayed shoud bea short as posible an, ide fisould be es hana ew second. ‘Altea sce from the above for aplctons hat insoe the ane ofa consant it te steam, a etettoniehed rework woul apeart be mos Spproprate ince, fad, the eal setup dey is often not important and srercly the channel provides a constant bit ate service ofa hnown rae. Chapter 2 Multinesi communications conversely, for interactive applications, a connectonless packet switched net trork would appear to be most appropriate since with this there is no nework Tall setup delay and any variations inthe packet transfer delay re not important. ‘an example application that lustrates the benefits of a packetswitched net work over a crcutawitched network isthe transfer of a lage file of data from Tener computer connected tothe Internet to cient PC/ workstation ina home ‘As we showed earlier in Figures 1.2 and 1.18, access to the Internet from home ‘an be by means of a PSTN (with a modem), an ISDN connection, or a cable tnodern, In the ease ofa PSTN and an ISDN, these operate in a cicuitswitched Thode and provide a constant bitrate channel of in the order of 288 kbps (PSTN thin modem) and 64/128kbps (ISDN). In contrast, cable modems operate in a acket mode and, as we shall se later in Sein 11.2.1, the modems in each of the homes in a cable region time-share the use ofa single high bitrate chan tel/cirait A pica bitrate ofthe ehazed channel is 27 Mbps and the number of ‘Concurrent users ofthe channel may be several hundred. Hence, astuming 270 Concurrent users, each user would get mean data rate of 10OKBpS ‘With this ype of application, however, the main parameter of intrest is not the mean data/bit rate but the time to transmit the complete file. With a PSTN and an ISDN, this is directly related to the channel bitrate and the size (ofthe file. With a cable modem, however although they timeshare the use of the 27 Mbps channel, when they gain access oi, the file transfer cakes place tthe full rate, Hence assuming the filesize is 100 Mbit, the rinimam time to teansmit the file using the different Internet access modes is: PSTN and 28.8 kbps modem: 57.8 minutes ISDN at 64 kbps: 26 minutes ISDN at 128 kbps: 13 minutes ip table modem at27 Mbps: 8.7 seconds Inthe cate ofa able modem, ifother transfer requests occ during the tine tees being ansmited, then the completion tie ofeach waster tarsi nerete as they shar he ae ofthe channel. Neverteles, with qe Spe at aplieaton the prebbiliy of mulipl users requesting wansfer Jn he hort mw of ines lay oe ‘hs iaty fnstanices, hoWever; this dees fot sity that the: alternative net- sw per ane be ed: For iterate appli fr example, thé ll je! ork alvd’a PSTN for local calls is aay applications qi seepiable Siar for constant bit ‘52 plains, providing the equivalent mean bitrate provided bythe net se Dre tba the input bit ae aod the maximum iter ies than & wee catia then a packeovitched nebork canbe sed. To overcome the Seen sr tc a technique own 2 butfering used, the genera principles Sich are shown in Figure 122 te show inthe figure, the effect of eri overcome by retaining a defined summer of packetsin a memory baller athe destination before Ply aero ne information bitsream is started. The memory bulfer operates 15 Apotcaan and networking terminolny | 69 enson tt mio bts Moon eri inputsioow ton daly mat \ geri ean ataoion dely Feo nr postr ore: day Tosonon doy» Reon srecnslowor oy 1 Lipfning doy of seston Po omer wo # Ct natooupu doy semen fred doy south on « Fran, fs FO) tr ceeeeet TMM ol el oid 4 Ba ce oa Dora ol solos capa do Figure 1.22 Transmission of a constant bit rate stream over a packet- Switched network: (a) timing schematic; (b) FIFO buffer operation. sina ftin, fest (FIFO) discipline and the mimber of packets retained rg ete before output stars i determined by the worstcase iter and sae ticste ofthe laformation steam. However 2s we sow in pat (a of the te an using a packetewitched network or this pe of aplication, 20 aa pal delay rincured atte source a the information bistream is com. aaa eret packets, This is known asthe pasketization delay and adds othe dae re relay ofthe channel. Hence inorder to minimize the overall arr apt dl the packet Sze aed for an applic s made as mall saree bat of micient sre to overcome he et ofthe worst es a ee apli the proces of determining wheter a pareular network aaa go tenement ofan application, a numberof standard appice ets cies have been defined Asoited with each service cast 2 acm ‘hapter 1 Multinesia communications summary [72 Summary In this chapter we have discussed: fm the different ypes of media that are used in mulimedis applications, fn the different types of communication networks thatare used to support these applications, a selection ofthe different types of application. Media types “The different types of media that are used in multimedia applications are summarized in Figure 1.23. In some applications only a single type of medium is involved while in others multiple media types are used. As we dlesribed in Section 1.2, the basic form of representation of both text and {mages consists ofa block of binary codewords. Bach codeword consists of a fixed number of binary digits and represents, for example, a single character (ext) or a ingle picture element (image). In contrast, the basic form of Nalinede oppiatons edo pes do Nidoo tated Con Doiied Sore Geel Video Moves, fecoed lew, cae hes i ‘pesifc set of QoS parameters.and a network can either meet thi set of pan 3 Adopt | tersor not Also for networks that suppor a number of iflerent servic lise elispenion the Internet for example ~ in oder to ensure the QoS parameters associate 4 i 1 wih each cassare met, he packets relating o each clas are given a diferent prcoindgs ‘ovity. Iti then posible to reat te packets eating each css dflereny. conn or example, as we shall sce in Chapter 9 inthe Internet, packets rela 1 to mulimmedia applications involsing realtime seams are gveha higher prio Jen igo comeeion ao on vise canarnion ity than the packets relating to applications such as emai. Typically, packet ‘ope: Ioper a ‘containing realsime seams sch 3: audio and video are so more sensitive t delay and jitter than the packets containing textual information. Hence during : Periods of network congestion, the packets containing realtime streams ae Inegid mina albemoton some (ransmitted frst. Packets containing video ate more sensitive to packet loss than packets containing audio and hence aregiven a higher prior B55 Alternative types of media used in multimedia applications. summary | 73 Chapter Multnesia communications representation of both audio and mest video signals isin the form of a analog signal whose amplitude and frequency varies continuously with tind Hence in applications that involve audio and video integrated with tex pecestote Vio and/or images, itis necessary frst to convert the audio and video signals int i tire phony digital form. We shall describe the digital form of repretentaton ofall fou ‘media ypes in more detail in the next chapter. In practice, che bandwidth associated withthe basic form of represent tion of the different media types is greater than the bandwidth ot thd ees ‘communication ne«works that are used to support multimedia applicatiora Spechend vidio eons Worn ey ence in most applications, a technique known as compression is applied iq Say Cooma the source information prior to it being transferred over the network. Wal shall describe a selection of the different compression algorithms that ar used with text and images in Chapter 3 and a selection of those used with audio and video in Chapter 4, Enero 1g Midevoronard, ‘neoove ord sho The fs Cable nates pecs he Network types i : int ‘The different types of communication neororks that are used to support mul timedia applications are summarized in Figure 1.24 and a selection ofthe applications that each network type supports are shown in Figure 1.25, : Sc od teeta rodeos revo moat Aesk/dgiloade — Newvtin/ ne boc niece bocce geen Nubinaiaconmorcoen sta rotor ISON Do, rooskos wintecn ——_Nonowbard Becadhond eT a bs velo ‘son ison ss a os co osieeet eevee ete ut Seeoneerng inrcmecion N me Cle Slice beoedbard BON nator ol SMM inane Mole | = co Mt sapenonal ord Highspeed ne oo: eto fs ee ‘Mulimedia communiatin networks and their service. N= pile sited bichon retard AN nano reas apc bow horas 'SPNe~ inna tres prove rete IN Thnegeed vn digi hk ‘¢1.24 Multimedia communication networks. ter 1 Mutimeda communications In the case of telephone networks, thee were designed intially to vide a svitched telephone cervice both nationally/internationaly (a PS land ata single site (a PBX). Also, with the advent ofthe fist modems, provided a low bit rate switched data servic. Later, as a result of avances i fnodem technology and related compression algorithms, the transfer of digd tized documents (facsimile) was supported. These developments hav continued and the PSTN now supports a wide range of applications th involve all Four media types either singly or integrated together in some Way. ‘Similarly, with data networks - and in particular the Internet, Althou Aesigned initially to sipport applications that involve only text and imag the advances in compression algorithms means that the Internet now Sup ‘ports a similar range of multimedia applications. The applications associat Iwth broadcast television networks have been enhanced by the same advanced in modem technology and compression algorithms. "The last two network types = narrowband and broadband ISDN ~ wer both designed from the outset to provide an enhanced set of services t thos provided by a PSIN. A narrowband ISDN, for example, has range of digit Aceess alternatives which, collectively, support a wide range of multimedi Applications. Broadband ISDN as designed fom the start to support multi media applications that involve all four media types. In practice, however, because ofthe wider set of (multimedia) applications tha the other networks can now support, broadband ISDN is not as yet widely deployed, "Nevertheless, the basic transmission and switching technology associated with it known as the asynchronous transfer mode (ATM) and cell switching respectively has been used in highspeed LANs and for high-speed network] ‘We shall discuss in some detail the operation of these various network] ‘ypegin Chapters 7-11 and the communication protocols and other applic tioreelated ies that are associated with them in Chapters 12-14 Multimedia applications We have chosen to place all multimedia applications into one of three} categories: 1 interpersonal communications, 1% interactive applications over the Internet, 1 enieftainient applications, There are a number of applications in each category each of which involves various media types. A selection of the applications, together with the npe of media involved, are summarized in Table 11, Note that each Wp ‘of application can be supported by a number of different network types, For ‘example, video telephony is supported by a PSTN, the Internet, and both narrowband and broadband ISDN, a pitenitign tats wed Hrcged pede ind ge Yost, ing o the term bits per second fo dgiized audio and video. What's ing ofthe term “compression” and EF compresion wed? Section 13, 13 “4 With the aid of diagram, explin the meaning tof the flowing terme relating to wiched tle ‘hone network @ POTS, (i loclechange/end office, (i PB (Go simobitevtcing center, (9) interational gatevay exchange. Explain why pal of modems is required to transmit agi signal vera PSTN. With the filo a diagram, show the Focaion ofthe oo tnodems when two digital devices commun ‘Chapter Multimedia communications cate over a PSTN and the pes of signal ~ ‘Salo or digital ~that are wed over each part ‘fie neces cet, Show inthe form of a diagram how 2 high= speed modem provides a range of addtional Services to base telephony and data services ‘Satea piel acces bitrate thats used, With the aid of a diagram, describe how the following gai acces the Internet () duserathome or ina small busines, (i) adstibuted community of users around ‘tinge ste or campus, (Gi) 2 Gibued st of ers al atatched tothe Sune enterprivwide pate network. Why isthe later sometimes ced an intranet? plain why snost data networks operate in a packet mode, Hence explain why services [ivolring audio and video are supported Sate the aim ofall broadeast television net ork "Witte aid of diagrams, explain how add tional services are provided with (i) acibl disziboton network and {Ga suellte/terresrial broadcast neoor. yao dns, explain the meaning of ‘the folowing terms teloing to ISDN: (6) lg subseriber ine (i) aserat acces, (6) aggrextion, (i) pray eae acess, () Pxés (0 Beplin ui ean’ of tte roadband™ in relation toa BISDN and iy the deploy- ment of suc HebIGES as been aye 11,_Explain the meaning ofthe following terms ela a ISDN: deel, wy ‘ATM, ii) cll oching, ection 14 12 In elation to speeshonly interpersonal com ‘munizations lnvabing Both public (PSTN/ 1SDN) and pate PBX) netorks, withthe id fof a diagram expain how voicemail and tele Conferencing ae supported. Inciode in your ‘escription the role af 2 yoiceeall server and fn aioe. 13) With the al ofa diagram, explain the fnetion ofa telephony gatewsy in relation to Internet telephony. Hence sate the origin ofthe term ‘Soice eer IP (VP) LM Deseibe the principal operation of a fax rmacrine and why modems are required. What isthe meaning of he term "PC fax"? 1.15 Show in the form ofa dlagram the networks and escntal ters of equipment that are used to send an email mesrage rom a PC user at home to (i) aPCatachgd aste/) start and end bokiiaee (cBotext), present in the fo browse interactively % Chapter? Multimedia information represertaton 2.4 24. form ofa bulleted list (lst«/HL>), include an image (), and s0 on, Other media types such as sound and video clips. also be included, giving rise o the term hypermedia. Indeed, the ter hypermedia” and “hypertext” are often used interchangeably when refers to pages created in HTML. ‘The specification of a hyperlink is made by specifying both the URL. where the required page is located, together with the textual name of th Tink. For example, the specification of a hyperlink to a page containin "Further details would have the form computer's ply ereen cn Oe considered being made wp of ae ds ptr elements — ptels~ each o swoimensional ma ors asst ihe For example, VGA ideo voi ae sis a common type of display and, as we show in Figute Fe sina oO hort pal 40 ver ps 4 ‘el which allows each pixel to have one of Fano example 8s per psel Uiferenc clos “aja =induing freeform objects nyo each other ad, st ay APPA 8 ray thort ine each made up of 25008 0 ~ are made up ofa serigs of ines ‘curved line, in pixels which, prac a i etn of a pr of ajcent pts 08 the Tee. Some examples are shown in Figure 210(8) @ egos ¥ Y= 80 pl x Yo ipl emlen dl ie Dis belpet = 280 aot clas = 0 ‘ @ ode ps Clot pe ies pine sereen format; (0) so se 2.10 Graphs principles (a) example sree ; raat aye examples) effect of changin position attribu {ap seli object. Chit 2 Multimedia information representation Each abject hat a number of attributes associated with it. These iw'shape ~ line, a circle, a square, and so on ~ its size in terms of the positions of ts border coordinates, the color of the border its shadow, a ‘on, In this way, editing an object involves simply changing selected att sisociated with the object. For example, as we show in Figure 2.10(0), move a square to a different location on the sercen by simply changing border coordinates and leaving the remaining auributes unchanged. ‘An object shape is said to be either open or closed. Inthe case of an object, the start of the frst line and the end of the last line that make up, object’ border are not connected = that is, they do not start and end on same pixel whilst with a closed object they are connected. In the cae o closed objec; the pixels enclosed by its border can all be assigned the sam color ~ known as the eolor fill ~ to create solid objects as shown in Figus 2.10(d). This operation is alto known as rendering, In this way all objects dravm on the screen by the user simply specifying the name of the object its aruibntes — including its color ill and shadow effec if required ~ and fof more basic lowerevel commands are then used to determine both th pixel locations that are involved and the color that should be assigned ‘each pitel. ‘As we can deduce from the above, the representation of a complet graphic is analogous tothe structure of program writen ina high-level gramming language. For instance, a program consists of a main bod together with a number of procedures/functions, each of which has ase parameters asociated with it and performs a specific function. In the sum ‘way, a graphic consists ofthe set of commands (each with atributes) that necessary t6 draw the different objects that make up the graphic. Also, in same way thatthe procedures/fnedions in a program can be a mix of tho created by the writer of the program and those available as library pro ares/functions, so the objects associated with.a graphic can be either tho ‘created by the author or those selected from the set of standard objects the clipart gallery. And in the same way that a procedure/function in a ‘gram mayin turn, calla number of lower level functions, so the cosa sociated with objects ure the loverevel commands to display the objects “the screen. Finally, ip the sime ay that the main body of a programy is ed ‘cerned with invoking the various procedures/functions in the ‘ord necessary to implementa particular computational tas, so the main bod ‘a graphic representation is concerned wit invoking the differeit object col mandi in the correct sequence to create the desired graphic taking ink account any overlapping objets ‘We can conclade that there are two forms of representation of a cong 2 puter graphic: a high-level version (similar to the source code’ ofa high (program) and the actual pselimage of the graphic (similar to the bytestri Corresponding to the lowlevel machine code of the program and kno ‘more generally as the bitmap format). A graphic ean be transferred over fiebvork in ether form, In general, however, the highevel language form 2.4 tases | 9. _much more compact and requires less memory to-store the image and less bandwidth for its transmission. In order to use the high-level language form, however, the destination must of course be able to interpret the various high: level commands. So instead the bitmap form is often used and, to help with this, there are a numberof standardized forms of representation such as GIF (graphical interchange format) and TIFF (tagged image file format). There are also software packages such as SRGP (simple raster graphics package) which convert the high-level language form into a pixeHimage form. We shall discuss a selection of these in the next chapter. ized documents [An example ofa digitized document is that produced by the scanner associ- fated with a facsimile (fax) machine, the principles of which are shown in Figure 2.11 "The scanner associated with a fax machine operates by scanning éach complete page from lft o right to produce a sequence of scan lines that start a Fens Seong bead Pry de c iY a te) Sede + Son's Pale pce deert —, Rachdon = Mx N Peleren 8 peor Te iden = 185/77 aren 200/00 fc Figure 2.11 Facsimile machine (b) digitization format, ciples: (a) schematic; i ‘100° | Crapter 2 atutineia information representation at the top of the-page and end atthe botiom. The vertical resolution of scanning procedure is either 3.85 or 7.7 lines per millimeter which i eq lent to approximately 100 or 200 lines per inch. As each line jr scanned, ‘output of the scanner is digitzed wo'a resolution of approximately 8 pictur elements known as pels with fax machines ~ per millimeter. ‘Fax machines us just single binary igi to represent each pel, 0 for white pel and a1 for a black pel. Hence the digital representation of scanned page is as shown in Figure 2.11(b) which, for a typical page, p duces a stream of about two milion bits. The printer part ofa fx mad then reproduces the original image by printing out the received stream of bits toa similar resolution, In general, che use of a single binary digit per ‘means that fax machines are best suited to scanning bitonal (black-an wile) mages such 2s printed documents comprising mainly tex Digitized pictures In the case of scanners which are used for digitizing continuoustone mot ‘chromatic images ~ such as printed picture or scene ~ normally, snore than a single bitis used to digitize each picture element. For example, good qual ity blackand-white pictures can be obtained by using 8 bits per picture clement. This yields 256 different levels of gray per element ~ varying bbesween white and black which gives a substantially improved picture qual ity over a facsimite image when reproduced. Inthe case of color images, in order to understand the digitization format used, itis necessary frst to obtain an understanding of the principles of how color is produced and how the pic ture tubes used in computer monitors (on which the images are eventuall displayed) operat, Color principles Tkhas been known for many years thatthe human eye sees ust a sngie col ‘when a particular set of three pritiary colors are mixed and displayed sm taneously. Infact a whole spectrin of colors known a a color gamit ~ ‘be produced by ising diferent proportions ofthe three prinary colors re (B); green (G),.and blue (B). Tas principle is shown in Figure 212 togeth with some examples oFeplors that can be produced ‘The mixing technique used in part (a) is known as additive color ‘hich, since black is produced when all Uhre primary colors are zero, is par ticularly useful for producing a color image on a black surface a8 isthe in display applications. Its ako posible to perform the complementary tractive color mixing operation to produce’ a similar range of colors. This shown in part(b) of the figure and, 28 we ean see, with subiractive ‘white is produced when the three chosen primary colors cyan (C), magenta (Mp, and yellow (¥) are all zero. Hence this choice of colors is particular {ieful for proditcng a Color image on a white surface as isthe casein pri ing applications ‘lear ‘GREEN (MEX I\ \ fac) / \ Figure 2.12 Color derivation principles: (a) additive color mix (b) subtractive color mixing ‘The same principle is used in the picture tubes associated with vision sets with the three primary colotsR, G, and B. Also, in most ‘monitors since, in general, those used with personal computers Us picture tubes 25 are used in television seis. Hence, in érder to be « ‘with the computer monitors on which digital pictures are norma the digitization process used yields color image that can be d played on the sereen of either a television set oF a computer mo {general principles asociated with the process are shown in Figure Raster-sean principles ‘The picuure tbes used in mos television sets operate using what | a rastersean, This involves a finely-focussed electron beam ~ t boeing scanned over the complete screen, Each complete scan number of discrete horizontal lines the first of which starts atl BI ‘Riu iin iden bston Television compe monitor * 6 Sxecant wi cor man om he exh coprag ont ete | freak pap whi : a x Scicunat det Coe a” Soralinee Cady siete » Sonn 1 2 = a i ast ce H Noted oct 1 550M nd 625 PAUCCR/SECANE roe hee 0 ts pr ard NISL 1 Soe sca PAY/COR/SECANN we 8.68/26 8 = phosphor ninds Figure 2:13 Teltsnesmpitr intr rns ( schema Co averacan pnp (pte! ovat on each san nes omer ofthe sreen and the ist of which end a the thi point the beam is defected back again tothe ap lf corner and the scanning operon repeats in the same way. Ths ype of scanning sealed progrentive scanning ands shown in diagrammatic form in Figure £19(0)- Each complete set of horizontal scan lines is called frame and, as we can see, each frame is made-up of Nindividual sean lines where Ns ether Sop (North and South America and most of Asia) oF 625 (Europe and 2 amber of other countries). The inside of the-display sereen of the picture ibe i coated with aightsensitive phosphor that. emits ight when enengized by the electron beam. The amount of ight emitted ~its brightness ~is deter wlined by the power in the electron beam.at that instant. During each Tarkcontal (ine) and vertical (frame) retrace period the electron beam is tuuned off and, to ereate an image on the screen, the level of power in the ‘beam is changed as each line is scanned. Th the case of black-and-white picture tubes just a single electron beam is ud with a whitesenstive phosphor. Color tubes use three separate, lose qocated beams and a two-dimensional marx of pixels. Each pixel comprises @ wer of three related colorsensitive phosphors, one exch for the red, green, sha blue signals. The set of three phosphors associated with each pixel is ited a phouphor triad and a typical arrangement ofthe triads on each sean {ine is at shown in Figure 2.13(¢), As we can deduce fcom this, although i theory each pisel represents an idealized rectangular are which is indepen- ‘dent ofits neighboring pixels, in practice each pixel has the shape of & Spot which merges with is neighbors. A typical spot sie i 0.025 inches {b.635mm) and, when viewed from a suicient distance, a continuous color Image is een. Television picture tubes were designed, of course, to display moving sagen The persistence of the lght/color produced by the phosphor, there fore is designed to decay very quickly and hence it is necessary to ‘Continuously refresh the screen. In the case of a moving image, the light sig- sis associated with exch frame change o reflect the motion that bas taken place during the time required to sean the preceding frame, while for 2 artical image, the sare st of ight signals are used for each frame. The Frame refresh rate must be igh eriugh to ensure the eye is not aware the display js continuously being refreshed. A low refresh rate leads to what is alld flicker which is caused by the previous image fadirg ftom the eye retina before the following fe isdisplajed. To avoid this, a refresh rate of re Teast 30 ties per Second prequlred: br-practice, the frame refresh rte ised is determined by the frequency of he mains electricity supply which is tither 6D Fiz in North and/South America and most of Asia and 50H in Europe and a number of oiler countries. “est current pictute tubes operate in an analog mode, that i, the ampli tude of each ofthe three color signals is contimuotsy varying as each line is scanned. In the case of digital television ~and digitized pictures stored within the memory of a computer ~ the color signal are in a digital form and com puke sing of pinels with a fixed numberof pels per scan line, Hence in Prder to display a stored image, the pixels chat make up each line are read from ‘remory in mesynchronism wit the scanning paces and converted into a raertnuously varying analog form by means ofa digitalto-analog converter ———————— a | comer 2 mrt penton Since in pact the area ofthe computes memory iat lds eS pels that make up ie image the pixel image ~ mist be accesed con Ustas each ine canned, normal aseparste oc of memory own tne fideo RAM ~ RAM being the acronym for random access memory ~ fused to store the pixel image. In this way, vitae the vdeo RAM whenever either selected pixels or the total i “Changes An example architecture showing the various steps involved in Figure 2.14 “Typically, the graphics progr the image interactively (using. for output tothe display Pixel depth “The numberof its per pixel is known as the pixel depth and determines range of different colors that can be produced. sx olor yielding 4096 different colors ~ and 24 bits~8 bits pe per primary Hos compe Pasreane inoge "wo a re 2.14 Raster-scan display architecture. atn is used to create the high-Tevel version fer the keyboard or a mouse) and the play controller part of the program interprets sequences of dsp Paay mands and converts them into displayed objects by writing the appr Ste pine ales ito the vdeo RAM The ater also known, theres ane frame /display/refresh buffer. Normaly the video controller isa har ware subsystem that reads the pixel ‘jmesjnehronism with the scanning process and, foreach sc of piel val aarvmeyts these into the equivalent set of red, green, and blue analog signa 1 values stored in the video RAM i 2.4 tmagis | 105 £16 million (2%) colors. In practice, how or edge iminate between sch 2 range of caors 8h 3019 Se ce clected subse of thi range i wed, The Slee colors in sy dnen stored ina able ad ach piel au i ie ‘asan addres: the mun the tale wich contains the correspongng TS ‘olor to aoc Dies known 26 he color fookp table or CLT: FAT example nS, ne tits and the CLUT contains 24 itemise ill provide = ica it lilerent colors selected rom a plete of 16 MOON Ca subset soa, de amount of mestory required 9 sore an MABE AP > reduced significantly primary color yielding in exces of 7 fever, the ey the graphics program needs only Aspect ratio Both the numberof pixels per 5 Tame vary, te sta numbers 3 Fes pect rao ofthe display sereen. 7 the srcen height. The aspect ratio of aoe tees =n which PC monitors are based Screen television: tubes. levy ete standard for oor terion tas Deen dein vy a nena Teeson Stans Commits TSC) we Ey by the Naan ds exit PAL (UK), CCTR (Germany), 290 EY te et aed ete, the NTOC snr oh HS a Te (France. fe ee Buropean standards ll we G25 sean ines 1922) frame wie nes payed on the sree ce SEAT A case hoe ther formation. race teens Be OTE Se or pec hich sequal the ver resenuin in we Wut an TBC monitor aa 7 ith eee ee Fe ol docon on aren whi Ba 84/9 CEE "isn rd paying ange (9 lH et for xa gad 9/3) pes ine wh an NTSC. moni 2 tana Oc prne wi aropean mot. This Pros 4/9 pute are lacs an iso i AAS Sa Pig soe eames SP a ree ones sed on television picture Fee ie amt of memory eure sore corso? spuige are snown in‘Table 21 Eee Hp the able the memory requements sn Emagen be bgh andy between SOT Hii sn Ser FGA vdeo graphics army) ren Wh AE Pe splayed atl 290 Mes for a SVG Sepet VOR) 50? S.C 24 8s Per PA on elev pte nies and Bene a5 0) weet ra on exapl # 180102424 2 ae a ren per second eo procs a hare 26 anned Tine and the number of fines pr wt being determined by what is known hss the ratio of the screen width Tyurrent television tubes is 4/3 vi Sand 16/9 with the wid ples are 12 bits~ 4 bi fees IE peor : 323/85] soy ja Biome 4 oe Gs 1040/768 pe ~— 5 Cott ed ter oes : 4 (rt dasa “Ld elon Soped oio= 4/3 jure 2.15. Screen resolutions: (a) visible lines per frame; () digitization spatial resolu Table 2.1 Example Digital cameras and scant; Atypical arrangement that is ut to capture ani tore a digital image pro- ‘duced by a scanner ora digital catbera ether a slhimage camera or a video ‘camera ~ is shown in Fighre 2-16(8) la the figure iis assumed that the cap- tured image is transferred to the computer directly as it is produced. Alternatively, in the case of digital camera, a st of digitized images can be sored within the camera iuelf and then downloaded into the computer at a later time. An image is captured within the camera/scanner using a solid-state device called an image sensor. This is silicon chip which, in digital cameras, consists of a two-dimensional grid of light-ensitve cells called photosites. When the camera shutter is activated, each photoste stores the lee! of inten. sity ofthe light chat fall on it. A widelyased image sensor i a charge-coupled ‘er Multiesia Information representation device (CCD). This comprises an aray of photosites on its surfice and oper fates by converting the evel of light intensity that falls on each photosite into fan equivalent electrical charge. The level of charge ~ and hence light inten- Sty “stored at each photosite position is chen read out and converted into a digital value using an ADC. A similar technique is used in scanners except the frage sensor comprises just a single row of photostes. These are exposed in timesequence with the scanning operation and each row of stored charges ae read outand digitized before the next scan oceurs For color images, the color associated with each photosite ~ and hence pixel postion ~is obtained in a number of ways. These include the three methods shown in Figure 2.16(b). Digi alimage cone In this method, the surface ofeach photosit is coated with either a red, green, or blue filter so that ite charge is determined only by the level of, ed, green, or blue light that fall on it The coatings are arranged in a $353 grid structure as shown in the figure. The color associated with tach photoste/pixt is then determined by the output of the photoste ARG, or B- together with each ofits 8 immediate neighbors. The levels ofthe two otker colors in each pixel are den estimated by 25 interpolation procedure involving all nine value. This method is used ‘with most consumer-quality cameras, (ii) This method involves the use of three separate exposures ofa single image sensor. the fist through ated filter, the second a green filter, and the third a blue filter, The color associated with each pixel position is then determined by the charge obtained with each ofthe three filters ~ RG, and B, Since three separate exposures are required for each image, this approach cannot be used with video cameras It is used primarily ‘with high-resolution stillimage cameras in locations such as photographic studios where the camera can be attached to a wipod. (ii) This method uses three separate image sensors, one with all the pphotosites costed with ared fle, the second coated with a green filter, find the third coated with a blue filter. A single exposure is used with the Sngoming ith pit into three beams each of which exposes a separate ‘ae tensor. This method is used in professonalquality high-resolution sill and moving image cameras ance, in general, they are more costly ‘owing tothe use of three separate sensors and associated signal processing circuits s.c.0 ent, pia hee } 3 | cote Fl copes 16 Color image capture: (a) schematic; (b) RGB signal generation a 26,8 ‘Once each image/frame has been captured and stored on the image sensor(s), the charge stored at ech photosite location is read and digitized. Using a COD, the set of charges on the matrix of photosites are read a single row at atime. First the st of charges on the first row of photosites are trans- ferred to what iscalled the readout register. Each of the photostes in a ow is ‘coupled to the corresponding photostes in the two adjoining rows and, as avh row is transferred tothe readout register, the set of charges on exch of Mernatives. sn 1 Ee NET SRE EP TREE, 12 Malinedia information representation the other rows in the matrix more down to the next row of photoste poll tions, Once in the readout register, dhe charge on each photoite postin i shifted out, amplified and dighized using an ADC. This procedure thed repeats until the set of charges on all eo ave been read out and digitized, Fora lowsesolution image of 640 480 pixel and a pixel depth of 24 bis = 8 bits each forthe R, G, asd B sigeals— doe amount of memory required wo store each image is 92¢ 600 bytes his is optpan directly to the computes, then the bitinap can be foade srigh into the frame buffer ready to be de played. It ist be stored within the camera, however then multiple images ofthis site need to be stored prior co chee being oxiput to a computer. The set of images are stored in an integracedcizcait memory that is ether on a removable card or fixed within che camer. le dhe Bis eat, the ear issimply removed and inserted into the PCMCIA slat ofa computer and in the secon «ase the contents ofthe memory are downloaded 1o the computer by means fof cable link, Once within the compueer, software can he used to inset the Aigital image(s) into a documment, send ic by emai, and so on. Aleenatvely, Photo-diting software can be used wa manipedate a stored image; for exaue le, 0 change its 2¢ ot olor There are a number of file formas used & stare a set oF images. Cae of tbe most popular isa version of the tagged image file forma (TIFF) ealled TIFF for electronic photography (TIFE/EP). This allows mony different pes sf image data to be stoced in the image file iichuding date (avch as ibe date and time and various camera stings) associated with eact image. Audio Essentially we ae concerned wth two pe of audio igual speech signals as ‘sed in a varie of iterpersonal pplication lncuing telephony at aince telephony and msicqualiy audio as used in applications sock ac Ceo demand and broadcast weevsion. In general ais can be produced obey ‘ataral by speans of microphone or plectonically sing vote fos Foe these Io abe cise ofa syntheses hela eeated in dg ore oo ltenee can be testy stored within the ciples memory. Amreneghone however generates inetryng analy lal id inorder to sore ec ag satin the memory ofa compute, nd 1 tdosmit them over a dig ‘network chey us St be convened at digi form using an aise coder Alo since loudspeaker operate ung in analog Son ote ofall aigidze aodio signals he area of digittee values nie Os coneeneg Back agi ato es anatog form ing an ai sgnal decodes Ue dlscusted the genera) principles behind the design of signal encoder ane decoder cartir inthe chapter in Section 2° ae hore we sup apply ehese principles to explain the digtation of bth apes and moc produced dys mecrophone Weshal then discuss he format ofan Sed audio in wseparate eeion The rand ofa pial pec gyal stom 5 Be throwgh to ORE and hr ea mae sal om 08 hag oe Hence be pling tet re asa eee ef rw Sse Lb or sec and ae (2 20H) for mae he tr after ple mt chown a he ean ne trated by tn empingprosen sc atopic Level relative ‘nr Salon ee eying es a an Mora se in ta dye we ii sper sample andor mn 10 et don, ce x pe taining msc seeoponie (trea) undid ad ee Such signs nthe deed) son in Dae double hat oF mons men) sna race, bot it sampling ate wt and the mame of Bits er sanpe refines nh aber Ie fp crm the anddh of he netrorl cacd in nanyInerpertonal application shen much les than the Bandidh fe source goa ie cating ne mpng tne i pe ple Sa cee Png hen eer ree he anc af ea Taube vo sore a parila’ page of misc. A praca example fe been rms woe heck oe om pried 2.5.1 PCM speech ‘As we described in Chapter 1, most interpersonal applications involving speech use for communication purposes a public switehed telephone net- work (PSTN). Because this has been in existence for many years the ‘operating parameters associated with itwere defined some time ago, Initially, a PSIN operated with analog signals throughout, the source speech signal being tcansmitted-and switched (routed) unchanged in its original analog form. Frogressvely, however, the older analog transmission circuits were replaced by digital circuits, This was caried out over a number of years and, because of the need to interwork between the earlier analog and newer digi tal equipments during the transition period, the design of the digital ‘equipment was hased on the operating piremeters of the earlier analog met= ‘work, The bandwidth ofa speech circuit in dhs network was imited to 200 tz through to 8.4kHTz Also, although the Nyquist rate is 6 8kHz, the poor qual: ity of the bandliniting fiters used meant cha a sampling cate of 9Hz ws required to avoid aliasing. In order to minimize the resulting bitrate, 7 bits Fer sample were selected for use in North America and Japan and 8 bits per sample in Europe (both including a sig bit which, in turn, yields bt rates of [56 kbps and 64 kbps respectively. More modern systems have moved to using, 8 bits per sample in each case, giving a much improved performance over carly Tit gstems. The digitization procedure is known as pulse code mods lation of PCM and the international standard relating to this is defined in ITU Recommendation G.711. Figure 2.17 (a) shows the circuits that make ‘upa POM encoder and decoder ‘As we can see, both the encsder and decoder, in addition to the circuits sown eatlier in Figs. 2.2(2) and 25(2), consist of ro additional circuits: a ‘compressor (encoder) and an expander (decoder). The role of these‘cit- {ults can best be described by reconsidering the quantization operation described earlier, This used equal also kaown ay linear ~ quantization Intervals which means that, irrespective of the magnitude of the input signal, the time level of quantizatioh npixe k produced, The effect of this is Spmsch i pa] ue ine Cmira Harlaie eee potion fc) sae Palo ear shea ona ison lodd aighils Heice tp reduce the efter oF auaior berm pcaeegh tage nee een ee ie ‘Snimerat re made none nena wh rower mca cd tor nals tp gla eager nie Tas ected Oy treme Whe compen creak yO sateatth eene ee tons petomed ye exper cee The onl opener knoe cr sonpesdng Te pe oapes easy of base store Fre i ed yea acts pany nkcone prion hrs er nut he apes amore Sordlagtjucd Nope sapien ea aN AR RAE 25 Audio | 056 In practice, for historical reasons, there are wo different compression: expansion characteristics in use: Haw, which i used in North America and Japan, and Alaw which is used it Europe and some other countries. Hence, dawe can deduce from Figure 217(a), itis necessary to carry out conver __ om operation when communicating between the two systems, In both ease, however, the use of companding gives a percsived level of performance with 8 bits that is comparable with the performance obtained with 12 bits and uni form quantization intervals, 25.2 TThe discs used in CD players and CD-ROMs are digital storage devices for stereophonte music and more general multimedia information streams. "There is 4 standard associated with these devices which is known as the CD- digital audio (CD-DA) standard, As indicated earfer, music has an audible bandwidth of from 15 He through to 20kH: and hence the minimum sam- pling rate is 40ksps, Inthe standard, bowever, the actual rate used is higher than this rate firstly, to allow for imperfections inthe bandlimiting filter used! land secondly o thatthe resulting bitrate is then compatible with one of the bigher transmission channel bitrates available wth public networks ‘One of the sampling rates used is 4.1 ksps which means the signa ssa pled at 28 microsecond intervals. Sine the bandwidth of a recording Ehannel on a CD is large, a high numberof bits per sample can be used. The Standard defines 16 bits per simple which, as indicated earlier, tests have Shown to be the minimum required with music to avoid the effect of quant: avon noise, With this number of bits, Fear quantization can be sed which jields 65596 equal quantization intervals. The recording of stereophonic Jusie requires two separate channels and hence the total bitrate required is double that for mono. Hence: N ~ Segre! cae re “PCa Lose ‘Cup ham OAC ee Bit rate per channel = sampling rate x bits per sample 244 1 109 x 16 = 705.6KbpS and, Totalbitrate 2x 705.6=1.411 Mbps le tsin $2 711 sd 0 3 egret code and qunizaten coe Fed 2:17 Continued ‘This also the bitrate used Wit CDROMs which are widely used for the dis: Prior to the input signal being sampled and converted into a i itibution of multimedia tiles: Within a computer, however, inorder to bythe ADG, itis pase through the compressor circuit which effet reduce the access delay, mitipls of this rate are used, Presses the amplitde of the input signal. The level of compression. “As we can deduce {Yom Example 25, iis not feasible to interactively Fence the quantization intervals ~ increases as the amplitude of the access'a 30s portion of a multimedia tile over a 64kbps channel. And with @ Spal increases, The ruling compresed signa is then patsed to the) : 1LsMbps channel the tine i sill to high for interactive purposes sae. in tar, performs a aear quantization on the compressed Sitar atthe destination, each received codeword is first fed into} 5.3. Synthesized audio ae snaleg onput from the DACs then passed tothe expander ‘which performs the reverse operation of the compressor m———> ma —> 82 (1) a 410) he 210), 9 f samy is ETN tilt toate Wogt ok =DI C1 26244 8 Figure 3.3 Huffman code tree construction: (a) final tree with codes; () tree derivation. ERAGE "Text ie compreson Example 3.2 stzing ofthe binary values associated with each branch traced. We can ded from the set of codes associated with this tree that it would take Ax1 42x 241 x34 LS 1 bits to transmit the complete string AAAABBCD. ‘To illustrate how the Huffman code trce in Figure 33(a) is determi we must add information concerning the frequency of occurrence of character Figure 35(b) shows the characters listed in a column in deer (eight) order. We derive the tree a follows “The first two leaf nodes at the base of the list~ Cl and D1 ~ are asi to the (1) and (0) branches respectively of braich node. The two leaf are then replaced by a branch node whose weight isthe sum of the weigh the two leaf nodes; tha is, wo. A new column is then formed containing new branch node combined with the remaining nodes from the frst col again arranged in their correct weight order, This procedure is repeated ‘only two nodes remain. "To derive the sesuling codewords for each character, we start with character in the first column and then proceed to lst the branch numbers fr 1~as they are encountered. Thus for character A the first (and oni branch number i (1) in the last column while for Cthe Srstis (1) chen (0/4 branch node 2 and finally (0) at branch node 4, The actual codewords, hl ‘ever, start at the root and not the leaf node hence they are the reverse these bit sequences. The Huffman tree can then be readily construcsed fy the set of codewords ‘We check that this isthe optimum tree ~ and hence set of codeword listing the resulting weights of all the leaf and branch nodes inthe tee ing with the smallest weight and proceeding from left to right and fc otto to top. The codewords are optimum ifthe resulting list increment weight order pda ‘A025—» Ao2s—> 4025—> Ao2s—_p> 028 oar. 8025——> 80.25 —> 6025» 8025, A025 ‘one COM——> COM—> Cola 022 —1> 80.25 TJ A025 Dola——> do1a— Dora cosiy > 02210, FOOsS— pF ON ONS DO.14 0) Fonss—~f eoossi = 0.11 0, {6.0055 HTP F0055 190550) Atop)» 10 | 01 oie, Se Dewan) > 110 £ =1110100—> 0001 F 219101010} —> 0000 130} = 0011 o L O28 1 ost co AI 055 HOdss GOSS rods. Wiig order = 0055 0055 0055 0055 0.11 0.11 0.14 0.14 0.22 0.25 0.25 028047 055 Figuee3.4. Muftman encoding exariple: (2) codeward generation) (y aie ore ire uc Ve meres ate eh Father than on Gted 7/8 bit boundaries, Because f the oes in whe are asigned during the encoding procedure, howeye, Hit cod have the unique property that shorter codeword Wl never start ofa longer codeword, If sx, 011 isa valid codeword, then ti ‘cannot be any longer codewords starting with this sequence. We cia firm this by considering the codes derived in the earlier examples Figures 8 and 3.4, ‘This property, known as the prefix property, means that the rec bitstream can be decoded simply by carrying out a recursive searchibit, ARRON a, 23.3 Text compression! bit until each valid codeword is found. A flowchart of a suitable decoding algorithm is given in Figure 8.5(a). The algorithm assumes a table of code- ‘words is available a the receiver and this also holds the corresponding ASCH codeword. The received bit stream is held in the variable BIT: STREAM and the variable CODEWORD js used to hold the bits in each codeword while itis being constructed. As we can deduce from the flow chart, once a codeword is identified the corresponding ASCII codeword is ‘written into the variable RECEIVE_BUFFER. The procedure repeats until all the bits in the received string have been processed. An example of a decoded string corresponding to the codeword set derived in Figure 8. is given in Figure 35(b) (6) Resind bsg 1011000001 1-—-—> Tne Ceo : . i 1 10001 “gay oe Yoag910° 1eaG001 1990100 ol cama 0 Figure 3.5 Decoding of a received bitstream assuming codewords derived in Figure 3.3: (a) decoding algorithm; (b) example. {and hence codewords) varies for dite mg ansmited, for the receiver to perform the dec 4 Than be de tn the codewords relating to the das being ree {HS can be done in wo ways. Ether the codeconde lating tothe next se hat codewords ae being used, rt SPPFOAh lads toa form of adaptive compression since see hed ost the ype of data being enseand ne Sdmtaze ithe overhead of having to send the mas ean codewords irement isto send text files generat seas Procesor (and hence containing nore nent infor mation SGutled satnical males have been carried out inva he Frequency of oc intron ears in the English alphabet in ormal eine pee ton hasbeen used to constr the Hulman se forthe ap sent iis Ope oF data is being sent, the wae and receiv anatred in tt of codewords. Other common das sen ne be the nar iis way and, for further examples you seg na coms the bibliography at the end of the book, Dynamic Huffman coding pets mi the characte he rancid caendy rose Gees tw codevord is determined and sent ine way. It trannies CaS that ti fot occurnee re Earby ne glbeinpree form. The encoder ups arn ther by ncremiéiting the frequency: ‘of occurrence of the transmitiedsc ‘eter o by introducing the new character uote srismiied codeword is eicoded in such a ay thatthe rece Ui dititon to being she to determine the charaer we received, Gan ithe Se modifications to sown copy or ie ee teseuceet BRO codeword rereved aceon ee ee arid ll ofthe method, assume ha the daa (fe) wo ‘ransmitd ears wth the following character sng ‘This is simple 3. Tex compression DEAT since bisa crad cases eect red to its O-branch. There is always jus < empryi ire eee a eee Sceetee igure 35 ase constructed. Itis represented in Figure 3. uy Figure 3.6 Continued wv Mas 33: Text conipresson | 155 “The encoder then starts by reading the frst character T and, since the tace emp it sends this in ts uncompressed ~ say, ASCU ~form, This is Showa asin the figure. The character i then asigned wo the Franch of the rot and sce tis isthe first occurence ofthis character, tis shown 3, ‘Tri the wee. On reception, since the decoder’ tees also emp timer preds the received bit sting ws an uncompressed character and proceeds 0 ESsign the character oitstre inthe same way (Pigure 8.6(2), For each subsequent character, the encode fist checks whether the charete is already present inthe tee, Ii, then the encoder sends the arent codeword forthe characte in the normal way, the codeword being Getermined by the positon of the character inthe tee. Its not presen, then the encoder sends the current codeword forthe empty leaf ~ again {lctertained by its poston inthe tee — followed by the uncompresedcode- oad for the eharacter Since the decoder has the ame tre ashe encodey it “a redily deduce fom the received bit string whether tithe current coe Mord af (compressed) character or that ofthe empiy leaf followed by the Character in tsncompressed form. “Te encoder and decoder proced t update their copy ofthe wee Based onthe iat haracter that hasbeen tassmited/ reece If tina new chara ter the exsting empty leaf node in the tee i replaced witha new branch ‘ode, te empty et beng signed tthe branch andthe characte othe branch (igre 3608) the characteris already pfesent in the te, then the frequency of occurrence of te leaf nodes eremented by wy On doing thi the pos {fom ofthe lea noe may not now bein the optimum poston in the tree Hence cach time the wee updated ~ ether by adding new character or by incrementing te frequency of occurrence ofan existing character both he tncodel and decode check and i necesary modify the curren postion of athe charactersin the ee “To enmie that both the encoder and decoder do thin a constent way, hey fit lst the neights of the leaf and branch nodes inthe updated wee fton ft ta eght and from bottom t top staring a the empty leat tial in weight order all's well and the tee islet unchanged. Kg ode oo of order, the structre of the tre is modified by exchanging the positon ofthis node withthe other node fs the tree ~ together with its branch and leaf nodes to produce an incremeated weight order. The fist ccurtence isin Figure 36(0) and other examples rein pars (i “The steps followed when a character tobe transmited has previousy ee sent ae show in Figure 8.6(0). At this point, the character to be rane tnited'is and when the encoder searches the te, it determines that bis Ienly present and transit exiting codeword ~01. The encoder then increments the characte’ weight = frequency of occurrence ~ by unity ti2 tnd updates the postin of the modified node as before. Another example is ‘ow in Figure B6(g) when te character sis 0 be wane. ‘Chapter 3 Text ard image compression ‘We can dedluce from this example thatthe savings in transmission bal ‘width start only when characters begin to repeat themseves. In practice, i ‘savings with tex files can be significant, and dynamic Huffman coding iso ‘used in a number of communication applications that involve the tran sion of text Arithmetic coding [As we can deduce from Examples 8.1 and 8.2, Huffman coding achieves ‘Shannon value only f the charactér/symbol probabilities are all integl powers of 4. Clearly, in many instances, this s mot the case and hence the si Of codewords produced are rarely optimum. In contrat, the codewords pr duced using arithmetic coding always achieve the Shannon value. Arthme coding, however is more complicated than Huffman coding and 30 we limit our discussion oft to the basic static coding mode of operation. "To illustrate how the coding operation takes place, consider the transmi sion ofa message comprising 2 string of characters with probabilities of e=03, 3, (02, we0l, =O. [Avthe end of each character sting making up a mesage, a known cha acieris ent which, n his example, ia period». When this decoded at th receiving side; the decoder interprets thi asthe end of the sving/ message. Unlike Hutfnan coding which was a separate codewerd for each chro ter, arithmetic coding yields a single codeword for each encoded string of Characters The fist step ito divide the numeric range ftom 0 to 1 into numberof diferent characters present in te message to be sent— including the tetminaion character ~and the sizeof each segment by the probabil of the related character. Hence the assgaments for our st of fie character may be as shown in Figure 8.73), {As we can sec, since there are only ive different characters, there are segments, he width ofeach segiment being determined by the prota o q the related character For example, te character e has a probability of 03 dnd bene Agile range ot O46 D3, the character a - which as as probabil of 23 =the range fot 0.3 wo 0:6, 9 on. Note, howere ‘hata asghtedt inthe rage, 0870 0.9, méans that the probably i the curlatie range i from 0.8 10.8999... Once this has been done, ae readyto sat te encoding proces. A example is shown in Figure 8.6) Sand, is this example, we assume the character sng/ message tobe ercoded isthe singe word went. “Theft character to be encoded w isin the range 0.8 to 09. Hence, as ve shall ee the final (nomeric) codeword isa number inthe range 08 to 18000. since each subsequent character in the string subdivides the range (03 10.09 into progresively smaller segments each determined by the probe bilides ofthe caraters inthe sting ° © gad vein cb cet sting went 8a Se Pie 3.7 Arithmetic coding princip Biiments; (b) encoding of the string went.- 3.3 Texteompresion | 157 ony 0818 oste2 ost, | 087 oat fe, aise oat” J ose _ oats cm ty on osvene os 8 cat Loma 4 exdewod merge 081802 «catowerd < 08162 incipes: (a) example character set and thei vecan we inthe example, sine w isthe Bt character ote ng ee aie a et divide into five frter segments ee aan gent again determine by he proba ofthe char A nent for the character efor example, is from 08 aa er Vole chair a romOd 00.0 (83 + 03x01), a6 som ent charter in fe Sing ie and ence ts rage (28 fo 088 is in subdivided into five ‘sédments. With the new assignments, therefore, the ga do OB wo OAT (08 + 03% 008), he chance 9 crass (OB09 + 033005) and soon. This procedure conaues Fo chara, seco this pin, the segment ge a er co O.T6? and hence the codeword for the compete any name otbin the range (0.81602 < codeword > 08162 Chapter 3 Text and mage compresion 33.4 In the static mode, the decoder knows the st of characte sentin the encoded messages it recches ar wells the segment wie Characer hasbeen auigned and its lated range, Hence with this a point, the decoder can follow the sane procedure as that followed Encoder to determine the character sting relating o each receive word. Foresample ifthe received codeword i ey 0.8161, then the Can readily determine fom thin hat the few character iw since its character within the range 08 co 09. 1 then expands this interval a and determines thatthe second character mst bee since 08161 iv range 0810088, This procedure then repeats unt it decodes the tminnon character which point ic Bas recreated the ny, AST ‘elating to went and pses this on for processing ‘Ase can deduce from this simple example, the number of ded igi in the final codeword increases inary with the numberof chara in the sring tobe encoded. Hence the maximum number of characters Sng is determined by the precision wth which Tloangpoint number represented in the source and desinaon comptes As raul a compl teste may be frst fragmented into multiple smaller stings. Each then encoded sepratelyand the resulting set of codewords ent asa bl (binary) floatingpoint numbers each in a known format. Alterna binary arithmetic cong canbe used but, as we indicated carb, hss Side the scope ofthe book. Farther details relating wo arthmese coding te fund in the bibliography for thi chapter atthe end ofthe book. Lempel-Ziv coding “The Lempel-Ziv (LZ) compression alzrithm, instead of using single ch {gr as the basis of the coding operation, uses strings of characters, Example for the compression of text, a table containing all the posible acter strings ~ for example words - that occur inthe text to be transfert held by both the encoder and decoder. As each word occurs in the t instead of sending the word asa set of individual ~ say, ASCH ~ cad the encoder sends only the index of where the word is stored in the ang, on receipt of each index, the decoder uses this to access the co ing word sting of characters from the table and proceeds to recanstr {ext into its original form, Thus the tble i used as a dictionary and algorithm is known a8. a dietionary based compression algorithm, Most word-processing packages have a dictionary associated withthe which js used for both spell checking and for the compression of te ‘Typically, they contain in the region of 25000 words and hence 18 bits which has 82768 combinations ~ ate required to encode the index. To sd the word “multimedia” with such a dictionary would require just 15, instead of 70 bts with 7bic ASCIL codewords. This results in a compres ratio of 7:1. Clearly, shorter words vill have lower compression ratio. longer words a higher ratio. 33.5 a9 sat with the |As with the other static coding methods, the basic requiremet Lalgorithm i that a copy ofthe dictionary i held by bth the encoder and the decoder. Ano this acceptable forthe tansmiasion of text wih hhas been created using a standard word-processing package, it can be re tively inefficient if the text to be transmitted compzises only a small subset of the words stored in the dictionary. Hence a variation ofthe L2-algorithm has bbcen developed which allows the dictionary to be built up dynamically by the tencoder and decoder as the compressed text is beiag transferred. In this way, the sizeof the dictionary is often a beter match to the number of different ‘words in the text being transmitted than ifa standard dictionary was used. Lempel-Ziv-Welsh coding 1 principle of the Lempel-Ziv-Welsh (L2W) coding algorithm i for the cee ee cater to Bal he contents ofthe tna damicly2 the text fs being wanserred. Initally the dietonary held by both the encoder find decoder contains dil the character se = fot example ASC ~ that has teen ae crete the text. The remaining entriés in the dietfonary are then bit ip djaraly by both ie enecder and decoder and contain the words that oecr in the text Fr example, ifthe character set comprises 128 charac ters and the dieionaiy is limited to, say, 4096 entries, then the first 128 Chtres would contain the single characters that make up the character set Sd the remaining 5968 enties would each contain strings of two or more Characters that make up the words in the text being transferéed. As we can See. the more frequent the words stored in the dictionary occur in the text, the higher the lve of compression Tmorder to describe how the dictionary i built up, let us 285 text tobe compresed arts with the string sme that the This simple as itis stan rage compression Since the idea is for the dictionary to contain only words; ce eee ‘only strings of characters that consist af alphanumeric characters are Udec= 88) in the dictionary and all he other characters in the set ate interpre Initially, the diesionary hetd by both the encoder and decoder eo ‘only the individual characters from the character set being used; for ex the 128 characters in the ASCII character set. Hence the first word ‘example text is sent by the encoder using the index ofeach ofthe four i : ——| acters T, A i and & At this point, when the encoder feads the next cl —_—_+ ‘rom the string ~ thefts space ($P) character ~ it determines that this an alphanumeric cha index as before but, in addition, interprets it as terminating the frst and hence stores the preceding four characters in the next available (f location in the dictionary. Similarly the decoder, on teceipt ofthe fsa estan, Indices/codewords, reads the character stored at each index and comme toreconstruct the text. ‘characte, it interprets ‘Tsim ite dictionary, ‘The same procedure is followed by both the encoder and decode uansferrng the other inthe form of single characters, first checks to determine ifthe word is o rently stored in its dictionary and, ifs, it sends only the index forthe we Similarly the decoder, the index to access the string of characters that make up the word Soi the example text suing after the space character following the cecond oc rence ofthe word ithe contents ofthe dictionary held by both the enol and the decoder will be as shown in Figure 8.8(3). As we can see, since il -the second occurence of the word itis transfered Using Gly the ined ier ecumoned where itis stored in dhe detionary (120), ae As We can dedue fixed.and, for the example we identified earlier, a dictionary coma 25,000, words: requ fom this example, ke) isue in determin a the lye] of compression that i achieved, iv ihé numberof entries nf b dictionary since this, in turn, determines the numberof bits that’ caused forthe inde With sate dielongry, the momber of end racter. It therefore transmits the character us inbane choc words except the encoder, prior to sending each since it also has the word stored in is dictionary, itl da te 5.18 bits to, encode, the index. When building dictionary dmamicaly, however, the question arses as fo how many ent shouldbe provided for the dieuionary. Clearly, if oo few entries are provi then, the dictionary will contain only a subset of the words that occur the text while if too many are provided, then it will contain empty spa which, in turn, makes the index unnecessarily long. In order to optimi the number of bits used for the index, at the commencement of ea transfer the number of entries i set to a relatively low value but, should available space become full, then the number of entries is allowed 1 increase incrementally 33 teitcopresin | 6 1 | Moss locter wade Sede codevod fhe bse chor nt 129 190 | Thee octens wade a1 | folie cadonad cf Ie check 192 [peach ew wantin 13g | oon ne esting 235} ‘he's etuang he index of he ward i129 Each chaos ing he var he dial chomoer ° 1} Bove choot ve v8 v9 } Geng dna 255 256) 27 aerded dtonary si Figure 3.8 LZW compression algorithm: (a) basic operation; {(b) dynamically extending the number of entries in the dictionary. For example, ia an application that uses 128 characters in the basic character set, then both the encoder and decoder would start with, 53), 256 entries im the dictionary. This requires an index/codeword length of 8 bits and the dictionary would provide space for the 128 characters in the sn REESE TRL character anda frther 128 locaton for words that ocr Should hs numberof lastions hecue nsufcent, sdekease the encoder and decoder would double the neo es dn lesions, Cleary this neces ah index length oS basen oi the encoder wes i codewords Howes scene ss Sosied the sie of own dvcory,k eepcew St cetee f Pein this ay, the number of ens i ecto hese fells the number of eiferent words in the te Deny antenn hence optimizes the number of bis wed for each in clone ‘The procedures sen n diagrmmae form i age St). anil is amedhat eatery ne ag ae ses wot land the nex word nthe text ar bn urea ary i pond. a Image compression Real rom Section 2.4 how images can be of tvo bast pes com eneaed (ao known a graphic images and digtced lager Scams and ie) tong th ete Spied a form ofa ryodimensonal mais of aids ator dese sala graphical image sepresenedaierenty inthe conse te Typically, his inthe form ofa program (writen in a pardons go Programing language) and, since this pe of tepresenion eae Siderbiy lest memory (and hence tmumission basdvicog we corresponding max of ctr cement, whenever poate pais sanded ci neg ints ove cate aad pictures, homer once dghze, the oy fora of etenenane te nensional matrix of picture elements. ees 7 i terms of compression, when tandlering graphical iages wi repreenedin thet progra form alone compreion aos sed stir or example to thee inthe last secon Hewes ed image/ graphic be tapered aeronthe nem ig ey form, den hiss normally compresed pists tae rene umber of aiterent compression sigorithins and ssoemte Re teed se and etal dace ofthese nthe eto scr Fo taser digtzed images a ifferem ype of come a ‘mun gormaly be employed and, inpracce, op irene oe The itis biked on a combinsion of rulength aad suanse ceca Hence tis loses and i used forthe uanstet othe dntecd ees eaerted by scanners sich a toe used in se a ee based on 3 combination of waniorm, diferent an lorena ing and bas been developed fr the comprenion af both Mead aigied pictures Since there ian international standard secs both schemes, ve dal lini our dacesion to thee ha shee 34 Image compresiog | 268 Graphics interchange format “The graphics interchange format (GFF) is used extensively with the Internet for the representation and compression of graphical images. Although color ‘mages comprising 240i pixels are supported ~ 8 bits each for R, Gand B~ GIF reduces the number of possible colors that are present by choasing the 256 colors from de origiaal set of 2 colors that match moxt closely those ‘sed in the original image. The resulting table of colors therefore consists of 256 encres, each of which contains a 44bit color Value: Hence instead of send- ing each pixel as 24-bit value, only the 8it index to dhe table entry that ‘contains the closest mate color to the original is sent. This resuls in a com- pression ratio of 8:1, The table of colors can relate either to the whole image — Jn which case ts referred to as the global color table ~ orto 3 poston of the Image, when itis referred to 25a local color table, The contents of the tle are sent across the network ~ together with the compressed image data and ‘ther information such 28 the screen size and aspect ratio ~in a standardized Format. The principles of the scheme are shown in Figure 3.9(3), As we show in Figure 8:9(b), the LZW coding algorithm can be used 20 ‘obtain further levels of compression, We described this ealier in Section 3.3.5 when we discussed text compression and, in the case of image compres- son, this works by extending the basic color table dynamically 25 the compressed image data i being encoded add decoded. As with tevt ompres- son, the occurrence of common strings of pixel values ~ such as long strings of the sanie color ~are detected aad these are entered into the color table after the 256 selected colors. However in this application, since each entry in the cofor table comprises 4 bits, i order to save memory, to represent cach string of pixel vals jus the corresponding string of Bit indices to the baie color ble are used, IF we limit each entry the table © 24 Dis, then this will, allow common strings comprising three pixel values tobe stored in each loca- Won of ci extenaed table. Normally, since the basic table contains 256 ‘elvis, an inal table size of 512 entries is selected which allows for up to 256 common strings 10 be stored. As with text compression, however, shoud rote strings be found; then the number of entries the ble is allowed to Increase incsementally by exending the lengah of the index by 1 bit GIF ako allows an image to be stored and subsequently transferred over the nerwork in an interlaced mode. This can be useful when transferring Images ovr either low Bikrate channels or the Tnieynet which provides a rar able transmission rate. With this mode, the compressed image data ‘ganized so that the decoinpressed image is built up ita progressive way as the data arrives. To achieve this, the compressed data is divided into four [groupe as shown in Figure 8.10 and, as we ean see, the fire contains 1/8 of the total compressed image data, the second a further 1/8, the third a fur ‘her 1/4, and the lst the remaining 1/2 34.2 co ° | tenia ha Team nt Bevan kee sesame ice te by he ouce (eegaherobeckond tdeden nts nage ies ea te Inte mage, cr cl becca Fe ent mage so Inco cotta Retin 255, The clo eran cen se, dep oe et ih he fs henge ” ce Cob eon get 256 wed 255, Bete denon 256) sags pel sobee : fe came clr 37 3 Sige of 3 pnt ote om Seed Snaniely owe ck tert ng Po load ay : su “eb con be rc Ss el rd Tagged imaye-file format ‘he tg nage Me format (THF) is leo sed extensively. 1c suppor i retolutiont ofp to 48 bts 16 bits each for R,G, and Band is intended the transfer of both images and dgitzed dociments. The Image data, th fore, can be ioted ~and hence transferred over the network =n a num of different formats. The particular forsnat being used is indicated bya co ‘number and these range from the uncompressed format (code number 1 through to LZW-compressed which is code number 5, Code numbers 2,34 Jind 4 are intended for use with digitized documents, These use the same RE ES TE TT 3.4 Image compression | 165 Inge wth Govge oe! 2 Row | 3 3 3 DOO wvoonssseessneeeeeee g 5 3 a BL, i 5 % a F—inagewih Gp 1.283 nage wih Goss 12.3 4 PEE HH 3 saan § oq $ Sg a 8 HHH = UAE a LPLEED = pCOCOOCO SS = | : e ern ~ 0 Gig iio ere 7 Ge bdo F GIF interlaced mor ‘compression algorithms that are used iaichines which we discuss ~~ inthe nex section, . ‘The LZW compreision algorithm that is used is the same as that used ‘wth GIR sare witha basic olor table containing 256 colors and the table {an be extended to contain up to 4096 enties containing common strings of = = Finals in the image being transferred. Again, a standard format is wsed for the transfer of both the clo table andthe compresed image dat ‘We described the principle of operation of the scanners used in facsnf machines to digitize bitonal images (auch as printed document in 243. The digal representation ofa scanned page was shown in Figg 2.11() and, even though onl single binary bit i uted eo represen e picture element, withthe reslitons used, is prods an uncomp bitstream ofthe order of 2MBit In most cass this mist he trans ssing modems andthe public switched telephone network, The tela low bitrates avaiable with modems means that it would be both costa time consuming to transfer a total document comprising many pages in tw form ‘With ost dociments, many canned line const only of lng string white pitire elements ~ pels ~ while others compre a mix of long stingy ‘white and long strings of Back pels. Since facsimile machines are nor Used th pubic erie networks, Ue TUT has produced standards rela to them These are T2 (Group 1), T3 (Group 2), T4 (Group 3), and (Group ). The rt wo are eater standards and are now rely Wed Inst wo, however, both operate dial: Group 3 wth modems for us wi an analog PSTN, and Group 4 lll for use wit digital newort ch the ISDN. oth use data compression, and compression ratios in exces 10: are common with most cocument pages. The time taken to wansmig age it edie cles than 4 mime with Group 8 machines and, beease {he added benefit of higher transmiason rate (64g), tess han a seconds ih Group 4 machine As par ofthe standardization process, extensive anaes of pil sa docament pages were made. Tables of codewords were proce sed oni rca freqoeny of eccrtence ofthe numberof contguos white and bl pee found in a anned line. The ring codewords ae fied and Into to seperate tables the terminaon-eodes table andthe makeup cod tale. The codewords in cach table re shown in Fag 3.1 Codewords in the termination-codes table are forwhite or black lengths of trom 0 to 63 pels in steps of 1 pel; the makeop codes contains Codeworsfor white or Sack rudengths that are multiples off Peis A technique known ak overscnning is el which mean hata Sari ninimm of one white pel. In thi way, the reece knw the codeword always relates to white pee and then alternates between black white Since the cheme vss two se of codewor (etna st tp) theyre known as modified Hufinan codes. Asan example, undeng of iit pels coded deci at 00100, Simary x ro-ength of 2 pels sido directly a 0000111 A rumength of 10 back pel, however Encoded as 000011001600 + 0000111; that ix 125-12 pels. Rurleng teen. aw : cay [tT Cale vir] cai [804] cote sea] oe son) 4 figs) ee 0 ceoonion 3} gene — | 32] exoorciom. i]s 3 sioriono | | Seesoona: ay | sional | 5) renter ilo 3 | siootaio - | $5] Seemnororot! dfon | siosiott |g eooanronen 5]con, S| contcoro | $1} conmrorio 3} | spricoir | $2] eosrroone 3] sor S| eo |_| ameorieont 19] saot00 13} soit “ cae [MT ce 13 costco et ics] 43 ozo 1000 Ton x | cnooor 48 eeeotonn iste 13 | eat ota 1e| acento Shratty | 236] somone 13] Geeortoott soriotioc | 320] Saneor toon 43 toot to100 orion) | dee | ear oto 23 | gear ot09 Staten | és aaeor oot 22| ooxmrrant erieoioe | 312 | enon! orto 2 soaionon. Sriotece | $75] seer terior | axeooron Shears | dap oomooicoror0 35) fro 009 Sitoorieo | Fae | Samenccion 35] semrvonoo Shier | Fax | ences! co B | coorteo.on Srroraore | é32| seeoreo! ior 4s | S200 1091100 iioicort * | Se costae 2 | eeor aati Siiooica | $66 sozeor igor 45 | Sia! oom Shitoior | eet | exer oto | seo! ait Srtoiotno | oss | covet toon 3) aro! st Sriorount | fee | encore | comorioion Srretioco | tie | eeeoson ton 34) ar 01010 Sitar | tse | SSanoroteo!9 33| Suh oicon Srionoro | Yat | Sameoroteo 3 eomriotoico Sriotiowy | ts | eesenntororn 3| cooorsir Sreoliono | lara | Sooomroiior 38 oot otatno Srasrions | 146 coomor ato 2 | sawisiant Sleoiio1o | ee esata ot '5| Samat toto0 Sita” | 188 | eosaertonian 4 | emparronior Stostion, | ea | Soeoreoion 2 egporor aro Spoonotces | 798 | sxenolenn a Sooooo! 100 | 1256 | eee 09 a 0 Soees! ot, | eo | eee 10 8 eeoon 2010 | oes | enosooranto & Gooorcon | 2a | oxzeoicot | axoroioin teeooanio100 | 212 | esooroica ‘| oreo eon Gtecosoioin | 2176 zosooraroy 4 | coor icon Gaenoneio i | eas fecaocao 5 | exeoroioo'o oaoo10! | ne | Sseore 51] Scans? ooze 100 | 298 | Geos! 1100 32 | Gsoonotea100 feccooo1110 | 2499 | Groot Tot 3 | exosorront Seovooor 110 | 2458 | cooont 10 34) Smoot 1009 Seooa0011)1 | 2s | enon 53] Samo cant 221] szeneoonot | | econo! exceeding 2860 pels are encoded ising more than one makeup code pl ane erminaton code ‘There is no errorcorrection protocol with Group 3. rom the listo ‘eodewords, we ean deduce that if one or more bit is corrupted during i p codes. 11. ITU-T Group 3 and 4 facsimile conversion codes: (a) termination. 3 Text and image caoresion transmission through the network, the receiver wil start to interpret {fuent codewords on the wrong bt boundaries, The reeiver thos beeo Uigqnchronized and cannot decode the receited bit string, To enable teceer to regain synchronism, each scanned line i terminated with ak Codatine (EOL) code. In this way, if the receiver fils to decode a valid Mord after the maximum number of bits in a codeword have been sean (pared), it starts to search forthe EOL patern. If fais to decode an Shera preset numberof lines, it aborts the reception proces and informs i Sending machine. A single EOL precedes the codewords foreach seam page and a svng of xix consecutive FOLs indicates the end ofeach page Because each seanned line is excoded independently, the T4 coal scheme is now aa oncimensional coding scheme, As we can conclu ‘Norte sasfactrily providing the scanned image contains significant are White or black pels which occur, for example, where documents consist off ers and line drawings. Documents containing photographic imagl Fowever, are nt sasfatory a the different shades of black and white represented by varying densies of black and white pels, This, into, Ina lrge number of very short black or white runlengths which, withthe 110 a negative compression ratio; tat is, more sroneeded to send the scanned document in its compressed form than if needed in its uncompressed form. For this reason the alternative 6 coding scheme has ben defined ts copsional feature in Gcoup 3 facsimile machines buts compulsory in Grou sertnines. When supported in Group 3 machines, the EOL code atthe end Tach (compressed Hine hgs an additional tag bit added. If this sa bin then the next ine has been encoded using the T4 coding scheme iti cn the T6 cosing scheme fas been used. The later i known as mod Ppedifed READ (MMR) coding. Its also known as two-dimensional r/f ‘Coding sinceit identifies black and white rur-ength by comparing a ‘Ean nes, KEAD stands for relative element adress designate, nd itis" Fed” sinc it isa modified version ofan earlier (modified) coding scheme. MMR coding exploits the fact that most scanned fines difer fom the vio ie ony afew pels For example if line contains Mehran ‘heext line wail normally contain the same run plus orminus up 1 pak With MMR coding the runlengths associated With line ae deni Ey compasing thé line contents, known 25 the coding line (CL), Felave ‘ieantately preceding line, kngwn asthe reference lie (RL). We al “abuse de fist reference ine to be an (imaginary allwhite ine ind the Tine proper is encoded relative to this, The encoded ine then becomes efemnce line forthe folowing line, and soon. To ensure thatthe compl jage nscanned, the scanner head always starts to the Tet ofthe page, #¢ ne alvays starts wth an imaginary white pel We sent the run lengths associated with a coding line as one of th posibilies or modes eelative to the reference fine, Examples ofthe th Poses are shown in Figure 8.12. The three modes are identified by the Pg Jon of the next runlength in the reference line (2) relative 0 thes 3.4 Image compresion @ ob doo Cana tne > cot y & =r gti yb, cased pew bocones ld by o ob feb ine Enis Gagne > r % & toa ne = cee Coing ee aes te t lrg 06 csed Thaeag bs oo “ hoe fence r Coleg ine = ae 6 b ipa cae Soe = = ng 02 bond Ba cade chow opens i: gto pee deer on ean ok te Reel coy who ees ear Pees Pac emcee oe hc wih eter EASE feielon be wocce oe hoy wih oom cbr igure 3.12 Some example run-length possibilities: (a) pass made; > (b) vertical mode; (c) horizontal moti. 19 and end of the next pair of rumengths inthe coding line (gy ang NNote thatthe same procedure i used to encode the runs of bok By ite pels. The tree possibilities are 1 Pass mode: Thisis the cae when the length inthe reference! (Oa) ist the ee ofthe next rundengu in the coding ine (aa, 's 10 the left of, An example gen in gure 3.128) cae this mode the un-length bf coded using the codewords ge Figure 8.11, Not that the ext pel on the coding line dive below i then thst not pass mode Vertical mode: This isthe case when the runength in the refers (i) overlaps the next rundength i the coding ine (ra) ps ‘maximum of pls or minus 3 pel. Two examptes are giver in Figur 3.12() and, for this ode, juste difference rumlength a Mos codewords ae in this category. Horizontal mode: This isthe case when the ruength in the referend Tine (4) overlaps the runtength (a) by more an pls or ines ps Two examples are given in gute’ 12(0) and fortis toda tc Fomengts 2, and a, are coded using the codewords Figure A flowchart of the coding procedure is shown in Figure 818, Nox the frst ais eto an imaginary white pe Boe the Sst pel ofthe ln hence the Bt eo rulength wil be ay ~ 1. 1f daring the coding of 4 yb OF by ae not detected, then they are set oa imaginars ge soned immediatly after the last pel onthe respective ine Once the irst/next psion of hasbeen determined the posons 4 hy and By forthe next cadewont are located. The mode's hen 2 computing the postion of retaive to oy Iles to the ley hii ‘mode, Iit i not wo the left, then the magnitude of sued to doe ‘whether the mode is vertical or horizontal. The codeword for the ident ‘mode is then computed and the sat ofthe nxt codeword positon, a 1© he appropriate postion. This procedure repeat aherately beste and Hick rel the end of eine reached. Than apy ede afer te Is pel ofthe tne She Sued Aitfereni olor from the lst pel. The current coding ie tien beeoihed di ‘reference ine and the nex seanned tne the new coding Hine, Since the coded rumdengths relate to one ofthe three mies, add codewords ae used either t indicate to which mode the following words) relate ~ pas or horizontal ~ or to sped the length a the eos lng - vertical. The additonal codewords are five ins thd ble a3 the twodimensional code table Is contents are a shown in Table 31 ‘ai entry inthe table, known asthe extension mode, irs nique eo that abors the encoding operation prematurely belore the end afte Thisis provided to allow a portion ofa page tobe sent nia uneo form or possibly with a different coding scheme Figure 3.13 Modified-modified READ coding procedure. Pohapter 3, Text and image compression Table 3.1 Two-dimensional code table contents. 3.4.4. Digitized pictures We described the digitization of both continuousone monochromatic pi tures and color pictures in Section 2.4.8. We also calculated the amount of| computer memory required to store and display these pictures on a number ‘of popular type of display and tabulated these in Table 2.1. The amount of ‘memory ranged from (approximately) 307 kbytes through to 24 Mbytes and, as we concluded, all would result in unacceptably long delays in most interac. ‘tive applications that involve low bit rate networks. ‘in order toreduce the time to transmit digitized pictures, compression is normally applied to the twodimensional array of pixel values that represen & digitized picrur= before iis transmitted over the network. The most widely ard relating tothe compression of digitized piceues has been Fnternatonal standards body known 3 the Joint Photographie HSUUREG):JPEG also forme the bisls of most deo compreso algorithm’ at hetice we shal! limit our discussion of the compression of digi tized pictures Yo describing the main principles of the JPEG standard, JPEG As we'cint deduce from the name, the JPEG standard was developed by = team of expert, each of whom had an in-depth knovledge of the comprer- sion of digitized pictures. They were working on behalf ofthe ISO, the ITU, and the IEC and JPEG is defined in the international standard 1S 10918. practice, the sanidard defines a range of different compression modes, each ‘of which is intended for use ina particular application domain, We shall 3.4 Imac compression. | 173 restrict our diseusion here to the lossy sequential mode ~ also known as the ‘baseline mode ~ since itis thie which i intended for the compression of both monochromatic ard color digitized piewures/images as used in multimedia communication applications, There are five main stages associated with this ‘mode: image/block preparation, forward DCT, quantization, entropy encod- ing, and frame buiding. These are shown in Figure 3.14 and we shall discuss the role of each separately Image /block preparation [As we described in Section 2.4.3, in its pixel form, the source image/ picture ismade up of one or more 2D matrices of values In the case ofa continuous- tone monochrome image, just a single 2D matrix is required to store the set ‘of Bbit graylevel values that represent the image. Similarly, for acolor image, if CLUT is used jest a single matrix of values is required. Alternatively ifthe image is represented in an RG, Bformat three mati ces are requited, one each for the R, G, and B quantized values. Aso, as we saw in Section 2.61 wehen we diseussed the representation ofa video signal, for color images the alternative form of representation known a8 ¥, G, G can, ‘optionally be used. This s done to exploit the fact thatthe two chrominance ignals, G and G, require half the bandwidth ofthe luminance signal, Y. This in tar allows the two matrices that contain the digitized chrominance com ponents to be smaller in size than the ¥ matrix so producing a reduced form BEG 0 fcoded Coreen Figure3.14 JPEG encoder schematic. masses = SERENE of epretenttion over the equivalent RG, B form of represematg Fo ‘xample, nthe 420 format, groups of four neighboing cominance va Sreavenged to produce a singe valve in the reduced metro reducing the Sic ofthe Gand mates by factor of our The four aemage fore representation ae shown in Figure 156) (Once the source image format hs been selected and prepared, the st of values in each manx are compres separately using te DC. Before pe forming the DCT on each mars, however, a Second step known a blosk preparation is caried out. This i necessary ince to compute the tant Formed vale fr each positon in matee requires the values inal the Jocaons of the max to be procesed, would be too tie consuming to compute te DCT ofthe wal mari ina sngl sep ao each mati foe Ade int asetof smaller 3x8 submauices Each know at block nd, sve can sein pat (b) ofthe figure these are then fed sequently othe DDT which tandorms cach block seperately Forward DCT . ‘We described the principles of the DCT eatlice in Section 8.2.4. Normally, cach pixel value is quantized using 8 bits which produces a value in the range 0 to 256 for the intensity/Iuminance values ~R, G, Bor Y-and a value inthe range 128 to +127 forthe two chrominance values Cand G. In order to compute the (forward) DCT, however, all the values are ist cer tered around zero by subtracting 128 from each intensty/Iuminance value, ‘Then, ifthe input 2D matrix ie represented by: Plx 9] and the transformed ratrc by Fli,j), the DCT of each 8 x 8 block of values is computed using the expres: dopey BE Pl 5) cos Ot DI gg 24 DI OO EE Pt 31 208 16 ria where O19 and O1) detilsYelating to die BCE inthe bibliography for EAU the end of the book. However, we.can deduce a number of point by Csiering tie expression above: 12 All 64 values inthe input matrix, P(x 3} contribute to each entry in the ‘waiforined matrix, FL, ‘a For =j=0, the wo cosine terms (and hence horizontal and vertical frequengy coefficients) are both 0. Also since cos(0)=1, the vale in Joeition F{0,0] ofthe transformed matrix is simply a function of the summation of al the values in the input matri Esentially itis the mean ‘ofall 6 valuesin the matrix and is known as the DC coefficient. 3.4 Image compression | 175 @ oe ce B| Menochcine cur sone] ae feet | |e | enc | FF | é ame = jure 3.15 Imagerblock preparation: (a) image preparati preparation. 1% Since the vues in all the other locations ofthe transformed mate a frequency coeiicient associated with them ether horizontal (x for = 0), vertical ( 1 Forj=0, only horizontal frequency coefficients are present which increas in frequency for i= 1-7. For i= 0, only vertical frequency coefficients are present which incre in frequency for j= 1-7 Inall other locations in the transformed matrix, both horizontal and! vertical frequency coefficients ae present to varying degrees. ‘The above points are summarized in Figure 3.16, In order to gain a tative understanding of the likely values pretent in a transformed bi conser a ypical image comprising, ay, 640% 480 pixels. Assuming ab size of 8%8 pixels, the image will comprise 80X60 or 4800 blocks ea hich, fora screen width of, say 16 inches (400mm), will occupy aq only 0.20.2 inches (535mm). Hence those regions of a picture that con single color will generate a set of transformed blocks all of which wil firstly, the same (oF very similar) DC coefficient and secondly, only afew Phe a moO 1294 5 67 0 veg pod heeaurg sn coma Fei B8 mon par Ff) x Brat roomed v/s heer ot InFtuh [] =0Cccetcan fi] «ACcoxton soll ene cone [reece lensey cn Figure 3.16 DCT computation features. 34 tna cngesin [277 coefficients within them. Thus itis only those areas of a picture which contain color transitions that will generate a se of transformed blocks with diferent DG coefficients and a larger number of AC coefficients within them. Its these features that are exploited in the quantization and entropy encoding Phases ofthe compression algorithm, Quentietion 1p theory, providing the formard DCTs compute high preion wing, ‘loan pent artamet, dere is very hte los fnfonmaiondosog GT pase ldiough in practice smal less coving tothe wr of acd pein artnet the main oure of information ts orcs ring te ee Sato and enropy encoding stages where he compression ake tore ‘swe identified earlier in Section 3.24 when We frst decgeel wane form encoding, the human eye responds primary w the DGcecfens ed the lowe spatial frequency coeticens. Thus ifthe magnate of has frequency coeticen is below a cerain threshold the oe al ae aoe ‘This proper is exploited inthe quantization phe by dopping adeverds. Se pet tmenencoded form. This is done so thatthe bitin the SS field pa auc: property = which we described eatler in Secon 38. ~ and : a i es he Uecode to determine unambiguous} the frst Sel from, encoding The emaining 63 valexinbesector ae : the received encoded btsteam. tain ln u mame hi exploit hi featre he Torys of ping of pas of values ship's die naimber OF feF08 ee Heber tie encoded (0,8)40,7)(0.3)(0,3)(033)(0.2(0,2)(0.2) 02). Note that he final pe (0,0) indates te en of the sing for Nove pe remaining coefficients in the Block ae 2r0, Also, Feld is encoded inthe form SSS/alus, For each of the runlength encoded AG coefficients in the block, the bit that make up the skip and SSS fields are treated as a single (composite) symbol and this is then encoded using either the default able of Hitma codfords shown in Table 8.2 or a table of codewords that is sent with th encoded bitstream. Again, this is ddne so that the string of encoded compar ite smbols all have the prefix property so thatthe decoder can interpret th received btsfeam cin the corteet coeficient boundaries, To enable th decoder to discriminate between the skip and SSS elds, each combination 6§ the on fields encoded separately and the composite synbo i the replaced by the eqtivalent Hunan coteword 4 “AS'we ci ded from Eiample'3.5; to decode the received bitte : ihéreteierfintseaichesahe bisgeam ~ starting atthe leftmost bit ~ for ere ‘ald eodenont and, on finding ths (100), determines the corresponding : ship (0) and S85 (3) fields fromthe Huffinan table. The SSS fields thet used 10 determine the number of bits in the run-longth vale field and air reading and decoding these, the process repeats tntil the EOB code ‘word is received indicating that the remaining coefficients ace all zero. g Because of the use of variable-length codewords in the various parts of the 17 entropy encoding stage, this is also known asthe variable-length coding ct fiviintsiotiogss tia) ae (VLC) stage ‘i IMT ION! w/a LED hapter 3 Text and image compression 2 Continued Fontinued ‘cample 3.8 In this example, the number of bits required to transmit the set of AC coefficient forthe 8% 8 block of pitels is 29 and, assuring its for the DC oefient, the toa forthe block is 35 bits. Hence asuming each pike value is 8 bie, he resuling compression rai for this block i 812/35 of, approx! rately 1.61. Frame building Typically, the bitstream output by a JPEG encoder ~ corresponding to, sy, the compressed version of a printed picture ~ i stored in the memory of a ‘computer ready fr either integrating with other mediaifnecessary or acces fing fom a remote computer. As we can see from the above, inorder for the decoder in the remote computer o be able to interpret ll he diferent fields ‘and tables that make up the bitstream, its necessary to delimit each field and Set of table values in a defined way. The JPEG standard, therefore, also Judes a definition ofthe structure of the total bitstream relating toa par- \ge/picture. This is known a8 2 frame and is outline structure is igure 3.20. "The role ofthe frame builder shown earlier in Figure 8.14 to eneapsu- Sate all the information relating to an encoded image/pictare inthis format ‘and, as we can sce, the structure ofa frame i hierarchical At the top level, the complete frameplurheader is encapsulated between 2 sartoframe and an endoffione delimiter which allows the receiver to determine the start and Figure 3.20 JPEG encoder output bitstream format. Jaader contains a number of fields that include: 3.4 Image compression | 129 inthe segment should the default tables not be used. In this way, each seg tment can be decoded independently of the others which overcomes the lel possiblity of bt errors propagating and affecting other segments. Hence Each complete frame contains all the information necessary to enable the [JPEG decor to identify each field in a received frame and then perform the ol ‘corresponding decoding operation, JPEG decoding ‘As we ean see in Figure 3.21, a JPEG decoder is made up of a number of bet) tages which are simply the corresponding decoder sections of those used in the encoder. Hence the time to carry out the decoding function is simitar to that used to perform the encoding ‘On reecipt of the encoded bitstream the frame decoder first identifies the convo! information and tables within the various headers t then loads the contents of each table into the related table and passes the control infor ‘mation to the image builder. I then starts to pass the compressed bitstream tothe Huffman decoder which carries out the corresponding decompression ‘operation using either the default or the preloaded table of codewords. The two decompressed streams containing the DC and AC coefficients of each block are then passed to the differential and run-length decoders respec- tively. The resulting matrix of values is then dequantized using either the default or the preloaded values in the quantization table. Seel Hunn coders (orb bck ofall the information relating to a complete image,picture. The FG decoder image (CLUT, R/G/B, ¥/G,/G); aetna ae 22, 20 Fei trike cma ofa ni compen Hat lie : 1 the ident oe components (R/C/Biete); the numberof bits used to digitize each component; the quantzadon table of values that have been used to encode each component, ‘Typically, each scan/component comprises one or more segments eal which ean contain a group of (8% 8) blocks preceded by a header. This ci ‘ains the Huffman table of values that have been used to encode each bi pas ‘Bach resulting the inverse ting the expression: where rae} L hava mace expand ap 1B =O ea ‘The image buil blocks usin Althot relatively simple ~ ee Tomplicated pictures, compe ‘These figures, ated “This level ofc ‘with it~ B/G) figures can be mul So of 1 rei oe in Table 2.1 is reduced to 2 range ‘splay tabulated i fo 240 kbyees. More im mages is reduced . inal as with in a progressive Way agressive adding MOF progress coefficients o ‘coefficients mode: esphuson = 640480. In this chapter that are used sion is applies transfer the the cost of th the response ‘lock of 8X 859 DET which transforms 21 for all other ¥ ig the cont righ the JPEG sian fencoding/ decoding s Girt can be obtained while sl hats, have relatively jive mode: in this mod, swe have described a see fource information cxeDin Din oe > seucts the original image from tren nagon passed coat by the frame decod sag clay complicated owing ote num eh, compreston Tatios in excey good quality CUtPUt image, Mer apples to pictres Whose conte eee olor transitions ~ and, for to H0el are more comnfl \der then reconst Jompression, howe 7B or V/Cy/S pied by a Cor remount of eon npr, Nevertheless, even With a compl *y required withthe various type cof from 30 Kbytes trod Hany the ime delay incre n cen cer hoor isa reser veo ethan Pe fist the DC and lowsrequency rand then the higherfrequency sible to encode and rebuild the inf reine of the image and then f chieved in the following: each block afe se his mde, the rapt 30K STU e -eiion of the comprestion algort ze Ba etpresvon of cext and images TB EeNeral, comp aio both media type in ord ora rip inueractive applications, co red i consection f nee information. "ime to a request fr the SOUrc Sy Seema | a aia i tet cog niques associated with all compression alge tetra ese These wet ied rg en ee rg or sure eneoting- Enropy encoding taf Rye hoaitOn is represented and we described vo area's ow the Bring Meng 2 sata encoding mples: rane Sending the 2otng is used when the Source information Sen gf the ut symbol such 38a character, a bit op pyc 2S Hg ann i oe yes nstead ot ingle te insrmaion inthe Form of indepen ing Stan of aitating the particular symbol in each suing eNotes itis ‘ntti Se aanber a yninsin sang ME Be Paton g<%oding exploits the fac that not ll the gl gem : on Shot ft ith equal probably. Hence, iseng ingalt cont one’ length codewords, variablolength cod ciara =t8ed to encode those symbols that 0 Her a (ON in Otte encoding exploits a particul Pte my eer o produc aerate frm RC Odin OM of Sd ve of the fc ‘ed version ofthe original form "Nd 4 6°™pression, Two examples w ‘tia, frm encoding. ingeoding ised when the amplinde of tongs tation cove aang range the Tepfatvely smal Instead ef sing 1 egg€ ent the actual amplitude ofeach val tbols in the source of enc ing all the lewords ae wed vith CUT most freuen at Propery ofthe source mn of representation tas oF mote amenable tthe 6 described: different ‘he values that make ference between sus eu eg terete Pe vane ye of sn soul the “ie hf whieh indicates ony te difleencen soe wale code OEE ings Mame ing ample beneas more’ Iafa,tmg 8g encoded andthe immediate precede a dee yreaat Man, Plies, ansorm encoding iene eee compre’ wad toto an alternative form of representation tae Image’ eign’ the’ Re application of compression. The empha se ina SiRto ang Sscrete cosine vansform (DCT). Ths anh 8 we mere rea is decegeP mg Beity B Of spatial frequency Components comprenPPee OF tex? the application of compression, decerigetOn 2d Est Compression, when the comPreSed source nk dynam js alBor the reece there snermaly 20 los firme ith, it gicbans that have this property are known an mate. The amcthe mffeng Per of such algortoms, These ned ease Son and ge Mea Hae osing,avtimetc ceding and the 2 edi at ‘ffman_ ithmet ‘ZW coding algo- vinta zy tan sgt nd iti oay a at that Og SEW OF Securtence of sgl charts nh and digrt©el go any 2Borithm strings of characters, informa: and TER ea Enh REE compression, we described a num im Bic ERE compression of graphical images digg Yan cae. es. For use with graphical image secte eters deg ct SS, for iphied eae eee ed eG compat S8ry Feet fOr digitized documens two modifed hake eemPress TGS cligitized pictures the PEG agree cing ionwhen go. SS are part or 1 standard lhe algrtins ie Pap Be part of international standards whieh ‘ing stored or uansferted across a nemo reat infor bet of the algorithms Chapter 2. Tet and image compression 2.4 Image compression | 189 [nae segment should the defealt tables not be used. In this way, each ses ent ean be decoded independently of the others which overcomes the possiblity of bit errors propagating and affecting other segments. Hence teach complete frame contains all the information necessary to enable the JPEG decoder to identify each field ina received frame and then perform the corresponding decoding operation, tM Pee | feel? JPEG decoding ‘As we can tee in Figure 3.21, a JPEG decoder is made up of a number of ata sages which are simply the corresponding decoder sections of those used in the encoder. Hence the time to carry out the decoding function is similar to that uted t perform the encoding. (On receipt of the encoded bitstream the frame decoder first identifies the control information and tables within the various headers. I then loads the contents of each table into the related table and passes the control infor ‘mation to the image builder. It chen stars to pass the compressed bitstream to the Huffman decoder which carries out the corresponding decompression, ‘operation using ether the default or the preloaded table of codewords. The to decompresced streams containing the DC and AC coefficients of each Set el ifn codowo ere boc block are then pasied to the differential and run-length decoders respec: tively. The resulting matrix of values is then dequantized using either the Figure 3.20 JPEG encoder output bitstream format. ‘efault or the preloaded values in the quantization table end ofall he information, relating to a complete image/pieture. The Juader contains a number of fields that include: AF the overall width and eight ofthe image in pels ft henuiberand ype of components that are used to represent he Smage (CLUT R/G/B, ¥/G/G) she digiraion format wsed (422,420 te). $ilibe Second evel fame conan ofa qumber of componenss sigh fnew asa san These ae also preceded bya header which o fields bat inelide: * q ie deni ofthe components (R/G/2 ee) 1b the numberof bits used to digitize each component i the quantization table of ales that have been used to encode each component. “Typically each scan/component comprises one of more seis ce ‘which can contain a group of (8% 8) blocks preceded by a header. This Thins the Huffman table of values that have been used to encode cach bf 21. SPEG decoder schematic, ach revaing block o 8x8 spatial fegueny coffin turn tothe ves DET heh wasters then ack nt he spa Dang the expression canine nie 12a Aaah Z % Lainey Mig oT cow where C(i) and C() = 1/8 for j=0 = for ll other values of fan j. “The image builder then reconsrvts the orginal image from de blocks using the contol information passed to ity the frame decod ‘Although the JPEG sanded is relatveycompeaied owing to the number] Cncodng/ decoding sages assocated witht compreson ras in exces S01 canbe obtained wil sl retaining geod quality output image Core. Ths level of compresion, however, apes to pictures whose conte {elavely imple ~ thats, have rath ew ctor tansiions~ and, for 4 Complicated picture, compression ratios nearer to 10 are more commol ‘There gure however, asume each pie locaton has he planes aed with“ R/G/B or /G,/G,~ and ence if GLUT is used, then Figures can be multpied by for of Neverthe, eben wih compe Sion rao of 101, the amotnt of memory required withthe various types Gloplay tabulated in Tale 2. sree (oa ange of fom 80 Kbytes throw to BO Kites More importa he tine dea incurred in accessing inages is rediced by a factor of 10 Finally as wth he Gif its lo posable oencode and rebuild the im in a progressive nay by fs sending an ouline ofthe image and then p ge adang more deo Thacan beaded in thefalloing ‘a progressive modes in this mode, fist the DCand low-equency Coclficents of each block are sent and then the higherfrequency coefficients; Igrafchial mode: in this mode the total inage is fist sent using a wy ‘esblution = for example 320% 240 = then ahi 40480. Tin this chapter we have described a selection of the compression algort that are used for the compression of text and images. In general, com sion is applied to both media types in order to reduce the time taken‘ transfer the source information over 3 network. This is done either to red the cost of the network connection or, in interactive applications, to redu the response time toa request forthe source information. ‘The basic techniques associated with all compression algorithms were first identified and described. These were clasified as being either entropy encoding algorithms or source encoding. Entropy encoding exploits hew the source information is represented and we described two examples tun- length encoding and statistical encoding ‘Runlength encoding is uséd when the source information contain: long strings of the same symbol such as a character, a bit, or a byte, Instead of sending the source information in the form of independent codewords, its sent by simply indicating the particular gmbol in each string togethe: with an indication ofthe number of symbols in the string. Statistical encoding exploits the fat that not all symbols in the source information occur with equal probability. Hence, instead of encoding all the ‘symbols with fixed-length codewords variablelength codewords are used with the shortest ones used to encode those symbols that occur most fretuenty Im contrast, source encoding exploits a particular property of the source information in order to produce an alternative form of representation ‘hat is cither @ compressed version of the original form or is more amenable 1 the pplication of compression. Two examples were described: differential encoding and transform encoding, Differential encoding ie wed when the amplitude of the values that make ‘up the source information cover a large range but the difference between suc ‘cessive values is relatively small. Instead of using a set of relatively large ‘codewords to represent the actual amplitude ef each value, a set of smaller code- ‘words is used, each of which indicates only the difference in amplitude beween the eurrent valve being encoded and the immediately preceding value 'As the name implies, transform encoding involves transforming the source information into an alternative form of representation that lends itself more readily to the application of compression. The example that we described was the discrete cosine transform (DCT). This is used for mage ‘compression and transforms the matrix of pixel values that represent the image into 2 matrix of spatial feequency components which, in turn, lends itgelf more readily tothe application of compression In terms of text compression, when the compressed source information is decompressed by the receiver, there is normally no loss of information. The ‘compression algorithms that have cis property ate known as lossless and we escribed a number of such algorithms. These included both static and dynamic Huffman coding, arithmetic coding, and the LZW coding algo- rithm, The two Huffman algorithms and arithmetic coding are based on the relative frequency of occurrence of single characters in the souree informa tion and the LZW algorithm strings of characters. In terms of image compression, we described a number ofthe algorithms that are used for the compression of graphical images, digitized documents, and digitized pictures. For use with graphical images we described the GIF tnd TIFF standards, for digitized documents two modified Huffman coding algorithms, and for digitized pictures the JPEC algorithm. All the algorithms that were described are part of international standards which, in addition to the compression algorithm, also define the format of the compressed infor. ‘mation when it is being stored or transferred across. a network. ‘hot Text and imag compression ben) n32 Zeplain the meaning of the following terms “cating to compresion: 4) source entoders and destnaon decoders, Toes and los compression, |G) entropy encoding, |) source encoding Explain the meaning ofthe following terms “lng to statsial encoding: (i) romtength encoding, statistical encoding Explain the meaning ofthe following terms ‘elting to tatisial encoding: 39 ( prefixpropers, (a) envopr, ) Shannon's formula, (hs) coding effieency. ‘Explain the meaning of the following terms felting to source encoding (0) diferent encoding, (@): transform encoding ‘With he dof iagrams expan i a qualia tre way the meaning of the following terms ning o wanform encoding pata quency, {3) Morzntl and vertical fequeney com ponents, (4) Girt coxne wansform (DCT) 33 plain the meaning of the following terms to ent compression algorithms: ate coding, {i djnaie/adapive coding. ‘Wiha dof an example, deserite the cules that are followed to construct me Huffman, “rode tee fora transmitted character St Messages comprising seen diferent charac: ters, A through G,aeto be wansmited over a data link. Anais has shown that she relative frequency of occurrence ofeach character is ‘Aos0, B05, COo5, Dos2, Foo, Foo, Go2 (0) Derive the entropy of the mesg. (il) Use sae Huffman coding to derive a suitable set of codewords (ii)_Derive the average number of bits per codeword for your codeword set wane mit a message and compare this with both the fixed length binary and ASCIL codewords (i) State the pref property of Hulls ‘odes and hence show that your code word st desved in Exercise 48 satis ais (i) Derive a flowchart fora algorithm to decode a received bit string encoded; ‘wing your codeword set (Gi) Give an example of the decoding opera tion assuming the recived bits ‘comprises amix ofthe seven characters. “The following character string isto be tans mitted using Huffman coding -ABACADABACADABACABAB. (i) Des the Husa code ee. {id Determine the savings in transmissog Foanghidth over “normal ASCIL and binary coding ‘With Tefience to the example shown igre 38 telitog te dynamic Hunan cod G)._ Wiite down the actual transmitted by ?) patie correponding to the characte ing This scuming ASCH coding is being use. (i Deduce the extensions to the existing Huffman tee if the next word wansmit tedisthe" ‘Assuming the character set and associate probability assignments given in igure 3.7, derive the codeword value for che character tiring mie Assuming this is recieved by the Aestination, explain how ihe decoder deter Fines the original string from the received b codeword value LExplin the principle of operation of the LZ ompresion algoridum, Hence assuming a dic- tionary of 16000 words and aa average word Iengtbof 5 bits, derive the average compres: Sor rato thats achieved relative to using Pit ASCII codewords. Bi4 naplan the principle of operation of the LZW compreson algorithm and how this dle fentffom the LZ algorithm. Bis Asume the contents ofa fe that consists of 286 different words ~ cach composed of alphanumeric characters from the base ASCIL Character set ~ isto be sent over network ‘sing the L2W algorithm. Ifthe Bile contents start withthe string: Tris cay ast iy show the entries in the dictionary of the encoder up to this point and the sing of odewords that are sent. Also show how the receiver buds up i own dietonary and deter- tines the original le contents rom this Assume the ame message atin Exerc 3.15 but with the numberof diferent words much Jorge and unknown. How can the algorithm be changed to accommodate this? 38 Explain the bari mode of operation of GIF Include in your explanation the size of the color tnble-bred, how each piel value is seat, and hone receiver ows the image parame ters sed byt source, D8. in lation to GIR, explain how the LZW coding slgortn can be applied tothe (compressed) Image dat. Include in your explanation how comprenion edgpieved and how he receiver Incerprerte tontprewed information, a9 321 sa 333 826 exercises | 198 ‘With the aid of diagram, describe the inter laced mode of operation of GIF. lnelude the potential applications of thie mode and how the receiver knows itis being sed Describe the principes of TIFF and is applica: sion domains Explain the meaning ofthe following terms relating o facsimile machine: (i) terminaon codes, (i) iakeup codes, (Gi) overscanning, (is) the EOL code and its uses. Discriminate between a one-dimensional coding scheme anda ewodimensonal (MMR) scheme. ven a scanned line of pel, asuming 4 onedimensional coding scheme, deduce an Sigortho (@) wo devrmine dhe transmitted codewords, and (i) to decode the reecived string of code: words, Ute the Hoffman tables in Fig. 3.11 sage ‘With the aid of pel patterns, assuming an MMR coding scheme, explain dhe meaning of the fol loving ers (i) pusmode, (i, erat mode, (Gi) Norinontal mode. Hence withthe aid of the code table gven in Table 3.1, deduce an algorithm to perform the encoding operation, With the aid ofa diagram, identify the five main tages atociated withthe baseline mode ‘of operation of JPEG and give a brief deserip tio of he role ofeach stage ‘With thea of diagram, explain how the ind ‘dual 88 Blocks of pel values are derived by the image and block preparation stage foreach ofthe flowing source image forms (i) monochrome/CLUT, (i) RGR, i) GG. In relation to the ¥, G, G forana, show the corderin which the blocks ae output agter 3 Text and image camression hehe aid of diagram, explain the meat Hn following ers relating to the DCT seth: 'DC coefficient. penta and vertical spatial fequeney coeficients see by considering apical niage of 1024 Pinch daplayed on 317 inch (482 sim) 8 Pepa where te stings in bandwidth ise with PEC. ane the characteristic of the eye that it ‘poed jn the quantization phase of the ee rid. Hence suring the et of DC veehctents and threshold valves shown im Zire 517, eaplin how de set of quant ‘on coefiients are derived Jue a range of DCT coefficients and a selected ‘anim tresbod to derive how he mas ram quantization error i determined by the Spoee of testo val uae the characteristics ofthe values in the Ghunded octicent mux hat ae exploited TRapay the entropy encoding stage: Why 8 ve earn ng a ipag sean appbe toe a? plain why diferent encoding is we for Tie omprension of the DC coefficients in 8 aa oe blocs. By means of an example st of eetncient estimate he savings in bandwidth that are achieved Using the se of coding categories sed 2 Figures 19(a), determine the encoded version EA following sting of DC coefcents 16,15,16, 14,12, 333 336 s3t Describe how the 68 quamized AC eo ravector are encoded using randengt ing. Hence derive the encoded form felling vector of quantized AC colic 6,7, 0,0,0,3,-2-0,0, 000 Describe how the diferentabencoded Coefficient rom a string of acces t sre act sing Huffman encoding. Hence tng the defoult Huffman codewords soi Figute 5.19(b), derive the eicoded bt Fa the set of ferential encoded DC e ‘Gents you desved in Exercive 8.2 esrb how the st of romdength em Pecitcent fora block are sent wing Hull seeping, Hence astuming the et of d Shattman codewords fisted in Table 52, 0M the Hulfmanrenceded bitstream forthe vMtvlength encoded conficlnts 0 d Puercne 285. How is the end of the sf todd coefficients fof a Block determin ail te information relating to compre erated by the various 4.2 Show the stractareo Geseibe the role oft the headers that are use ‘ih the aid of Figure 3.21, explain i Wiovs pars ofthe encoded frame it er rerdae 3.36 are wed to recreate te nal mage dently the oo alternate ways that syed wo eecreate an image Ina rok 4.2 o compression Introduction ‘bs we decribed in Chapter 2, unlike ext and images, bot audio and most Awe dec are conuououal) varying analog sgralt ences 20 see oe, alice cigitizaton, both comprise & continuovs Seer of digital Sec value representing the amplitude of #sampie oF (he particular valve Signal taken a epee me intervals AS 2 Te compression rt esate with digited aio and video are Oe from those ae elas chapter. nes chapees therefore, we Sal describe 2 we dere pee algorihns, st thor relaing to audio and shen those relating to video. Audio compression We dicussed the digitization of andio signals in Section 2.8 andi gs eon proves nove: spe code modulation of TA" This the digits Pipe (analog) audio signal/waveform at mine Se ince of une mamma Frequency component tht makes YP the 195 96 | chapter 4 Aco an video camprestion signal, Alternatively ifthe (frequency) bandwidth of the commuanicaill channel to be used is ess than that of the signal, then the sampling ra determined by the bandwidth of the communications channel. The ltl then known asa bandlimited signa In the cate of speech signal, the maximum frequency componen 1OKH2 and hence the minimum sampling rate i 20ksps. For general aud _music for example, the figures are 20 kHz and 40 ksps respectively. ‘number of bits per sample also varies and, ypically, i 12 bis for speech af 16 bits for general audio. In addition, for a stereophonic signal, wo signdl ‘must be digitized. As we saw in Example 24, this produces a bitrate ‘240kbps fora speech signal and 1.28Mbps fora sereophonic music/gen audio signal, the later being the rate used with compact discs. Im practice, however, in most multimedia applications involving audi the bandwidth of the communication channels that are available dictate rat that are less than these. This can be achieved ia one of two ways: either audio signal is sampled at a lower rate (and, #f necesary, with fewer bits pa sample) or a compression algorithm is used. Although the fist approach ‘relatively simple to implement, using a lower sampling rate has the disadva tage thatthe quality of the decoded signal is reduced owing tothe loss of th higherfrequency components from the original signal. Also, che use of fewel bits per sample results in the introduction of higher levels of quantization noise. Normally, therefore, a compression algorithm is ued since, a we sl see, this achieves a comparable perceptual quality (as perceived by the ear) that obtained with a higher sampling rate but with a reduced bandwidt requirement. In this section we considera selection of the compression ag rithms thatare widely used for audio in a range of multimedia applications 4.2.1, Differential pulse cole modulation Differential pulse cose modulation (DPM) i a derivative of standard PCM and exploits the fact that, for most audio signals, the range ofthe difference in amplitude between successive samples ofthe audio waveform i less that the range ofthe aetual simple amplitudes. Hence i only the digitized diffe cence signal is used to encode the waveform then fewer bits are required thag {or a comparable PCM signal withthe same sampling rate. A DPCM en: And decoder are shown in Figure 4.1(a) and a simplified timing diagram f the encoder is shown in Figure 4.1(b) Essentially the previous digiized sample of the analog input signal is held inthe register (R) ~a temporary storage fail ~ and the difference signal (DPCM) is computed by subtracting the current contents ofthe register (R,) ’ {rom the new digitized sample output by the ADC (PCM). The value in the register is then updated by adding to the current register contents the com puted difference signal output bythe suburactor prior (ois ansmission. The ‘decoder operates by simply adding the received difference signal (DPCM) to the previously computed signal held in the register (PCM). Typical savings swith DPCM, are limited to just I bit which, fora standard PCM voice signal, for cxample, reduces the bit ate requirement from 64bps to 56 kbps. 42 uso compression | 297 er M Deo Dwcmsigntenander PI Tine Fe erat onan of eps fond «now /sgdaed exe Figure 4.1. DPCM principles: (a) encoder/decoder schematic; (b) éncoder timing. AAs we ean deduce from the cireuit shown in Figure 4.1(a), the output of the ADC is ured directly and hence the accuracy of each computed differ tence signal ~ also known as the residual (signal) ~ is determined by the fccuraey of the previous signal/value held in the register. As we saw in Section 2.2, all ADC operations produce quantization errors and hence a ‘rng of, sa, positive errors, will have a cumulative effect on the accuracy of Chapter 4 Asi and veo eomoresion the value tha is eld in the register. This means therefore, that with dl DPCM scheme, the previous value held in the register is only an approx tion, Hence more sophisticated techniques have been developed § tstmating ~ also known as predicting ~a more accurate version of the tus signal To achieve this, these prediet the previos signal by using not d the estate of the current signal but al varying proportions of a numb the immediately preceding estimated signals. The proportions used are dl Inined by what are known as predictor coefficients and the principle i ho in Figure 4 y= pier coco Figure 4.2 Thitd-order predictive DPCM signal encoder and decoder schematic. 422 142 Adio compression | 199 In chis example, the difference signal is computed by subtracting varying proportions of the lst three predicted values from the eurrent digitized value Sueput by the ADC. For example, if the dnree predictor coefficients have the ‘alues G, = 0.5 and C, = Cy = 0.25, then the contents of register RI would be ‘ited sight by 1 bit (thereby mulplying its contents by 0.5) and registers RZ and RS by 2 bits (multiplying their contents by 0.25). The three shifted values fre then added together and the reslting sum subtracted from the current ‘igiized value ouput by the ADC (POM). The current contents of register RI are then tansferred to register RY and that of register R2 to register RS. “The new predicted value is then loaded into register RI ready for the next ample to be processed, The decoder operates ina similar way by adding the ame proportions ofthe last theee computed PCM signals to the received DPCM signal By using this approach, a similar performance level to standard PCM is obtained by using only 6 bits for the difference signal which produces a bitrate of S2kbps ‘Adaptive differential PEM [Additional savings in bandwidth ~ or improved quality ~ can be obtained by warying the number of bits used for the difference signal depending on its “amplitude; tats, using fewer bits to encode (and hence transmit) smaller difference values than for larger values. Ths isthe principle of adaptive dif- ferendal PCM (ADPCM) and an international standard for this is defined in ITU-T Recommendation G.721. Ths is based on the same principle as DPCM xcept an eightorder predictor is used and the number of bits used to quan- {ize each difference value is varied, This can be either 6 bits ~ producing $2 bps to obtain a beter quality output than with third order DPCM, or 5 bits = producing, 16 bps ~if lower bandwidth is more important "A second ADPCM standard, which is a derivative of G.721, is defined in ITU-T Recommendation G.722. This proves beter sound quality than the 6.721 standard atthe expense of added complexity. To achieve this, it uses an xided technique known a8 subband coding. The input speech bandwidth is extended to be from 508 through to 7#Hz ~ compared with 8.4Hz for a Standard PCM system ~and hence the wider bandwidth produces a higher: fidelity speech signal, This is particularly important in conferencing applications, for examples in order to enable the members of the conference te alscriminate between the different voices of the members present. The ffeneral principle ofthe scheme is shown in Figure 48. ‘To allow for the higher signal bandwidth, prior to sampling the audio ‘put sigaal itis firs pasted through two filters: one which pasies only signal frequencies in the range 50 Hz through to 3.5kHz, and the other only fre {quencies in the range 3.5KHL through to 7kHz. By doing this, the input {speech} signal is effectively divided into two separate equal-bandwidth sig- nls the fir known as the lower subband signal and the second the upper subband signal. Fach is then sampled and encoded independently using Chapter 4 Aue ad video compression ORCI abband ence Figure 4.3 ADPCM subband encouler and decoder schematic. ADEM, the sainpig ite of the uippe abba sgl Beng 1Oksp to al forthe presence of the higher frequency component is subband, "The use of two subband has dhe advantage tat difereat bitrates an used for each. In general, the frequency components that ae present lower subband signal ave a higher ereeptal importance than those in higher subbané.'The operating bit ate can be 64,86, or 4B bps. With a rate of 64 kbps, for example, the lower subband is ADPCM encoded 4Bkops and the upper subband at 16 kbps. The wo bistreams are then mul plexed (merged) together ~to produce the transmitted (6£bp) signal — cha way thatthe decoder inthe receivers able to dvde them back aga Into two separate streams for decoding A htd standard tased on ADPCM is alo svaiable. This is defined in TT “Recommendation G.726, This also wses subband coding but with a speech Dbandvidth of 3.4H2. The operating bitrate can be 40, 3224, or ]BRBps 42 had cormson | 204 4.2.3 Adaptive predictive coding tes tee since they are a function of the characteristics of the audio signal being dign. Soto came alsin component dt ta vp eg Linear predictive coding Anerson ln anpng he ine ‘en eave Sepia sa OR an Sonar tl tc hah tual fenares i contains. These are them quanzed and sent sea ae Stat te ete og EO cc sae Medepnecde oysters Sh high levels of compression (and hence low bit rates) can be achieved, dow bee tsepmaca HOGS at henge a Be glee thi is closely Folate to the i i ” frequency of the signal and is ‘iiporiat because the ears more sensitive to frequencies In the range ‘2-BkHe than to frequencies that are higher or lower than theses Period: this is the duration of the signal loudness this is determined by the amount of energy in the signal In addition, the origins ofthe sound are importn. These are known ‘vocal tract excitation parameters and classified as: “ 4 Auio and video compression ‘n__unvoiced sounds: with these the vocal chords are open and examples Jnclude the sounds relating to the letters ands ‘Once these have been obtained from the source waveform, i is possible Ones ton togetier witha suitable mode! of the voc tact to generate 8 ae ened version of the original speech signal. The basic features oF an tencoder/decoder are shown in Figure 4 “fe input speech waveform is first sampled and quantized 2 ade rate blont of digitized samples —hnown asa segment is then anges fae fine the various perceptual parameters ofthe speech that it conta ‘The'opecch signal generated bythe voal tract model in dhe decoder Toned ofthe present output ofthe speech smtheszer = a8 detersined tana set of model coefficients ~ plus a linear combination ofthe Pre aoe car model coeTicents. Hence the vocal tract model used is aap FC gence Figure 4.4 Linear predictive coding (LPC) signal encoder and dec schematic. 44.2 Audio compression | 208 and, ascan be seen, the encoder determines and sends a new set of coef: Gents for each quantized segment. vere can see from the above, the output of the encoder isa string of frames one for each segment. Each frame contains fields for pitch and loud ames the period is determined by the sampling rate being used — 9 nee cation bt whether the signal i voiced or unvoiced, ancl a new set of com Fated mode! coeficients. Sone LPC encoders use up wo ten sts of Previous ees roefficiens to predict the output sound (LPC-10) and use bitrates a5 trond akbps or even 12bps. As indicated, however, the generated sound re pose ries often very synthetic and hence LPC. coders are used primarily ja military applications in which bandwith is alFimportant. Code-excited LPC “The smthesizers usd in most LPC decoders are based on avery asic mode! of ihe weeal wack A more sophisticated version of this, known as a codecxcited Tinear prediction (CELP) model, i aso used and, in practice is just one «tat pe ofa family of vocal wact models known as enhanced excitation (1°) Pedal These ar also intended primarily for applications in which the amount vr hanewidth available i imited but the perceived quality of the speech must be of an acceptable standard for use i various muledia applications. ‘athe CELP model, instead of treating each digitized segment indepen: dently for encoding purposes, just imited set of segments s used, each sera saa waveform template. A precomputed st of templates are held by srw er and decoder in what is known a3 template codebook. Fach of wpe sinidual digitized samples that make up a particolar template in the casebook ae differentially encoded, Each codeword thats sent selects a par ata template fom the codebook whose difference values best match those “fantzed byte encoder In this way theres continuity rom one of Aherto suiher ad, asa esl an improvement in sound quality it obiained “There arc aow four international standards available that are based on this principle These are ITU Recommendations G.728, 729, 729(A), 2nd 323. all of which give a good perceived quality at low bitrates "Al coders of tha type have a delay associated with them whichis incurred while cach block of digitized samples is analyzed by the encoder and the Speech i reconstructed atthe decode. The coinbined delay value fs know” rr Jeder’s processing delay, In addition, before the speech samples can Fei seed, itis necessary to buffer ~ store in memory ~ the block of sary. trex The me to acumulate the block of samples known asthe algorthne eae and, in some CELP coders, this is extended to include samples from she aay carve block, technique known 2s lookahead, These delays occu sre eters of course, and hence ate in addition wo the endo-end transinis: ie celay over the network. Nevertheless, the combined delay value of 2 snes an important parameter as itoften determines the suitability of che coer for a specific aplication, For example, in a conventional telephony Zhapler 4 Auto and video compression 1 Summary of CELP-based standards. application, a low delay coder i required sine a large delay can impede thal flow of a conversation. In contrast, in an interactive application that invoh the output of speech stored in a file, for example, a dey of several second before the speech starts to be output is often acceptable and hence the coders delay is less important. Other parameters ofthe coder that are con sidered are the complexity of the coding algorithm and the perceived quality of the output speech and, in general, a compromise has (o be reached bbeoween a coder's speech quality and its delay/compleity “The delay associated with a basic POM coder i very small as its equal to the time interval between two successive samples of the input waveform: Hence atthe basic POM sampling rate of 8ksps the delay i equal t0 0.125 ms “This same delay also applies, of course, to ADPCM coders. In contrast, the four CELP-based sandards have delay values in excess of these as multiple samples are involved. These are summarized in Table 4.1 which also includes the bit rate(s) associated with each standard and the principal application for which each has been developed. The use ofthe extension .1 with 723.1 is ‘used to discriminate this standard from the earlier (.723 standard which has now been integrated with G.721 into the G.726 standard 426 Pereeptuareodiig Bath LPC and GEL? are. ised primary or elephony aplcations and hen ‘he compresion of speech signal. Pergepowah encodes, however, have bee ,oF B-~and the adress identifies the location of tan merablock in the fame, The quantization velueis the threshold value ter Audio and video compression video comp 43 Video compression | 225 that has been used to quantize ll the DCT coefficients in the macroblock land mation secoris the encoded vector if one is present. The Wocks present ind tates which of the six 8 X B pixel blocks that make up the macroblock are present ~if any ~and, for those present, the JPEC-encoded DCT coeiicients for each block. As we can deduce from this, the amount of information ‘output by the encoder varies and depends on the complexity of the source Gideo. Hence a basic video encoder of the spe shown in Figure 4.14 gener dates an encoded bitsieam that his a variable Bitrate “The decoding of the received bitstream is simpler (and hence faster) than the encoding operation siree the time-consuming motion estimation processing is not required. As the encoded bitstream is received and ccoded, each new frame is assembled a macroblock ata time, Decoding the macroblocks of an Frame isthe same as decoding the blocks in a JPEG- Encoded image. To decode a Prame, the decoder retains a copy of the immediately preceding (decoded) I or P frame in a buffer and uses this, together with the received encoded information relating to each macroblock, to build the ¥, C,,and €, matrices forthe new frame ina second buffer, With tincoded macroblocks, the macroblock’s addres js used to loeate the corre Sponding macroblock in the previous frame and its contents are then ttansferred into the second buffer unchanged. With fully-encoded macro- blocks, ese are decoded directy and the content transferred to the buffer. With macroblocks containing motion vector and a set of difference matri- ts then these are used, together withthe related set of matrices in the first buifer to determine the new values for te macroblock inthe second bulfer. The decoding of Btames is similar except three bulfers are used: one con- ing the decoded contents ofthe preceding For Prame, the vecond the (decoded contents of the succeeding P- or Kirame, and the third to hold the frame being assembled, Performaiice “The compression rati for Mframes ~ and hence all intracoded frames = is similar to Uiat obtained with JPEG and, for video frames, typically is in the Tegion of 10-1 through 20:1 depending on dhe complexity of the frame con- {entsThe compression ratio of both P-and B- frames is higher and depends nthe search method used. However, typical figures ar in the region of 20: tough 301 for Pframes and 20:1 through 50: for Bframes. 4.3.2 4.261 “The H.261 video compression standard has been defined by the ITU-T for “the protsion of video telephony and videoconferencing services over an inte grated services digital network (ISDN). Hence, as we described earlier in Keeton 1.34 its assumed that the network offers transmission channels of Jnulipes of 64kbps. The standard is also known, therefore, as px 64 where Caper through 80, The dgiaton format sedi ther ihe common Figure 4.14 Implementation schematics: (a) frames; (b) P-frames; (c) B-frames; (d) exemple macroblock encoded bitstream format. Invemedate format (CIF or the quarter CI (QCM. Normally he tne for idcconftencing and he QCIF for video telephony, both we described in Section 262 Hoyer, becuse each fame is died mrad of 16 16 pies or comprenion the hora rela reduced fom 360 384 pcs 0 prosuce an negra number Of 2 Hoe Heme, sine blk frmat te subampling ofthe two chrom Signa at ha he ate wed for thc haminanc agate spa echo eech ormas CHF: ¥= 352x288, C= C= 176x144 QU: Y= 176x144, C= C= 88x72 Progressive (nominterlaced) scanning is used with a frame refresh rate of 30 fps for the CIF and either 15 or 7.5fps forthe QUI. Just F and P- frames are wsed in H.261 with three Psrames between ead pair of Hames. The encoding of each ofthe six 8x8 pixel block that makq lup each macroblock in both I and Prames ~4 blocks for Yand one each fo G, and C, = carried out using the procedures described in the last section “The format of each encoded macroblock is shown in outline in Figure 4.15(a)f and the format of each complete frame is shown in part (b) of the figure. [As we described in the last section, each macroblock has an addres ated with it for identification purposes and the spe field indicates whether the macroblock has been encoded independently ~ intracoded ~ or with re ‘erence to a macroblock in a preceding frame ~ intercoded. The quantza talueis the threshold value that has been vsed to quantize all the DCT eo cients in the macroblock and mation vector isthe encoded vector if one: ‘present The coded black patirs indicates which of the six 8 x 8 pixel bloc that make up the macroblock are present ~ if any ~ and, for those presen the JPEGencoded DCT coefficients are given in each block. "The start of each new (encoded) video frame/pictue is indicated by the picture start code. This is followed by a temporal rjrence field which is a timed Stamp to enable the decoder to synchronize each video block with ‘sociated audio block containing the samne me stamp. The picture type fe indicates whether the frame is an I-or Péfame. Altougt the encoding ope ation is carried out on individual macroblocks, a larger data structure kn 8 group of (nacre) blocks (GOB) is also defined. As we show in Figure 4.15( this is a matrix of 11 x 3 macroblocks, the size of which has been chosen | that both the CIF and QCIF comprise an integral number of GOBs ~ 12 ig the case of the CIF (2 x6) and 3 inthe case of the QCIF (13) which interworking between the two formats. At the head of each GOB is a unique ’ Start code which is chosen £0 that no valid sequence of variabledength code- ‘words from the table of codewords used in the entropy encoding stage can produce the same code, In the event af a transmission error affecting a the decoder simply searches the received bitstream for this code which sg nals the start ofthe next GOB. For this reason the start cdeis also known asa SSSR DC Lm 43 Video compression | 22% 208 ab be innionel 144 ple el GC wchion (608 = Geup nccilBeels a) macroblock format; (b) frame/picture format; 14 Augie and video compression resynchronization marker. In addition, each GOB has a group mumber ated with it which allows for a string of GOBS to be missing from a parc frame. This may be necessary, for example, ifthe amount of (compres information to be transmitted is temporarily greater than the bandwiil the transmission channel ‘As we indicated at the end of our earlier discussion on motion esi ‘ion, the amount of information produced during the compression operat varies. However, since the transmission bandwidth that is available with ( target applications of the H.261 standard is fixed ~ 64 kbps or multipley this ~in order to optimize the use ofthis bandwidth, its necessary to con the variable bitrate produced by the basic encoder into a constant bt rail ‘This is achieved by first passing the encoded bitstream output by the encod through a firstin, first-out (FIFO) buffer prior to it being transmitted aff then providing a feedback path from this to the quantizer unit within ti encoder. The general scheme is shown in Figure 4.16(a) and the role of FIFO buffer is shown in Figure 4.16(b). AAs you may recall from our earlier discussion of the JPEG standard 4 Section 3.4.5, the output bit rate produced by the encoder is determined by the quantization threshold values that are used; the higher the thresho the lower the accuracy and hence the lower is the output bit rate. Hence since the same compression technique is used for macroblocks in vided encoders, itis possible to obtain a constant output bt rate from the encoded bby dynamically varying the quantization threshold used, This isthe role of thd FIFO bute. ‘As the name implies, the order of the output from a FIFO buffer isthe same as that on input. However, since the output rate from the buffer is con stant ~ determined by the (constant bit rate of the tansmisson channel - the input rte temporarily exceeds the output rate then the buffer wll start i fil. Conversely, ifthe input rate falls below the output rate then the buffed contents will decrease. In order to exploit this property, two threshold level are defivied: the ln threshold and the high hreshld. The amount of informa tion in the buffer is continuously monitored and, should the contents fall below the lw threstold, then the quantization threshold is reduced ~ thereb increasing the output rate from the encoder. Conversely should the conten increase beyond the Aigh civeshold, then the quantization threshold i increased in order to reduce the ouput rate from the encoder Normally, the control procedare operates at the GOB level rather than at the macroblock level. Hence, should the high threshold be reached, frst the ‘quantization value associated with the GOB i increased and, if this is not sul ficient, GOBs are dropped until the overioad subsides. OF course, any ~ adjustments to the quantization threshold values that are made mustibe made also to those used ir the matching dequantzer. In addition, the standard als allows complete frames to be missing in order to match the frame rate to the level of transmission bandwidth that is available, 43 Video compression | 229 oy Pee Sl comsaees joe ns LTT Se 4 & a snap () FIFO butter 433 4.263 "TRE H.263 video compression standard has been defined by the ITU-T for “aie'si a range of video applications over wireless and public switched tele~ plone nettorks (PSTN). The applications include video telephony Sigeoconferencing, security surveilance interactive games plying, at so ‘ny all of Which require the output ofthe video encoder to be transite cross the network Connection in real time 25its output by the encoder “Se deseribed in Section 1.3.1, the access circuit to the PSTN operates in an “Enalaggode and to tabsmit a digital signal over theve circus, requtes a pi se ter 4 Aus and video compresion these very low bit rates. ne oe ee ee “The use of low frame rate ca ao lead w very jerky movements. Tn ord i Oa ee aed evr eeger eer Sin feb nrc gay one QaF: y-176x194, 6, SQOIF ¥=128x96, C= 6,=64%68 grin nannng i edt fa refresh rate of either 15 or 7.5 In practice, the support of both formats is mandatory only for decoder, and the encoder need support only one of them. As you may from Section 4.3.1, the motion estimation unit s not required in the de and hence is less expensive to implement than the encoder. The adel cost of having two alternative decoders i, therefore only small Ho having a choice for the encoder, this means that either a simple ~ and lomeant encoder design tte onthe QCIF cn bee spi such as gues lingo moc sophie den bated on be QC fe used for applications such as videoconferencing. The decoder can b same in both cases as it supports both forms. Frame types In order to obtain the higher levels of 2 cr levels of compression that are needed, 1.263 standard uses FP, and Berames. Also, in order to use as high a fra rate as possible, optionally, neighboring pairs of P- and B-frames can ‘encoded as a singie entity. As we described in Section 4.8.1, the result 423 View compression | 232 encoded frame is known as a PB-rame and, because of the much reduced saeettag overheads that are requied its we enables a higher frame rate (0 be used with a given transmission channel ae evar earlier in Figure 411(0), a PBrame comprises a Brame ‘and the iramediately succeeding PArame. The encoded information for the ane eaponding macroblock in both these frames sinterteaved, wit the in carrer the Pftame preceding that ofthe B-rame. Hence atthe decode aa setoded information is received, the macroblock for the Pframne ine castracted fist using the received information relating 10 (he aectublock and the retained contents ofthe preceding PArame. The cone canacif the reconstructed P-macroblock are then used, together with the vent Of encoded information relating to the macroblock i the correspond Ing Bframe and the retained contents of the preceding Pim, (9 ing, enionally predict the decoded contents of the Bemacroblock, Thien, ainiretne decoding of both frames is complete, the Bframe is decoded frst followed by the Prame, Unrestricted motion vectors ‘As we showed earlier in Figures 4.12 and 413, the motion vectors associated ich predicted macroblocks are normaly rested 10 defined area (9 Me wie ce frame around the location in the target frame of che macroblock Fring encoded. Tn addltion, the search areas restricted to the edge ofthe Pring his means that should a small portion of a potential close-match rar plock fall outside ofthe frame boundary, then the target macroblock is mcmatealy encoded as for an Hare. Tis occurs eventhough the pordon atthe macroblock within the frame area isa close mateh, eacrcome this imitation, in the unrestricted motion vector mode, for hose pincls ofa potential losematch macroblock that fall ouside of caer boundary the edge pixels themselves are used instead ands tread the resulting macroblock produce a close match, then the motion aaoene FP ecessary, is allowed to point outside of the frame area. In pracy wer tithe small digitized frame formats that are used with the H.268 ee turd, this has been found to give a significant improvement inthe level ff compression obtained. Error resilience ‘anwweindicated earlier, the target network forthe 1.263 standard isa wireless aa arson a PSTN. With tis ype of netrork there isa relatively high proba, Big that transmission (bid) errors wil be present in the bitstream received tthe decoder Normal, such errors are characterized by periods when Ming of errorfee frames is received followed by a short burst of errors STE pea corrupt a sing of macroblocks wihin Fame. In peaches ergy plasibe vo identify the specific macroblocks that are corrupted bat soot Eat the related group of (macro)blocks (GOB) contains one or more caine ploeks that arevin error. Als, as we can deduce from the frame ner 4 Aucle an video compression sequences we showed earlier in Figure 4.11, because the contents of mag frames are predicted from information in other frames, its highly proba 49 vies omoreson | 233, thatthe same GOB in each of the following frames that are derived from GOB in error will contain errors. This means that when an error in a ‘curs, the error wll persist fora number of frames, hence making the ern ‘more apparent tothe viewers As we explained in Section £3.2, when an error in a GOB is detected, decoder skips the remaining macroblock in the affected COB and search for the unique resynchroniation marker (start code) atthe head of the nex GOB. Ic then recommences decoding from the sar ofthis GOB, In order ‘atk the error from the viewer, an error concealment scheme is incorporat Into the decoder. For example, a common approach is to use the contents o the corresponding GOB from the preceding (decoded) frame. In addition, since » PSTN provides only a relatively love bitrate tranamig sion channel, 0 conserve bandwidth, intracoded (1) frames ae inserted relatively infrequent intervals. Hence in applications such a8 video telephon in which the video and audio ate being transmitted in realtime, the lack of frames has the effect that errors within a GOB may propagate to othel regions ofthe frame due to the resulting errors in the motion estimation ve torsand motion compensation information. With digitization formats such the QCIF (which has only dhree GOBs per frame) the resulting effect can very annoying to the viewer. A typical effects shown in diagrammatic form if Figure 4.17(a) and, as we can see, although the initial error occurs in ond ‘GOB position, it rapidly spreads to other neighbouring GOBs. Its for thi reason that schemes are included in the standard that aim at minimizing ‘effects of errors on neighbouriag GOBs. The schemes include error tracking independent segment decoding and reference picture selection. We shal dis ‘cus thetprinciple of operation ofeach ofthese schemes separately Error tracking With realtime applications such as video telephony, a ‘communications channel is required for the exchange of the compresse audio and video information generated by the codec in each terminal. Ty ‘means that there is always a return channel from the receiving terminal bal to the sending terminal and this used in all dhree schemes by the decodef order to inform the related encoder that an error in a GOB has bed detected. Typically, errors are detected in a numberof ways including: ‘one or more outofrange motion vectors, ‘one or more invalid variable-length codewords, lone of more outofrange DCT coefficients, an excessive number of coefficients within a macroblock In the error tracking scheme, the encoder retains what is known as error pre diction information forall the GOBs in each of the most recently transmitted frames; that i, the likely spatial and temporal effects on the macroblocks ia 608 = gop nck When an error is detected, the return channel is wed by th BE conpte morleks EE] toed movable ee = home conten ea tosmison ars AK), 2} GOB9 fame compas Ine follies tha il et ia pei GOB na fame is corrupted, wneg.the acknowledgment (NAK) mesage back tothe encoder in the Jue Codec contin Dosh the frame number and the location of the GOB nthe ame that isin error The encoder then wes the €*FOF prediction ormation relating to this COB to deny the macroblocks 1 these GODS Ais ame tat key to be alerted I then proceeds © tansmit che v4 Audio and video compression macroblocks in these frames in their inuacoded form. The principle of Scheme is shown in Figure 417(b), "The example frame sequence shows in diagrammatic form how the upted macroblocks shown in part(a) ofthe figure are predicted and, cauh affected frame, the predicted macroblocks are sent in their intracodl form. Hence in the example, on receipt of NAK(1,3), iti assumed that tcacoder has predicted and retained error prediction information relating frame I, Since the next frame to be encoded is fraine 4, the affected m blocks are intracoded rather than predicted. Similarly for the affect iacrablocks in frame 5. Independent segment decoding The aim of this scheme is not to over grove that occur within a COB but rather to prevent these errors from af ing neighboring GOBs in succeeding frames. To achieve this, each GOH lreated as 2 separate subvideo which is independent of the other GOBs in frame, This means, therefore, that motion estimation and compensitio Himited to the boundary pixels of a GOB rather than a frame. The opera fof the scheme is shown in parts (a) and (b) of Figure 4.18. "As we can see from part (a), although when an error in a GOB occurs same GOB in each successive frame is affected - until a new intracoded Gi is sent by the encoder ~ neighbouring GOBs are not affected. Clearly, fever a limitation ofthis scheme is thatthe efficiency of the motion estimal nd compensation in the vertical direction is reduced significantly owing the search area being limited toa single GOB. Thus, the scheme #8 not tnaily used on its own but in conjunction with either the error track chee —as we show in Figure 4.18(b) ~ or, more usualy, with the ree pictur selection scheme described below. ‘Reference picture selection This scheme is similar to the error ta fcheme inasmuch as it endeavors to stop errors propagating by the dee Teturning acknowledgment messages when an error in a GOB is det "The scheme can be operated in two different modes as we show in Pal and (b) of Figure 4.19. 3 "The mode of operation we show in part (a) is known as the NAG and, in this mode, only GOBs in error are signaled by the decoder reel ANAK message. As we showed earlier in Figure 4.11, normally incereod tr B) frames are encoded using an intracoded (1) frame as che inital ence frame. However, as we showed in Figure 4.14, during the encodi fntercoded frames a copy of the (decoded) preceding frame is retaine@ the encoder. With this scheme, therefore, the encader can select any of previously decoded frames as the reference. Hence in the example show Figure 419(a), when the NAK relating to frame 2is received, the enc sclecs (the decoded) GOB 3 of frame las the reference to encode GOB the next frame = frame 5 in this example 43 Video compression | 235 Be ommesiors ee = fans coins nar horein es cot cod SOR yop ol ocalecs NAK|2, 3)» GO8S none? comped G18 Independent segment decoding: (a) effect of a GOB being corrupted; Peused with error tracking. " haae] dated As we an seein the igure, ith hit scheme te GOB in ero il propo autora numberof ames the mmber beige he ouneip Era of the communication channel that the ime delay between the NAC being sent ty the decoder and an intercede derived from the in rare eig rece “The tera moe of operation om the ACK mode since, a we show in Figure 419(0), with ts moe ares received without errors are | oer sus ane ort = soar c | { E44 1 2 $3 4 s 6 on ss : mn : etn = Encodes 7 “| - s. * ~~ fe == 1 Ya 4 Ys 6 Deedee _ Ss 2 Ne nade ome r/c te Ire 4.19 Reference picture selection ACK mode. 4.2 Video compresion | 237 ‘acknowledged by the decoder returning an ACK message. Only frames that have been acknowledged are used as reference frames. Hence, in the example, the lack of an ACK for frame 8 means that frame 2 must be used to encode Frame 6 in addition « frame 5. At this point the ACK for frame 4 is received and hence the encoder then uses this to encode frame 7. The effect of using a reference frame whieh is distant (in time) from the frame being encoded is to feduce the encoding efficiency forthe frame. Thus the ACK mode performs best when the roundsrip delay ofthe communications channel is short and, ‘dally, less than the time the encoder takes to encode each frame. MPEG ‘The Motion Pictures Expert Group (MPEG) was formed by the ISO to for- ulate a get of standirds relating to a range of multimedia applications that involve the use of video with sound, The outcome is a set of three standards which relate to either the recording or the transmission of integrated audio and video streams. Each is targeted at a particular application domain and describes how the audio and video ate compressed and integrated together. ‘The three standards, which use different video resolutions, are: 1 MPEG-1: Thisis dined in a series of documents which are all subsets of| 180 Recommendation 11172, The video resolution is based on the source intermediate digitization format (SIF) witha resolution of up to 352 288 pixels. The standard isintended for the storage of VHS quality audio and video on CD-ROM at bit ates up to 15Mbps. Normally, however, higher bitrates of multiples ofthis are more common in order to provide faster acces to the siored material 1 MPEG2: This is defined ina series of documents which are all subsets of 180 Recommendation 18818. Itis intended for the recording and transmission of sudio-quality audio and video. The standard covers four levels of video resolution: = Low: based on the SIF digitization format with a resolution of up to '352>x 268 pixels It is compatible with the MPEC-I standard and [produces VHS-valty video, The audio is of CD quality and the target bit, rate is up t0 4Maps; = Main: based on the 4:20 digitization format with a resolution of up to "720% 576 pixels. This produces studio quality digital video and the audio allows for multiple CD-quality audio channels. The target bit ate is up to ISMbps or 20Mbps withthe 4:22 digitization format; = High 1440; based on the 4:20 digitation format with a resolution of 440° 1152 pixels. tis intended for high-definition television (HDTV) atbit rates up to 60Mbps or 80 Mbps withthe 4:2:2 format. = Hight based or the 42:0 digitization format witha resolution of, 1920 x 1158 pixels. It is intended for widescreen HDTV ata bit rate of ‘up to 8OMbps or 100Mbps withthe 4:2: format. per 4 Audio an video compression 43.5 sb MPEG lily, this standard was concerned with sma ange of Applicaton o thse of H.269, each running over very low bitrate ‘Pannelsangng from 48 to 6tbpe Lats scope was expanded io brace awe ange ofincracive mlimedia applications ovr the Internet and the varius types of entertainment networks. Unlike these three standards which are concerned with the compress of the multimedia information associated with an application, the Standard is concerned with describing the structure and features of tl Content of the (compressed) multimedia information produced by ifferent standards. The resulting descriptions are then used in “engines (o locate particular items of material that have a defined feature, ‘The MPEGS standard was to be focussed on HDTV but was not de oped separately as the work was subsequently incorporated into MPEC-4 Hence we shall restrict our discussion to MPEG-1, the main and high levels MPEG2, and selected features ofthe MPEG standard. MPEG-7is ouside the scope of the book. ‘The first three MPEG standards are in three parts video, audio, an system. The video and audio parts are concerned with the way each i Compressed and how the resulting bitstreams are formatted. The system pa {concerned with how the two streams ae integrated together to, prod a synchronized output stream, We shall discuss just the video compressio part of the MPEG-1/2 standards in this chapter and the system parts in th next chapter 7 MPEG-1 “The MREG-1 (and MPEG2) video standard uses a similar video compressiog technique as 1.261, As indicated, the digitization format used with MFEG-1 the source intermediate format (SIF) which we described in Section 2.6 However, as with the H.261 standard, because each frame is divided inl macroblocks of 16 x 16 pixels for compression, the horizontal resolution reduced from 360 to $52 pixels to produce an integral number of (29 nacroblocks, Henee, since the two chrominance signals are subsampled! half the rate of the luminance signal, the spatial resolutions for the two of ideo source are: 176x120 76x 144 NTSC: Y¥=.852x240, PAL: Y=952%288, GG, GG, ‘Aso, since the application domain of MPEG-1 isfor the storage of video (with fudio), progressive scanning is used with a refresh rate of 80s (for NTSC) and 25H (for PAL) The standard allows the use of Hrames only, and Prames only oF IP and Belrames, the later being the most common. No D-rames are supported 143 video compression | 39 samy ne MPEG standards and hence the cave of MPEG es ee sas eed axiom randomacrs time 0 seconds 990 this ithe The acepted ng ith ideo quality ~ that invences the mayer main fr ramesin the frame sequence used. Twa examples WwEPBBPBBL.,. and TBBPBBPBBPBBL val sequence proposed foc se with PAL (ohh hs the it gn resco fre ith NTSC, The second shower Fame rote uy bth sens aniseed in igre 420, cahicicoraee sequence tial ensines Heth OY Bea he decoder andeconal eT digs ave available youdecosieeach P abd Pedcions LO a @aaaGaaa3a~ BS BR OOS ‘diecional peders Figure 4.20 MPEG-1 example frame sequence, =r Shaper 4 Auda and video compression The compression algorithm used in MPEG is based on the H.261 star dard. Hence each macroblock is made up of 16x 16 pivels in the Yplane and 8X8 pixels in the G, and G planes. However, there are two main differences The first is that time-stamps (temporal references) can be inserted within frame to enable the decoder to resynchronize more quickly in the event of ‘one or more corrupted or missing macroblocks. The number of macrobloc between two timestamps is known as a slr and a slice can comprise from | ‘through to the maximum number of macroblocks in a frame. Typically, a slice is made equal to 22 which is the numberof macroblocks in line. The second difference arises because of the introduction of Beframes which increases the time interval between I and P frames. To allow for the ‘resulting increase in the separation of moving objects with Pérames, the seatch window in the reference frame is increased. Als, to improve the accuracy of the motion vectors, a finer resolution is used. Typical compresion ratios vary from about 10:1 for Lirames, 20:1 for Pames and 50:1 for Bframes ‘As with the 1.261 standard, the compressed bitstream produced by the video encoder is hierarchical and is shown in Figure 4.21(a). At the top level, ‘the complete compressed video is known a a sequence which, in turn, con. 42 vie cms | 2m ee: loving for packetization and multiplexing venous ‘bf 1.2Mbps ie allocated for the video, Hetice, annum a: Fale 1 5Mbps hs ares SOD for Ue ca sists ofa sting of groups of pictures (GOPS) each comprising a string of, P oc B pictures/frames in the defined sequence, Each plcture/irame is made ‘p of N slices, each of which comprises multiple macroblocks, and so on down to an 88 pixel block Hence in order for the decoder to decompress the received bitstream, each data structure must be clearly ientiied within the bitream. The format ofthe bisream is shown in Figute 421(b), The start of a sequence is indicated by a sepuence star! cde. This is fol lowed by three parameters, ech of which applies to the complete video sequence. The vides paramder specify the sree sve and aspect ratio, the it stream parancters indicate the bit rate and the se of the memory/rame bafers that are required, and the quantization parameters contain the Contents ofthe quantization tables tha are to be used forthe various frame/piture types. These ate followed by the encoded video steam which, as we can sce, $Sin the form ofa suing of GOPS Each GOP (IBBP..) i separated by a (GOP) start cade which i followed by 4. tinestamp for smchronizaton purposes anda parents field which defines Sequence of frame types that are used in each GOP. This is ile by the string of encoded pitures/trames in each GOP. Each i ‘eparie by afictur start cade and is olowed by a piel (Por B), tf jaromels, which indicate Kw ful the memory buffer shouldbe before the decoding operation should stat, and end aramces which indicate theres ‘lution used forthe mation vectors. Thi isfllowed by a string of slices, each ‘comprising «string of macroblocks. Each sic is separated bya slice stat ce Which i followed by a veri! position Bld, which defines che scan line the __- slice relates 1, and a quantization parameter that indicates the sealing factor {hat appiies to this slice. Ths is then followed by a string of macroblocks each of which is encoded in the same way as for H.261, the basic principles of which we described earlier in Section 43.1. As we can deduee from this, a slieis similar 0 the GOB used in the 8.261 scandard 14 uti and video comeresion or mr sored deal ig GOP OF oct ‘21 MPEG-1 video bitstream structure: (a) composition; (b) format. 4.3.6 MPEG-2 4 in Section 4.34, MPEG-2 supports four levels ~ low, mata 440 and high ~ each targeted ata particul mh, there are five profiles asociated with each Tevet: simple, main, {Gon accuracy, ad high, These have been defined 5 sively form a teo-dimensional ta lar application domain. 1 tial resolution, quantiat thatthe four levels and five profiles collect 43 Video compression | 243 which acts as a framework forall standards activités associated with MPEG-2, Tm this way the development of both the existing standards and any new stan- dards can take place relative to one another. For example, at a particular level, the decoders used with a given profile will be able to decode all the Jower profiles tht have been defined for that level, hence making interwork- ing between older and newer equipments possible As indicated earlier, since the low level of MPEG? is compatible with MPEG, we shall restrict our dis- Ccssion of MPEG2 to the main profile atthe main level (MP@MIL) and the two high levels relating to HDTV. MP@ML “The target application of the MP@ML standard is for digital television broad- casting, Hence interlaced scanning is used - which we described in Section 261 / with a resulting frame refresh rate of either 50 Hz (NTSC) or ‘25 He (PAL). The 42.0 digitzaion format is used with a resolution of either "720 x 480 pixels at 30Fz or 720 x 876 pixele at 25Hz. The output bit rate from the sjtem multiplexer ean range fram 4Mbps through t© 15Mbps, the actual rate used being determined bythe bandwidth available with the broad. ‘ast channel, “The video coding scheme is similar to that used in MPEG-1 the main aif ference resulting from the use of interlaced ~ instead of progressive — ‘scanning, The use of interlaced seanning means that each frame is made up fof two (interlaced) fields and, ax we show in Figure 422(2), alternative lines fare present in each field, Hence for frames, the question arises as to how the DCT blocks are derived from each macroblock. As we show in parts (b) and (© of the figure, ovo alternatives are possible depending on whether the DCT blocks are derived from the ines a feld~ field mode ~ or the lin a frame frame mode "As described in Section 2.6.1, fora frame refresh rate ~ temporal resol- tion ~ of 30/25 Hz, the corresponding field refresh rate is 60/50 Hz. The choice of field or frame mode is thus determined by the amount of motion present in the video. fa large amount of motion is present, then itis better {o perform the DCT encoding operaon on the lines in a fteld ~ part (b) — Since this will produce a higher compression ratio, owing to the shorter time interval between successive fields, Alternatively, if there is litte movement, the frame mode can be used since the longer ime interval between succes. sive (complete) frames is less important. Hence in this case, the nacroblocks/DCT blocks are derived from the lines in each complete frame vipat (6). In fact, the standard allows either mode to be used, the choice ‘beng determined by the type of video; for example, alive sporting event is, likely to be encoded using the field mode and a studio-based program the frame mode Tin relation to the motion estimation associated with the encoding of macroblocks in P-and Belrames, three different modes are possible: field, frame, and mixed. In the field mode, the motion vector for each macroblock, ter 4 Audio and vdeo compression 43 videscmmsson | 245 a te rhs is computed using the search window around the coresponng macroblock in the immediately preceding (IorP) fed for both P-and Bitames and, for Barames, the inimediately succeeding (P or) field The motion vectors, therefore, relate to the amount of movement that has taken place in the time to scan one field. In the frame mode, a macroblock in an odd field is ‘encoded relative to that in the preceding/succeding odd field(s) and simi- larly for the macroblocks in even fields. In this ese, therefore, the motion. vectors relate tote amount of movement dat as taken place in the me to scan two fields; that is, the time to scan 2 complete frame. In the mixed ‘mode, the motion vectors for bath field and fame modes are computed and the one with the smallest (mean! values is selec HDTY ‘There are three standards associated with HDTV" advanced television (ATV) in North America, digital video broadcas (DVB) in Europe, and multiple sub-Nyquist sampling encoding (MUSE) in japan andthe rest of Asia. All three standards, in addition to defining the digitization format and audio and video compression schemes used, also define how the resulting digital bitstreams are transmitted over the diferent ypes of broadcast network, In addition to these standards, a wth normal digital television, there is an ITUR HDTV specification concerned with the standards used in telev sion studios for the production of HDTV programs and also for the international exchange of programs, Ths defines a 16/9 aspect ratio with 190 samples per line and 1152 (1080 visible) lines per frame. Currently, interlaced scanning is used with the 420 digizaon format. n the future, however, its expected that progressive scanning wil be introduced with the 422 format ‘The ATV standard, which was formulated by an alliance of a large ‘number of television manufacturers, is ako hnown as the Grand Alliance (or simply GAY'standard, It inchides the ITU-R HDTV specication and a second, loweresolution format. This als uses «16/9 aspect ato but with a resolu- tion of 1280 x 720. The video compression algoridim in both cases is based 6on-the main profile a the high level (MP@HL) of MPEC-2 and the audio ‘oinprstion standird is based on Dolby ACS. ‘The DVB HDTV standard i based on the 4/3 aspect ratio and defines a resolution of 1440 samples per lin and 1152 (1080 vise) lines per frame. As we can see, this is exactly twice the resolution of the low-definition PAL “digitization format of 720 x 876 The video compression algorithm is based fon what ie known a the SSP@HIM10 zpatallyscaleahle profile a high 1440 = of MPEG2 which is very simila to that used wth MP@HL. The audio con pression standard is MPEG Audio layer 2. ‘The MUSE standard is based on a 16/9 aspect ratio with a digitization format of 1920 samples per line and 1035 Ine pet fame. The video com esi algorithm i similar to that used in MP@HL, - z fen wet fet re >| — a Necoopesc, som) 2 MPEG-2 DCT block derivation with I-frames: (a) effect of interlaced scanning; te; (c) frame mode. per 4 Aue and video compression 437 4 MPEG-4 “The main application domain of the MPEG- standard isin relation to aesscand video associated with interactive multimedia applications overt Fane aeand the various types of entertainment netsorks. The standard co veiar features to enable a user not only to passively acces a video sequeng {or complete video) ~ using, for example, start/stop/pause commands ~ ito necess and manipulate the individual elements that make up ae within the sequence/video. If the accessed video is @ comput Sfarerated carton, for example, the user maybe given the eapabiley- byt Bermeor of the vided ~ to reposition, delete, or alter the movement of the i Sigua! characters within a scene. In addition, because ofits high codin Titciency with scenes such as those associated wih video telephony, the sta sree tio used for this type of application running over low bit r seryorks such as wireless and PSTNs. For such applications, therefore, is ternative to the H.268 standard Scene composition The main difference beoneen MPEG-4 and the other standards we have co Sidered is that MPEG has a number of what are called content onetionotte, Before being compressed each scene is defined in the form g epackgeound and one or more foreground audio-visual objects (AVOs Each AVO isin rn defined inthe form of one or more video objects and/¢ taaio objects for example, a stationary car in a scene may be defined ws Justa single vdeo objet while a per both an audio and a video object. bject may itself be defied as being m orenple ia person's eyesand mouth are the onl things that move in od Seartiic his he person's face may be defined inthe form of three Jeane for te head and the other two for the yes and mouth. Once Jee en done, the encoding ofthe background and each AVO is caried ‘Zparately and, in the ease of AVOs consisting of both audio and vi ffames hat resin minum debs in he eee te that are used to provide muldmedia services, We also described a range of ecoder. ° multimedia applications that use these networks and, although these are 4.48 With the aid the digrams shown in Ful L tmany and varied, we showed that they canbe clasiied into one of three cate 426, explain goris: interpersonal communications, interactive applications over the ihe sdranages wo ing toot Internet, and entertainment applications. ¥ideo packets instead of GOBs wih Te ; Tm Chapter 2 we described the way the different types of media that are ‘aerate wineless ad PSTN used in'multimedia applications - text, images, speech, audio, and video ~ (o)_eteprton of be motion cin se cpretnte n'a digital for and we concluded that «numberof the net State how the compression algorithm used vith, MPEG-L differs from that used in the 11361 standard. stung dhe frame sequence shown in Figure ‘€21(a) and average raion of 121 0,201 (), eared crater urges Dit trmaon nh a esate mulimeatpleron ar aro of ea ere, Reenter ama : cea eee ePbare ken pace te eld compro sriapeeaed eee he sepeaon of pe anode F Teen ee aie etd «seed ofthe cae alge : - : : = eee saa ae er ove er te ipa meaning he filing eran aoe TE eee carat 449 Wi he ald ofthe darn stom ne 1 pcm fe muita pplenons edit in oe eee hap ae ose pf men bt ner rant So eres mies ypes tat we negated ogetier in some nay. For exp (is) timestamp, (ithe derivation of RVLCs Ey (0) buffer and encode rameters. (il) forward and reverse seats and her we Introduc! wae npr, Hence forall tthe smal siete node fo a erp hat orcs ost single te/esablshient cxampl, sal fo medians ae PBN ol LAN tthe enlishment hand all eral a earn eat ar ete the ste ate ade sng 2” aPPOP ot nv uch asa PST, a ISDN o a Tere service prov 8.2 82 tans | 475 (ISP) network. For an enterprise that operates over multiple sts, howeves ‘when there i significant proportion of interste calls analterative solution isto extend the private facilites associated with each ste to embrace all sites. This involves linking the sites together using high bit raw transmission lines that are leaed from a (national) network provider. The resulting network is then known as miliste enterprise network of if testes are located in dif ferent countries around the world, a global enterprise network. ‘Normally leased lines are charged for on aa annval rather than a percall basis and hence this approach is only justfed when the annual (public call charges to other sites exceeds the cos ofasing the lines. An added benefit of creating a private network, however, is that itis often easier to offer more sophisticated services since the utilzation ofthe bandwidth of the intersite leased lines is under the control of the enterprise network manager. Also, because the total network ie private ~ apart from the transmission lines, of course ~a private network is considered o be more secure than a public one. "As we explained in the last chapter, a PBX operates in a similar way to a local exchange/end office in a public network with the terminal equipment connected to the PBX using either analog or digital ines, In this chapter, we Shall focus on the operation of the different types of LAN and the various approaches tha are used to create multisite enterprise nevworks. LANs ‘As we have just indicated, LANs are used to interconnect distributed commu- nities of end systems often referred to as stations in the context of LANs ~ including multimedia PCs, workstations, servers, and so on. Typically, these are distributed around an office, a single building, ora localized group of buildings al of which belong toa single enterprise. "The early LANs ~ many of which are sll in existence ~ operate using a shared, high bitrate, transmission mediyim to which al the stations are Attached and the information frames relating to all calls are transmitted. To ensure the transmission bandwidth is shared fairly between al of the atached Stations, a number of different medium access control (MAC) methods are tosed. These include carriersense multiple-access with collision detection (CSMA/CD) and token ring, both of which have a defined maxi ‘number of attached stations and length of transmission medium asso ‘vith them, As we shall see, in practice the maximum distance is relatively Sina and hence most LANs of this type comprise multiple (LAN) segments that are interconnected together using either repeaters or devices known as bridges and a high bitrate (stesside) backbone subnetwork, We explain the operation of Ethernet/IEBES02.3 LANs ~ whieh are based on the CSMA/CD (MAC method ~in Section 8:3 and token ring LANs in Section 84. The opera tion of bridges s explained in Section 8.5 and, as an example ofa backbone network, the fiber distributed interface (FDDI) in Section 8.6 ‘throughputs that are required with multimedia applications, the central associated with the earlier LANs have been upgraded to operate higher bit rates. Also, as we shall explain, the older hubs operate in a ‘duplex mode and support only a single frame transfer ata time. Hence and Ethernet switching hubs, both of which we describe in Section 8.7 In terms of the ink layer protocol associated with LANS, the various cach of the LAN types. We describe the structure and the user servic offered by each sublayer in Section 8.8. In multisite enterprise networks, the LANs asiociated with the difernf sites are interconnected together using various methods determined by volume of intersite traffic involved. If cis is relatively low, then switched ISDN connections can be used; if tis high, shen high bitrate (digital) leaed lines are used. Normally, these are leased from the operator ofa national public circuitswitched network and are the same as those we described i Section 7.28. In both cases, however, a gateway is connected to the LAN af ‘each ste and this manages al interste frame transfers. We explain the ope tion of some of the different types of technology that are used tof Snterconnect the LANS at different ses in Section 8.9. Ethernet/IEEE802.3 Ethernet deoworks~and the more recent derivative IEEESD23~ are used extensively in technical and ofce environments As we sal se, Ethernet has gone through many phates of development since it fir intoducton bt in general the same baie mode of operation is sil se. Al frame tran minions beeen all the ations that are afached tthe LAN ake place oe & shared 19Mbpe bur andthe CSMA/CD MAC method i then wed sh the ne af the Bsn an equitable way. We shall explain the principle o oper ation ofthis type of MAC method fat and then other selected apelin the fol sabecctons ¢sMA/cD Since all the stations are atached directly to the same cable/bus, itis said to ‘operate in x multiple access (MA) mode. To transmit a block of data, the source station fiet encapsulates the data in a frame with the address ofthe ‘destination sation and is own address in the frame header and an FCS field atthe til ofthe frame. The bus operates inthe broadeast mode which means that every frame transmitted is received by all the other stations that are attached tothe bus. Hence as each ofthe other stations receives the frame, it 03 commences | 7 frat cheeks he frame ee of error sing the FCS and ii compares the desination addres in the header wth ts own address If hey steer ent the sation simply discards the frame if the ae the sme he frame Convens are pased upto the LC sblayes for procesing together wih the address of the source station. z : la With this mode of operation, wo (or more) stations may atempt to transmit frame over the bus atthe same time. Because ofthe Brose, rode this wil real inthe content ofthe tv (or more) lames being cor rupted and calison ssid o have ocurred ence in oder rede the possi of collision, prior to sending a frame the source station het Aletermines wheter a signa srame current beng wanted on the bus. Ma signal ~ hao atthe eater =i sened (C3), the salon defers own trnsmision unl he crren fame wansmison is complet ad ely then does statempt send its own tame: Evens, nthe event of wo (or mote) sons wang to senda frame, both wl start to transmit thet tame ul taneously on detecting that the transmision of Ue current frame is Complete When ths happens, honever, is necessary forthe wo (or more) Setins ave to detet 3 colison has oeatred before each hs ed ‘ansmiting ts own frame In practice, because ofthe posit large aga propagation delay ofthe bus and the high transmission bit rate toed {1OMpe, hiss nos ne stsghtoracd sit might sce, Jeet that colsion has occured by simultaneously moaitor thatis prevent on the cable all he time is wansing 3 ffame. The, ifthe Wansited and monitored signals ae diferent, coli sion fatumed to have occurred = collson detected (CD). As we sow in Figure 81, howeer, sation can experiences illsion fot ute a of a fame but after has tranamied a numberof biu- The worse tine delay ~ and hence maximum numberof bts that have been wasted = before detecting that a collision has taken place is own 2 the eollon window and ocus when the to ealding saons ae stached to oppose ‘extremities of the bus, as we show in the figure. “Pres Inthe igre, sation A has detertined tht no tansmiion isin progress and hence stars to taramit a rame = part (), As we explained fn Seton 628 irespette othe bitrate beng wed, the bite i ene wil ike 2 small but ite te propagate oer the ansmision medium dete: tine by the length of thecable, Land the signal prepagaion velo, 2 “Themaximom length ef eae scm 258m. Hence ssamings Voki the wrstease signal propagation delay time, Tr going fom on end of the cable tothe ther ogen T,=Yo=25 x 108 /2 108 = 12.5 microseconds Now assume that, just prior to the first bit of the frame arriving a its interface, station B determines the transmission medium is free and starts to ‘wansmita frame part (i os es 8 Entepetse etwors om a ee = twos nmnenpropaptin eal dy “1 CSMACD worst-case collision detection. “Aswe show, after Bhas transmitted just few bits the ovo signals ol at (i) and the collision signal then continuo propagate back ve Apart (ie). Hence the worst-case time before station A detects i cehiion has occurred, 27,, is 25 microseconds. In addition, as we ‘expand upon the cable is made up of ine os offour devices called repeaters. Each repeater introduccs 2 dela THarimicroseconds in order to synchronize to each new frame. Hence the ve areas tme is set at 50 microseconds or, assuring a bit rate of 10 afer Abas transmitted: 10 10° 50% 10° ‘Asafety margin of 12 bits is then added to chis and the minimum fra size baet 312 bits oF 64 bytes octets. This is called the slot time (in B are ensures that siation A will have detected a collision befare thas ta at ite onallest frame. Also, co ensure thatthe collision signal persists 23 ethemenitecenes | 479 sulficent time for itt be detected by A, on detecting the collision, Beontin- tiesto send a random bit pattern for a short period. This is known as the jam sequence and is equal to 32 bits ‘After detecting a collision, the two (or more) stations involved then wait fora further random time interval before trying to retransmit their corrupted frames. As we shall explain later, the maximum frame sie inchuding a four byte CRC is set at 1518 bytes and hence a collision will occur if wo (oF more) ations create a frame to send during the time another station is currently transmitting a maximum size frame. This is equal toa time interval of 1518 x 8/10 10° = 1.2144 milliseconds Clearly, the probability ofthis occurring increases with the level of traffic (number of frames) being generated and the maximum throughput of the LAN occurs when this limit is reached. Hence if second collision should ‘occur when a station is tying to send a frame, this is taker asa sign thatthe Cable is currently overloaded. To avoid further loading the cable, therefore, the time interval between trying to retransmit a frame is increased exponen tially after each new attempt is made using a process known as truncated. binary exponential backoff, The actual time isa function of the slo time. “The numberof sit times before the Nth rewansmission arempt is chosen as ‘a uniformly distributed random integer R in the range 0SR<2, where ik» min (N backoff limit), In the standard, the backoff limits st to 10. Wiring configurations ‘There are a number of different types of cable that can be used with Ethernet. These include: tm 10Base2,thinvire (0.25 inch diameter) coaxial cable with a maximum segment length of 200m; 1m 10Base5: thick-wire 0.5 inch diameter) coaxial cable with a maximum segient length of 500m. ta 10BaseT; hb (siar) topology with twisted pair drop cables of upto 100m; ‘a 1OBaseF: hub (star) topology wth optical fiber drop cables of upto 5k Although different types of cable are used, they all operate using the same CSMA/CD MAC method. ‘tthe ume the first Ethernet installations were carried out, the only transmission medium available that could operate at 10 Mbps was coaxial ‘able. Inially,chickwire coaxial cable was installed since this can be used in felatvelylong lengths of up to 500 m before the ransmitted/broadcas signal needs o be repeated, As we explained in Section 6.8.1, this involves the aten tated signal received at the extremity ofthe cable segment being amplified dnd restored to its original form before i retransmitted out onto the next ee Ef emcee eerie mors cable segment. Up to five cable segments ~ and hence four repeaters - ‘be used in this way. Hence the maximum length of cable the signal prof {ats is2.5km plus 4 repeaters which isthe origin ofthe slottime figure inthe standard. More recent, as we explained in Section 62.2, with the arival of nd pensive adaptive crossalk canceler circuits to overcome nearend cross (NEXT), itis possible to obtain bitrates of tens of Mbps over twisted ‘able of up to 100m in fength. Also, it was found that, in a vast majorigal offices, the maximum length of cable used for telephony to reach each def top from the wiring closet was less than 100m. Hence unshielded twisted sf (UTP) cable ~ as used for telephony — has rapidly become the standard use with Ethernet. The configuration used for each segment is show Figure 8.2(a) Since the cable forms a physical bus, beth thick and thin wire coax cable installations involve the-cable passing nea 10 each attached station, ‘we can see in the figure, however, with twsted-pair cable a star configura is ved withthe hub located in the wiring closet and tach sation connes to it by means of twisted-pair drop cables, Normally, category three (CAT ‘UTP cable is used as for telephony. Each cable contains four separate tis pairs. In the case of Ethernet, just two pairs are used: one pair & {tansmissions from the station to the hub and the second pair fr transl sons in the reverse direction, ; ‘Toemulate the broadcast mode of working associated with CSMA/C§ we show in Figure 8.2(b), the repeater electronics within the hub repeats broadeasts out the signal received from each of the input pairs onto al off ‘other output pairs. Hence the signal output by any ofthe stations i rece byall the other statins and, as a result, the cartier sense function si involves the MAC unit within each station determining whether a currently being received on its input paie. Similarly, the colision de function involves the station determining if a signal arrives on its inp ‘hil itis transmitting a frame on the output par. Because of their mode of operation, this ype of hub is called a Inub and typical numbers of auached stations - and hence sockets — are i 8 through to 16. Above this number multiple hubs are tacked together! fare connected by repeaters or, as we shall explain in Section 8.5, bridg the cae of repeaters, the maximum length of eable between any two stall = inchuding the 100m drop cables - must not exceed 1.5km. To achieve i coverage/distance, however, normally its necessary to use a central hull hich each evisted-pair hub is connected by means of optical fiber cables. rn i aaa £3 eeemaneesio3 | 4 (a) Hb ety Sbion Sate Sat Figure 8.2 Hub configuration principles: (a) topology; (b) repeater ‘schematic. ples: (a) topology; (b) repeater Frame format ond operational parameters ‘lc nat ofan and the operational parameters ofa CSMA/CD net woth re shown in Figute 83. The promi fld beet a eek Ses. faneon ello the reccnng elecroics in cabana "epee to ache bit smchronzaton belore the ctl age ‘cecived. The preamble pate is sequence of een then ea es th inary puter 1010010 Al anes ar tanmited oe cole, Manchester encoding. Hence aswe exphined in Sron 651, hess cach DTE which acts as a reference clock The stareffame delimiter (SPD) te the single bee 10101011 which immediatly follows the preamble and sigeas *Y the start of valid frame t the receiver, @ FCS one chick seen (eh osm Coy onus (1 80 = donctkane dines BPgk ice deveatenoddess UC ibe e/g les ben 10s Bonhe enced Soins Slates tecione gop Sbmomcanh Ioorerit 1 sole % poste Be Bone deefcving CS} —SIBbym ieee : sibs rior Foe sae fei FCS) {@) frame format; Figure 8.3 Ethernet/IEEE802.3 characteris (b) operational parameters. “The destination and source adivesss ~ also Known as MAG add ech they are ued by the MAC sublyer ~ specify the idemtty of the ae eT of both the intended destination staton(s) andthe original aan erecively. Each addres eld can be either 16 or 48 bits but fg ‘rer FAN inal the seus he same forall aon TH Panic dexinain adres field specifies whether he aes isan itn Get) or group addres (-1). Jf an iidal addres spec sae cd frame is intend fr a single Seiavion. 1 group a eee the fame ieintended either fora lel eed group Oy ae resp adres) of forall other stations connected tothe Det esas or global adres) In the acer cas, the adress ik ite apron 4 {broaden ea group address, the addres species a previovaly p ye second bit ar ia oe The pe of grouping specie in 4 Foe a iacred fel) oF erally amined (0). Group a be easing and Ue MAC uni/ cru asocated with ech ae ee ara roup ithe programmed ad al aes wi group address at is head 83 Ethemeneceso23 | 405 ‘With the original Ethernet standard, the wo-byte ppelield immediately foe lows the addres fields and indicates the network ayer protocol that created the information in the data ld, With the more recent IEEESO2 8 format, the next two bytes are used. asa length indicator which indicates the number of bytes in the data field If this value is less than the minimum number required for a valid frame (ininimum frame size); a sequence of bytes is added, known as ‘padding, The maximum sze ofthe data field ~ normally referred to as the max- frmum transmission unit (MIU) ~is 1500 bytes. Finally, the frame check seuence (FCS) field contains a fourbyte (82-bit) CRC value that is sed for error detec- tion. Note that with the original Ethernet standard, the end of a frame is detected when signal ransitions end. Frame transmission and reception The frame transmission sequence is summarized in igure 84(a). When a frame isto be transmitted, the frame contents are fist encapsulated by the MAC unit {nt the formas shown in Figure & (a). To avoid contention with other transmis. sions onthe mediurn, the MAC unit frst monitors the cartier sense signal and, if necesary, defers to any passing frame. After a short addtional delay (known a5 the interframe gap) to allow the passing frame wo be received and processed by the addressed sation(s), transmission ofthe frame is inated ‘As the bitstream is transmived, the transmitter simultaneously monitors the received signal to detect whether 2 colision ha occurred. Assuming a collision hnasnot been detected, the complete fame is trnsmited and, after the FCS field hnas been sent, the MAC unit awaits the asia ofa new frame, elther from the cable or from the LC sublayer within the stsion, Ifa collision is detected, the transmitter immediately tans onthe collision devet signal and enforces the co {sion by wansmittng the jam sequence to ensue thatthe colision is devected by allother stations involved in the collision. After te jar sequence has been sent, the MAC unit terminates the transmission of the frame and schedules a retrany mission attempt after a short randomly computed interval Figure 8-4(b) summaries the frame reception sequence. The MAC us first detects the presence of an incoming signal and switches on the carrier sense signal to inhibit any new transmissions from this station. The incoming preamble is used to achieve bit synchronization and, when the startoframe Selimiter has been detected, with an TEFESO2. LAN, the fength indicator is read and used to determine the number of bytes that follow. The frame con- {ent including the destination and source addresses are then received and leaded into frame buffer to await further procesing. The received FCS field is first compared with the computed FCS and, if they are equal, the frame Content i farther checked to ensure it contains an integral number of bytes fnd that its neither too short nor (o0 long. If any ofthese checks fail ten the frame i discarded. Ifall checks pass, then the destination address is read fiom the head ofthe frame and, ithe frame is intended for this station ~ that Js, the addres of the station isthe same a that in the frame of iit sa group ‘address, the station is a member of the specified group ~ the frame contents are passed to the LC sublayer for processing, rr ‘pte? 8 Energie nedrorks @ e Figare 8.4 CSMA/CD MAC sublayer operation: (a) transmit; (Gi) receive, 8.4 Tokenving | 485; 8.4 Token ring ‘Token ring networks are also used in technical and office environments and, in sition, in industrial environments, As we can deduce from the previous section, with an Ethernet LAN the time to transmit a frame is nondeterminis, Uc since, during heavy load conditions when collisions are likely to be frequent, the transmission ofa frame may be delayed and, in the limit unsue cessful, Although in an office environment this to a degree aeceptable, in industrial environments such as manufacturing and process control, itis lunacceptable. Hence although token ring LANS also use a high bit rate shared/broadcast transmission medium, in order to provide a deterministic service, they uilize a completely different MAC metho. Alo, because the type of information ~ and hence frame contents ~to be transmitted in an industrial application may have different levels of impor. tance, frames can be assigned different priorities. The MAC method, 8herefore, also contains a priority control algorithm to ensute higher priority frames ~ for example those containing alarm messages ~ are tranemitted. before lower priority frames. We shall discuss this and other issues separately. Control token Jn a token ring LAN, all he stations are connected together bya set of unid. ectional links inthe form ofa ring and all frame transmissions between any ofthe stations take place over i by circulating the frame around the ring, In its basic form, only one frame transfer can be in progress over the ring at a time, When the rng is first initialized, a single control token (frame) i gener ated and, in the absence of any frames to tansmit, this continuously circulates around the ring. Then, when a station generates aframe to send, the steps taken by the MAC unit within each station are a illusteated in Figure 83. Whenever a station wishes to send a frame, it first waits forthe taken, On ‘receipt ofthe token, it initiates aransmission of the frame, which inchudes the address ofthe intended recipient a its head. The frame is repeated (that is, cach biti received and then retransmitted) by ll the stations in the ring tant R circulates back tothe inating station, where itis removed. In add tion to repeating the frame, each station reads and stores the frame contents, ‘The intended recipient ~ indicated by the destination addeess in the frame header retains a copy ofthe frame and indicates that thas done this by set ting the response bits at the til ofthe frame A station releases the token in one of two ways depending on the bitrate (Speed) of the ring, With slower rings (4Mbps) the token is released only after the response its have been received. With higher speed ringy (16Mbps, it i released immediately after vansmitting the lat bit of the ‘frame. Ths is known as early (token) release and, as we shall explain later, this is done to improve the level of utilization ofthe ring ne den Athos td (ame atin © Ston Awa vnc cobs fom ‘psteom gio: Stn Ato fone fing ten C expe ec tome ores ocd Son Awa th Son lf bt on ct ‘Spea he lone ery howl he Wren as biel fone ho : ectbed soton A serene; ad poses on he ‘Sten pone to reponse ithe den S tone ites ome TE Benoit by ‘Ripases on he x ‘olen = ey roose ciple of operation. 2.4 Token og | 487 Wiring configurations |A small token ring network is shown in Figure 8.6(a). As we can see, inthis ‘Configuration is a single hub ~ also known as a concentrator and located in, Say, the wiring closet of an office ~to which all the stations are atached by a Cable containing two.twisted-pairs, one for each direction of transmission. Within the hub, associated with each station is station coupling unit (SCU) land, a we show inthe figure, these are interconnected so that all the stations are interconnected together to form a unidirectional ring ‘An SCU is shown in Figure 8.6(b) and, as we can se, it contains a set of ‘relays and additional electronics to drive and receive signals to and from the ‘able, The relays are so arranged that whenever a station is switched off the SCU is in the bypassed sate and a continuous transmission path through the SGU is maintained. The insertion of a station into the ring is initiated wien the sation is switched on. A separate pair of wires inthe drop cable is tused to pass power from the station to the SCU and, when activated, the ‘relays change position so that the station becomes inserted ‘When the SCU is in the inserted sti, all signals from the ring are routed through the MAC unit ofthe stavon. The receive/transmit electronics in the (MAG unit then ether simpiy read and relay (repeat) the received signal to the transmit side, if this station is not the originator ofthe frame, oF remove the received signal from the ring, i tinitated the transmission, "The ise of two pairs of relays connected inthis way means thatthe MAC un ‘can detect certain open- Figure 8 () receive, (a) transmit; es Eerpris ets Priority operation The prot asigned 10 a token by a MAC uniafter it has completed py any waiting frame) is determined by amechanism that ender “Canure both ofthe folowing (a) Frames wih higher pros than the curent ing service Por are aways wansinited on the ring firs (2) Allsations boling frames with the same priority ro thering. have equal access ight “Thisisacomplished by using both the P-and the ets the AC eld each se coupled with & mechanism tat easures a station Wat ruses 10,0 ee) TO 8.10 Token ring 8 Token ing | 499 Table 8.1. Token ring management: MAC frame types. ‘Standby monitor: Upon completion of the initialization sequence, the station can start to transmit and receive normal frames and tokens, In addi- ton, the station enters the standby monitor state to monitor continunsly the correct operation of the ring It does this by monitoring the passage of tokens nd spectal active monitor present (AMP) MAC frames ~ which are period cally ransmiued by the currently active monitor ~as they are repeated a the fing interface ‘Active monitor: Ifthe station is successful in its bid to become the new active monitor, it ist insers is latency buffer into the ring and enables its wn clock. It then initiates the transmission of a purge (PRG) MAC frame to ast that there are no.other tokens or frames onthe rng before it initiates the transmission of anew token, Beaconing Ifa serious failure such as a broken cable arises in the ring, a procedure known as beaconing informs each station on the ring that the {okenpassing protocol has been suspended (until the affected failure tlomain has been located and repaired). The failure domain consists of the following: ‘= the station that report the failure, which is referred to as the beaconing, station; isthe station upsreain of the beaconing station; 1 the ring medium between them, We cansee that the MAC procedures used wth a ok suite completed certainly compared wit 3 CSMA/CD bes for ex emember her tat mos ofthe proceres ae implemented pa inte cats within the MAC uns thee operation transpae the ter Moreover many of these ring management procedste se ine only when faults dvlopand so the overheads atocated wih thom are theo, modest 8.5 Bridges There are two types of bridge, the ones that are used with Ethernet known as transparent bridges, andthe others with token ring LANS, kno helpful fist to review the operation of repeater since bridges were desi to overcome the limitations that oceur when using repeaters. Repeaters are used to ensure that the electrical signal transmiued by Ug line drivers within the MAC unit propagate throughout the network. For ei LAN segment, in order to limit the signal atenuation to an acceptable I there isa defined maximum limit st on the physical length. of the segmea ‘connecting segments, a repeater is used to limit the electical d requirements ofthe line driver circuit to that of a single segment. In this the presence of multiple segments (and hence repeaters) in a transtissi path is transparent to the source station. The repeater, after achieving oi throughout the total LAN and hence be received by ll the other att tions. This means, therefore, that in terms of available bandwidth! network behaves ikea single segment. | * "In earl LAN installations, because most traffic was text-based ema ‘occasional fd wransfers, this mode of operation gave an acceptable pf mance in terms of network access and transfer delays. With the arrival diskless nodes/stations, however, all disk aceesss to the'server are via the fi ‘work and:hence the demands on the network batdwidth are substan higher. in most cases, the server and the set of diskless nodes it serves attached to the same LAN segmtent. Hence there is no necessity for frames associated with such transfers to be ransmited beyond the seg on which they are generated, Bridges were introduced, therefore, to inhi the forwarding of such frame transfers and only to forward those frames are intended for a diferent segment. “Thus, the function ofa bridge i similar toa repeater in that iis used fi interconnecting LAN segments. Hoveever, when bridges are used, all frame 25 sxages | SOL {e) tnd sation End station % re 8.11 LAN interconnection: (a) repeaters; (b) bridges. received from a segment ae buffered (stored) and error checked before they are repeated (forwarded). Moreover, only frames that are free of errors and are addressed to sations on a different segment from the one on which they were received-are forwarded. Consequently, all transmissions between sta: ~ tions connected to the same LAN segment are not forwarded and hence do rot load the rest of the network A bridge thus operates at the MAC sublayer in the context of our reference model. This is shown in Figure 8.11(b) and ‘the resulting LAN is then referred to as abridged LAN. Transparent bridges ‘With a vansparent bridge, as with a repeater, the presence of one (or more) bridges ina route between two communicating stations i transparent to the ‘wo stations. All routing decisions are made exclusively by the bridge(s) AuMor@bver, a wansparent bridge automatically initializes and configures itself Chapter 8 Enterprise networks (in terms ofits routing information) in a dynamic way after it has {nto service. A schematic ofa bridge is shown in Figure 8.22(a) and 2 bridged LAN in Figure 8.12(b). "A LAN segment is physically connected to a bridge through a port, A basic bridge has just two ports whereas @ malport bridge Pember of connected ports (and hence segments). In practice, each port comprises dhe MAC integrated circuit chipset associated wit the Thar ope of LAN segment ~ CSMA/CD, Ethernet ~ together with tssociated port management software, The software is responsible for izing the chipsct at startup ~ chipsets are all programmable devices for buffer management. Normally, the available memory is logically d nto a number of fixed-size units known as buffers. Buffer manager involves pasing a free buffer (pointer) to the chipset for onward tran sion (forwarding). ‘pvery bridge operates in the promiscuous mode which means it read and buffer all frames received on each ofits ports When @ Teceived at port and put into the assigned buffer by the MAC chipset, port management software prepares the chipset for anew frame and Paste the pointer of the memory buffer containing the received frame to Bridge protocol enity for processing. Since two (oF more) frames may a Coneurrenly at the ports and two of more frames may need to be fo from the same output port, the passing of memory pointers between the management software and the bridge protocol entity software is carried via aset of queves. “As we shall describe later, each port may be in a number of alterna states and processing of received frames scarred out according vo a defi protocol. The function ofthe bridge protocol entiy software is to implen the particular bridge protoco! being used, Frame forwarding (filtering) [A bridge maintains a forwarding database (also known as a routing dire tho indicates, for each port the outgoing port (i any) to be used for for ing each frame received at that port a frame is received at a port dressed (oa station on the segment (and hence port) on which it Teceved, the frame is discarded; otherwise itis forwarded via the por sped inthe forwarding database. The normal routing decision involves a sit Tookup operation: the destination address in each rpceved frame is Bs tind then used to access the corresponding port number from the for “dab, If this i the same as the port on which it was received, the dducarded, esc iis queued for forward transmission on the segment associa trith the accessed port This process i also knowm as frame Aiering, | anger “ply ae sy, base One approach is for the contents of the forwarding database to created in advance and held in a fixed memory, such as programma re 8.12 Tansparent ridge schematics acter; (b) application example. aaa 1 Eoterprse netvors read-only memory (PROM). The disadvantage is thatthe contents ofthe i ‘warding database in all bridges have co be changed whenever the news {opology is changed ~ a new segment added, for example ~ or when 2 “changed the point of attachment (and hence segment) of his or her stati ‘To avoid this in most bridged LANs the contents ofthe forwarding dat are not statically set up but rather are dynamically created and maintai ‘dring normal operation ofthe bridge, This is accomplished using a con nation ofa learning process and a dialog with other bridges to ascertain topology ofthe overall installed LAN. An overview ofthe learning proces as follows. "When a bridge first comes into servic, its forwarding database is ini ized to empty. Whenever a frame is received, the source adévswithin tise and the incoming port number on which the frame was recived is ents jnto the forwarding database. In addition, since the forwarding port is nd know at this time, a copy ofthe frame is forwarded on all the other ou port of the Bridge As these frames propagate through the network, this pi Cedure is repeated by each bridge. Firstly, the incoming port number’ ‘Catered in the forwarding database against the source (sation) address and copy ofthe frame is forwarded on all the other ovtput ports of the bri ‘Thi action is referred to as Flooding since it ensures that a copy of e frame transmited is received on all segments in the total LAN. During learning phase this procedure is repeated for each frame recived by bridge. le this way, all ridges in che LAN rapidly build up the contents their forwarding databases. "This procedure works satisfactorily as long a stations are not allowed migrate around the network (change their point of tachment) and tf Coverall LAN topology isa simple tree structure (that, there are no duplicl paths (routes) etween ai Gvo Segments). Such a tree structure is known ff E spanning tee. Since in many networks, especially large neworks, both the ponslives may occur, the basic learning operation is refined 2 follow. "The MAC address associated vith a station is fixed at the time of its i ‘facture. fa user changes the point of attichment to the newwork of hig tier PC/ workstation, the contents ofthe forwarding database in each brid must be periodically spdated to reflect suel changes. To accomplish thi Tnaetiviy timer is associated with each entry in the database. When« frame is yeceed from a station within the predefined time interval, the ti ‘expires and the entry is removed. Whenever a frame is received from a3 tiob for which the entry has been removed, the learning procedure is 38a {olloned to update the entry in each bridge with the (possibly new) pay number In this way the forwarding database in a bridge is continuos# lupdated to reflect the current LAN topology and the addresses ofthe stati tat are currently attached to the segments it interconnects. The inactvid timer also limits the sie of the database since it contains only those station that are currently active. This is importantsince the size of the database inf tences the speed ofthe forwarding operation. 0 onto | sas ‘The learning proces works only ih . ors only if he total ried LAN has i (opaning) wee topology. This means that tere ones single ah beens ‘any two segments in the network. However, this condi ae es dnl igs te ed nh sme ee rove reliability, or perhaps by mistake when a LAN is © Mall paths berwen two epmems cannot exit id te eos aes ‘algorithm we have outlined since the Nooding a place woud case ent hth as learning igoperation ding the learning ahs od evi the ein dae aie in Figure 815, Cicariy if aon 10 ransmis a femme on segrenes dean ihe eating pas ten begs Land il bat ese ony in he w4orwarding database ~ station 10/port 1 — and forward a cx (the frame on segment 2 Each ofthe fames wil in tara De seseed te hee Srige aaa ety wl Be made of ation 107 pont an copy the Fe up pot nr sah of thw be ey eter ane il ts condnueny cree sloop a ono ek fa i ne ots wih dhe ets foreach pot cst psp ich fer male pats ern station, Enea alna lorthn set xt ig or raring ‘ny oo segment. As we all expan ths done by seting a : aie m4 : t . ——I} ce = ed «Fite 8.13. Effect of dual paths on learning algorithm, pte Enterprise networks Fe mda se 5 a osm Spanning tee algorithm : eninge algorithm ll th igs replat xchange i he san as bridge protocol data unis (BPDU, tas (meg lveand a nigu ene For eal ied i Peer Jamal chosen he spaning wee gost a ee ede bese ith he highs pony and the sm saree determined confirmed at replant ; ee Lathe unique MAC group ars which i ess temneen brides. As, te path cos oid fo en determined bythe irate How he desig ch eo ich each de higher he Cra, the Se een A eiges know the designated ox of he egmes stich te areatached Sa a oe a bought into service, i asim itis the vee dg ar beer ithe oo al nal nines he ag re i atom BPDU om al fis pore (and hence the sr eit regular ne itera knowo athe el ie He SS BPDU conn a mnie fel inig for ending all the identifier ofthe bridge which the bridge wansmiting the BDU: believes to be the root (itself initially); ws the path cost othe root ftom the bridge port on which the BPDU received (zero inital); the identifier of the bridge transmiting thie BEDU: the identifier ofthe bridge port foun which the BPDU was ransmi om cept of» configuration BPDU, each trig connected ee earansmited can determin, bY compar met om ewe i with ow ener, ay, he al heer iden «ones pny on i the pine te eal Hae eee tne dene rom the received fame Ih Seis gel cary on auming ithe tan ip card the received frame. Ane matnely, the identifier from the received BPDU indicates that! not the root the bsdge proceeds by adding the path cost associate with 8 wridses | 507 port on which the BPDU was received to that already within the fame. It then creates a new configuration BPDU containing this information, together with its own identifiers (bridge and port), and forwards a copy on all, its other ports. This procedure is repeated by all bridges in che LAN. In this ‘way the configuration BPDUs flood away fom the root bridge to the exter ties ofthe network and, atthe same time, the path cost associated with each port ofall the other bridges back to the root is computed. Thus, in addition to a single root bridge being established, al the other bridges will have deter ‘mined the path cost aeociated with each of their ports, Ths s known as the root path cost (RPC) and the port that has the smallest RPC is then selected ts the root port of the bridge. If two ports have the same RPG, the one with the lowest port number is chosen, ‘Once the root bridge and the root ports for the remaining bridges have been determined, the basis of che spanning tree has been established. The neat step is to ensure that chere are no loops/connections between the branches of the tree, Thiris done by selecting only a single bridge (port) forward frames fom each segment. This is known asthe designated bridge [is selection is based on the least path cost to the root bridge from the seB- ment under consideration. If two bridge ports connected toa segment have the same path cost, the bridge with the smaller identifier is chosen. The bide port connecting the segment to its designated bridge is known as the desiguated port Inthe case of the root bridge, this is always the designated bridge forall the segments to which i is connected. Hence all ts ports are designated ports, ‘When establishing the designated bridge port to be used with a segments note that once a bridge port has been selected as a root por, it will not take partin the arbitration procedure to become a designated port. The choice of ‘esignated port is thus between the non-oot ports connected to the segment under consideration, The exchange of the configuration BPDUs between the two (or more) ‘ridges involved wil allow the to (or more) bridges to make a joint decision asto the port tobe selected. “Aflet the root bridge and the root and designated ports of all otker bridges have been established, the state ofthe bridge ports can be set either to forwarding or fo blocking. Initially, since all port ofthe root bridge are designated ports, they are tet to the forwarding state. For all the other bridges, only the root and designated ports are set tothe forwarding state: the others are set to the blocking state. This establishes an active topolony ‘equivalent to a spanning tree. This procedure is then repeated at regula intervals (determined by the hello timer) to confirm the active topology o% inthe event ofa bridge failure, to reestablish a new topology. 2.5 Brides | 509 Enterprises xample 8.2 : j (©) Some st j = i : a “OL seonen st] = os & < 4 od ag > feitii ea| Segre Sa [ae o aie Figure igure 8.14 Active topology derivation example: (a) LAN topology; fed port selection; (d) active topology. (@) root port selection; (c)d + © ® Figure 8.14 Continued. go oper emma — ips | sm 8.5.2 Source routing bridges Although we can use source routing bridges with any type of LAN segment, ‘we use them primarily for the interconnection of tokea ring LAN segments, ‘Atypical network based on source routing bridges is shown in Figure 8.15(a) ‘The major difference between a LAN based on source routing bridges and one based on spanning tree bridges is that withthe latter the bridges col lectively perform the routing operation in a way that is ransparent to the end stations. Conversely, with source routing, the end stations perform the rout ing function. Cy) 18) Rosin tte hall by A Dneraon B = Sagan kone gran (C= Sogo 181, Segme! 2,82, Segre 3 = Sagner 1, BI, Seqnen 2,84 Segre 5 Roxng able ald by 8 Danan A= See | Jae age De Segnent 81, Synan 2 89, Sagan ig ole td by E Denon A= Sagat 8 84, Seman, Segre EaSeqre 584 Sgn? 82 Seen 3 Figure 8.15 An example source routing bridged LAN: (a) topology; (b) routing table entries. hapter @ Enterprise networks With source routing, a station ascertains the route 10 be follove frame to each destination before any frames are transmitted. Tht inf tion is inserted at the head of the frame and is used by each bridg determine whether a received frame is to be forwarded on another se ‘or not. The routing information comprises a sequence of segment brid segmentbridge identifiers. Routing tables for selected stations in the exif ple network are shown in Figuce 8.15(b). ‘On receipt of cach frame, a bridge needs ony to seach the routing Bel atthe head of the frame for its own identifies. Only iit i present and fj lowed bythe identifier ofa segment connected to one ofits output ports it forward the frame on the specified LAN segment. Otherwise its not i ‘warded, In either event, the frame is repeated at the bridge and, if forwarded, the addressrecognized (A) and framecopied bits in the frame status (FS) field atthe tail of the frame are set to indicate the source station (bridge) that is has been received (forwarded) by the d nation sation (bridge). Routing algorithm ‘The routing information feld contained within each fame immediately lows the source address field atthe head of the normal information f The modified frame formats thusas shown in Figure 8.16(a). Since a routing information Beld is not alvays required ~ for example, the source and destination staions are onthe same segment ~the fist bit the source addres ~ the indvidval/group (1/G) address bit = is used to ing ‘ate whether routing information is present in the frame (1) oF not (0). Ti ‘a be done since the source address ina frame must alvays be an individ address, 20 the 1/G bits not needed for this purpose. Tt Biting information is present, its forma is as shown in igure 8.16( “Thé routing informatio eld consists of a routing cnt eld and one oF rouie designdior elds, The routing control Fld itself comprises three al Fields: frame pe maximum frame size, and routing field length. In addon normal information frames, «wo other frame pes are associated with routing algorithm. The fame type inditates the type ofthe frame. ‘Source touting bridges can be use forthe interconnection of dite types of LAN segments in addition to token rings Since there i a diffe ‘maximum frame size ascociated with each segment type, the maximum, Shield determines the largest frame size chat can be used when transit 2 frame between any two stations connected to the LAN. Prior to transmitting a route finding fame, a sation sets the maxim frame sie field to the (known) largest frame size that can be used inthe 9 LAN: Before a bridge forwards the frame on a segment, the bridge ched this fila with the (Known) maximum frame sze ofthe new segment If Inter is smaller, the bridge reduces the frame size fel vo the lover value Ii this way, the source station, on receipt of the corresponding route r frame, can use tis information when preparing frames for transmission that destination. — = | Ring ilenaton ld present OND ing oaibie o a \ / \ Figure 8.16 Token ring frame format: Information field; (b) structure of routi ) position of routing information field bridge identifiers. = ‘ihin-ae the singferoute broadcast frame and the allvowtes brocdesst out the LAN and is thus received by the intended deciecuon eaten fer Enters tors [As we indicated earlier in Figure 8.15, if there are redundangy {and hence loops) in the LAN topology, multiple copies ofthe f propagate around the LAN. Ta prevent his, before any route find fre sent, the bridge ports are configured to give a spanning tee acti ‘ogy. On the surface, this may appear to be the same procedure transparent bridges. With source routing bridges, however, the spanning.ree active topotogy is used only for routing the initial sing Droadcast frames. This ensures that only a single copy of the frame ftes through: the network. The spanning tree scive topology isnot uf outing either normal information frames or the allroutes broadcast (2 ‘On receipt of 2 singierouce broadcast frame, the required dest station returns an allroutes broadcast frame (0 the originating st Unlike the singleroute broadcast, this frame is not constrained to fol spanning tree active topology at each intermediate bridge, Instea receipt of sich frames, de bridge simply adds anew route designator {comprising the seginent identifier on which the frame was received ai ‘own bridge identifier), increments the routing field length, and then bi cass copy of the frame on each ofits other port segments Tin this way, one oF mote copies of the frame willbe received bythe of nating source station via all che possible routes between the two stato examining the route designators in their routing control fields, the s0 Station can select the best route for transmiting a frame to that destinal ‘This route is chen entered into its routing table and is subsequently when transmitting any frames to that station. ‘Since the allroutes broadast frame is not constrained to fallow the: hing tee active topotogy on receipt of such frames additonal steps mu taken by each bridge to ensure that no frames are simply circulating in lo Before transmitting a copy of the allroutes broadcast frame on an out séginent, each bridge Bist searches the existing routing information i frame to determine ifthe segment identifiers associated withthe i and outgoing ports are already present together with its owm bridge id fier. If they ate, a copy ofthe frame has already been along the rovte, copy ofthe frame is not transmtted on the segment. "Note that itis not necessary to pérform the route finding operat ‘each frame transmitted. Once a route to an intended destination has ‘determined and entered (cshed) into the routing table ofa station, thi be used for the transmission of all subsequent frames to that destinal ‘Moreover, since most stations transmit the majority of their frames to iced number of destinations, the number of route Finding frames is relat eZ small Compared with normal information frames for modest sized LAN. {We pat foe yea oes ei (G3) the route (path) selected by A. “Gi) Paths of singleyoute broadcast fame E8192 BPRS RO-9BS IRS BORG RIIMREB5 Gly Padis of at-routes broadcast fraines: RG BD ORSB5-9R2-782 5. ue BYR © RISBI ORAS BERSERK 8.6 Sigler Emeric eters f= ing nants Be bude 6 e Figure 8.17 Source routing example; (a) topology; (b) spanning tree, FDDI Jed in Section 82, in sion 10 bridges being imrotoces ash powers » ae apamalng the wale tate local to a segment fom inecesail ag the ene LAN, backbone subetwors were i a eat forvarded between segment ncrced col mini Pee incsample, 2 smal out rpc establshmenteide LAN shal Se Ages and cto sneer sen in gee B38 is, servers, and so on) are COW" ‘Normally no end systems (workstations, se Z rected to backbone and they are used solely for intersegment trai. F sa rot | sar rte cn ems c= emo — Dhan 8:18 Typica estabishmentwide LAN. intercouneesing only 3 small zomber of segments in a single building, back- bones ofthe same type a5 the interconnected segments (CSMA/CD, at takes ting) are used. They are known 2s building backbones, ‘As the number of interconnected segments increases, sher® comes a point at which the transmission bandwidth required by the backbone to meet the intersegment traffic sats 10 exceed that available with the basic LAN 'ypes. To overcome this problem, backbones based on newer high-speed LAN “Spe aremset An example the Hier dstibted data interface (FDDI) “EAN. This is an optical fiverbased ring network that supportea bit rate of a... & Enterprise neoorts semyps ttcan be wed fo the imcerconnecon semen red opps ao fen hans ne ling ch 4 eT a vier oa rerun newer shen Ke 8 manuf pm Teepe prince of operation FDOT kt es nghapees Tn SONA aN 2 nae developed oy ihe Amcrien Nat renee any non nerraoa sandard 84 Sone hed on ng pao and oP i 80 9514 Te Ot te ues dua countering ooops Bens eer connec each von og and et ta ao en 90 aan a coed cab 1 va ea backbone network THEMAC oe fing an hence an ation to normal a a op ted on 3 cont epoca at equies » Surny the Fng can a Pr example, digi spec and Network configuration FDDI uses bvo counter0t fed the secondary ring, The secondary 105 2 ana tT anmigsion path or purely as 2 back-up in he Se i tna ign the primary ring A typical nebeork cOnFgwrason shown. Figure 8.19. opt ong nt sx sorely ‘Bag sto etch ion a= wae ty Figure 8.19 FODI networking components, 6 Foor | 519 ‘As we can see, there are two types of station: a dual attach station (DAS) which se connected to both rings and a single attach station (SAS) which is Miached only to the primary ring. In practice, most user stations are ached ae ring wa wirlag concentrators since then only a single pai of fibers is needed and the connection cos is lover. ‘fake LAN is being used as backbone, then most atached stations are bridges "The protocol aed co reconfigre the LAN into singe ring inthe crete of ing failure i the same as te beaconing procedure associated with SToen dng EAN. As we explained a Secon 84 if serious failure such a6 Broken abe arscs in the ring, Beacon MAC frames are isued by the station arongereets the failure. Essential, these are used to inform all other stations Pie ring thatthe token-passing protocol has been suspended until the ityecred lure domain hasbeen located and repaired. The failure domain recon of the station tha: detects the failure, its immediate upstream neigh- fen and the ring segment in between them, The failure has deemed to be Topaired when the station that issues the beacon frames starts to receive therm Tier rotating aroued the ring; that i, on receipt of a beacon frame with its town MAC addres atthe head of the frame. “Ar example ofa failure domain is shown in Figure 8.20(a) and a redon- dant ring coniguraton in Figore 8.200). In this example we assame a Break fhas occarced in the ring segment between stations Fand G. Hence Gis the beaconing station and Fits upstream neighbor. When a redundant rng is being ued, the TCU not only support the functions we explained in Section Bt wacko the means to bypas a faulty ring segment or station. Asan exam fie we show in Figure 820(c) how the faulty ring segment (lure domaln) fe identified in Figure 8.20(a) is bypassed. ‘rentially, once the failure domain has been located and reported, the selaysin the TCU of Fand Gare activated to (hopefily) reestablish contin: TDeoring If isolating the suspected faulty segment does not remove the fault the next te isto initiate the itoation of station G completely as shown in Figure B20(@); Note from these illustrations that the redundant ring dogs Pethave a direct path to the MAC unit and simply provides a means of bypassing a section of the ring. The order of the stations in a reestablished fing isthe same a that in the original ring. The basic fiber cable isdual core with potarized duplex (two-position) connectors at each end. This means that each end of the cable hasa different Sia ey so that ie can be connected into a matching socket only. This rdeens the wansmit and receive fibers from becoming inadvertnyinter- Ffanged and bringing down the total network. Asa further precaution, we cnirferent connectors to connect cach station type ~ SAS and DAS. In ee nom mith the basic coken ring, ve use special coupling units to isolate bypass) 2 sation when its power istst With FDDI,dhese are either active or passive ber devices ‘Aithough the topology is logically 2 ring, physically it is normally implemented in the form of a hub/tree structure, An example is shown in Figure 821(a). To ensure that changes o the wiring are carried ovt In 2 | | \ were ster Enterprise networks 2s Foot | sea ry Fouly gre sh col ts 20 Ring fault detection and isolation: (a) failure detection; (b) redundant ring ‘ation; (e) segment isolation; (d) station isolation. controlled way, a combination of patel panels and wiring concentrators Sed Typically these are located in the tring coe associated with eth {Hook Gra local FDDI ring i being used) or a building Gif the ring is» bi) pone). In the latter case, the patch panels are interconnected as show Figure 821(b) to create # tee structure to connect cach station ~ high servers or bridges fo the ring. ach patch panel as # nuciber of posible atachment points aso with it In the absence of a connection ata particular point, the ring is tained using short patch cables, each vith the same type of connes Muddng a new station or concentrator simply Sovores removing > patch find replacing it witha corresponding drop cable, This approach is know ‘structured wiring Physical interface “The physical intriace tothe fiber cable is shown in Figure 8.22. Ina ober ring network, at any instant, there i single acive ring monitor which ipsa bar —— ‘rearing ibe Figure 8.22 FDDI physical interface schematic. puaster clock forthe ing Bach cia iteenial Mane song, be oie ng mono wing ental Man bea coli anonsin eng en requ an as coc A as eam, Hwee seh an appre the ack fs ofan FOE) ring ne mold ree 2 i a Instead, ea ig mere has ito eee amined mang dwn coming a 80 Oa a gen) a pase locked tothe wansio ean ps aa sll dna code so 1 coming Bem eed anaton de ea ate YO sot Rha each ried itp (ee) 7 -_-sshined weight of 0 or +1 and 267 codes mect this condition. To satisty the Second condition, we eliminate those codes with few . ‘codes with fewer than two transitions ~ nce“ and io tow starting or ending with ovr consecatine eros six odes. This eaves the required 256 codewords, the first sa Tae oor the first 128 of which are apr 8 Enterprise networes 8.2 First 128 cod lewords of SBGT codeword set 87 Highspeed LAN? |! 535 DC balance ‘Awe have just indicated all the codewords elected have a combined weight Arvuner 0 or #1, For example, the codeword + ~~ +00 has a combined weight or Sule she codeword O++4~-~has a weight of +1. Clearly fa string of code aoe ch of weight +1 is transmitted, then the mean signal level at the wergeer ill move away rapidly from the zero lve, causing the signal to be ‘Goanterpreted. This is knoien as DC wander ad icaused by the use of tant: Taemersht each end of the line. The presence of transformers means theres to path for direct current (DC). aoe come this; whenever a sing of codewords witha weight of #1 8 tobe sent the symbols in alternate codewords are inverted prior to transmis scone For example if string comprising the codeword O + + + ~— isto be sir then the actual codewords transmitted wil be 0+ +# =~» 0-27 + ee crenny a+ + and so on, yieking a mean signal level of 0. At the Oot iacr the same rules are applied and the alternative codewords wil be escorted into thei original form prior to decoding, The procedure used Tor tansmission is shown in the state transition diagram in Figure 8.27(2) “Toveduce the latency during the decoding proces, the 6 ternary symbols corresponding to each encoded byte ae ransmited on the appropriate three ire pairs in the sequence shown in Figure 827(b). Ths means that the vMaodace of symbols received on each pr can be decoded independent seesthe frame can be processed immediatly after the lst symbol i received End-offrame sequence ‘The trananission procedure adopted enables further error checking to be svcd tothe base CRC. We can deduce from the sate transition diagram in Figure 827@) thatthe running sum ofthe weights aways either 0 oF +. AL Fed of each frame transmission ~ that is, aftr the four CRC bytes have sae ett mitted —one of two different endofstream (EOS) codes is ransmit- reyoorench ofthe hres pairs. The code selected effectively forms a checksum, {er that pair The prinipe ofthe scheme is shown in igre 827(¢. Th ths igure, we assume the lst ofthe fur CRC bytes (CRCA) ison pair 4: The next codeword transmitted on pair 4is determined by whether the run- ing sun of th weights on that air~ refereed tas the checksum iso +1 Tees function is complete atthe end ofthis codeword and the length of| ee ihr two EOS codes are reduced by two or one times the latency that is, Tr or 37. This means the receiver can detect reliably the end ofa frame since “Ul sgnals should cease within a short de of one another, This allows for very mall variations in propagation delay on cach pair of wires. Collision detection An example station-hub transmission without contention is shown in Figure sca. Recall that a station detects collision by detexting & signal on pair 2 Sil fis transmitting and, similarly, the hub detects a collision by the per: Enerpse networks Sen wel [remit actoos _ Soden ne ey oe wal of codewon ‘onan codeword wih wyatt iene pet fee 100 | oe Se were) FE epee ete eee eerrdae J u ‘T= eenary aybol voc Lf Pair 1 Ges @ ae an te vad CETTE EEE T on a reer es EOS elton conte Tosti slo fo cn a sae 8,27 200BaseT transmission detail: (a) DC balance transinission rules; (b) sg sequence; (c) end of stream encoding. 508. ERAT 7 Highspeed LaNs | 537 preience of a signal on pair 1. However, 3t Figure 828(a) shows, the strong. (anattenuated) signals transmitted on pais 1, 3,and 4 fom the station side ‘each induce a signal into the collision detect ~ pair 2~ wire. This is nearend crosstalk (NEXT) and, in the limit, is interpreted by the station as a (coll- son) signal being received from the hub, The same applies for transmissions inthe reverse direction from hub to station ‘To minimize any uncertainy the preamble at the start of each frame is encoded asa string of evel (as opposed to evel) symbols, thats, only pos itive and negative signal levels are present in exch encoded symbol. This increases the signal-level amplitude variations which, in turn, helps the sta- tion/bub to discriminate between an induced NEXT signal and the preamble ‘of a colliding frame, #001 d eo ‘0 ser bane dite ¥ (2) effect of NEXT; (b) preamble sequence. sier 8 Enterprise ators “The preamble pattern on each pair is known se ar of soa 8 and dc up of to evel codewords SOS] and SED. The cronies anne tedon cach ofthe thre pass snown in Figure S200) apo teem wang eG SFD codeword on each paris staggered Dy S096 9 “ge SOS ton pair Th means that te fest DE Of NS isa radon pair 4 the next on pair 1, the nexton pat eet of frame requires all three SFD codes tobe sa emg hat takes at Least fur smo errors fo cause an Ung tectable start-offrame error ‘On detecting 2 collision, a station suops transmitting. At sis point the station 28 30 Ther nation.) involved in the collisioa cease tansy the one a poces In practice tis eave easy since 961 sar ae) sane with BOT encoding, a0 gal low’ PSS ie tnis means that her ne induced NEXT Signal thre dare which, n tur enables the compleon of he om sion dete eto be realy determined lo 9 improve Wii fro oe le intrframe gap tine reduced ror 9650 989 transmis the jam sequence and tbe able to determine wh iting in order 100BaseX eadaiton tothe 10OBaseT standard a second Fas ernst saad 89 In aon known a 100BaseX, Une 100BaT which was ne aoe eating category 3 UTP cable, COBaseX was designed ‘Ct oe sre Magher quality category 5 cable now beng used in 0H De ‘nsalaiog ere itis intended for use with STP and optical ibe Sk seas rpes of wansinson medias the rg ofthe °° me oa ee tferent pe of transmission medium requires & Giherene renin to be developed s thao se with limo eB satay AC FDDL neoork. Recall fem the ast setion the PTE cable early a backbone subnetwork eine, unk JOP 7 vee aitance up to several lometer Transmiions oF DDI ey SP ary cere known as ABS sometimes writen 3 9/098 Me ni opted for we with 10BseX hs version being ks 100BaseFX. Bast comprises wo fibers, one af which i sed for wana bet Sie aon and hub and the ther for tansisions Pe between the sation. Av with 10Base, calisions are detec > (coll abs present on the receive fiber ring the me = SCO 4 ‘rant Tee frame. However, because of the adetions! Sot ‘of both Lng 2 rae tal conversion reais and the asocited optic BOE Sockets that are required per ports f the MAC unit associated the NIC is higher than that used wit type of Fast Ethernet is 100BaseT ane TODD Tonger drop cables are required 7 Highspeed Laws | 538 8.7.2 Switched Fast Ethernet swe exlind ath suc ropc weno mote Bee os eee sro a ahi mlonrere sen mip een Ne tne and ipl nn lags Secon de ee) hh ner npn mage concent we pment me: er eno of hd itn eg ect nc esas the bo The rening ope fsb bows mat census ncoontod oe hy ean fa of Cope) ith ye meee OR eS eles fal Ceca ee eae fb ee pat Fo eet al 100 Mbps dp cole Wee pe {0 tre Figure 8.29 Fast Ethernet switch schematic. harer © Enterprise networks the fourth pairs wed 0 perform the carier sens and collision dete functions With pitching hy however, CSMA/CD ist weds ft aation can tani and rece frames concent Hence, 2 i TOoBase, thee pas in each cable ae used colecvel ean a (at 1003p) in each cretion, Tn the ce of al multimode fiber cables cach ber is sed 19 21 100Mbpe over several lometer, one in exch detion of rat Since the 4BSB coding scheme i ued he Une igoaling rates 125M Tnaddiion, an active signal i maintained on each fiber condinuowa cranomitng an ile symbol during the idle period between fame. 7 osres the Fecever DPLL can mainain dock chron between suc re tame weneiasons Becave each son can trans ame simultaneous frame mg received st mull input port of thehub and hence reqire procs ultaneouly Similar wo or more frames may que the same ou Tne simultaneous Hence associated with each put and ouput ie memory ber that ean hold see fates wating to be ether proce Cpu ransmited ftp). Te rames~ memory poiters tthe the fame in pace are sted in a EO que. The contel proc then reads the pointe othe frame at the head of each faput queue In Chins the denaton MAC aden rom ts Bead, an transfers the a pointer to the al of te required ouput quve o avait transmision, Th ode ore the sane connections ode of operat othe ol LAN gpes hen the sich is ist brought into service and sequen erode intra the contol prcesor ences learsing sate This inl Uthat sd in ranspren bridges wich we dese Secon 83.1, Hel Steno the learning sa, the svich snp inte tbe onward vans aks copy ofeach rine reed fom an input ine onto al output ines. to doing dis however the conel procenor eas Ue source adres rong bend ofthe frame ar Keep a econ ofthis tgethr with he fp smber on which be fame was recehed In #routng tbe. The conta the routing ble are ten siuequeny ted o rose each rece Franel tpecge ouput por. Are can deduce fom thi tere ina soreandord ‘Einyauocted wih atch, Ak, wiha edge, the FOS at heal of {Fame i wed to chek forthe pctence of tansion errors pir fame being forwarded and conrpted mes are carded Flow control [As we cam ste from the above, under heayy load conditions i is possiblélg 4 all the frame buffers within the switch to become full. At this point, chef the control processor must discard any new frame(s). Alternatively, ‘optional feature associated with awitched hubs is to incorporate flow cont into the switch. When using flow control, should the control processor fig that the level of memory in use reaches a defined threshold, it initiates tt tuansmission of what scaled a Pause frame on all fits input port. "pede ees 2 ed ae Gnd P fs racing teceives a notification from the switch that the overload cone wed, Having sent a Pane frame, te conuel procezor none ie eek ee oe Network configurations An example (amal) network configuration that ncn switching hub shown in igre 850, Au we can sees n onde ioeinn high eve of ioughpas, the to servers ae connected del the sch ‘by means of duplex 100 Mbps lines, All the end-user stations then gain access the server through eka 1OBaeT ors 100s hus Avs pce inthe lat secon, bth these pero hub opeten the falnpierees Sng mode Hence the dpe uplink pr conscetng ech hub oe eh egg cee with ba tempura mene ad fom the with sod prom the COMA/CD MAC potcl ney ated with the shared medium hub ports. ee RH 10/100¥(CSM/CD Ha pes les £30 Example network configuration with a Fast Ethernet svitch nd 10/L00BaseT ‘apter 8 Enterprise networks 873 Gigabit Ethernet [As the name implies, the drop cables associated with Gigabit therm pera at 1000 Mbps (1.Gbps). They have been introduced ro mel seeaghpu demands ofan increasing numberof servers that bold fle taining multimedia information; examples include web pages comp {ery high resolution graphies, motion vdeo, and general audio. The te dither a simple repeater bub~ that is, one that has no memory ass with it~ ora switched hub. ‘An example application of a repeater bub isto distribute the outp powerful supercomputer (performing, sy, 8D scientific visualatont pow iued set of workstations. The main isue when operating in the rep voeaye is to ensure thatthe roundsrip delay berween any to stations sro ne. exceeds the time required to transmit the smaller allowable fi Se 512 bis The time to transmit a 5I2bit frame at 1 Gbps is 0.512 micrg crids whereas the slot tine is in the order of 2 microseconds, To over Ghat technique known as carrier extension is used. This, as the implies ensures data known signa present onthe in forthe dur aoc time and therefore a collision can ail be detected. Alternativ ee pnique called frame bursting can be used which allows moltiple frames to be transmitted one after the other up tothe slot time Te the ease of a switched ub, these ae used t0 perform similar ol the Fast Ethernet switch we showed in Figure 880. As we can deduce the figure, ital the attached hubs ae 100faseT ~of Fat Ethernet mvc vreae ewitch providing the backbone funtion must also be able to ha aren cureased load generated by the various hubs. Normally, howeven reer mecting each 100BaseT hub/switch to the Gigabit Exhernet perate a 100Mbps and only the servers that are connected direty Cegabit hub operate atthe fll sped of 1 Gbps. However since in ti cert hubs operate inthe duplex mode the sottime is mat an issues sp ecine of eabling, repeating hubs can use either category 5 UTP f with a drop cable length of up to 100m (1000BaeT) or STP cable pra The tengh ofthe drop cable is imited t 25m (100BateCX), InAs aoe reet hub used asa backbone, however, opieal fiber cable ise see drop cable lengths of up to 200;n ~ wsing mulainods Pyo00BaseSX) ~ oF up to 10K if monomode fiber (1000BAseTX) the case of multimode fiber, an 8B/10B coding scheme is wedi that i Bit grou tera 1O>it symbol. Hence, since the line bit rat Gps the line signaling rates 125 band. Apart from this, he Suerna cope of the bbe is similar (o those sed in Fast Ethernet hubs and sit 8.8 LAW protocols | 548 seer e MAC ier he kent ene es ea TSA sn i ce dara PAR OM FDDI, which s defined Tito newerk ler aor i fats aac wid LANS ate al a o the TREE 90 seve. he jou sndard shown in Figure 8 31(2) ti ols which we bine jons are listed in Figure 8.31(b) hhave described in the previous sec- co) ea le 802.2 tool ek conai ic #123 comeotanes, S23, Syoetentt oe es a en 0025 tay Chapter @ Enterprise networks Figure 8.32. Fast Ethernet media-indenendent interface, 8.8.1 Physical layer To cater forthe different ypes of media and transmision bit fates, the ‘ayer as been divided into two sublaers: dhe physical mediumpoa Hence the function of the inverse multiplexers, in addition to cal ety Js to make the segmentation and reassembly operations transparent (0 "user equipment. In practice, because each channel is set up independent they may all traverse the ISDN trunk network across different routs/path “This results in small time differences in the signals received from each chant nel. To compensate for ths, the inverse multiplexer atthe reeivng side mos perform delay compensation and resyichronization of the reassembled bi §Rream. The general scheme is shown in Figure 8.37(). “To bbiain a similar service to that provided by switched p x 64, inve multiplexers are avaliable that enable the user terminal equipment to set u and clear mule 64 kbps circuits on demand. The technique is known 44 bonding and the principles ofthe scheme are shown in Figure 837(¢). In order to set up the high bit rate channel ~ i response to a us sequest~ the inverse multiplexer at Ue calling sie requests a single O4KDpq : “chanel be set up to the remote site| Once this isin place the inverse mul Uiplexer a the called side sends back a list of ayailable local (extension numbefs. The calling muldplexer sets up the requifed number of additional ‘channels one ata time ~ and the tyo ser equipments can then exchange ‘data, During the call, 2 user terminal efuipment can request thatthe aggre ‘gated bandwidth available i either increased or decreased by seting up oF co) Gearing channels dynamically. For example if the terminal equipments are emote bridges then the aggregate bandwidth can be regulated to match the data trafic Being exchanged al any point in time. An international sndard has now Been defined in ITU-T recommendation H.221, which is concerned. ‘with the operation ofthis type of equipment i j | I 1 br 8 Emergis networks 8.9.3. Frame relay Frame relay was initially defined 38 service provided through ax, ‘Subsequently a number of telecom providers have set up networks just a frame relay service. As the name implies, with frame relay, Pexing and routing of frames's performed atthe link layer. Morea outing of frames is very straightorward so the channel bit rte can ‘ppieal rates being up to 34 or 45 Mbps. A schematic diagram of a public frame relay network is shown in Figure 8.38. ‘The customer first informs the service provider of the sites that ne be interconnected. The provider then creates a st of permanent virtual ection that interconnect all the sts by setting up appropriate routing t Gatres in each frame relay node. The provider then informs the nety anager at each ste ofthe identifier that should be put into the header frame to reach each ofthe other sites. "All frames are multiplexed together onto the link connecting the tomer interface equipment (CIE) to its nearest node, Logically, this app to the customer equipment lke a set of pointtopoint connections itelf and all the other sites, each identified by the corresponding identi "The identifier is known asthe data ink connection identifier (DUCT) aif is put into the header of each frame. Is then used by the network to rou (Gelay) the frame to is intended destination. (Sin a | tf fi fa 3 Sie ‘med 3 DN aN ‘ec homey | bone alo sevice 8.38 Public frame-relay network schematic. 8.9 Muse LAN intereonnetion teenoleies | 555° “The format of each frame is based on that used in the HDLC protocol and is shown in Figure 8.39(a). It comprises a 2-byte (extended) address, hheader with no control field owing to the lack of any error control, In addi- tion to the DLCI, the header contains the forward explicit congestion notification (FECN) bit, the backward explicit congestion notification (BECN) bit and the discard eligibility (DE) bit. These are used for control ling congestion within the network. “The DLCI like the VCTin packet-switched networks, has only loca signif. cance on a specific network link and therefore cranges asa frame traverses the links associated with a vrtwal path. When the virtual path s first set up, an centr is made inthe routing table of each frame relay node along the route of the incoming link/DLCT and the corresponding outgoing link/DLCI to reach the intended destination of the frame, An example set of entries is ‘Shown in Figure &39(b) and the related routing of each frame is ilustrated in Figure 839(¢) ‘When a frame is received, the frame handler within each node simply reads the DLCI from within the frame and combines this with the incoming Tink number to determine che corresponding outgoing link and DLCI. The new DLCTis written into the frame header and the frame is queued for for ‘warding on the appropriate link, The order of relayed frames is thus preserved and their routing is very fast ‘Since multiple frame transfers can be in progress concurrently over each link within the network, during periods of heavy traffic an outgoing link may Ibecome temporarily overloaded resulting in its queue stating to build up. ‘This is known as congestion and the additional congestion control bits in ‘each frame can be used to alleviate this condition. “Whenever the frame handler relay a frame to a ink output queue, it checks the size of the queue. If this exceeds a defined limit, the frame han ler signals this condition tothe two end users involved inthe transfer. This ddone in the forward direction by seting the FECN bitin the frame header. In the backward direction, itis done by setting the BECN bitin the header ofall frames which are received on thi link. Ifthe condition persists, the frame handler also returns a special frame called a consolidated link layer manage- ‘ment (CLM) frame to all CIEs that have routes (paths) involving the affected link, Such frames are simply relayed by each intermediate frame relay node in the normal way. ‘When the frame handler in a CIE receives an indication of network con gestion, it temporarily reduces its frame forwarding rate until there are m0 further indications of congestion. If che overload increases, however, the frame relay node must stat to discard frames. In an attempt to achieve fai~ ness, the DE bit in the frame header is used since this is set by the frame handler in each CIE whenever the rate of entry of frames into the network exceeds the peak rate agreed at subscription time. “To minimize the possiblity of wrongly delivered frames, the CRC at the tail of each frame is used to detect bit errors in the frame header (and infor nation) Fields. Then, ifan error is detected, the frame is discarded. With the \ | my Chapter 6 Enterprise retworks 8.9.4 jure 8.39 Frame relay principles: (a) frame format; (b) frame routing; (c) frame relay nematic. f= nerd odes te cannon FRCS ered ep congestion rion SEEN = bothered ox engeton ott ‘isd cagy 189 Multste LAN interconnection technologies | 557 frame relay service, error recovery is left tothe higher protocol layers in the tendeaser stations. The cost of the service is based on the actual number of frames transferred, High bit rate leased lines [A ypical large multisite enterprise necwork base! on high bitrate leased lines js illustrated in Figure 8.40, As we explained in Section 8.1, in addition to LAN (data) traffic, the network must also support intersite telephony traffic. ‘Typically, the leased lines are either DS1/TI (1.5 Mbps) or E1 (2 Mbps) or higher such as DSS (4 Mbps) and E3 (34 Mops). The multiple 6tkbps chan- nels these contain are divided between telephony ~ for PBX interconnection and data ~ for LAN interconnection ~ ona semipermanent basis using net work management within each site multiplexer. In the ease of telephony, although 2 64kbps channel is used by the PBX. for each call, its now common to use each 64kbps channel of the interste leased cireut for more than one cal. As we explained earlier in Section 4.2, there is now a range of compression algorithms /circuits available that pro- vide good quality voice communication using 32, 16, or 8kbps. This means that 2,4, oF 8 calls can be multiplexed into a single 64kbps channel giving a substantial saving in the number of channels required between sites. The technique used to do this i known as subrate multiplexing and is particularly worthwhile over costly international leased lines In the case of data trafic, a common approach isto use a (private) frame ‘adapter (FRA), These operate in a amilar wa to the frame relay nodes jn public frame relay network. The trafic benvcen each pair of sitesi allo- ‘cated a portion of the bandwidth ~ number of 64kbps channels ~ of the elated leased line by network management. A set of DLCls are then assigned to each path/route and these are loaded by network management into the routing tables of the interconnected set of FRAS. A related DLCI for each path i aso passed tothe remote bridge (or router) at each site and, once the Set of MAC addresses assoctated with each path have been learnt by the bridge, itwrites the appropriate DLCI in the header of each frame prior 10 pasting the frame to its local FRA. The role of the FRA is then to relay each frame received from the remote bridge using the preassigned entries in its routing table and the corresponding set of aggregated channels. ‘Although not shown, there isa single network management station for the total network and all the devices shoven in the figure have network man ‘agement (agent) software within them. Normally, dhe management station is ‘connected to one of the site multiplexers and a single 64kbps channel of the inersite leased circuits is then used to transfer management elated messages to/from the management station and al the other network devices, The mes sages include configuration information to all devices ~ routing table entries, bandwidth allocations, and so on - and Fault reports from the devices. In this way, should a fault develop or a reconfiguration be necessary, this can be done from a central site in a secure way. se tile ok Ste | summary ofthe various topice disused in this chapter given fn Figure 8.41. " he dig land ies legacy AN hart hen 9 ev incomeeton Terspoee) ——_Seweo ung does ‘done Foot beclbone two Highspood AN 9 = onto idge ve mip MK mins perl dope atic of large multisite enterprise network based on multiplexers and Hi Fos Bhene! fou Chavet Gigabit b/epeoms awtar Eat 40 Scher: Finally, although most private networks are rn and managed by enters to which they belong 3 punber of telecom provers Te of j ee qreetton for an equstalent private network tO be set OF within Se reder's nctwork. This then known a6 viral Pree network ( son Rode ree mea of services fo te priate Hework Dut are MSE wine caida tty eon at rs ted bythe telecom provider In general VENS ate more pe eee coe ieee) an Pate networks but they have dhe advantage tha the SCTE than Pr raced in de eeuiunent oF sa who as not concerned WA ae ees the core business of the enterprise i igure 8.41 Summary of the topies discussed in this chapter relating to enterprise networks, stfon 8.1 ‘Whats the meaning ofthe term "enterprise Bilir® enterprise sewers Exercises fpework? Describe the factors that determine Athen such networks are created ction 83 a7 ‘Explain the meaning of the following tems Feletiag to the CSMA/CD medium access ‘contol method: (i) iukipe acces, {i broadeast mode, (Gi) collision, (iy) carrier sense. Wit the ad of Fire 8.1, explain the mean hg of the term “slot dime” and how this is ‘Baise. State ow the lo time determines the ‘maximum doughpuc ofthe LAN, Sate the use of a jam sequence with the CSMA/GD MAC method and explain why a truncated binary exponential procesis wed, Explain the origin fhe hub configuration as Fechow used for Ethernet LANS. Also, with the Sidofa diagram, explain how the broadcast ‘mode of operation is achieved. ‘Two UTP hubs to which wser stations are “ached aie each connected toa thi! hub by paler cable ford fog acess 0 8 sen that ie ataced tothe tied vb, Derive ‘he maximum length of optical iber cable that can be wed ‘withthe aid of the fame forms sbown in Figure 83(a)-explain The elock efcoding method used and now the startof «new rane is detected (i how each station thac receives a frame (decerines from tke desnation address stneter the fare contents are intended forit, (Gi) the we ofthe pe/length Held Explain the meaning and ute of {) aninterace ga (i) aackot mit (Gi) anatempt iit Hence, with the si of flow dagrams, des the tamumit and receive procedures fl Dy the CSMA/CD MAC sublarer. Sect a9 810 an a 813 au ion 4 With the aid of Figure 85, explain how ie Inston af frames over the Hing is contol ‘nga token. Include in your explanation tho alternatives that ace used by a sain ree the when. With the ald ofthe to wiring configura eed wh a token ring shown in Fgsre “Splan the mesning/e of the follwing {@) hubjeoncentato, {i station coupling unit (i) trunk coupling unit. explain the meaning/se of the follow elating to woken rng (ative ing monitor, {i minimars ig latency, (ii) cae bles ‘With she aid of the diagrams in Figur inn: how the ste and end of a fra detected, i the role of ihe token, monitor, pay land yeservation Bits In the acces Sela, (G8) the told ofthe A and C bits inthe situ fd. Wit the aid of flow diagrams, expla unsmision and reception procedures fame with a token ring LAN. Include tnenning/ we ofthe woken hold times “Aswume the same operating conditions 2 in Enample 81, After period of inact tions 172, and generates a fame 1 send hic priory of thease i, and 2 respec fie deve and show in able form the fons made by each aon for fie fr ther roof the when sow is abridge diferent from a repeater? What are the advantages and disadvantages ofeach? ith the ad ofthe bridge architecture shown in Figure 812(0), explain the operation of ‘bridge inching the meaning ofthe tems (promiscuous mode, (forwarding database, 8). loge learning. ‘Wh the sid of Figure 8.12(b), explain how the entries in the two forwarding databases would be built up arming the following mes wage exchanges! to/from 3, 1 to/from 5, 2 to/from 4,210/from 6 : Vih the ald ofthe LAN topology shown in Figure 815, explain why he learting proces described in your solution to Exeréoe 810 ould not work. Hence state how the toplogy pects tobe changed. fin relation to the spanning tree algorithm, pli the meaning ofthe terms ‘spanning wee, Feat brie, the same bridged LAN topology as in Bgure 814, Determine the ative 9: ee) topology for the following _allbridges are in service but segments SI | Bedsand § have three times the desig: nated cor of segments S3 and 6 (that ‘hey hive a higher bitrate) ("the same designated costs an (i) but ide 5 hea hgh priority than the ahesbribges 821 Srercies | sex Pure 24 of the LAN to fom 465. sate the out SAA reach ston Journ Sm by As rome aor tion the sre ™ caried inthe 1 elation ved aah 80 the route disco wd i 2 re deny agin i ape meaning we of © BS LAN, i) twlerowte broad frame Hen alvoutes bonds fe Bowe igtth the aid of the L eed Ie Er 8%, expin ton ofeach pot POLO show in Wenty hel bya Hence deere how to D. Tach ure of the rouin frame header os et nay zl Section 8.6 828 3a 825 426 Feo go LAN ) Tap tg, (i) 3 geing backbone, ‘wide backbone. ing/use of got Fue 8.19, explain 5 conto a c POIOgY shown in ning/se of Patna RRmrY and secondary ale aur ngs, optic each () paeiate wo & and dul attach st oupting nig ome PRC Bane ig once Med duplex connector. — Semana With © aid of i Figure gogo the interface sa 6) asp ctphin he meaner a meaning eof {Sith bes, e stn pro the terms" FDDI, explain thy — plain the meaning of TR Gi) Tin ety tee per @ Enterpre networks cline the terms (i) maximum obtainable Tonughput and (i) the maximom acess delay ‘pshared-medium network. Hence with the of the example shown in Figure 825, sa ig clearly any assumptions you make, drive approximate forma for each in terms of te TERT and rng latency, 7, 187 lerve dhe lo time in bits for a Fast Ethernet Ub operating with dvop cables of upto 100: ‘52 bit rate of 100 Mbp. State the impli ions of your answer in felation t0 that of a Base hub, ‘dh the aid of the wiring configuration of 3 (OaseT hub shown in Figure. 8.20(a), “xplain how the carnier sense and colision Tetecton fanctons sociated with CSMA/CD ste carted out State why the ABOT encoding scheme is wed for ransmissions over each tvistedpair wire ‘Sh 100BaseT. Also explain why a DC balan ing scheme isrequite. ‘With the ad ofthe diagrams shown in Figures 827 and 8.28, exphi: (how DG balance ixnaintained, {ithe latency astodated with the SB6T encoding sequence, (ii) Now. additional erzor detection is ‘obtained by sending ane of two diferent ‘endotaream codes, (in) how the sartofstream code wed gives a nore reliable collision detection. ini the dference besteen a repeater hub and a sitching hub? With che aid of Figure £299, explain the operation of a Fat Ethernet Switch, Include jm your explanation how ‘duplex working is achieved. ih he aid of the network schematic shown in Figure 8.0, explain how a Fast Uhernet teh can be wed to provide faster access fo ate servers for sation atached 10 10/100BaseT hubs. 8.5 In reaton ta Gait Benet ep fe ouihe Principles shown in gure 89 wo feplain bow the shorter lt te plsin how ames are relayed/roued os all the network ates. Incade in your oo ation the roe ofthe fal (i), Same busing lowing feds in Dic, 95 Produce a diagram of a network conf B) FEGN, BECN and DE bit, Similar to that shown in Figure 8.80 chat Feplain the use of a CCLM frame and ch how a Gigabit Ethernet switch can be dons carried out ifaameiscorrapted imereonnectsevera} 100BastT hubs Es toa server Show clearly the Bit rate ws ‘ach interconnecting ine. Section 8.8 837 With the ad ofthe protocol framework in Figure 83, expla the oe of the Fla subayer protocol (PMD, (i) convergence, (i) MAG, Go) LL 838 With the aid of the interlayer paramet shown in Figure 8.35, explain the meant ie of (the DSAP and SSAP, {i SNPincloding the ORG and wpe fed (wy om Section 8.9 839 With the aid of the diagram of an enter network shown in Figure 8.36, expla Tntenite communications are carried out the following epes of ots gateway: (remote bridge, (i) TRAX router 40 With the ai of the diagram shown i Fi 337, sate the role and describe the oper of an inverse multiplexer. Tale in ‘desertion the principles ofthe delay sation and resytehronzaion procedures. 8.41 With the aid of the necwork schematic in Figure 838, explain how a public f relay network canbe used to create an en Drie nemerk. Hence use the frame for {842 Wi the ald of the network schematic hown jn Figure 540, explain bow both eleanor via a PBX) and dat (va a Femote blige Four) ate eteded to coveran ene Ss, pie. Incidein your explanation the oe na planation the role and (0 asubrate multpexes, i) alramereayadapter (Can the latter ako be used for telephony? e Internet Introduction ssl saw in Chapter 1 the Internet in otal network that pos fy of interpersonal and imeractve multimedia applications A wer feces to these applications by means of an end stem = normal) refer we host = whieh, rypcaly, fs a muimedia PC, a necwork computer morkwation, As we showed in Figore'1.2, the Internet comprises 4 Timber of diferent access networks which te interconnected roged means of a global internetwork. Associated with each acces ‘ mane, enterprize netwerk,site/campus LAN, and s0 bal nternewvork consists of an interconnect Fae one and internaonal, networks al of which are it aeee gether ung high bits leased lies and devices kxown 350 Fe cine operates ip a packet itched mode and Figure 91 the protocol stack asclated wi In the figure, we aame the nei Imefface ead inal oa that ate attached fo an access network comm Gate with other hots wing the TCP/IP protocol stack. AS we showed figure 511 (and explained in dhe accompanying text) tis snot abay ted togelligl network 92 Invodsction | 565 Deseton ho epicoln PD =n a I/D? HD) ‘Accs etch eco rao TCP/UDP = weramision contd ocd /iset dagen tes P lene pcos! Pet pose! me ely Figure 9.1 Internet networking components and protocols. ‘case. Nevertheless, any end stem (host) that communicates directly over the Internet ~ the email server in Figure 5.1] for example ~ does so using the ‘TCP/IP protocol stack In general, the various access networks have lfferent operational pars tmetets associated with them in terms of their bit rate, frame format, ‘maximum frame sie, and ype of addresses that are wed, For example, in the case ofa site/campus LAN, as we saw in the last chapter, a token ring LAN Wee's différeni’bit rate, Irame format, and maximum frame size from an Eibeiet LAN. This meas, terefore, that since bridges can only be used to Jmtertorinect LAN segments of the same type, they cannot be used to per. {orm the network interconnection function, Hence instead, he outing and forwarding operations associated with a gateway are performed at the net Work layer: In the TCP/IP protocol stack the network layer protocol fs the Internet protocol (IP) and, as ve show in Figure 9.1, in order to transfer packets of information from one host to another, ts the IP in the two host, together with the IP in each Internet gateway and router involved, that per. form the routing and other harmonization functions necessary, ‘The I in each host (that commenicates directly over the Internet) has a limigue Internetwide address assigned to it. Ths is known a3 the host's apter 9 The Internet Internet address oF, more usually, ‘area network identifier (net) an Foon of netids is centrally manage’ (Center (InterNIC) and each access eee nie each camps/site LAN is assigned a single nets ror crap ost atached to an access network then contains 1 ares pe access network and a unique host. As with nesds nevi fy allocated but his ce by the focal aministrator of che accel fork to which the host i attached. sche IP provides a connectionlessbesteffrt service tothe anspor abou wtgchy as we show inthe figute, i either the transmission aotocl (ECR) oF the wser datagram protoeal (UDR), Hens ‘when ei neal has a block of information wanes it inp Pe the blo Provoeel IP together with the IP address of the intended recipient Hee) IP fat ads te destination and soure IP addresses Oe (eons) er wih an indication ofthe sour protocol (TP of 9 Tae os known av an I datagram. The TP then forwards he dag to for gateway At ahs pointe datagram often Feferrea wo 282 we ncnce the evo ermsare wsed interchangeably pease eas gateway is attache o an imernetvork router and 5f smterah tne TP in dese routers exchange routing information, WED inet each router as built vp routing able whi eos [wo a |e 2 aa > |e 3 moe ¥. mM } wa ad feo tm Nee [RD Nell eae Y [ae y > [wo 2 [mi 2 a |et 3 feo 3 a [ea a [me 4 13 Distarice vector algorithm: (3 ‘outing tables. ) internet topology and intial tables; (B) derivation the router to its neighbors tothe current distance values in its own roll table and forwards a copy ofthe related updated table to each of its nei ors. Then, based on the information reeeved, if reported distance is leis than a current entry, each router proceeds to update its own routing table inith the reported distance. The same procedure then repeats with the Updated table contents. This procedure repeats for a defined numberof ter wrons after wbieh, each router has determined the path with the minimum distance to be followed to reacl all netids “Asan example, the build-up ofthe final routing table for each ofthe four routers in our example internetwork is shown in Figure 9.18(b). To avoid Fepetiion, we assume that only a single gateway/netidis attached to each renter and, as we can see, for this simple internet the contents of each rout. ing able are complete after jus two routing table updates, Jin che case of Rl, this receives the updated contents of the routing tables hyeld by R2 and R4, Hence after RI receives the first set of updated tables from them, it determines that the shortest path to reach netid 2 has a dis. tance of 2 via R2 and, to reach neti 4, the distance is 2 via R4. At che same time, R2 and Ré have themsehes received update information from their own neighbors and, asa result, on receipt of the second st afupdated tables from them, Rl determines that the shortest path to reach net 8 has a distance of 3 via R2. Note that with the distance vector algorithm an entry is updated only ifa new distance value i less than the current value. Also, that routes ‘with equal path cost values are discarded. “The final routing table of each router contains the nexthop router and the corresponding distance (path cox) value to reach all of the netis in the internetwork. Hence to route a packet, the netd is fist obtained from the (destination TP address in the packet header and the identity ofthe nexthop router read from the routing table. The corresponding line number on ‘hich the packet is forwarded is then obtained from the connectiviry table. “To ensure that cach table entry reflects the current active topology of the internet, each entry hasan associated timer and, ifan entry is not confirmed ‘within a defined time, then itis timed out This means that each router trans nits the contents of its complete routing table at regular intervals whieh, thal, is every 20 seconds. Again, fora small internet. this is not a problem put for a large internet like the Internet, the bandwidth and processing over heads associated with the distance vector algorithm can become very high. ‘Also, since entries are updated in the order in which they are received and paths of equal distance/cost re discarded, routers may have dissimilar routes {othe same destination. As result, packets addressed to certain destinations may loop rather than going directly to the desired router/gateway. Neverthlest, the routing information protocol (RIP) vhich uses the distance tector routing algorithm is till widely used in many of the individual net ‘works that make up the Internet ‘The Internet 4 Link-state shortest-path-first routing [As the name implies, this typeof routing is based on two algorithms: inka (LS) and shortest path frst (SPF). The linkstate algorithm is used to nal teach router to determine the current (active) topology of the internet 3 the cost aszociated with each line/link. Then, once the topology is knowl ‘each router runs (independent) the shortest path-irst algorithm to det ‘mine the shortest path from ite tall the other routers in the internet. Linkstate algorithm Aswith the distance vector algorithm, inital, each router knows only is Connectvity/adjacency information and, as an example, thesable entries f four example internet are repeated in Figure 9.14(a). The linkstate lgoritha isthen run and the buildup ofthe internet topology by RI is shown j Figure 9.1400) 4 Tnidall, based on the information RI has in its own connectivity tbl the (incomplete) topology fas shown in (). At regular intervals, each route broadcasts a inkstte message, containing the router's identity and is aso ated connectivity information, to each of is immediate neighbors. Hence if the example, we assume that R2 is the first to send its own connectivity infor ‘mation o Rl and this enables R to expand its knowledge ofthe topology that shown in (i). Ties followed by the connectivity information of Ra ‘whic enables RI to expand is knowledge of the topology to that shown in tii). Concurrently wit this happening, Une same procedure will hae been carried out by allo the other outers. Hence in our example internet, RE dnd R¢ wll have received the connectivity information of RS, fer this has been received, therefore, R2 and Ré relay this information on to Rl in a second st of linkstate messages and this enables RI to compete the picture Of the active topology (i) Alo, since each router has carried out the same procedure, each wil have dried the eurrentactive topology an, in add {ion determined the identity ofthe router to which each netd is attached. AC this poing each router runs the shortestpath-fcst algorithm to determine the shortest path from Mise to all the other routers. In practice, there are x fomber of algorits that canbe wie o find the shortest path but we shal restrict ue dleusion wo the Disa algorithm. Dijkstra shortest-path‘first algorithm ‘We shall explain the Djkstea algorithm is relation to our example internet topology. This is shown in Figure 9.15(2) together with the cost ofthe lines that link the routers together. The sequence of steps followed by Rl to derive the shortest paths to reach the other three routers is shown in Figure 9.15(b). ‘Shown in parentheses alongside each of the other routers is the aggre- gate cost from that router back othe source via the router indicated. Hence fan entry of (4,R4) means thatthe cost of the path back to RI is via RA. Initially, only the path cos of those routers that are direciy connected to RI are known (R2 and R4) and those not directly connected (RS) are marked FE roc lemon tom 4 | chapter 9 Te Internet @ oo ew golbock oR vote de aif a aok Seuce ent B, 14.24) 0 etal us QQ Coton dk io vin wy co NN Cost wales back 0 1 vio Ra ™ f+ Dasnaion [Pah Cot | tealo wm | m2 wm | 23 um | m2 Suc v2.80) igure 9.15. Dijkstra algorithm: (a) initial topology; (b) shortest paths from Rl to each other route 4.6 Routing algoritims | 595 with an infinite path cost value. Alo, until a cost value is nown 19 be he ‘minimum cos, it is sald tobe tentative and only when the cost value son firmed as the minimum value is it sid to be permanent. The router hen shown in bold oa sack nial since R isthe source its shown in bold and the path costs ack RI fom the tw directly connected outers (RE and R8) are shown equal © the respective line costs () Hence R2, fr example, bas an entry of @.R}) indi Ing he cons 2 wget ck Ri te dct fine HARE ‘Also, since ‘isnot connected dtety to RI, it sshon with a path Cost of nny ‘Once this has been done, she next step (i) is to choote the routes Wi {he minimum path cos value from al the remaining routers that are i eo tative. Hence in our example, the choke is berween R2 and Ra since both ae tentative and havea path cost value of 2 ~ and, arbitrarily we have choses é. This is now marked permanent and the new set of AEBTEgate Path Oot values via Ré are computed For example, the cost ofthe path from R2 f0 via Rd is 3 (1 from R2 to Ré plus 2 from Ri to R1) but, since this is grease than the curren cost of thisis ignored. In dhe case of RS, howenes the co8 of va Rd isles than the current value of infinity and hence (4RA) replaces the current entry. “The router with the minimum path cost value is again chosen from hove path cost yalue is ag that remain tentative and, since R2 has a path cost of 2, this marked perms nent and the new path costs to RI va RB are computed (il, AS we 8 {he path cost from RS to RI via R2 is only 8 and hence an entry of (372) replaces the current entry of (3,88). Finally (jx), RB is made permarch! 25 is the only remaining router thats sil tentative and, now that the ini path costs from each of the other routers back to RI are known, the routing {able fr Ris complete. In Figure 9.16 ve show the same procedure applied first with H2 a5 He source ~ part (a) ~ then wth R3 part (b) — and finally with R4 = pare (0) From these derivations we can make some observations about the agoritum 1 The derived shortest path routes adhere to the optimality principle 12 iF the computed path costs asociated with two or more tentative routers are thesame, then an arbitrary selection ean be made a5 (0 which s made permanent 1 Ifthe computed aggregite path cost from a (tentative) router tothe soutce va different route isthe ame as that via another routes, en both canbe retained. The choice of route is then arbitrary and load sharing becomes posible. Datagram routing procedures ‘The rovting ofa datagram invohes a combination of both Tinka ebiet ‘one containing the location of all netids and the other the connect information ~ and the derived set of shortestpath routing tables. These 30 ‘edi slighly different ways depending on the choice of routing method Chapter 9 The Internet 56 Routing algoritims | 597 {o) Sexe 83) =e . fz (oceear lace links tbs Raunt Comat bs ui 82 » k | wsio Ri: Nid | R_Detroin | Pah Co r we 8 | et Cy 1 recsved by RI a a ocd, 0 Gi/reid) |i Gon net 2 2 | m2 @ 1 H ei) Ra thodeinaton “Ly? |p a i 7 : — I a mw | m2 “ —____ 12: Boater [ok Go a | Be » ep | & | wail | eee wa * ata om fea i (2.2) ua Ba 4 4. Daan [ a cena tonal oe ean malas ne cfs |G n | a2 wee? kes |p— 8 are |S 52 21 4 | Re ea | RRO, 2 te ® | wane A ae Seorkatt any sewce . 1. Daogoin inte 8 fom Gt ote Fae ub dooms hele poo en 2, ond wits ih ee ooo pane top he on Ri anes owe epost oe ten 2, ge 1 cnt rk, £2 ad cand ron ei £9, od oun comer werd aoa one. ; ci lips 13 deans tfrce cal geen onda oo coach ne fave fps oGheneat 9.16 Shortest path tions: (a) by R2; (b) by R35; (e) by 4. hop-byhop routing or source routing. We shall explain the procedure fo lowed with each method using the example of a host attached to netid sending a datagram /packet to a host attached to netid 3 ‘The procedure followed with hop-byhop routing is summarized i Figure 9.7(a). Using this method, each router computes only its own routing table contents and uses ths together withthe contents of is own connectv table. On receipt ofthe packet from gateway Gl, router RI obtains the neti from the destination IP address in the packet header ~netid 3 ~ and uses it copy ofthe linketate table to determine that this is reached via router R3. I . then determine: from the contents ofits routing table that the nexchop| router on the shortest path to R3 is R2 and hence proceeds to forward the packet to R2 over the lin indicated in its connectivity table, line 1 The same procedure is repeated by router R2 ~ using its own linkstate, routing, and connectivity tables ~ to forward the packet to R3 over line 2. Finally, on receipt of the packet, R3 determines from its own tables thatthe packet is addressed to netid 3 and that this is attached to one ofits local lines, 17 LS-SPF routing exampl ) hop-hy-hop routing; (b) source routing. LLL. The packet is then forvarded to the attached gateway and from there to the destination host ‘The procedure followed with source routing is summarized in Figure 9.17(b). Using this method, once all the routers have built up a pic- "hare ofthe current active topology using the link-state algorithm, they each sting tables. Then, on receipt of apache ‘C1 in the example ~ the source router ‘compute the complete st of four 11 from one of its attached gateways RI — uses the et of tables to determine vat path othe intended destination ~ R2 and R3. The list is then inser sedan cpins Geldof the datagram header by RL and the packet forward to the first router in the path, R2, using the corresponding line numbed ‘btained from RI’s own connectivity able Hine 1. ‘On receipt ofthe packet, R2 reads from the options field the identity the next router along the path, R3, and uses its own connectivity table td vSetenmlne the line the packet should be forwarded om, line 2. On receipt o the packet, R3 determinesit is intended for one ofits focal gateways and ‘ivy table to determine the packet should be Forwarded tq thelist of routers that form the gateway C3 on ine Li Additional comments ‘Aithough in the various examples, internetwide identifiers have been used i identify each of the lines inthe example internet topology, this has been ‘done to simplify the related descriptions. In practice, a5 we can deduce the description of the LSSPF algorithm the line identifiers aswociated with tech router have only local significance and, since these are part of th Seater’ configuration information, normally, a different set of line identi is used by each router Tn our ditcusson of the mission of the linkstate me result of transmission errors. Clearly, Tupted, dhen the routing tables in each couter may be inconsstent and ong oer things, ase pckesto loop. To overcome this each inka tnessage, in addition to the identity of the router that created the message rind itt associated connectivity information, also contains a sequence numb sand a timeout value. As we have mentioned, linkstate information is dist ted by each route relaying a copy ofthe messages it receives from each 0 {ts neighbors on to its other neighbors. Hence, to avoid messages bet relyed unnecessarily when cach new mestage it created ~ at defined th Intervals itis amigned a sequence number equal to the previous numbd} plus one. Bach router then Keeps a record of the sequence number col lined within the last message it received from each of the other Fouters bonly if a new message is received ~ that is, one with 9 higher sequencd fpamber ~is a copy forwarded to its other neighbors. a addition, the exchange routing informal ‘with them. This routing information consists of the list of netids within ‘Corresponding autonomous system together with their distances and ro from the reporting exterior gateway. This information is used by a sen ignteway to select the best exterior gateway for forwarding datagrams toa ticular netid and hence autonomous ssterr ‘The three main functions associated with the BGP areas follows 1& neighbor acquisition and termination, neighbor reachability, routing update Each function operates using a request-esponse message exchange. The} messages associated with each function are shown in Table 9.1 ‘Since each autonomous system is managed and run by a different author ivy, before any routing information is exchanged, (wo exterior gateway ‘tached to different stems must fist agree to exchange such information| ‘Thisis the role ofthe neighbor acquisition and termination procedure. When two gateways agree to such an exchange, they are said to have become meh bors: When a gateway first wants to exchange routing information, it sends an Table 9.1 BGP message types that are exchanged by the BGP in exterior gateways and their meaning acquisition request message tothe BGP in thé appropriate gateway whieh Feturns ether an acpuiston confirm message or if it does not want t ace the request an aqution mse menage which includes a reason code ‘Once a neighbor reatonship has been established beoreen two gateways ~ and hence autonomous gstems ~ they periodically confirm their relation- Ship. This is done either by exchanging specific messages ~ hello and Thaar-you or by embedding confirmation into the header of normal rout ing information messages ‘The actual exchange of rousing information is caried out by one ofthe gateways, which sends a oll mua mewage to the other gateway asking it for thelist of networks (netde) that are reachable via that gateway and thr ds tances from it The response is a rutng update mesage which contains the requested information. Finally if any request message is incorrect, an eror rmosages returned aa response wth an appropriate reason code. ‘As with the otfer IP protocols, all the messages (PDUs) astociated with the BGP are carried in the ser daa field of an TP datagram. All BGP tnessages have the same fixed header, the format of which is shown in Figure 9.19. “The vero eld defines the version number ofthe BCP. The he and cade fields collectively define the ype of message while the stats ild contains mes ‘age-dependent satus information. The cedsu, which is used asa safeguard aginst the procesing of erroneous mesages, isthe same as that wed with TP ‘The avtonomous sytem number is the assigned numberof the autonomous sytem to which the sending gateway is avached: the sqpuece mumbai sed to ‘gnchronize responses to thelr corresponding request mesage. ‘Naghtr reachability messages contain only a header wi a bpefield of 5, code of = hello, and a1 = Fheardyou ‘Neighbor acuition messages have a hpe field of & the code number defines the specific message type. The hallo interoal specifies the frequency with which hello messages should be sent the fol itl performs the sume Function for poll messages. ‘A poll mesage has a bpefeld of2. The ene feld is wed to piggyback the neighbor reachability information: a code of O = hello and a code of heard-you. The source network IP addres in both the poll and the rousing update response messages indicates the network linking the two exterior gateway. This allows the cove network itself wo consist of multiple neworks with an astociated routing prototol “The routing update mestage contains the Fist of netwerks (netids) that are reachable via each gateway within the autonomous system arranged indi tance order from the responding exterior gateway. AS indicated this enables the requesting gateway t select the bes exterior gateway through which to Send a packet for forwarding within an autonomous sytem. Note that to con- Serve space, cach netid addres is sent in tree bytes (24 bits) only with the tnost significant Bbit host field missing. The later redundant forall IP adidress las pes 604 | chap 9 The Iteret Bode —> 1 so 6 Ta Gore Fuad teode | [ai Typo ~3 = Nhighbrxpiston Ciera etc” | “Gomori 1S pcsen es 2a Agustin hes De ie Be Se eges : acces ct Reda sine let of atwos NEE Se | bce pray) Cas Titeesoae ‘ae Le age NER BE ‘soci om goewoy 5 fndierceadst = Ruin ve Figure 9:19 Border gateway protocol (BGP) message formats. 9.6.6 Classless inter-tdomain routing As we explained earlier in Section 9.4, each IP address is 82 bts in length and is made up of a netid part and a hostid part. The allocation of netds is cen- “= trally managed by the Internet Network Information Center and, in order to Utlize network addresses efficiently, the number of bits used for the netid part varies, As we shoved earlier in Figure 9.5, the number of bits is deter- ‘mined by the address class: Class A: netid = 7 bits, hostid = 24 bits Class B: netid = bits, hostid = 16 bts Clase C: netid = 21 bits, hosid = 8 bits In thin way the manager of a network wth many atached hosts can be attocated a cass A adres, one with a small numberof hosts a clas C adres, and the est aca Bares In pracice, howe when requesting an IP address, most network man agers opted fo a class B adress since they considered a dass C address wth jt 256 hos too small and acs Aaddes with 2" hostids too large. As Fesule, even though there were plenty of netis available with class C ‘ese, shore class B adresses was predicted To resolve this prob- Tem, an alternate ope of routing (which essentially bypases the fixed Alvtions aociated wi each clas) known as clales interedomain routing (CIDR) was introduce. Iti deine in RPC 1519. ‘As we sain Exanple 9.1 there ate over 2 milion cass C addresses and hence the primary aim of CIDR was to explit ther sage in a more ef tient way Fo do this with CIDR instead of using the fixed netid/hostd ‘boundary asotated wth cas Cadareses, the boundary is made variable and dependent on the number of attached hosts specified bythe network toanager making a request. For example, ifthe manager ofa new network to be connected (o tae Internet estimates that the number of hosts may to to, tay, 100, then a contiguous Block of 1024 (2) class C addresses, Bane "The slleratve CIDR inetod was introduced relatively recently (pose 4966) und, by that tine, the general Internet achitectre had grown to that wre showed ealicrin gure 99. Hence in order to reduce the amount of Touting information exchanged by exterior gateray, twas decided to aban- {ton the fed etd /ostid boundary and instead introduce a hierarchical Structure that refleced this achitctare. Remembering that al lass © Mreuesstartwith 10, the range of address avaliable (in doted decimal form) i from: 1920.00 through to 225.255.255.255, Der 9 The taser Geary, some of shese address had alteaty heen allocated. Hfened allocations to rhe networks in the different continents are as follows: Burope: 194.0..0 ehrough to 195.255 255.255 North America: 198.0..0 through to 199.285, 255.285 Central and South America: 2000.0.0 through es 807.258.286.256 Asia and the Pacific 2020.00 through to 208.255.255.265 ‘The remainder of the addresses are hel ia reserve ‘As we can deduce fron chese allocations, the frst bye in the dest IP adress indicates the consinental backbone to which it should be Hence the couting of packets across the global backbone newwork addresses that are inthis format is relatively straightforward. For exam Any netid that contains 194 or 195 (in dotted decimal as it Sst (dot ‘decimal number indicates the packet should be sens 10 the European b bone, However, te absence of fixed division point in the remaining 24 means that each router in the backbone must be informed of the re ned/hostit boundary before it can route the datagrain ay further. ‘The approach adnpted is similar to that we described earlier in S 9.4.1 relating to subnetting, As we suv, with subnetting the hostd eld isi divided into a subnetia part and 2 hostid part with no fixed bound between them. Instead, the division point is indicated by means of an sash which contains binary 1 in al) those bit postions that contain the neti (and neti) fields Ina similar way, an addres mask is used 1 the bowndary between the netid and hestid parts of the new el addresses, Each exterior gateway then contains a copy of the addvestm ‘each of the networks within the autonomous sistemas that are attached d together with the base address ~ the netid ~ of the corresponding networ In this way, an exeerfr gateway, an receling-a packet, reals dh \ion IP addres from the parker header and then performs the log ‘operation om this and the lit of address masks that it contains, On d 2 match ~ ats the resulting net is the same as that stored with the eo sponding mask - the exterior gateway uses the neti and the related igen gateway protocol to route the packet to the appropriate interior gotens ‘The packet is then passed on 6 the related acceas network gateway by tne Interior gateway. AAs we can deduce from this, each interior gateway in the related dutonomous system must ako contain a copy of the address masks of the nev ‘works within that system. Also, each access gateway has a copy ofits oem aditress mask and, by using this it first extracts the hostid from the desing. ‘ton IP address and then uses this to route the packet ta that hast. Finally as we can see from Fxample 4.4, ic possible for a number of hosts associated with a network whick tas Been allocated a large block of addresses to produce amatch with « mask relating toa network with & smaller block of addresses. Howe, since a) network masks are tested, this wl ein addition (0 the match relating to the mask with the smaller block of addresses, Should this happen, then the matk with the smaller Block of ‘addresses ~and hence lager muunber of Is in its adress mash, ~ is chosen ag ‘the most probable match, a ie ee 1gaL000, 10a 0001/00 9 The Internet 9.6.7 Tunneling Inthe previous sectio jnternetwork operate ina connect ied routing protocols. Ia practice, however, this Showed earlier in Figure 9.9 and explained in the accomps Internet is made up of many separately manages Aihich, in some instances, se'a different operational mode and; from the I, or example, considera small enterp which hove LANG tat operate using the TCP/IP stack, but only one of she the Internet, Also, for cost reasons, aoe aero aang a leased Tne to connect the two site LANs together, a pubic operates in a connectionroriented Sites hasan access gatevay connected t0 (or private) data network is used that re a ec rom he IP Ce 0 posse © eee ublic data network and instead a ea eed gre 9.20 sts hi appro esd own 8 ‘enamel, oes sa the I pr tvanafer each IP datagram directly over the technique kn "As we can se, in order (o link the two sites toged nultiprotocol route is connected to each site LAN tnultprotocol router operates using two different prot sen nck on the site side and the protocol stack associated with coer onthe other The IP in each host simply treats the muliprotocol sos we have assumed that all networks within the global tionless mode using the IP and its associ is not abrays the case. ASWe anying text, the id networks and internetworks /or protocol rise consisting of two sites, both of etal ina router the se Internet aces gatevay To send and reccve packed fom hota sener for example= tats connected tthe Interne BEB Siaphy sends te packet to he muliprotcol router vag for example te ARP asrially ike TP in the source router is given the (aor) neck addr othe mulipotoeo| route atthe remote ste by netrork manage: ett On recip of te pack the IP inthe source router, on determining that he ned the deination IP ades i not forthe st, looks up the Tinh network address of the remote router and pases thi, together th wer dragean the nework ae protoolasocsted wth the fom net oa Te ner eau the éatgraas ser data and proceeds water the Snagram othe peer neterk bye in the emote rier using the protocal seer tine som neework wih te daigram enespelsed ina dala packet Felting othe network ayer proto ‘On cept of the data pachetby the peer nebork lye protoea inthe remote routes the wr data the daagram~ contained win it paied > the IP The IP st determine from the desGnaton IP address thatthe ‘Ripined hots notatached tote site LAN and hence proceeds o send the Tet io the IP inthe Imternet aces gateway using for example, the ARP. Feces procedre i flloned in he errs directo to tafe the packets aerkag the rated reply menage. Thos, he presence of the non net Serksueparento the Fin exch host and the acces gateway. Ti addidon w uaing tannlingo ansfer an IP packet over a non-P net wort the sme technige istsed bent an IP packet over an TP network AS we ehan pend upon Seaion 9611, cnneling i wed by an IP router t0 Tehaya pocket that contains a meleast destination address oa different 0)? Bat as hale muleat packets Normally the IP addres of thelr ‘eurcic mules outer shown Salle ober routers and, on recip ofa Mert wth muldeat addres, he source router encapilates the packet Fiat new packet withthe IP adres ofthe mala router athe deine Son I addres, Broaticast routing ‘As we explained in thé last chapler, LANs such as Ethernet and token ring ‘perate bya station/bost broadesting each frame over the LAN segment to ‘nhich itis attached. The frame is then received by all che other stations that dre attached to the same segment and, by examining the destination (MAC) ldaress in the frame header, the network interface software within each host an decide whether to pas the frame contents on to the IP layer for further processing of to diacard the frame. A frame is accepted ifthe destination MAC address is the same as its own individual address, or is a broadcast ‘address, or is equal to one of the group addresses of which the station is 2 ‘member: For a bridged LAN, this mode of working is extended to cover the total LAN by each bridge relaying ll frames that contain either a broadcast a pulticast address on tll the other LAN segments to which the bridge s ‘er The Ineret attached. In ths section we explain how broadcasting is achieved at che Tayer and; inthe next section, how mulcasting is achieved. "ae identified in Section 94, there are a number of different pes 9 IP broadcast address: ta limited broadcast: this used wo send a copy of@ packet tothe [Pin al ‘he hosts that are attached tothe same LAN segment or bridged LAN. sre neve thi, the destination TP address iret to 255.255.258.255 256 ‘Neither subnet routers nor acess gateways forward such packets ta subnetdirecied broadast this is used to send a copy ofa packet tthe BP inall the hosts that are attached to the subnet specified in the vNeatwation IP address. To achieve this, the subnet mask associated with qeepnet must be known and thisis then wsed to determine the hostid parc and sell these is oI Sach packets are forwarded by sbnet asters but only ifthe destination neti is different from the souroe re they forwarded by acces gateways, interior gateways, and if necessary, exterior gateways: im netdirected broadcast this is used to send a copy of a packet to the IP in} wh une hosts that are attached tothe network specified in the nev part ‘tne deatnation IP addres. Such packets are forwarded by subnet outers but only ifthe destination netid is diferent from the source neti dre they forwarded by access gateways, interior gateways, and, If necessary, exterior gateways. “Thos packet wih netairected broadcast addres whose desi ned ifrnt fom the oe etd ay ned Be formar 0 wet ort Sine te desnadon nei known, howe en aoa ere route by ncioe and neces extesior— 3 Co a tien rato apo tare ae ed brndcas adres none desinaton neti der i id Ao, ce wih submetdreted bros adres a att the source and deanationneoort have 3c a mat then they to can ie the cat rong grt Rep dress The later then broadcasts the packet over this subnet. Wit Ans liiseeted broadeast, however, this is not possible and the unans “Jueston is how the paket is roadast wo all the subnets belonging to A ctwork specified in the netid part ofthe address ‘Sue tation ito use flooding but, as we concluded atthe end of Seti 9.62, chs has very high bandwidth overheads associated with it Two alt ne approaches are employed, the choice determined by the rout Sigoritm thats sed to route unicast packets over the network For de sree purposes we shall we the example of large ste/campus network Comprise a large numberof subnets all interconnected by subnet row a seman to 2 Routing algoritis | 612 “The aim of both algorithms is then for the arriving packet with a netdirected Thee peat be broadcast overall he subnets using # minimer amount of bandwidth Reverse path forwarding “his algorithm is wsed primary with networks that use the does A Tov) algorithm to route unicast packets. To explain the oP a5 0% of the (petits we sete nework topology shown in Figure 9212) ‘We assume igri er I (Sl) loa a8 he (ingle) acces gate for = ne Serk and that all subnets (SN) are broadcast LANS sans enc DV algoidim we explained in Section 9.6.8 in 00008 anna eis dering te shortest pbs reac subnet he} ce car ae ort path to each each ofthe other subnet rome, 7 oer a oe inal and fal rousing ables but ap by ech STS: Boh doe ng meri of hop cour) re dbown 0 Fgure 931) (oe aang ables have been erent, the reverse path for arg igor wed to route (aden) packets works 8 follns. 7 2°04 ofa et datagr, eT in each vet router (SR) cone PTS able Peery forwards copy afi ont cach of the ports ofthe Sox the rt the packet arsed on = ifthe packet arsine rors 2” that is on the aoe eth fom SRL to the SR that x procesing the packer NS spomthe packet is discarded. Based on tis simple rule he path followed by aor cepy of an incoming packets shown io Figure 921(0- cory ze, on rept of a packet SRI broadcasts 2 copy of Hs NN Hence a copy ofthe packers received by he I a SE san une On eceting he packet he TP in SR2 st oot aaa irand determines fom the (ies) exty nthe able i St (rom vrei packet was recived) ion the shortest path ack to Similarly hl np Se cons its ong able also determines that SY, (Fo win he ckt wa rece) ialso onthe shore path back 9 SR ee ee nd SR ae shown in bold in the igure and each proce to ‘broad Both he phe SR2 onto SN2 and SNA, and SKA nto SS cop fe Pd an of broadcasts, on receipt of scopy of he Foss Ae ae So determines fom it routing able that SNB is 08 he AE si back to SRI Silay fo the copy SRE receives {Pe ‘SRE via SNA. Path ae SRS and SRS aie shown n bold and proceed a Deeaacaa UY Here pocket, SRS ont SNS and SNS, and SRE onto SNS, NT, and SNB. aon the ease ofthe packet received by SRS from SAW 'SN7, SRS However i at SN7 is maton the shortest path back to SRE Betsy SRO tong this path i notshown in bold andthe arriving packs discarded. ne a cedure repeated by SRG and SRG after the Te of ron a Nek ben received but tht ime only SR6 determines 1S broadcast tha SNO ison te shortest pat back to SR ane proceeds t0 coat ae py ofthe packet onto SNB, The copies ofthe packet received sapar 9 The internet a a st se sts eas ost ata a ts 2 2) a ze wo afha ata uw 21 Reverse path forwarding: (a) network topology; (b) distance vector routing ing a hop-count metric; (c) broadcast sequence. from SRO by SRS, SRA, and SR6 ae ll discarded asthe related sal SN7, and SNB—are not onthe shoret paths back to SR. Als hl received by SRS from SR6 after the fourth broadeast. ‘As we can deduce from this example, a copy of the packet is broad overall the eight subnets that make up the network and only SN7 avd receive two copies. However, since both copies of the packet have she ‘alu in the identifier Geldof the packet header, the second copy can be ‘detected by each of the hosts on these subnets as a duplicate und fs caren, NNote also thatthe same set of routing tables can be used to perform the same algorithm ifa second (or afferent) SR acts as an additional (or alternative) access gateway. Also, ithe broudcasis over the source network, Spanning tree broadcast With ators that oaing orth bated on ek tate lord, ealerate wy of curing eat eke teak grt, ie oe he nat rman cick gga ih router Tid beac gaan a ves Stun 5 the mon ated as pro he tine sate agethn ket each er done ee the interno Ina intr ay rele ee ey ot Imlipl bnew trend auntie eke eee Up invledge ofthe saret ace tool eke see aa Wlto compe tonya tones ae eat ee Hence ith he spaning wee bondeat age subnet our comping tie shone rae ea on each ing uce opt ont terre sce onto eae he ae) spa Aron we deed in Scion B31 Nese ee ame he inthe oder molten cine sk amg weno fonety ding tpn suet hh ae ge TAN, Tk Sela port Alor at sr ero age oP or tino the warding ste sa alte ses pare Fas ze then ‘Seating ce) se Unig the mime approach ne can dere a spanaing we byscting | ‘loaed ss eter prints fren nck see eens fing he neton topelagy ve honed ie a ream {sor ne deeibdin Scion S81 tno ena oe te root cach il ere he peng eames Ba reng winionsqucnce econ one eS Wetun ates munber afabcsnons ar na '§ For consistency, the port numbers astociated with each subnet router are Setermined by the (known) identifier of the attached subnet © Bach SR has arooiport (RP) associated with it which is the port with the shortest path back tothe root. The path costs inthe example are based ‘8 hop count and, in the vent ofa te, the port with the smallest port number is chosen 9 The Interne veoeot ——————> NY, £22 Spanning tree broattca snet router; (e) broadcast sequence, 4) network topology: (6) spanning tree d For each subnet, there ia designated pore (DP) whicl ‘on the shortest path from the root the subnet In the SR with the smallest identifier is chosen. All router ports that are not root or designated ports (DP) the blocked state 1m Onlya single copy of each received packet/ cach subnet “The samme spanning tree can be used to broadcast different) SR acts 38 an additional (or alternative the broadcast is over the source network. datagram is broadcast 1 packets ifa second ( acces gateway andi 9.6.9 Multicast routing [As we explained in Chapter 1, applications fencing Fequite a copy of the information 6 sana conference toe sent oll de bet oss a Meg aa ere erm mueatng sea to seb he SA a reese dang generated by cach Bow ll (Me Pe soP Mh tea mult group is aed to ident te Boss as eT Pet af the same conference. Clearly, there can De many Conte pare ke voncurey, each involving a different grouP of POMS 16 ae icp that das D mules aaaresses were Gene aeons tn rygare Od end explained inthe accompanying e502 °0EE ey ata ued to ideal the hosts dat are members of co multicast group. Also, since 28 lable, many different molticas groups canbe in place cone ‘umber of mulicastaddreses are reser For example, al the boss (and subnet routers) broadcast network are members of the group with the address of 2240.0.1 Hence the IP in all hosts that can *PP&" fulicast address tabl such as audio- and videoconfer- emerated by cach host a to identi pec GOP" to cre ached to 2 ules ve aT) Weill have this address permanently in their mm a waned packer be receved with this addres, che datagram conv Be heme to and acted upon) bya related application proces SO Chapter 9 The ntinet ‘This approach is acceptable providing the number of participating hol is relatively smalland the composition of the conference is static. Hower for applications sich asa conference or mecting which is being transmit cover a LAN or the Internet, a relatively large number of participants hence hosts ~ may be involved. Moreover, hosts may wish to join and/or lal the conference/meeting whist itis in progress. I is o meet this ype of appl cation that multicasting using IP multicast addreses is used, ‘With this mode of working, the organizer of the conference/mecti first obtains an IP multicast address for it from the Internet assigned numbef ‘authority (ANA). The allocated address is then made known to all the re tered participants together with the conference/meeting start time and il likely duration. Eich participating host can then request to join the conte fence at any ime during the time the conference/meeting is in progress 7 do this, wo operating scenarios are used which depend on whether the pal ticipating hosts ate all attached to the same LANY/subnet or, as is more are attached to many different networks that are geographically distribute around the Internet. We shall discuss each separately i Ehene group deus ( 10000008 ] 00000000, 3260? micas ads ‘Multicasting over a LAN The IANA has been allocated a block of Ethernet MAC addresses for appli tions that involve multicasting. As we described in Section 8.8, Ethernet MAG addresses are 48 bits in length and the reserved block of addresses in dotel decimal are from 0.0.94.0.00 trough to 0.0.94.255.255.255 Vn te sis ae wed fr mabasng Hence, meni 1 tal engl sna ene pop fos) srs a SS tian eo ere Sree or coal al teen || ir niet oper om beets. Letadtnon deh e004 58288 | eens Semana ‘Thus for a partcularconference/mecting, a Sbyte aiddress in the range rates ble. UNA ers opm ovony 0.00 through eo 127255.256 polies oe Is allocated by the IANA. In the case of an:Ethernet LAN, this forms the lef Signiticant 24 bits of the 4Bit dosti three bytes 128.094 ~ and, it the case of the Internet, the least significa 24 bits of the desination IP multicast address. As we explained earlier, D IP addresses are 28 bits in length - the first four bits being 1110 ang hhence, as we show in Figure 9.28(a), the four remaining bits are all set 100. So to join a conference/meeting that is being broadcast over the s LAN, once the multicast address is known, the application process running i ‘lticasting over a LAN: (a) address allocation principle; (b) address usage- sociated with the ~~ the host that is managing the information associated WO) conference meeting simp loads the allocated TP multicast addres [90 MAT and the related 48:icEthernet group address deriv /meet- _pemp es ale (GAT Each agra rng the conference/ jon IP address Fog then has the allocated multicast address in the destination TP 29 Ty Leet field of che datagram healer. Bach packet is them broadeast over the LAN, ‘an Ethernet frame containing the derived 4825it group address in the des tion MAG address field of the frame header, ‘On receipt of frame, the MAC sublayer in each host that isa member the same multicast gronp, first checks to see whether the destination eres inthe frame header is present in its group autdress table and, iis, ‘passes the frame contents the datagram = on tothe IP layer The later fi ‘erermines thatthe destination TP adress ea multicast address and also ics present in ies mulkicact address ele. It therefore passes the infor contained within the datagram on to the related application process via TCP or UDP. This procedure is shown in Figure 9.23(b). Mutticasting over the Internet ‘When the hous that are part of a multicast group are atachee! to differeng epvorks/submensevks geographically distiboted around the Internet, then intermediate subnet routers and/or interior/exterior gateways may bel involved. Thus, since an LF multicast address bas no strueture ~and fence no netid ~ associated with i, dilerent wpe of routing from that used to route unicast packets must be wed. ‘The sequence of steps followed co roae a packet with @ mulcast address {sas follows: BA router that rap mone pockets containing 2 (destination) TP mubicast auddress ison as a malicast router (earouter) 1% Normally, in the case ofa nerwork that comprises multiple subnets inggreonnected by subnet routers a single subnet ronter als acts asthe router for that network. = Eck mrouter learas the st of multicast group addresses of which all the host actiched «the ncworks which dhe encour serves are currently ‘members. = The information gathered by each mrouter is passed on to each of the other mrouters so that each knows the complete ts of group addresses ‘hat cach mrouter has an interes in, On receipt ofa packet witha destination IP mulucast address, each router ses an appropriate routing algorithm (0 pas the packet oni) (0 thove mrovters that ar attached to network which has an attached host that isa member of the mulicast group indicated in the destination IP adaess fle [As with beoalcas routing, two diferent algorithms are used, the choice ever mined by the rousing a}gorihi that iy used route unicast packes. The aim of both algorithms is to minimize the amu of transmision band width required to deliver each mutieast packet to (hose multicast romters that 9.6 Routing algorithms | 619 zhave an interest inthe packet. To explain the to algorithms, we shall use the Internetwork topology shown in Figure 9:24(a) The letters by each multicast router (MR} ~ A, B, and C-indicate he matticae adess(es} chat each has an interest in and, since all MRs exchange this information, they ech have @ ‘copy ofthe multicast address table show in Figure 9.242). DvMRP ‘When distance vector routing is being used, an additional set of roving, tables (10 Hise used to route unicast packets) based on MRtoMR distances are derived and, for the sie MBs, these are given in Figure 924(b). They are based on x routing metric of hop count and have been derived wing the samme procedure we described earlier in Section 9.63. Together with the con- tents of the MAT in each MR, they are used to route all packets that have a Sessinavion multicast address. i desl i [ Nios ane x 8 ® MRL MRS is RD MRS RE ag MRE ae Nie MY Ne me ws ms va Jn 1) 22 2127 afar 5] 30 e{s = dsoace fogs = Figure 9.24 Distance vector multicast routing: (a) example topology and multicast address: table; (unicast routing tables of MRA-6, ° Chapter 9 The Internet ‘The protocol is known as the distance vector multicast routing prot (DYMRP). To explain how it works, assume a packet with a multicast add ‘OF A is received by the IP in MRI from one of its attached networks, sequence isas follows: The IP first consuls its MAT and finds that a copy ofthe packet should be sentio MR2 and MR6. It then proceeds to consult its touting table (RT) and finds tha the shortest path to MRE is also via MR2 and hence sends just a single copy ofthe packet to MRE. On receipt ofthe packet, MRS consults its MAT and sees that a copy of, the packer should be sent out onto its own network and also to MRI and! ‘MRE. On consulting its RT, however, it finds thatthe shorcest path to [MRI is on the line/port de packet vas received and hence it only sends ‘copy of the packet to MR6. The RT indicates thatthe shortest path to MR6 isvia MRS and hence it forwards a copy of the packet to MR3, 1% On receipt ofthe packet, MR3 determines from its MAT that MRI, MRE, ‘and MR6 should be senta copy ofthe packet. On conscling its RT it Finds thatthe shortest pach to both MRI and MR2 is via MR2. Fence, since this the line/port the packet arrived on, it only sends a copy of © 9.6 Routing alortns | 62 Mako odds tebe AT te | Heo adden v] AB 2] Rac a) ge a}o¢ seed ef 8 Not 1-8. glob In eri Tne ook ved os pat rambo in he devoten ihe eoming fee 8 ‘TVIMIM the packet to MRB. ja ae Sponge Paned soon tes, ne kr "= On receipt ofthe packet, MR determines from its MAT thata copy ofthe sed by 2058 och meee Shere packet should be sent out on its own network and also to MRI and MRO. However, since the shortest path to both MRI and MR2i via the ine/port {the packet arrived on, itonly sends copy out on its local network. MOSPF hel inkstate routing is being used, since each MR knows the eurent active opolgy ofthe Internetwork, a8 we explained in Secion 968, each Computes a spanning tee forthe internetworking the algorthn described in Section 81, For example, for the interneork shown Figure 925), the spanning ee computed by each Mics shown In Figure £225(0). The numbers shown by each line ae sed as global ne Mens ands port numbers inthe dertaton ofthe spanning ee ‘A any poi in time, each MR knows from fy MAT the mutica address that ach has a interet in or each adress Band Cin the trample ach MR proceed to produce a prune spanning et by tenor ing selected tins For the iternework shown in Figure 92948), the pruned spanning trees produced by cach MR for each of the three multe , arses aes shvm in Fgure 92500) For each are these sre proce by starting» the tip ofeach branch of the base spanning ee and pruning eat ine ha doesnot form path tack io the rot fortis addres, Packets are then only forvarded on tose lines that make ip the resuling promed spanning tee, The protocol iow atthe muldcast open shortest path frst (MOSPH) routing protcel fe 9.25 Spanning-tree multicast rou (0) set of spanning trees fc (2) example topology and multicast address ‘each multicast address. and, to explain how it works, assume that a packet with a (multicast) address OFA is received from a network atached to MRJ. The steps followed by each (MR ae as follows: On detecting the (multicast) address in the packet header s A, MRI uses the pruned spanning tre for A to determine that copy of the packet ‘should be sent to MRE. On receipt of the packet, MR? first determines from its MAT thata copy ‘of the packet should be sentout onto its own network. It then usesits ‘own copy of the pruned spanning tree for Ato determine that a copy of the packet should alo be sent to MRS ‘= On receipt ofthe packet, MRS frst determines from its MAT that it has no interest in the packet. It then uses its own copy of the pruned spanning luce for Ato determine that a copy of the packet should be sent to MR6. On receipt ofthe packet, MRE frst determines from its MAT that a copy ‘ofthe packet should be sent out onto is own network. I ther uses its ‘own copy of the pruned spanning tree for A to determine that itisat the tend ofa branch ofthe tee and hence discards the packet. Chapter 9 The Irtermet 9.6.10 45 IGMP “The two routing algorithms we described in the lst section ~ the DVMRP -MOSPF = both assumed that each multicast router has stored in Addressable the complete list of multicast addresses that are current in land also the multicast addresses that each multicast router has an interest ‘Ar we explained, the contents of the MAT are obtained by, frst, each mm outer lesring the st of multicast addresses of which all the hosts attached the networks/subnets which the meouter serves are currently members Second, this information is passed on to all the other mrouters. Cleary th fccond step can be carried out using a broadcast procedue simi to that in the distance vector algorithm to dsuibute networkowide routing inform: tion. Hence the unanswered question is how an mrouter learns the mul nudveses associated with its own attached networks/ubnets. In practic, this the role of the Internet group management protocol (IGME) which we iden fied earlier in Figure 9.2. The IGMP is an integral part ofthe TP layer inal hosts and routers that support multicasting It is defined in RF 1112. "As we explained atthe start of the last section, an application proces (AP) within a host can join and leave a currently active multicast group at any time. To do this, the AP must know the 24-bit group addcess that has been, allocated o this group by the IANA. As we showed in Figure 9:23, the AP uses this to derive both the IP multicast address of the group and the correspond: ing Ethernet group address. It then writes these into the MAT and the ‘corresponding GAT respectively. In the case of a multicast session involving froup of APs in hoss that are all attached to the same LAN, this sal thats fieeded. In the case of a multicast session over the Internet, however, itis nec. ‘casary for the host to inform its local mrouter the multicast address of the casi that it wishes to join, The sequence of step followed to do this are show in Figure 9.26. Figure 9.26 IGMP summary: (a) example network topology; message transfer sequence to join and leave a multicast sess (c) IGMP message format other def f) Lapese 7 eommaeisye Yecieeareni Figure 9.26 Continued ‘ we ‘chante 9 The Internet In this example, an AP running in a host that is atached to net/subn ‘wishes to take part in a multicast session that has a derived multicast ade Of A, We assume that three other APs/hosts atached to the same multi router are already members of two existing multicast groups, two with a cast address cf B and one with an address of C. In. the case of B, ong attached to nel/subnet 1 and the other to net/subnet 2 and, in the case of this is attache to net/subnet 2, Hence the contents ofthe inital tables a shown in Figue 9.26(b). First the IGMP in host (A) sends out a message ~ known 28a ror the IGMP in the atached mrouter (MR) containing the multicast addrg (MA) ofthe group it wishes to join (A). In addition to the MAT tha is for routing over the backbone network, a separate MAT and GAT are tained by the MR for both net/subnet I and net/subnet 2, Hence on of the report message, the IGMP first writes the MA into the MAT and a related Ethertet group address into the GAT of net/subnet 1. Also, since ‘not already present in the backbone routing MAT, this is added cot and new contents forwarded to each of the attached MRS. "Hosts do not need to inform an MR when it leaves a multicast group regular interals the IGMP in each MR broadcasts a query message tall hol fon each net/mbnet requesting them to report of which MAS they are rently members. On receipt of a query, the IGMP in each host responds i returning a separate report message for each MA of which the host is renly a member. In the example shoven in Figure 9.26, we assume the hal that was a member of MA C has now left the group and hence a report sage for Cis not returned. Hence the IGMP in the MR removes the entail for C from its tables and proceeds to forwatd the updated table contents cach of the atached MRs “ The format ofthe two types of IGMP message ~ query and report ~is i same and i shown in Figure 9.6(c), The version field is equal to 1 and the Field is either 0 fora report message (sent by a host) or 1 for a query messy (gent by a MR). The checksum applies to the complete message and is compu using the same Is complement procedure used with the header of an IP d ram. The grmp addres isa 32-st ease D,smulicat address. In a query me {tis set toll Os and in a report its set tothe multicast group address be reported, Boh are transnited over the attached net/subnet in an TP pack swith a protoavalue of 2 and a tev value of 1. In the case of a query, destination IP aves the allnoss broadcast address of 24.0.0. and the s IP address the IP address ofthe MR. Inthe case ofa report, the two addres are the groupMA being reported and the host IP address respectively. M-bone As we explaired in Section 9.6.9 when we discussed the two multicast routing algorithms, carrently, only a subset ofthe routers that make up the Intern slobal interneswork are capable of routing IP-packets which have a multical 97 tome | 625 destination address. These are known as multicast routers (mrouters) and the network formed by the in-erconnected set of mrouters, the multicast back- ‘bone (MLbone) network, The two routing algorithms we described in Section 9.6.9 are then used to route multicast packets between the mrouters that make up the M-bone. In practice, therefore, because only a subset of the routers inthe global internetwork can route multicast packets, there may be other routes that do ‘ot support multicasting present in the physical path that Tinks two mrouters together. Hence many ofthe transmission paths that link the mrouters that form the M-bone are logical links that are implemented using IP tunneling. {As we explained in Section 94.7, with tunneling, in order to send an IP data. ‘gram containing a mulicat group address over the logical lnk that links two ‘routers together, the datagram is carried in the user data field of a second IP datagram. This has the (known) IP unicast address ofthe intended dest- nation mrouter in the destnation IP address field ofthe second datagram, In this way, the packets routed over the global internetworkin the same way as a unicast packet using either the distance vector or the link-state shortest path-frs algorithm. Then, on arrival at the destination mrouter, the latter extrac the multicast datagram contained within the packet and proceeds ¢o route it using one of the two related multicast routing algorithms we described in Section 9.69. ‘As we can deduce from this, in order to implement the M-Bone, each rmrouter has the TP (unicast) address of the adjacent mrouters tha are (log cally) connected to it stored in their connectvity/adjacency table. Normally, this information is entered by the management authori responsible for the network in which the mrouter is located. In this way, the possible presence of other (unicast) routers between two mrouters is transparent to the #0 ‘routers which simply rou (multicast) packets as if here isa physical tans sisson line inking them together. I¢MP ‘The Internet control messige protocol (ICMP) forms an integral part of all IP implementations. Ics wsed by hosts, routers and gateways fora variety of. functions, and especially by network management. The main functions assoc ated withthe ICMP areas follows 1 error reporting reachability testing, 1m congestion control, 1 routechange notification, 1m performance measuring im subuet addressing. 19 The internet ge pes associated wih each of these eons te shown Ta Oo. Each is wansmitted ina standard TP datagram. Each ig bestetfort (unacknowledged) protocol Paes a) dns le dhe are in transis arose Interne. OF cours ae ica ase but paket canbe carded by a How, Toes SE Toons Inthe absence of any ero reporting nee tor Kaom wheter the repeated faite 10 sd 8 ashes doe eal poor transmission Ke (or other ful wits son te dexinaon fos being itched of The ations meee ssc si he evr reporting function aze used fos this PUrPOSS “The mess Table 9.2 ICMP message types and their use Potente eo Echo reques/aly aquest souce gierch ae a Sestookon Deseinines te Foal dy ce eosing Tieton eaves eEY : iemesn oo Be Pessina Used by o hoo dein obs cst oaboe! ibid ekbessng Ades mos IMP ert canted mesage protec packet is dicarded for any other reas sateway that discat _Feport mesage fa packets corrupted by transmision errors itis simply discal mn, the ICMP in the host, route ds the packet generates a destination unreachable sear Runs it to the ICMP in the source host with a reasomh ‘ode. Reasons include the following: destination newwork unreachable, estinaton host unreachable, specified protocol not present at destination, fragmentation needed but don't fragment (DF) header, ‘communication with the destination network not allowed for administrative easons, nunication with the destination bast not allowed for administrative . parameter problem, . flag set in datagram sxhouphn ox cases ror ports are recived asa el of ome pe se neat et Tne crept we a ee operational characteris ote pa ouefolloved so eerie tfer ofa mesage the lb inere by 8 pack eno agmentation solved. Mow networks ra or ic maitnom transmission unk (MTU) equal t0 of aa toe Hence one way of ening n0fagmentaon hs tan Se adopts he amu se fll gras Fa aera cates, howerer, the actual MTU othe once ths would esl fo more packets place is {including the TP heat path wil be greater than this and Feing used to send each message than is necessary re ernatve forthe source IP wo use a procedure known as path MTU discovery wo determine the MTU of «path/route prior to sending any datr relating to aces cl Essel, the fst message rected rom se tanaport layer protocol relating t0 anew cal/seson is sent ina singe ‘agra with de don frognent it et. Normally if outer along the path deere the packet cannot forward the packet over an attached link wily soreagenting it the router will return an ICMP efror report wth Jonnantatan nna 0a reason code and a indication ofthe si of MTU Fear ob The source IP then adops the latter as sown MTU to end A the remaining messages relating to the call/session. aarane report messages inchude tie exceeded, wich indicates chat the tunerotive parameter in a discarded packet has expired, and poranater the th indeates that a parameter inthe beader ofthe discarded packet ras not recognized. roaree ek manager receives reports from a user that specified dest ation fot responding. the reason must be determined using the pte 9 The Internet reachability testing function which is implemented in 2 program calle pi ‘Typically, on receipt of such a report, the network manager initiates the sen ing of an echo mquest message tthe suspect host to determine whether iti switched on and responding to requests, On receipt of an echo request sage, the ICMP in the destination simply ehanges thie to an ecko rps mess which t returns to the source. similar test ean be performed on selected routers ad gateways if necessary. Ifa packet is discarded because no free memory buffers are available as result ofa temporary overload condition, 2 source quench message is returnef to the ICMP in the source host. Such messages can be generated either by hhost or by a router or gateway. They request the source host to reduce thi rate atwhich itsends packets. When a host receives such a message it reduce the sending rate by an agreed amount. A new source quench mesxageisg erated each dime a packet is discarded so thatthe source host increment reduces the sending rate. Such messages help to alleviate congestion withi the global internetwork. Congestion is discussed further in Section 98. When a network has multiple gateways attached to it, a gateway may receive datagrams from a host even though it determines from its routing table that they would be better sent via a different gateway atached to same network. To inform the source host of this, the ICMP in the gateway returns a meet messge to the ICMP in the source indicating which ist Detter gateway co the specified destination. The ICMP in the source thenf ‘makes an entry in its routing table for this destination, ‘An important operational parameter for an internet isthe mean trans delay of packes/ datagrams. This isa measure ofthe time a datagram takes tl traverse the internet from a specified souree to a specified destinaion. ascertain this time, a host or a network manager can send a timestamp ru message toa specific destination. Each message contains the following thie ‘imerelated parameters (known a8 timestamps) 1m he time the datagram was sent bythe source, 1 the time the datagram was received by the destination, ‘the time the datagram was returned by the destination On feceipt aa timestamp request message, the ICMP in the destinai sip fils in ve appropriate time-stamp fields and returns the message 4 the Source. On receipt of the feply, the source can quantify the curreal rouridtip delay to that destination and from this determine the packet 120 sit del, e Finally, when subnet addressing is being used, the addres mask rue andl corresponding reply messages are used by a host to ascertain the add ‘mask asociated with a local subnet. This is needed by a host to determine, for example, whether a specified destination is attached to the same subnet ‘The address mask is held by the local router associated with the subnet. The ICMP in a host can obtain the address mask by sending a request message and reading the mask from the reply. 971 9.8 QoS suppor | 629 ICMP message formats and transmission ‘The format of an IGMP message is shown in Figure 9.97. The first tree fields are the same forall messages. The spe field indicates the ICMP message ype land these are related to the functions we listed earlier. For example, a ge field of O relates tothe error reporting function, $ reachability testing, 4 con- sgetton control, and so on. The code field then gives additional information Such as the reason why a destination is unreathable. For example, 6 indicates the destination network is unknown and 7 the destination host is unknown, The chectsum covers the entre ICMP message and uses the same algorithm ae ‘that used for the checksum present in the IP header. The number and mear- ing of the following 32-bit words then depend on the iyheand cade fields in the header {As we showed in Figure 9.8 and explained in the accompanying text, the ‘protec field in each datagram header is used to route the payload in a date ‘gram to the appropriate protocol ~ ICMP, IGMP, OSPF, TCP. or UDP. ln the ‘case of reply messages, normally, these are for use by the loca IP. When unso- licited error reports are received, in most cases, they are passed to an pplication evel process and result in an appropriate error mesage being ‘Output on the host screen, QoS support ‘Congestion arses within a network when the demand for a netrork resource ‘exceeds the level thats provided. For example, i a burst of packets ative 2 router (within the global internetwork) on a number of different input lines that all require the same oucput line, then the output line will become ranges Peter nf fi aoe a tl Nain 9b woh ona i aap aches whe ype ad et LA ee Flgure'9.27 TEMP message format and transmission. pte 9 The Interet 9.8.1 congested ifthe rate of arrival of packets is greater than the at they Sutput To allow for this possiblity, each output line basa ist (FIFO) queue associated with it which is used 10 hold a defined nutnbe {Backes that are availing output on that ine, Hence, providing the burt paelatively short duration and the number of packets wo be queued is han the number of packet buffers available, the congestion wil be iad the only effect should lea small increase in the end:o-end wansfer aperienced by each packet using that line. In the event of a longer bu TaPtier then al the packet buffers may become full and, a a result, 30 packers will have co be discarded. ‘Similarly, at a netvorkovide level, since the Internets a besteffort nectionless network, the global internetwork will become congested if o meetnined period, the aggregate rate at which packets are entering a teenetwork exceeds its total eapacity in terms of transmission bandvi ind packet bers. As we sa in Section 1.55, asociated with each cal sefifed setot parameters which form what i called the minimum quali sence (Qos) requirements for the call. For example, with a shed setwork like the Internet, these include a defined minimum meq racket throughput rate and a maximum end-oend packet wansfer d acne (Tara revlt of congestion these requirements are not met, then ‘Matg ofthe eal may no Tonger be acceptable tothe user, This the wiih cpplications involving realsime media streams, for example, such Internet telephony. rence can conclude from the above, evo levels of congestion control ‘eqired, ne that operates atthe global intemnetwork level andthe o TT opeates atthe router level. The am of the ite co iit the aggre aan oPihich packets are entering the global internetwork wo below ts ‘alum rate, and the aim of the second is to maximize the flow of through each router. I the following subsections we discus aspects of theschemes that are used to perform these functions. Integrated services Mos early applications of the Iniernet were text based and hence rela aooe Seve ta lay and jitter. Examples include FTP and email, oth of wi amma the added delays incurred by the use of a hostto-bost retranst san omtrol mechanism to overcome the effect of los packets resulting f ‘ec peateffort service provided by IP. Other text-based applications, aoe er colevate the delay caused by retransmisions but nevertheless requ mal packet losses. Examples ofthis type of application are thos rel to network control ‘ore recently, a number of interpersonal applications involving sized speech and vdeo were introduced. These require the packets that fenersed atthe source to be transferred over the Internet and played ont eee jcaination in realtime. This means that the retransmision of lost ‘ets isnot posible and thatthe packet flow is particularly sensitive to lost pack- te and iter. Such applications also require a guaranteed minimum bandwidth, To meet this more varied set of QoS Fequirements, two schemes have been researched and standardized, one called integrated services (lnServ) and the other differentiated services (DiffSers. In this section we {describe aspects ofthe Interv scheme while aspects of DiffServ are described in Section 98.2 Tm both schemes, the packets relating to the different types of cal/ses- sion are each allocated a different value inthe precedence bits ofthe Ope of Service eld ofthe IP packet header. Ths is used by the routers within the Internet to differentiate between the packet flows relating to the different types of call The IntServ solution defines three different clases of service ‘a guaranteed in this class, specified maximum delay and jitter and an oured level of bandwidth are guaranteed. Its intended for applications Snvolvng the payout of realtime steams; ‘= controlled lod {also known as predictive): in this dass, no firm {guarantees are provided but the flow obtains a constant level ofservice {Equivalent to that obtained with the besteffort service at light loads. Example of applications in this class are those involving reabtime ttreams that have the capability of adjusting the amount of realtime data that is generated (othe level that is offered; © bestelfort: this is intended for text-based applications. “To cater for the three different rypes of packet Slows, within each router, three separate output queues are used for each line, one for each cass. In addition, appropriate control mechanisms are used to ensure the QoS Fequirements ofeach class are met. We shall fist discuss a numberof these as theve anv Used in both the InServ and the DifiServ schemes. ‘Token bucket filter “Thisis used with exch ofthe packet flows in both the guaranteed and predic- tive service lanes A portion of the bandwidth of the outgoing line and an “amount of bffer/queve space is reserved forthe packet flow relating to each SaILA control mechanism called the token bucket filter i used to enforce {hese allocations s0 that the guaranteed QoS requirements in terms of band width, delay, and jiter are met. “Asociated with each flow isa container called a buch into which tokens are entered ata rate determined by the bandwidth requirement of the ow. ‘The sie ofthe bucket is the same as the maximum amount of buffer/queve pace the flow may consume. A packet relating to flow can only be transferred tb the outper queue if there ae suficient tokens currently in the bucket. The hhumber of tokens required is determined by the packet length and if suff Tem tokens are currently in the bucket, she packet is queued and the Corresponding number of tokens taken from the bucket, As we can deduce (Chater 9 The Internet from this, therefore, providing the arrival rate of packets is less than or equ to the rate of entry of tokens into the bucket, then both the agreed bands width and delay/jiter will be met. Ifthe arrival rate of packets exceeds th BMlocated bandwith, normally these are relegated to the besteffort queue Weighted fair quexing Since the packet rate ~ and hence bandwidth ~ associated with each flow m be different, when the packets relating 10 each flow are queued for transmis sion, in order to ensure the guaranteed delay bounds are met, its necessa tocenstre thatthe packets relating to each flow are not delayed bythe packets of other flows. Hence a queue management scheme is also required to sched lle the order that queued packets are transmitted. The weighted fair q (WRQ) scheme performs tis function. Tn order to ensure the delay bounds for each flow are met, the order of transmission of packets from the queue is changed each time a new pack arrives for queuing, When a packet arrive atan incoming lin ofthe router js giten a dnestmp. This is determined from the arrival dime of the packe and its scheduled departure time, the latter computed from the bandwidth ‘sociated with the flow and the packet length. The timestamp ofthe packet is then compared with the timestamps of the packets that are currently queued and the packet with the smallest timestamp is transmitted frst. In this way te delay bounds ofeach flow are met. Random early detection ‘The requirements ofthe queue management scheme used with the best tffort queue are diferent from thone of the other two queues. As Sndieyed earie, normally, a router simply dscards/ drops a packet fhe Tequted cup queve is already fal. However, as we shall deseibe Inte Seton 123.2, with TC, each time a packet relating Wo a eal/sesion is the TCP in the ource box detects this and halvesits current rate of entry new packs forthe eal Since ths is one by al the hoss that lose packer me the nk bandwidth falls dramataly. Thisis also detected the feed TOP whch then quickly amp the rate of entry of new Thi, fur, often ress nfll quetes snd dropped packets occur ‘again with the effect that the utilization of the available transmission bani ath poe. To bop tis occurring, the random early detection (RED! {eve management scheme is often sed ‘With RED, nhen a packet arrives for an ous queue and the queve ful instead of dcarding the packet, packet that is already nthe queve i randomly tec for caring, Ths has the affect that a reduced numbe af diferenappiations are affected and hence the bandwith wlzation of the fink sch improved To implement the scheme, tvo thresholds relating tothe queue are defined: 2 minimum threshold. (MinTH) and. maximum threshold (QaxTTD, Aste average length (AvrLEN) ofthe queve is continvousy Rea ian 28 es ant | 8 ‘monitored and used as a measure of the current level of trafic using the line ‘The action taken by the scheduler is determined by the current AvLEN rela- tive to the two thresholds a follows: AWLEN routers visited along the path followed or tothe destination host. The are known as jumbograms and the format of the header is shows ia types of extension header currently defined are: Figure 9.322) i ‘Aswe can see, this ype of header is of fixed length and comprises two 82. 8 hop-b-hop options: information forthe rovters sted along a path; bitwords (8 bytes). The head exension legih ield indicates the length of the 1 routings of routers relating to source routing information header in multiples of 8 bytes, excluding the first 8 bytes. Hence inthis case the field is 0. This option contains only one option field, the jumbo paylacd length As we indicotedcarlier, this is encoded inthe TLY format. The ype for this option is 194 (71000010) and the length is 4 (bytes). The vale im the jumbo payload lengths the length of the packet in byes, excluding the main ‘header but including the 8 bytesin the extension headet. Ths makes the pay. load lengthin the main header redundant and hence thisis seo zero. 1 fragment: information to enable the destination to reasemble a fragmented mesage: 1% authentication: information to enable the destination to verify the identity of the source; , ‘encapsulating security payload: information to enable the destination decrypt the payload contents

You might also like