You are on page 1of 198
Computer Networks Computer Networks ©. 9. DOOD H HGH DHHS 6 OHO 5 0H 6 HOSS D'0d DS 7 . INDEX 2. INTRODUCTION 1.1. NETWORK SOFTWARE: LAYERED ARCHITECTURE 1.1.1 OSI REFERENCE MODEL 1.1.2 TCP/IP REFERENCE MODEL 1.1.3 DIFFERENCES: OS Vs TCP/IP 1.2 NETWORK HARDWARE 1.2.1 NETWORK DEVICES 41.2.2. cTYPES OF NETWORKS 1.2.3 NETWORK TOPOLOGIES 1.2.4 INTERNETWORKING 2. PHYSICAL LAYER 2.1 TRANSMISSION MODES 2.2 TRANSMISSION MEDIA 2.2.1 TWISTED PAIR CABLE 2.2.2 COAXIAL CABLE 2.2.3 FIBER OPTIC CABLE 2.3 SIGNALS AND CODING SCHEME 2.3.1. TYPES OF SIGNAL 2.3.2 ANALOG SIGNAL 2.3.3, DESCRETE SIGNAL 2.4 MULTIPLEXING 2.5 SAMPLING THEORAM 2.6 LINE ENCODING 2.6.1 CHARACTERISTICS OF LINE ENCODING. 2.6.2 TYPES OF LINE ENCODING 2.6.2.1 UNIPOLAR ENCODING 2.6.2.2 POLAR ENCODING 2.6.2.3 BIPOLAR ENCODING 3. DATA LINK LAYER : 3.2. SUBLAYERS 3.2 SERVICES 3.3 FUNCTIONS 3.3.1 FRAMING 3.3.1.1 CHARACTER COUNT 3.3.1.2 BYTE STUFFING 3.3.1.3 BIT STUFFING 3.3.2 FLOW CONTROL 3.3.2.1 STOP AND WAIT ARQ 3.3.2.2 GO BACKNARQ stein : a4 ¢ ° Ol H of 99° P PH? d-0- 0% ovate dO SOHO S04 Qoa000 OO SOO COCO OO M0608 OO OOOONODO OQ P22ORDGAGOO Computer Networks 4, 3.3.23 SELECTIVE REPEAT 3.3.3. ERROR CONTROL 3.3.3: PARITY CHECK 3.3.3.2 CYCLIC REDUNDANCY CHECK 3.33.3 CHECKSUM 3.33.4 HAMMING CODE MEDIUM ACCESS SUDLAYER ‘4c1 MULTIPLE ACCESS PROTOCOLS 4a. ALOHA 4.1.2 PURE ALOHA 4.1.3. SLOTTED ALOHA 4.2 CARRIER SENSE MULTIPLE ACCESS PROTOCOLS 4.2. PERSIETSTENT AND NON-PERSISTENT CMA 42.2. CSMA WITH COLUSION DETECTION 4.3 WIRELESS LAN PROTOCOLS 43.1 MACAAND MACAW 44 DECIDING MINIMUM FRAME LENGTH 4.5 DIFFERENT TYPES OF LAN PROTOCOLS 45. ETHERNET 4.5.2 THE @ASICETHERNET FRAME FORMAT 4.5.2. FRAME TRANSMISSION 45.4 FAST ETHERNET 4355 GIGABIT ETHERNET 45.6 SWITCHED ETHERNET 45.7 TOKEN RING 458° FODI 459 ATM 4.6 PROTOCOL COMPARISON NETWORK LAYER 5.1 NETWORK-LAYER FUNCTIONS 5,2 SWITCHING SCHEMES 5.2.4 CIRCUIT SWITCHING 5.2.2 PACKET SWITCHING 8.3 IP ADDRESSES 5.3.1 INTERNET ADDRESS CLASSES 5.4 IP ADDRESS HIERARCHY 5... IP SUBNETTING 5.5 CLASSIFICTION OF ROUTING ALGORITHMS 5.5.1 CENTRALIZED VERSUS DECENTRALIZED 55.2 STATIC VERSUS ADAPTIVE 5.6 ROUTER 5.6.1 ROUTING ISSUES * ———————— AS a 5.6.2 ROUTER CLASSIFICATION 5.7 ROUTING ALGORITHMS: 5.7.1 DISTANCE-VECTOR 8.7.1.1 THE COUNT-TO-INFINITY PROBLEM 5.7.2 LINK-STATE S.8 THE NETWORK LAYER IN THE INTERNET 5.8.1 THEIP PROTOCOL 5.8.2 PRIVATE NETWORKS AND SUBNETS 5.9 WHAT ISCIOR 5.10 NAT-NETWORK ADDRESS TRANSLATION 5.11 _ INTERNET CONTROL PROTOCOLS 5.11.1 THE INTERNET CONTROL MESSAGE PROTOCOL S.LL.2 ARP-THE ADDRESS RESOLUTION PROTOCOL 5.11.3 RARP,BOOTP,AND DHCP 5.12 OSPF-THE INTERIOR GATEWAY ROUTING PROTOCOL 5.13. BGP-THE EXTERIOR GATEWAY ROUTING PROTOCOL 5.14 INTERNET MULTICASTING TRANSPORT LAYER f 6.1 FUNCTION OF TRNSPORT PROTOCOLS. 6.2 SERVICES PROVIDED BY INTERNET TRASPORT PROTOCOLS 6.2.1. UDPSERVICE 6.2.2 TCP SERVICE 6.2.2.1 TCP CONGESTION CONTROL 6.2.2.1] ADDITIVE-INCREASE MULTIPLICATIVE DECREASE|AIMD) 6.2.2.1.2. :SLOW START (SS) APPLICATION LAYER 7.1 APPLICATION LAYER PROTOCOLS, 7.1.1 DOMAIN NAME SYSTEM(ONS) 7.1.2 SMTP 7a FRE - 7.14 KTP 7.1.5. TELNET-A TERMINAL EMULATION PROTOCOL NETWORK SECURITY 8.1 CRYPTOGRAPHY 8.1.1 TRANSPOSITION CIPHERS 8.1.2 DIGITALSIGNATURES 8.1.2.1’ SYMMETRIC-KEY SIGNATURES. 8.1.2.2 PUBLICKEY SIGNATURES 8.1.3 MESSAGE DIGESTS 8.1.4 THERSA ALGORITHM. 8.2 FIREWALL ———-- -—-_——————_—_—_$_—— AG oP A ¢ 00000 OO DDO © OO DCH G'04OCOLFO" 8H A O07 Ot o re 00 HWOHHBDIWADCOCAHAGAOCTCOCOVDODOOTOOOODD: Computer Networks Introduction NETWORK Interconnection of two or more thiantwo devices is called network, MP! NETWORK Interconnection of end systems (basically computers) and intermediate switch different types of communication links is called computer network. Two compuless ar interconnected if they are able o exchange‘information. * 1.1NenN F. 8: LAYERED A\ RE LAYERED TASKS We use the concept of layers in our daily life, As an example, let us consider two fiends who communicate through postal mal. The process of sending a letter to a friend would be complex if there were no services available from the post office. K: ep IN SENDING L Receiver § Tt ‘The letieriswrtten, | putinan envelope, and ‘dropped ina mailbox. The leteripicked up, removed from the envelope, and read. Higher layers The letters cared from the mailbox toa postotfie. The letters delivered to canierby the post ‘office. The letters carted fromthe post office tothemalbox Middle layers ‘The letters delved from the carrier, tothe post office, lower layers is carted from the destination. AT OL HIERARCHY Tasks must be done in the order given in the hierarchy. The letter must be written and dropped in the mailbox before being picked up by the letter carrier. Each layer at the sender's site uses the services of the layer immediately below it The two popular models of networking are OSI (Open Systems Interconnection) Model ane TCP/IP Model, 12.1 THE EFERENCE. Le Established in 1947, the Intemational Standards Organization (ISO) is a multinational body dedicated to worldwide agreement on intemational, standards. An ISO standard that covers ail aspects of network communications is the Open Systems Interconnection (OSI) model. It was first introduced in the late 1970s, 1SO is the organization, OSI is the model. OSI is a layered model for the design of network systems.thal allows communication between different systems regardless oftheir architecture. OSI model is composed of seven ‘ordered layers: Physital, Data link, Network, Transport. Session, Presentation, Application, | Each layer uses the services'prvided by the layer below it and provides certain services for the layer above it. EI Mi 1] Tesiencon [Presentation coe nenenneaiiciacsemean! Baaa | 4 Rework rf | Daan F eeeenesneee_[L ESES=E=! ESE (Cte) ‘The interaction between layers in the OSI model AG 20 O.-0'.0 £O00: 9D OO OM OlOLO-0 CO OW CWOGoDaA oooocgoa000 0” oO ¢ DARBKAQAAOQOODOOAAODAODHDTVDOTOODDDDDIDdDOD'D Computer Networks Intermediate Intermediate node node 2[apptication” pen ==- SEE Peerto-pee protocol (th layer) 6 (Presentation en eg ee [esinerace eSiner ce acs enters eine s[__Session __Peeceeeemeel She) __ s er protocol th layer) s{_Tterspor Pesaro 4 aaneriace Finterace ad xd ard 3 Network, = Network, | Network <>) Network 3 3-2 interface ‘BLinterface ind ty 2rd 2 2 Data link ri Data link Data link 2 1 Paris 1 Physical communication ‘As a message travels from device A to device B, it may pass through many intermediate nodes. ‘These intermediate nodes usually involve only the first three layers of the OS! model Layer x on one machine communicates with layer x on another machine? this communication is governed by protocols, : . ‘The processes on cach machine that Communicate at a given layer are called peer-to-peer processes governed by peer-to-peer protécols. At the physical layer communication ig direct, however at higher liyers communi move through other layers. Ench layer in the sending device adds its own information to the message it receives and passes the whole package to the layer below it. At the receiving machine, the message is unwrapped layer by layer with each process (layer) removing the data meant fori, ‘The passing of data and network information down through the-layers of the sending device end back up through the layers of the receiving device is possible through an interface between ench pair of adjacent layers. Ag Computer Networks Each Interface defines ihe information and services a layer must provide for the layer above it ‘The seven layers can be organized in three subgroups. 4 ‘+ Layers 1, 2 and 3 are the Network support layers ~ Deal with the physical aspects of moving data Layers 5, 6 and 7 are the User support layers ~ Allow interoperability’ among unrelated software systems. + Layer 4 links the two subgroups — Ensures that what the lower layers have transmitted is in a form that upper layers éan use, Upper layers are impleiiented in software, lower layers ire a combination of hardware and software except physical layer which is mostly hardware, Encapsulation is another aspect of data communications in the OSI model. ANEX( ING THI L Balsiororororor er oreaosorcao0 PABoTOTo ToT oToT oor cocOTOOEe { “Tansmission medium AYERS IN THE EL, In this section we briefly describe the functions of each layer:in the OSI model, ee ‘Ato ¢ OfOP OL0COCO9 C9 CP CO? 0-0-0 ‘ DOwWwOM oo Oo ooo0d 80000 bd C 7000 OD HD%* gz CODD OGOCOCCDDWDOO0DD 9299909 ' Computer Networks PHYSICAL LAYER “The physical layér coordinates the functions required to transmit @ bit stream over a physical medium. It also defines the following: * Physical characteristics of interfaces and medium. * Representation of bits. * Data Rate © Synchronization of bits * Line configuration «Physical topology + Transmission: mode From detalink yer Todiualickbyer Physteat Physical ayer ‘ayer oTOTOOSEOSOTONTT over dassesaTOTTT Transmission medium ‘The physical layer is responsible for movement of individual bits from one hop (node) to the next. DATA LINK LAYER From netne yer Tonerorkine Daatar ber Trane Tephseaige Fromphytal yer ‘The data link layer is responsible for d¢livering data units from one station to the next-without errors. It’s also responsible for the following: © Framing * Physical Addres sing PE ee eee eee eee ee + Flow control + Exror control © Access control The data link layer is respoasible for moving frames from one hop (node) to the next. i End Intermediate system End. system - - End system Datalink Physical Hop-to-hopdelivery Hop-to-hop delivery Hop-to-hop delivery ‘Totanspeit ayer f inet Tossa fom dake The network layer is zesponsible for the souree-to-destination delivery of a packet across multiple network links. Other responsibilities include: © Logical addressing © Routing c oLotoa 20% £040 Ceol oeoe COBOL CO00DHHD00HD OOO OOCO:-O oo0°0 D-0'D%"O Cc PDOVDDODODDOD DDD DO VDDP0 90 9999 Computer Networks + Congestion Control (using feedback messages) ~ termed as “network assisted congestion contro!” + Note: TCP/IP doesn’t provide n/w-assisted congestion coptrol,, so it must use “end-to-end congestion control” at transport layer. very of individual packets front the source host to ‘The network layer is responsible for the d the destination host. End Intermediate system system End system Intermediate system Hap-to-hop detivery | Hopto-hop delivery | Hop-to-hep delivery Source to destination detivery A 8 é : F Necwork, Network Datalink Data link ata link Physical Physical Physical a Souice-iordestination delivery TRANSPORT LAYER’ rom session ayer Tosession layer Pee ee a ea 2¢ ‘The transport layer is responsible forthe process-to-process delivery of the entire message. Other responsibilities include: © Service-point addressing + Segmentation and reassembly : © Connection control CoG 3 © Flow control + Error Control + Congestion control : ; + Multiplexing and Demultiplexing in ceslomen ‘The transport layer is responsible for the delivery of a message from one process to another. eae fi Processes Processes C3 Network layer Host-to-host delivery Transport layer Process-to-process delivery © ODMDCOCOLO::0 HOO! COO DOHDODWMNO o Computer Networks 00d SESSI R From presentation ayer ‘To presentation layer 80 OO He Session! layer To transport ayer From transportlayet ‘The Session layer is the network dialog comoller, Other responsibilities include + Dialog contro! + Synchronization: Allowing a process to add check points or synchronization points, 10 stream of data ‘The session layer is responsible for dialog control and synchronization. IN. From application layer £—Toapplieation ayer” Presentation Presentation layer layer To session layer From session layer Presentation layer is concemed with the syntax and semantics of the: information exchanged between two systems, Cither responsibilities include: . © Translation é © Eneryption o + Compressiosi sBAQWGDADNDECOOCOOTOCVOOD Als ‘The presentation layer is responsible for translation, compression, and encryption. APPLI Lay El User User (hiuman or program) (human or program) Application ‘Application layer layer To presentation layer Froth presentation layer ‘The application layer enables the user to access the network: It provides user interfaces and support for services such as electronic mail, remote file access and transfer, shared database management and other distributed information services. Specific services provided by application layer include: * Network virtual terminal i + File transfer, access and management ¢ Mail services + Directory services ‘The application layer is responsible for providing services ta the user. ‘AIG C COCONDCOE'0L.0..04.0 COCEE 0.0.0 ic co 80) 0.0 00 OOK a) u 000000 000! %°o Qi 0000 © BWHRADOGOCCAO000O Q) 0, OF O» Computer Networks Toallow access tonetwork Application resources To translate, encrypt, and ; compress data Presentation Toestabish, manage, and oe ‘terminate sessions To provide relabe processto- process message delveryand Transport errorrecovery omove packetsfrom source to destination, to provide - internetvrking Toorganize bts into ames; dhl Totransit bis oreramedium; Physical to provide mechanicaland electrical specications P/IP REFE! ‘E Mobe! “The layers in the TCP/P protocol suite do, not exactly match those in the OSI model. The original TCP/IP protocol suite was defitied as having foul! layers: host-to-nework, internet, transport, and application: However, when TCP/IP is compared to OSI, we ean say that the TCP/IP protocol suite is ade of five layers: physical, data link, network, transport, and application. AMT Computer Networks rotocols defined by the underlying networks (hostto-network) At the piysical and data link layers, TCP/IP does not detine an YY specific protocol. It supports all standard protocols. At the netirork layer (the intemetwork layer), TCP/IP supports the Injemetwworking Protocol (IP) which in-tum uses four supporting protocols: ARP, RARP, ICMP and IGMP. IP is an unreliable and connectionless protdcol (IP provides no error checking or tracking. IP transporis data it packets called datagrams, each of which is transported separitely, ARP — Address Resolution Protocal is used to find the physical address of the node when its logical address (Internet address) is known, RARP ~ Reverse Address Resolution Protocol allows a host to discover its imtemet address ‘on knowing its physical address. ICMP ~ Internet Cottrol Message Protocol sends query andl error reporting messapes + IGMP — Internet Group Messige Protocol is used to facilitate simultaneous transmission of message to a group of recipients TCPIAP represents transport layer by protocols: TCP, UDP ariel SCTP w Protocols as compared to {P whichis a host-to-host protocol. h are transport level Y A18 C000 KC00 OK O20 ¢ 06:02, OF OLO CO OLOGOR07 OGOCOEO_O 0:0. 00 OWL Vo"o'o ¢ a) o0*°0 00 > 3090%0°d 1909 OF 0 FO 'O' © 0.09600 OO O DO DMI0A0 DO DAWIQN NG 8288399090 Fig.2. Star topology Advantages of a Star Topology «Easy to install and wire, + No disruptions to the network when connecting or removing devices. «Easy to detect faults and to remove parts. Disadvantages of a Star Topology + Requires more cable fength than a linear topology. + Ifthe hub or concentrator fails, nodes attached are disabled, + More expensive than linear bus topologies because of the cost of the concentrators. LINEAR ‘POLO. Here one long cable acis as a backbone to link all the devices in the network, nodes (devices) are connected to this bus cable by drop lines and taps. A linear bus topology consists of a nhaini nun of cable with a terminator at each énd (See fig. 1). All nodes (fie server, workstations, and peripherals) are connected to the linear cable, Ethemet and Local Talk networks use a linear bus topology. N25 Fig. 1. Linear Bus topology Advantages of a Linear Bus Topology + Easy to connect a computer or peripheral to a linear bus. ‘+ Requires.less cable length than a star topology. Disadvantages of a Linear Bus Topology + Entire network shuts down if there is @ break in the main cable, + Tenninators are required at-both ends of the backbone cable. * Difficult to identify the problem if the entire network shuts down ‘+ Not meant to be used as i stand-alone solution in a large building. STAR-WIRED RING I - A siar-wired ring topology may appear (extemally) to be the same as a star topology. Intemally, the MAU (multi-station access unit) of a star-wired ring contains wiring tliat allows information to pass from one device to another in a citele or ring (See fig, 3). The Tokea Ring protocol uses a star-wired ring topology. R26 i ¢ YP OOP P PS OO CUO SI 008 BB SBHHHHHOHHDDDM0F Yo c i ° ‘ Hy 2c Network 6 PLY O AP PAq0c0-010 1900009. © Fig. Star-wired ring topology ‘TREE ‘A tree topology combines characteristics of linear bus and star topologies. It consists of groups aoeerepafigured workstations connevied to a linear bus backbone cable (See fix. 4), Tree topologies allow for the expansion of an existing network Terminotor Fig. Tree topology oO oO f Advantages of a Tree Topology Po i \ O. + Point-to-point wiring for individual segments. A © Supported by several hardware and software venders. 00 a Disadvantages of a ‘Tree Topology 0 + Overall length of cach segment is limited by the type of cabling used. o i 7 «Ifthe backbone line breaks, the entire segment goes down. : oC + More difficult to configure aind ivire than other topologies. Computer Networks Considerations When Choosing a Topology + -Money. A linear bus network may be the lest expensive way to install network; you do not have to purchase concentrators. +. Length of cable needed. ‘The linear bus network uses shorter lengths of able, Fature growth. With « star topology, expaiding a network is easily done by adding another concentrator. * Cable type. The most common cable in schools is unshielded twisted pair, which is most often used with star topologies. _ Summary Chart Physical Topology ‘Common Cable ‘Commion Protocol Linear Bus Ejhemet Pair | Local Talk Star Pair | Ethemet et LocalTalk Star-Wired Ring Twisted Pair ‘Token Ring ‘Tree ‘Coax ‘Ethernet 7 Twisted Pair. Fiber INTERNETWORKING Intemetworking is the art and:science of connecting individual local-area networks (LANs) to create wide-area networks (WANs), and connect ing WANs to form even larger WANs, Intemetworking can be extreniely complex because it generally involves connecting newworks that use different protocols., intemetworking is accomplished with routers, bridges, and gateways, Many networks exist in the world, often with different hardware and software. People connected to one network often want to communicate with people jttached to a different one. The fulfillment of this desire requires that different and frequently incompatible networks be connected sometimes by nicans of machines, called gateways, to make the connection and provide the necessary translation, both in terms of hardware-and softwate. A collection of interconnected networks is called an intemetwork’ or intemet. These terms will be used ina generic sense, in contrast to the worldwide Internet (which ig one specific internet), which we will always capitalize. + Internet: The Internet is: not a network at al, but a vast collection of different networks that use certain common protocols and provide certain common services. It isan unusual system in that it was not planned by anyone and is not controlled by anyone. A28 ‘oboe Ooo © 00% B®E CTD DHOQOGCOUCODODOCOCOCDVHDWD Q 132-0 © Computer Networks Protocol: The protocol defines a comimon set of rules and signals that computers on the network use to communicate, A protocol is a set of rules that governs the communications between computers on a network. These rules include guidelines that regulate the following characteristics of a network: access method, allowed physical topologies, types of cabling, and speed of data transfer. A Computer Networks PHYSICAL LAYER TRANSMISSION MODES Dinection oF Data FLow ‘Communication between two devices can be Simplex, halfduplex or full-duplex. Simplex In simplex. mode, the communication is unidirectional. Only one of the devices on a link can ‘transmit; the other can only receive. For example, keyboa ds-and monitors. The keyboard can pnly provide input. ‘The moniter eat only accept output, Half-duplex {mn half-duplex mode, each station can both transinit and regeive but not at the sume time, When one device is sending, the other can only receive, Direction of attime 1 ‘The half-duplex mode is like a. one-lane road with 2-directional traffic. Thé entire capacity of a ‘channel is taken over by whichever of the two devices is jransmitting atthe time, eg, Walkie- talkies and CB (citizen band radids), ke_—_—— ‘A30 © © CWCOCOCOUdLOLO C00 CL 00D A) OO CADHHDHHOHOTOODOODWOMYL ‘Oc 00 OK WDAWOAOMAWIDGOOD CO CKCOTGHODMDOS B6ODOD% a Computer Networks Full-duplex In full-duplex mode, both stations can transmit and receive simultaneously. It is like a two-way street with traffic flowing in both dircetions at the saine time. Signals going in either direction share the capacity of the link. ‘The full duplex is like a two=way street with traffie flowing in both. directions at the same time. Signals going in either direction share the capacity of the link, eg. Telephone network. ‘When two people are commiunicating by a telephone line, both can listen arid talk at the same time, iH ‘TRansmissioy MEDIA ‘Transmission media can be divided into 1Wo broad categories + Guid: It inclades twisted-pair enble, coaxial cable, and fiber-optic cable ied: 11 is usually air. Guipep Menia Guided media provide » conduit from oné device to another. ‘Twisrep Paik CABLE . * Ibis made from copper. This type of.able is commonly used as last mile transmission media in telephone systems. signals of higher frequency ranges than twisted pair cable, # Ithas a central core conductor of solid or stranded wire enclosed in an insulating sheath, This in tum encased in an outer conductor‘of metal foil braid or a combination of the two. + The metallic wrapping serves both’as a shield against noise and as the second conductor completes the circuit: Computer Networks * The outer conductor {s also eelosed in an insulating sheath and the whole cable fs protected bya plastic cover, : Fiper Optic CaBLi Angleof Angle of Light.at tess than Incidence reflection critical angle Is absorbed In Jacket A glass or plastic core is surrounded by a cladding of less (lense glass or plastic. The difference in the density of the two materials must be such that a beam of light moving through the core is reflected off the cladding, PAGATION MODES There are two modes for propagating light along optical channels, each requites fiber with different physical characteristics © Multimode + Single mode UL TIMOD} Multiple beams from a light source move through the core fn ditterein paths Multimode ean be implemented in two forms: + Step-index * Graded index MULTIMODE STEP-INDEX FIBER * In Multimode Step — index fiber the density of the fiber remains constant fioni the center to the edges + A beam of light movés through this constant density ina straight line. —_—_—_— ABD 0.0 £0 © LO CO00UO. O10 ODODDODOOWM'0 00 HOMWMLO 00006 00 fe) C 0OSSSD 0'O OO! QDAOGOAGTBDRAGCCO00 00000 Computer Networks 's When it reaches the interface of the core and the cladding, there. is an abrupt change toa lower density that alters the angle of the beams motion. ‘© Step-index > the suddenness of this change. | ULTIMODE GRADED-INDEX FIBE © Itdecreases the distortion of the signal through the cable, + Density is highest atthe center of the core and decieases gradually to its towest atthe edge LE-MOD) ‘s Tiuses step-index fiber and a highly focused source of light that limits beams to & small range of angles, all close to the horizontal 1 © The Single-Mode fiber itself is manufactured with a smaller diameter than, that of multimode fiber and with lower density : «This results ina critical angle that is close enough to 90° to make it horizontal. 4s Allthe beoms.arrive at the destination together and can be recombined with little distortion to the signal. Figer SIZES Optical fibers are defined by the ratio of the diameter of their core 10 the diameter of their cladding expressed in micrometers. RF cE ¢ Attenuation is flatter than in the case of twisted pair'cable énd coaxial cable. Few repeaters are needed when we use fiber optic cable. APPLICATION It is usually used in the network backbones where high bandwidth in'required. It is also used in cable TY and LAN (Past Ethernet and 100Base-X). Advantages ‘+. Higher bandwidth: It can support higher bandwidth than twisted pair or coaxial cable. + Less signal attenuation: Transmission distance is greater than that of other guided media. Signals ean be transmitted for 50 krh without requiring regeneration SSS Immunity to electromagnetic Interference : Elecirgmagnetic noise can not affect fibere optic eables + Resistance to corrosive'materials: glass is more resisint to comosive materials. + Light-weight: itis of less weight than the copper cables + More Immune to taping: Fiber-optic cables are more immune to tapinig. than copper cables, Disadvantages + Installation/Maintenance: Installatior/Maintenance need expertise since i is a new technology. Unidirectional: Propagation of light is unidirectiosal. Bidirectional communication is achieved by means of two optical fibers. * Cost: It is more expensive and the use of optical fiber cannot be just bandwith is not high. SIGNALS AND CODING SCHEMES ‘+, Signal: Any physical quantity that carries information varies with other independent or dependent variables. Eg. Electromagnetic signal ‘TYPES OF SIGNALS ‘+ Continuous time (arialog) sigials » Discrete time (discrete) signals ANALOG SIGNAL The analog signal is a continuous function of independeit Variables. ‘The analog signal is defined for every instant of independent variable and so magnitude of independent variable is continuous inthe specified range. Here both the independent variable and magnitude are contifuous, ASSIFI G. + Deterministic and’ Non Deterinini + Periodic and aperiodic signals + Power and energy signals + Odd anid even signals —— ee AMA CODD DDDODOBODDOOWH O DOOMOWWLWLO 0 OW COCOLOUG: OV! PSO 0 O DD SOOO BDO ©0 608 OOdGCCO00 dG oO) O 0 OF O} ‘OOO Computer, Networks _~ DISCRETE SIGNALS ‘The discrete signal is a function of discrete independent variables. The inidependent variable is divided into uniform interval and is represented by an integer. The discrete signal is defined for every integer value of independent varinble, Here both the values of signal and independent variable are disorete. Types of discrete signal + Deterministic and non-deterministic signals * Periodic and aperiodic signals # Power and energy signals ‘* Odd and even signals «Digital signal: The digital signal is. same as discrete signal except that the magnitude of signal is quantized. MULTIPLEXING In telecommunications and’ computer networks, miiltiplexing (also known as muxing) is @ process where multiple analog message signals or digital data strcams are combined into one signal over a shared medium. The aim!is to share an expensive resource, For example, in telecommunications, several phone calls. niay be transferrec using one wire. It originated in telegraphy, and is now widely applied in communications. A device that performs the multiplexing is catled a multiplexer (MUX), ‘and a device that performs the reverse process is called a demultiplexer (DEMUX). ‘TYPES OF MULTIPLEXING ‘The group of multiplexing technologies may be divided into several types, all of which have significant veriations:{1] space-division multiplexing (SDM), frequency-division multiplexing (FDM), time-division multiplexing (TDM), and cdtle division multiplexing (CDM). Variable bitrate digital bit streams may be transferred efficiently over a fixed bandwidth channel by means of statistical multiplexing, for example packet mode communication. Packet. mode communication is an asynchronous mode time-domain multiplexing which resembles time- division multiplexing 435 Computer Networks FREQUENCY-DIVISION MULTIPLEXING Sip Signal 2 ‘Signals mT 300-900 Frequency-division multiplexing (DM): The spectrums of each input signal are shifted in several distinet frequency ranges, Frequency-division multiplexing (FDM) is inherently an analog technology: EDM achieves the combining of several digital signals into one medium by sending signals in several distinct frequency ranges over that medium, ¢ One of FDM's most common applications is Gable television. Only one cable reaches a customer's home but the service provider can send multiple television channels or signals simultaneously over that cable to all subscribers. Receivers must tune to the appropriate frequency (channel) to access the desired signal, TIME-DIVISION MULTIPLEXING , Mux Demux Conversation A Conversation A nvorstioy By oe Conversation G —p — ‘> u_ Conversation E > I i Fig: Time-division niultiplexing (TDM). ‘Time-division multiplexing (TDM) ig a digital technology. TDM involves sequencing groups of 2 few bits or bytes from each individual input stream, éne.after the other, and in such a way that they can be associated with the appropriate receiver. If done sufficiently and quickly, the a A36 20 DO COCGO0COCOB CO! OL0CO0 COOK DOOOOWOWWO MO OMOLO oD On OOOO (ome O o a o oD somputer Networks og es i receiving devices will not detect that sonie of the circuit time was used to serve another logical Comminiesion pth. O % SAMPUNG THEOREM inal Consider a band-limited signal with no frequeney components above a-certnin frequency fin. The O sampling theorem states tlt this signal ein be recovered completely fro a set of samples of its ° amplitude, ifthe samples are taken at the rate of f > 2fm samples per second, This is often called G the uniform sampling theorem for baseband or low-pass signals. “The minimum sampling fate, 2m samples.per second, is called the Nyquist sampling rate (or Nyquist frequency) its reciprocal l(a) (measured in seconds) is called the Nyquist interval {,=2* fm is called the Nyquist sampling rate. For telephone speech the standard sampling rate is $ kHz (or one sample every 125 ps). Line Coo Line Coding isthe process of converting binary data, a sequence of bits, to a digital signal. (CHARACTERISTICS OF LINE CODING : | Some characteristics of line coding are L Signal level versus data level + Pulse rate versus bit rate © Decomponents and ‘+ Self-synchronization SIGNAL Level \ ‘The number of values allowed in a particular signal is termed as signal level Data Level The number of values used to represent data is termed as data level, De. ENT( ZERO FREQUENCY) If the positive voltages are not get cancelled by the negative voltages then i is called a de component. This component is undesirable for 2 reasons. They are . A3T QDAHDOAKHAAROCOCOTCOODOODD: fella eee {the signal is to pass through a system that does notiallow the passiige of a de component, the signal is distorted and may ereate errors in the output + This component is an extea energy res ‘SELE-SYNCHRONIZATION. Need To correctly intérpret the'signals'rezeived from the éender, the receivers bit intervals tnust correspond exacily to the senders bit intervals. Ifthe reeeiver clock is fisier’ or slowés ithe bit intervals are not matched and the receiver might interpret the signals differently tha intended, i 1g on the line’and is useless. n thie'serider A Selfsyrchronizing digital signal includes timing information in the data being transn This can be achieved if there are transitions in the signal that alert the receiver to the besi 1middle or end of the pulse. If the receiver's clock is out of can reset the clock. Live Coping Schemes (DIGITAL To DiGital, TRANSMISSION) Line coding schemes are divided in to three categories: Unipolar, NIPOLAR Unipolar encoding uses only one polarity.0 is positive voltage. ted. ng, synchronization, these alerting points Polar and Bipolar represented by zero voltage and | is represented by, Its inexpensive to implement. Unipolar encoding has two problems: + Lack of synchronization + ADC component A38 oO 9 8 ° 8 7 8 8 Qo g Oo 6 3 CODHHOUODDDOODWODWD ODO OWW: "OO € Ig Bg> T% %* 00% QBABWAGASCHADGECOV0DHD000ODDVDD’ Computer Networks Unipolar Polar Bipolar encoding AMI NRZ RZ Biphase B8zs | | HDB3 NRZ-L NRA Manchester’) | Differential Manchester POLAR ENCODING It uses two voltage levels: + Positive : © Negative “The types of polar encoding are * Non-retum to zero(NRZ) = Return to zero(RZ) © Biphase NRZ The level of the signal is always either positive or negative. NRZL “The level of the signal depends on the type of bit it represents. 439 ‘Computer Networks + The bit is represented by positive voltage * The bit | is represented by siegative voltage. Demerits * Problem arises when there ig a long stream of Os or 1¢ in the data. + Ifthe receiver receives a continuous volta ie, it should determine how many bits are sent by relying on its clock. ‘The receiver may or may not be synchronized with the sender clock NRZ NRA, Neat 1 ‘The | bit is fepresented by an inversion (transition between a positive and a negative voltage) of the voltage level, ‘The existence of |'s in the data stream allows the receiver 10 resynchronize its timer to the actual arrival of the transmission. A string of 0's can still cause problems. RZ uses three values + Positive + Negative and + Zer In RZ the signal changes during each bit, + A 11 bitis actually represented by positive-to-zero and en gwO0_ aay 0. OLOGC (0401.0 0.0 LOCOUCE CR Ci! u « IF BODDOHODO0O OHH 3 000000 50-0 ¢ %7%OBo! SS%! o° © 000 OM% a0006 roo oO Orc lOnO30O yO} O} Computer Networks + A Obit is actually represented by.negative-to-zero Demerits + requires two signal changes to encode one bit, + Toceupies more bandwidth, BIPOLAR ‘The signal changés at the middle of the bit types of biphase encoding. interval and does not return to zero.There are two © Manchester + Differential Manchester MANCHESTER «It uses the inversion ‘at the middle of each bit inteval ‘for’ ‘both synchronization and bit representation. Ss ‘+The bit | is represented by negatives|o-positive transition, «The bit is represented by positive-to-negative transition ‘Menits A single transition achieves the level of synchronization but with only two levels of amplitude Manchester Encoding weeny J a lea A eh DIFFERENTIAL MANCHE: Inversion at the middle of the bit interval is used for synchronization. Presence or absence of additional transition at the beginning of the interval is used to identify the bit. © Abit 0 is represented by a transition. hhc | aa Computer Networks © Abit | means no transition. It requires two signal changes to represent binary 0, but only one to represent binciry 1. BIPOLAR It uses three voltage levels © Positive © Negative, and © Zero * The bit 0 is zepresented by zero level + The Is are represented by altemate positive and negative vollages. I the first 1 bit is represented by positive dmplitude, the second will be represented by the negative amplitude and so on, ‘There are three types of bipolar encoding: + AMI + B8ZS + HDB3 Bipolar Altemate Mark Inversion + A binary 0 is represented by zero toltage +” Abinary 1s aré represented by. alternate positive and negative voltages. Merrs + By inverting on each occurrence of 1, i + Thedecémponentis zero + Along sequence of 1s stays synchronized + -Pseudotemary «A binary 0 alternate betwen positive and negative voltages. COMPARISON ‘The comparison of the different encoding schemes of the following NKZ. Polar NRZ,NRZ. Inverted, Bipolar, Manchester, Differential Manchester are given, —————— s Aad oo ooo 0 Oo 0-0: OOO Voy © Lo Coe 0% ‘ Qo OHHDD COO OODOMDO = Computer Networks 0 0, 0,0 PgAQHYQ BWOOMVOADGAOGICHPSHOSPSO0TBEGBS DATA LINK LAYER + The Data-Link layer provides for the flow of data ov ‘o another. It accepts packets from the Network layer units called frames; these frames are presented to the era single physical link from one device and packages the information into data Physical layer for transmission, This layer also provides for the error-free transfer cyclic redundancy check (CRC) OR checksum is a frames damaged during trarismission, Data-I and requests those frames to send again, of fames from one computer to another, A idded to the data frame which is used detect Link layer can also detect when frames are lost Errortree data tink LODGEOO OS 5° oO ~O Physical cout ae) 2 2 Fig3: The Dara-Link layer establishes an error-free link between two devices ‘oO ; « + The Instituté of Electrical and Electroni Engineers (IEEE) developed a protocol Oo specification known as IEEE 802.X. (802.2 is the standlard that divides this layer into two sublayers, i DATA LINK LAYER SUBLAYERS Data Link Layer is split into.2 sub-layers: OrO*O The Logical Link Control (LLC) layer establishes and maintains the hig communication links between the communicating devices, %o The Media Access Conirél (MAC) layer acts like an aigport control tower—it controls the way muhiple devices share the same media channel in the same way thal a control tower regulates the flow of air traffic into and out ofan airport. } BX ( 0S BS 290088 99 GOOM0 0 O | BAISHGEOKRAGSEOGOMPA: 9% BBO, O Computer Networks Fig.4: The IEEE split the ISO Data-Link layer into the LLC sublayer and the MAC sublayer The LLC sub layer provides Service Access Points (SAPs) that other computers can refer to and use to transfer information {rom the LLC sub layer to the upper OSI layers. This is defined in the 802.2 standard. “The MAC sub layer, he lower of the two sub layers, provides for shared! access to the network adapter and communicates dircetly with nework interface cards. Network interface cards have a : ‘unique,|2-digit hexadecimal MAC address (frequently called the hardware Ethemet address) assigned before they leave the factory where they are made. The LLC sublayer uses MAC addresses to establish logical links between devices on the same LAN. ‘The data link layer has a number of spetific functions it can carry out. These functions include + Providing a well-dofined service interface to the network layer, + Dealing with transmission errors. ‘© Regulating the flow of data so that slow receivers are not swamped by fast senclers. To accomplish these goals, the data link layer takes the packets it gets from the network layer and encapsulates them into frames fur transmission. Each frame cont a frame header, a payload field for holding the packet, and a frame trailer, as illustrated in Fig. 3-1, Frame ‘management forms the heart of what the data link layer does. In the following sections we will examine all the above-mentioned issues in detail. Sending machina en ro re pe ed Cee ee eee Figure 3-1. Relationship between packets and frames. Dat K LAY! ICE: ‘The data link layer can be designed to offer various services. The actual services offered can vary from system to system. Three reasonable possibilities that are commonly provided are © Unacknowledged connectioniiess service. i * Acknowledged connectionless service. + Acknowledged connettign-oriented service, UNACKNOWLEDGED CONNECTIONLESS SERVICE Unacknowledged connectionless service consists of having the source machine send independent frames to the destination machine without having the destination machine acknowledge them. No logical connection is established beforehand or released alterward. If'a frame is lost due to noise on the line, no attempt is made to detect the loss of recover from it in the data link layer. This elass of service is appropriate when the error rate is very low so that recovery is left to higher layers. It is also appropriate for real-time traffie, such as voice, in which late data are worse thin bad data, Most LANs use unacknowledged connectionless service in the data link layer. ACKNOWLEDGED CONNECTIONLESS SERVICE ‘When this service is offered, there are still no logical connections used, but each frame sent is individually acknowledged. In this way, the sender knows: whether a frame has arrived correctly, If it has not arrived within a specified time interval, it can be sent again. This service is useful over unreliable channels, such as wireless systems, KNOWLEDGE! “TON WI ‘The most sophisticated service the data link layer can provide to the network layer is connection- oriented service, With'this service, the source and destination machines establish a connection, ann ESREEEGEeeeiteneee eee A468 o090000 oO % SSS COOCBKBHBBKLDBEEBS8BSOD 0000 %% °C? 60 © 0 COKKODDDOCOODODNDND OAc oO ¢ a o So eo & 2 Computer Networks. before any data are translerred, Bach frame sent over the connection is numbered, and the data tink layer guarantees that exch frame sent is indeed received. Furthenmére, it yunrantees that each fame ie received exactly once and that all frames are received in the right order. With connectionless service, in contrast, itis conceivable that a lost acknowledgement causes @ packet to be sent several (imes and thus received several times. Connection-oriented service, in contrast provides the network layer processes with the equivalent of reliable bit stream: DATA LINK LAYER FUNCTION: ERAMING ‘To provide sevice (othe network layer, the data lin layer must use the service provided to it by tne physical layer. What the physical layer does is accep a raw bt stredma nd attempt to deliver it te the destination, This bit stream is not guaranteed to be error free. ‘The number of bits eceived may be less than, equal to, or more-than the numberof bits transmitted, and they may have different values. Its up to the data link layer to detect and, if Hegessary, correct errors ‘The usual approach is for the data link layer to break theibit stfeam up into discrete frames and compute the checksum for each frame. (Checksum algorithms will be discussed later in this chapter) When a fiane arrives at the destination, the checksum is recomputed. Ifthe newly computed checksum is diferent froma the one contained inthe fame, the data. link layer knows that an ertor has occurred and takes steps to deal with it (6g, discarding the bad frame and possibly also sending back an error report). Breaking the bit siteam up into frames'is more difficult than it al Gist appears. One way 10 achieve this framing is to insert time gaps between frames, much like the spaces between words in ordinary text. However, networks. rarely make any guarantees abous timing, s0 itis possible these gaps might be squeezed out or other gaps might be inserted during transmission. 7 F va Since itis t00 risky to count on timing to'mark the start and end of each frame, other methods hhave been devised. In.this section we will look at four methods: Character coun. + Flag bytes with byte stuffing # Starting and ending flags, with bit staffing. Character Count ‘The first framing method uses a field in the header to specify the number of characters in the frame. When the data link layer at the destination sees the character count, it knows how many characters follow and hence where the end of the frame is. This technique is shown in Fig, for four frames of sizes 5, 5, 8, and & charaéters, respectively. = AMT Computer Networks jure 3-4, A character stream. (a) Without errors. (b) With one error. Character ctet One charter GOTT Tslel7[oTo] Tose tae s Tele Te PoTS TES) am ete at) Fane. Franea Forno Frome Seunaes schancen ag choion, oehoracar Egor ~GREBEP ECs PLel oh ets [sea I2 15) — eee Fame Frame? Hew a rena) Cains cat Disadvantage ‘The trouble with this algorithm is that the count can be garbled by a transmission error, For cxampl, ifthe character count of 5 in the second fiame becomes a7 the destination will get out of synchronization and will be unable to locate the start ofthe nex! frame, Even if the checksum is incorrect so the destination knows that the frame is bad, it still has no way of telling where the next [rae slats. Sending a frame back to the source asking fora retransmission does not help cither, since the destination does not know. how many chafaeters to skip over to yet to the start of the retransmission, For this reason, the character count method is rarely used anymore, Flag Bytes With Byte Stuffing The second framing method gets around the ironizalion after an y having each frame start and end. with special bytes. in the past, ihe starting and ending bytes were different, but in recent years most Protocols have us¢d the same byte, called.a flag byte, as both the stating and ending delimiter as FLAG. {n this way. ifthe reeciver ever loses synchronization, it gan just search fur the Mlag byte to find the end of the current frame. Two consecutive flag bytes indicate the end of one frame and statt he next o4 AaB OCO O0DDDONO OO O O O OLHLOUOr O- 060 MLaQUVOLV OVAUOWOt 000800 oO y Computer Networks. 0% %% °C [Pelee Pays fal ‘rater [rLso| iim Aas 7 Hei) Glee e eel] allel — [> ][ese][cse][ » & OSes o eis) —-HREEIRSE © “ele |— EEC » Figute(@) A frame ielimited by flag bytes. (b) Four examples of byte sequences before and afer byte stuffing. Disadvantage {A serious problem occurs with this method when binary data, such as object programs or floating-point numbers, are being transmitted. It may easily happen thatthe flag byte's bit pattem ‘occurs in the data, ‘Ths situation will usually intesfere withthe framing. One way to solve this problem is to have the sender's data link layer insert a special escape. ‘byte (ESC) just before each accidental” flag bye in the data. The data link layer on the receiving end removes the escape byte before the daia are given to the network layer. This technique is_called byte wuffing of character stuffing. Thus, a framing flng byte can be distinguished from one in the data by the absence or presence of an escape byte belore it ‘The next question is: Whiat happens if an escape byte occurs in the middie of the data? The answer is that it, 100, is stuffed with an escape byte, Thus, any single escape byte is part of an Sseape sequence, whereas'a doubled one indicates that a single escape oecurred naturally in the data, In all cases, the byte:sequence delivered after destuffing is exactly the same as the original byte sequence. ‘A major disadvantage of using this framing method js that itis closely tied to the use of §-bit characters. Not all character codes use’8-bit characters. For example. UNICODE uses 16-bit characters, As networks developed. the disadvantages of embedding the character code length in the framing mechanism béeame more and more obvious, so a new technique had to be developed to allow arbitrary sized characters. BAHBWOGAAGDACKAOOHDVOODOH OQ i

You might also like