unit1.pdf networks

Upload: sheetalscribd

Post on 06-Jan-2016

224 views

Category:

Documents


0 download

DESCRIPTION

Unit1.PDF Networks

TRANSCRIPT

  • 1/uts

    Chapter I

    Fundamentals of Computer Network

    Aim

    The aim of this chapter is to:

    introduce the concept of computer network

    discuss the history of network

    explain the transmission technology

    Objectives

    The objectives of this chapter are to:

    explain broadcast network

    elaborate on point-to-point network

    evaluate various networks based on scale

    Learning outcome

    At the end of this chapter, you will be able to:

    draw a basic data representation

    explain the concept of data communication

    explain digital and analog transmission

  • Computer Networks and Tools

    2/uts

    1.1 Introduction to Computer Network The concept of Network is not new. It is an interconnected set of some objects. For decades, we are familiar with the radio, television, railway, highway, bank and other types of networks. In recent years, the network that is making significantimpactonourday-to-daylifeisthecomputernetwork.

    Computer network is an interconnected set of autonomous computers. The term autonomous implies that one computer can function independent of others. However, these computers can exchange information with each other through the communication network system.

    Computer networks have emerged as a result of the convergence of two technologies of this century Computer and Communication,asshowninthefiguregivenbelow.Theconsequenceofthisrevolutionarymergeristheemergenceof an integrated system that transmits all types of data and information. There is no fundamental difference between data communications and data processing and there are no fundamental differences among data, voice and video communications.

    Fig. 1.1 Evolution of computer networks

    1.2 Historical BackgroundElectroniccomputerscameintoexistenceintheearly1950sandduringthefirsttwodecadesofitsexistence,itremained as a centralised system housed in a single large room. In those days, the computers were large in size and were operated by trained personnel. To the users, it was a remote and mysterious object having no direct communication with the users. Jobs were submitted in the form of punched cards or paper tape and outputs were collected in the form of computer printouts. The submitted jobs were executed by the computer one after the other, which is referred to as batch mode of data processing.

    interactive 1960s

    ARAPME

    Ethernet Packet Switching Network

    SatelliteMicro-wave

    TV 1923Radio 1896

    Telephone 1876

    Telegraph 1838

    ENIAC 1946

    Batch Mode 1950s

    Computers

  • 3/uts

    In the 1960s, computer systems were still centralised, but users were provided with direct access through interactive terminals connected by point-to-point low-speed data links with the computer. In this situation, a large number of users, some of them located in remote locations could simultaneously access the centralised computer in time-division multiplexed mode. The users could now get immediate interactive feedback from the computer and correct errors immediately.

    Following the introduction of on-line terminals and time-sharing operating systems, remote terminals were used to use the central computer. With the advancement of VLSI technology, and particularly, after the invention of microprocessorsintheearly1970s,thecomputersbecamesmallerinsizeandlessexpensive,butwithsignificantincrease in processing power. New breed of low-cost computers known as mini and personal computers were introduced.

    Instead of having a single central computer, an organisation could now afford to own a number of computers located in different departments and sections. Side-by-side, riding on the same VLSI technology, the communication technology also advanced leading to the worldwide deployment of telephone network, developed primarily for voice communication. An organisation having computers located geographically dispersed locations wanted to have data communications for diverse applications. Communication was required among the machines of same kind for collaboration, for the use of common software or data or for sharing of some costly resources. This led to the development of computer networks by successful integration and cross-fertilisation of communications and geographically dispersed computing facilities.

    OnesignificantdevelopmentwastheAPPANET(AdvancedResearchProjectsAgencyNetwork).Startingwithfour-node experimental network in 1969, it has subsequently grown into a network several thousand computers spanning half of the globe, from Hawaii to Sweden. Most of the present-day concepts such as packet switching evolved from the ARPANET project. The low bandwidth (3KHz on a voice grade line) telephone network was the only generally available communication system available for this type of network. The bandwidth was clearly a problem, and in the late 1970s and early 80s, another new communication technique known as Local Area Networks (LANs) evolved, which helped computers to communicate at high speed over a small geographical area. In the later years, use of opticalfiberandsatellitecommunicationallowedhigh-speeddatacommunicationsoverlongdistances.

    1.3 Classification Based on Transmission TechnologyComputer networks can be broadly categorised into two types based on transmission technologies:

    Broadcast networksBroadcast network have a single communication channel that is shared by all the machines on the network as showninfig.1.2and1.3.

    All the machines on the network receive short messages, called packets in certain contexts, sent by any machine. Anaddressfieldwithinthepacketspecifiestheintendedrecipient.

    Uponreceivingapacket,machinecheckstheaddressfield.

    If packet is intended for itself, it processes the packet; if packet is not intended for itself it is simply ignored.

    2 n1

    Fig. 1.2 Example of a broadcast network based on shared bus

  • Computer Networks and Tools

    4/uts

    Satellite

    Transmitter

    Multiple receiversMultiple receivers

    Fig. 1.3 Example of a broadcast network based on satellite communication

    This system generally also allows possibility of addressing the packet to all destinations (all nodes on the network). When such a packet is transmitted and received by all the machines on the network. This mode of operation is known as Broadcast Mode. Some Broadcast systems also support transmission to a sub-set of machines, something known as Multicasting.

    Point-to-Point networksAnetworkbasedonpoint-to-pointcommunicationisshowninthefiguregivenbelow.

    The end devices that wish to communicate are called stations. The switching devices are called nodes. Some Nodes connect to other nodes and some to attached stations. It uses FDM or TDM for node-to-node communication. There may exist multiple paths between a source-destination pair for better network reliability. The switching nodes are not concerned with the contents of data. Their purpose is to provide a switching facility that will move data from node to node until they reach the destination.As a general rule (although there are many exceptions), smaller, geographically localised networks tend to use broadcasting, whereas larger networks normally use point-to-point communication.

  • 5/uts

    E

    D

    C

    B

    A

    4 6

    5

    3

    21

    CommunicationNetwork node

    Fig. 1.4 Communication network based on point-to-point communication

    1.4 Classification Based on ScaleAlternative criteria for classifying networks are their scale. They are divided into Local Area (LAN), Metropolitan Area Network (MAN) and Wide Area Networks (WAN).

    Local Area Network (LAN)LANisusuallyprivatelyownedandlinksthedevicesinasingleoffice,buildingorcampusofuptofewkilometersin size. These are used to share resources (may be hardware or software resources) and to exchange information. LANs are distinguished from other kinds of networks by three categories: their size, transmission technology and topology.

    LANs are restricted in size, which means that their worst-case transmission time is bounded and known in advance. Hence, this is more reliable as compared to MAN and WAN. Knowing this bound makes it possible to use certain kinds of design that would not otherwise be possible. It alsosimplifiesnetworkmanagement.

    LAN typically uses transmission technology consisting of single cable to which all machines are connected. Traditional LANs run at speeds of 10 to 100 Mbps (but now much higher speeds can be achieved). ThemostcommonLANtopologiesarebus,ringandstar.AtypicalLANisshowninfig.1.5.

  • Computer Networks and Tools

    6/uts

    internet

    Fig. 1.5 Local Area Network

    1.5 Metropolitan Area Networks (MAN)MAN is designed to extend over the entire city. It may be a single network as a cable TV network or it may be meansofconnectinganumberofLANsintoalargernetworksothatresourcesmaybesharedasshowninfig.1.6.Forexample,acompanycanuseaMANtoconnecttheLANsinallitsofficesinacity.MANiswhollyownedandoperated by a private company or may be a service provided by a public company. The main reason for distinguishing MANs as a special category is that a standard has been adopted for them which is DQDB (Distributed Queue Dual Bus) or IEEE 802.6.

  • 7/uts

    LANDesktop PC

    Desktop PC

    Desktop PC

    Desktop PC

    LANDesktop PC

    Desktop PC

    Desktop PC

    Desktop PC

    LANDesktop PC

    Desktop PC

    Desktop PC

    Desktop PC

    LANDesktop PC

    Desktop PC

    Desktop PC

    Desktop PC

    LANDesktop PC

    Desktop PC

    Desktop PC

    Desktop PC

    MAN

    Fig. 1.6 Metropolitan Area Networks (MAN)

    Wide Area Network (WAN)WAN provides long-distance transmission of data, voice, image and information over large geographical areas that may comprise a country, continent or even the whole world. In contrast to LANs, WANs may utilise public, leased or private communication devices, usually in combinations, and can therefore span an unlimited number of miles asshowninfig.1.7.AWANthatiswhollyownedandusedbyasinglecompanyisoftenreferredtoasenterprisenetwork.

    LOCAL AREANETWORK

    Router

    Router

    Router Router

    Router

    Router

    LOCAL AREANETWORK

    LOCAL AREANETWORK

    Satellite Dish

    Satellite Dish

    LOCAL AREANETWORK

    Satellite

    National PublicSwitched Telephone

    Network

    National PublicSwitched Telephone

    Network

    Fig. 1.7 Wide Area Network

  • Computer Networks and Tools

    8/uts

    1.6 The InternetInternet is a collection of networks or network of networks.

    Various networks such as LAN and WAN connected through suitable hardware and software to work in a seamless manner. SchematicdiagramoftheInternetisshowninfig.1.8.

    Itallowsvariousapplicationssuchase-mail,filetransfer,remotelog-in,WorldWideWeb,Multimedia,etcrunacross the internet. The basic difference between WAN and Internet is that WAN is owned by a single organisation while internet is not. However, with time, the line between WAN and Internet is shrinking, and these terms are sometimes used interchangeably.

    LAN-III

    LAN-IIWAN-II

    WAN-ILAN-I

    Fig. 1.8 Internet Network of networks1.7 Data RepresentationThepurposeofanetworkistotransmitinformationfromonecomputertoanother.Todothis,youfirsthavetodecide how to encode the data to be sent, in other words, its computer representation. This will differ according to the type of data, which could be:

    Audio dataText dataGraphical dataVideo data

    Data representation can be divided into two categories:Digital representation: The information is encoded as a set of binary values, in other words, a sequence of 0s and 1s. Analogue representation: The data will be represented by variation in a continuous physical quantity.

    1.8 Data CommunicationThe distance over which data moves within a computer may vary from a few thousandths of an inch, as is the case within a single IC chip, to as much as several feet along the backplane of the main circuit board.

    Over such small distances, digital data may be transmitted as direct, two-level electrical signals over simple copper conductors. Except for the fastest computers, circuit designers are not very concerned about the shape of the conductor or the analog characteristics of signal transmission. Frequently, however, data must be sent beyond the local circuitry that constitutes a computer.

  • 9/uts

    In many cases, the distances involved may be enormous. Unfortunately, as the distance between the source of a message and its destination increases, accurate transmission becomes increasinglydifficult.This results from theelectricaldistortionof signals travelling through longconductors, and from noise added to the signal as it propagates through a transmission medium.Although some precautions must be taken for data exchange within a computer, the biggest problems occur when data is transferred to devices outside the computers circuitry. In this case, distortion and noise can become so severe that information is lost.Data communications concerns the transmission of digital messages to devices external to the message source.External devices are generally thought of as being independently powered circuitry that exists beyond the chassis of a computer or other digital message source. As a rule, the maximum permissible transmission rate of a message is directly proportional to signal power and inversely proportional to channel noise. It is the aim of any communications system to provide the highest possible transmission rate at the lowest possible power and with the least possible noise.

    1.9 Communications ChannelsAcommunicationschannelisapathwayoverwhichinformationcanbeconveyed.Itmaybedefinedbyaphysicalwire that connects communicating devices, or by a radio, laser, or other radiated energy source that has no obvious physical presence.

    Information sent through a communications channel has a source from which the information originates, and a destination to which the information is delivered. Although information originates from a single source, there may be more than one destination, depending upon how many receive stations are linked to the channel and how much energy the transmitted signal possesses.In a digital communications channel, the information is represented by individual data bits, which may be encapsulated into multibit message units. A byte, which consists of eight bits, is an example of a message unit that may be conveyed through a digital communications channel. A collection of bytes may itself be grouped into a frame or other higher-level message unit. Such multiple levels of encapsulation facilitate the handling of messages in a complex data communications network.Any communications channel has a direction associated with it.

    SimplexIn simplex mode, the communication can take place in one direction. The receiver receives the signal from the transmittingdevice. In thismode, theflowof information isUni-directional. Hence, it is rarelyused fordatacommunication.

    Half-duplex In half-duplex mode, the communication channel is used in both directions, but only in one direction at a time. Thus, a half-duplex line can alternately send and receive data.

    Full-duplexIn full duplex, the communication channel is used in both the directions at the same time. Use of full-duplex line improvestheefficiencyasthelineturnaroundtimerequiredinhalf-duplexarrangementiseliminated.Exampleofthis mode of transmission is the telephone line.

    A B

    Fig. 1.9 Simplex A to B only

  • Computer Networks and Tools

    10/uts

    A B

    Fig. 1.10 Duplex A to B or B to A

    A B

    Fig. 1.11 Full-Duplex A to B and B to A

    1.10 Digital and Analog TransmissionData is transmitted from one point to another point by means of electrical signals that may be in digital and analog form. So, one should know the fundamental difference between analog and digital signals.

    In analog signal, the transmission power varies over a continuous range with respect to sound, light and radio waves. On the other hand, a digital signal may assume only discrete set of values within a given range. Examples are computer and computer related equipment. Analog signal is measured in Volts and its frequency is in Hertz (Hz). A digital signal is a sequence of voltage represented in binary form. When digital data are to be sent over an analog form the digital signal must be converted to analog form. So, the technique by which a digital signal is converted to analog form is known as modulation. And the reverse process, that is the conversion of analog signal to its digital form, is known as demodulation. The device, which converts digital signal into analog, and the reverse, is known as modem.

    1 0 0 0 0 0 0 1

    Digital Signals

    Fig. 1.12 Digital signal

    Analog Signals

    Fig. 1.13 Analog signal

  • 11/uts

    1.11 Asynchronous and Synchronous TransmissionData transmission through a medium can be either asynchronous or synchronous.

    In asynchronous transmission, data is a transmitted character by character as you go on typing on a keyboard. Hence, there are irregular gaps between characters. However, it is cheaper to implement, as you do not have to save the data before sending. On the other hand, in the synchronous mode, the saved data is transmitted block by block. Each block can contain many characters. Synchronous transmission is well suited for remote communication between a computer and related devices like card reader and printers.Asynchronous and synchronous communication refers to methods by which signals are transferred in computing technology. These signals allow computers to transfer data between components within the computer or between the computer and an external network. Mostactionsandoperationsthattakeplaceincomputersarecarefullycontrolledandoccuratspecifictimesand intervals. Actions that are measured against a time reference, or a clock signal, are referred to as synchronous actions. Actions that are prompted as a response to another signal, typically not governed by a clock signal, are referred to as asynchronous signals.Typical examples of synchronous signals include the transfer and retrieval of address information within a computer via the use of an address bus. Forexample,whenaprocessorplacesanaddressontheaddressbus,itwillholditthereforaspecificperiodoftime. Within this interval, a particular device inside the computer will identify itself as the one being addressed and acknowledge the commencement of an operation related to that address. In such an instance, all devices involved in ensuing bus cycles must obey the time constraints applied to their actions. This is known as a synchronous operation. In contrast, asynchronous signals refer to operations that are prompted by an exchange of signals with one another, and are not measured against a reference time base. Devices that cooperate asynchronously usually include modems and many network technologies, both of which use a collection of control signals to notify intent in an information exchange. Asynchronous signals, or extra control signals, are sometimes referred to as handshaking signals because of the way they mimic two people approaching one another and shaking hands before conversing or negotiating.Within a computer, both, asynchronous and synchronous protocols are used. Synchronous protocols usually offer the ability to transfer information faster per unit time than asynchronous protocols. This happens because synchronous signals do not require any extra negotiation as a prerequisite to data exchange. Instead, data or information is moved from one place to another at instants in time that are measured against the clock signal being used. This signal is usually comprised of one or more high frequency rectangular shaped waveforms, generated by special purpose clock circuitry. These pulsed waveforms are connected to all the devices that operate synchronously, allowing them to start and stop operations with respect to the clock waveform. Incontrast,asynchronousprotocolsaregenerallymoreflexible,sinceallthedevicesthatneedtoexchangeinformation can do so at their own natural rate be these fast or slow. A clock signal is no longer necessary; instead the devices that behave asynchronously wait for the handshaking signals to change state, indicating that some transaction is about to commence. The handshaking signals are generated by the devices themselves and can occur as needed, and do not require an outside supervisory controller such as a clock circuit that dictates the occurrence of data transfer.

  • Computer Networks and Tools

    12/uts

    Asynchronous and synchronous transmission of information occurs both externally and internally in computers. One of the most popular protocols for communication between computers and peripheral devices, such as modems and printers, is the asynchronous RS-232 protocol.Designated as the RS-232C by the Electronic Industries Association (EIA), this protocol has been so successful at adapting to the needs of managing communication between computers and supporting devices, that it has been pushed into service in ways that were not intended as part of its original design. TheRS-232Cprotocolusesanasynchronousschemethatpermitsflexiblecommunicationbetweencomputersanddevices using byte-sized data blocks each framed with start, stop, and optional parity bits on the data line. Other conductors carry the handshaking signals and possess names that indicate their purpose these include data terminal ready, request to send, clear to send, data set ready, etc.Another advantage of asynchronous schemes is that they do not demand complexity in the receiver hardware. As each byte of data has its own start and stop bits, a small amount of drift or imprecision at the receiving end does not necessarily spell disaster since the device only has to keep pace with the data stream for a modest number of bits. So, if an interruption occurs, the receiving device can re-establish its operation with the beginning of the arrival of the next byte. This ability allows for the use of inexpensive hardware devices.Although asynchronous data transfer schemes like RS-232 work well when relatively small amounts of data need to be transferred on an intermittent basis, they tend to be sub-optimal during large information transfers. Thisisso,becausetheextrabitsthatframeincomingdatatendtoaccountforasignificantpartoftheoverallinter-machinetraffic,hence,consumingaportionofthecommunicationbandwidth.

    An alternative is to dispense with the extra handshaking signals and overhead, instead synchronising the transmitter and receiver with clock signal or synchronisation information contained within the transmitted code before transmitting large amounts of information. This arrangement allows for collection and dispatch of large batches of bytes of data, with a few bytes at the front-end that can be used for the synchronisation and control. Theseleadingbytesarevariouslycalledsynchronisationbytes,flags,andpreambles.

    If the actual communication channel is not a great distance, the clocking signal can also be sent as a separate stream of pulses. This ensures that the transmitter and receiver are both operating on the same time base, and the receiver can be prepared for data collection prior to the arrival of the data.An example of a synchronous transmission scheme is known as the High-level Data Link Control, or HDLC. This protocol arose from an initial design proposed by the IBM Corporation. HDLChasbeenusedatthedatalinklevelinpublicnetworksandhasbeenadaptedandmodifiedinseveraldifferent ways since.A more advanced communication protocol is the Asynchronous Transfer Mode (ATM), which is an open, international standard for the transmission of voice, video, and data signals. SomeadvantagesofATMincludeaformatthatconsistsofshort,fixedcells(53bytes)whichreduceoverheadinmaintenanceofvariable-sizeddatatraffic.

    The versatility of this mode also allows it to simulate and integrate well with legacy technologies, as well as offering the ability to guarantee certain service levels, generally referred to as quality of service (QoS) parameters.

  • 13/uts

    1.12 Types of Communication ServicesA term used to describe the data-handling capacity of a communication service is bandwidth. Bandwidth is the range of frequencies that is available for the transmission of data.

    A narrow range of frequencies in a communication system is analogous to a garden hose with a small diameter. Theflowofinformationinsuchasystemitsdatarateisrestricted,justasistheflowofwaterinthenarrowhose. Widerbandwidthspermitmorerapidinformationflow.Thecommunicationdatatransferrateismeasuredinaunit called baud. Baud is identical to bits per second. Therefore, a rate of 300 baud is 300 bits per second.Communication companies such as American Telephone and Telegraph (AT&T) and Western Union are called common carriers, and they provide three general classes of service for both, voice and data communi-cation:Narrowband handles low data volumes. Data transmission rates are from 45 to 300 baud. The low- speed devices might use narrow band communications.Voice band handles moderate data transmission volumes between 300 and 9600 baud. They are used for applications ranging from operating a CRT to running a line printer. Their major application is for telephone voice communication hence, the term voice band.Broadband handles very large volumes of data. These systems provide data transmission rates of 1 million baud or more. High-speed data analysis and satellite communications are examples of broadband communication systems.

    1.13 Serial CommunicationThe purpose of this application note is to attempt to describe the main elements in Serial Communication. This application note attempts to cover enough technical details of RS232, RS422 and RS485.

    DCE and DTE DevicesDTE stands for Data Terminal Equipment, and DCE stands for Data Communications Equipment. These terms are used to indicate the pin-out for the connectors on a device and the direction of the signals on the pins. Your computer is a DTE device, while most other devices such as modem and other serial devices are usually DCE devices. RS-232 has been around as a standard for decades as an electrical interface between Data Terminal Equipment (DTE) and Data Circuit-Terminating Equipment (DCE) such as modems or DSUs. It appears under different incarnations such as RS-232C, RS-232D, V.24, V.28 or V.10. RS-232 is used for asynchronous data transfer as well as synchronous links such as SDLC, HDLC, Frame Relay and X.25.

    RS232RS-232 (Recommended standard-232) is a standard interface approved by the Electronic Industries Association (EIA) for connecting serial devices. In other words, RS-232 is a long established standard that describes the physical interface and protocol for relatively low-speed serial data communication between computers and related devices. Anindustrytradegroup,theElectronicIndustriesAssociation(EIA),defineditoriginallyforteletypewriter devices. In 1987, the EIA released a new version of the standard and changed the name to EIA-232-D. Many people, however, still refer to the standard as RS-232C, or just RS- 232. RS-232 is the interface that your computer uses to talk to and exchange data with your modem and other serial devices. The serial ports on most computers use a subset of the RS-232C standard.

    RS232 on DB9 (9-pin D-type connector)

  • Computer Networks and Tools

    14/uts

    There is a standardised pinout for RS-232 on a DB9 connector, as shown below.

    Pin Number Signal Description

    1 DCD Data Carrier detect

    2 RxD Receive Data

    3 TxD Transmit Data

    4 DTR Data Terminal Ready

    5 GND Signal Ground

    6 DSR Data Set Ready

    7 RTS Ready to Send

    8 CTS Clear To Send

    9 RI Ring Indicator

    Table 1.1 9-pin D-type connector

    RS232 on DB25 (25-pin D-type connector)In DB-25 connector, most of the pins are not needed for normal PC communications, and indeed, most new PCs are equipped with male D type connectors having only 9 pins. Using a 25-pin DB-25 or 9-pin DB-9 connector, its normal cable limitation of 50 feet can be extended to several hundred feet with high-quality cable. RS-232definesthepurposeandsignaltimingforeachofthe25lines;however,manyapplicationsuseless than a dozen. There is a standardised pinout for RS-232 on a DB25 connector, as shown below.

    Pin Number Signal Description

    1 PG Protective ground

    2 TD Transmitted Data

    3 RD Received Data

    4 RTS Request to Send

    5 CTS Clear to send

    6 DSR Data Set Ready

    7 SG Signal Ground

    8 CD Carrier Detect

    9 + Voltage (testing)

    10 - Voltage (testing)

    11

    12 SCD Secondary CD

  • 15/uts

    13 SCS Secondary CTS

    14 STD Secondary TD

    15 TC Transmit Clock

    16 SRD Secondary RD

    17 RS Receive Clock

    18 Ready to Send

    19 SRS Secondary RTS

    20 DTR Data terminal Ready

    21 SQD Signal Quality Detector

    22 RI Ring Indicator

    23 DRS Data Rate Select

    24 XTC External Clock

    25

    Table 1.2 25-Pin D-type connector RS232 on RJ-45

    RJ-45 (Registered Jack-45) is an eight-wire connector used commonly to connect computers onto local-area networks (LAN), especially Ethernets. In other words, RJ-45 is a single-line jack for digital transmission over ordinary phone wire, either untwisted or twisted. The interface has eight pins or positions. For faster transmissions in which you were connecting to an Ethernet 10BASET network, you need to use twisted pair wire. RS232D, EIA/TIA - 561 standard is applied when connecting to or from a serial port with a 8 position Modular Jack (RJ45) though it is not widely used as such.

    Fig. 1.14 RJ-45 connector

  • Computer Networks and Tools

    16/uts

    Signal descriptionTxD: This pin carries data from the computer to the serial device. RXD: This pin carries data from the serial device to the computer. DTR signals: DTR is used by the computer to signal that it is ready to communicate with the serial device like

    modem. In other words, DTR indicates to the Dataset (i.e., the modem or DSU/CSU) that the DTE (computer) is ON.

    DSR: Similar to DTR, Data set ready (DSR) is an indication from the Dataset that it is ON. DCD: Data Carrier Detect (DCD) indicates that carrier for the transmit data is ON. RTS: This pin is used to request clearance to send data to a modem. CTS: This pin is used by the serial device to acknowledge the computers RTS Signal. In most situations,

    RTS and CTS are constantly on throughout the communication session. CD: CD stands for Carrier Detect. Carrier Detect is used by a modem to signal that it has a made a

    connection with another modem, or has detected a carrier tone. In other words, this is used by the modem to signal that a carrier signal has been received from a remote modem.

    RI: RI stands for Ring Indicator. A modem toggles (keystroke) the state of this line when an incoming call rings your phone. In other words, this is used by an auto answer modem to signal the receipt of a telephone ring signal

    Clock signals (TC, RC, and XTC): The clock signals are only used for synchronous communications. The modem or DSU extracts the clock from the data stream and provides a steady clock signal to the DTE. Note that the transmit and receive clock signals do not have to be the same, or even at the same baud rate. The Carrier Detect (CD) and the Ring Indicator (RI) lines are only available in connections to a modem. Because most modems transmit status information to a PC when either a carrier signal is detected (i.e., when a connection is made to another modem) or when the line is ringing, these two lines are rarely used.

    DTE-DCE interface There are two terms important to computer networking:

    Date Terminal Equipment Data Circuit-terminating Equipment (DCE)

    Facts The DTE generates the data and passes them, along with any necessary control characters, to a DCE. The DCE converts the signal to a format appropriate to the transmission medium and introduces it onto the network link. When the signal arrives at the receiving end, this process is reversed.

    DTEIncludes any unit that functions either as a source of or as a destination for binary digital data. At the physical layer, it can be a terminal, microcomputer, computer, printer, fax machine or any other device that generates or consumes digital data. Imagine: concept of brain function.

    DCEIncludes any functional unit that transmits or receives data in the form of an analog or digital signal through network.At the physical layer, a DCE takes data generated by a DTE, converts them to an appropriate signal, and then introduces the signal onto the telecommunication link. e.g. modem (modulator/demodulator). In any network DTE generates digital data and passes them to a DCE; the DCE converts the data to a form acceptable to the transmission medium and sends the converted signal to another DCE on the network.The second DCE takes the signal off the line, converts it to a form usable by its DTE, and delivers it.

  • 17/uts

    InterfacingTo ease the burden on data processing equipment manufacturers and users, standards have been developed that specify the exact nature of the interface between the DTE and the DCE. Such an interface has 4 important characteristics:

    Mechanical (all the 4 refer to text book pg 181) Electrical Functional Procedural

    EIAThe most active organisation that develop DTE-DCE interface standard. EIA standard called as v series/x series

    EIA-232 interfacePreviously called RS-232 standard issued in 1962 and has been revised several times. The most recent version, EIA-232-D

    MechanicalspecificationofEIA-232Definestheinterfaceasa25-wirecablewithamaleandfemaleDB-25pinconnectorattachedtoeither end. The length of the cable may not exceed 15 meters,

    ElectricalspecificationofEIA-232Theelectricalspecificationofthestandarddefinesthevoltagelevelandthetypeofsignaltobetransmitted in either direction between the DTE and the DCE.EIA-232 states that all data must be transmitted as logical 1s and 0s (mark and space) using NRZ-L encoding, with0definedas+vevoltageand1definedas-vevoltage.

    FunctionalspecificationofEIA-2322 Different implementations of EIA-232 are available: DB-25 and DB-9

    DB-25 ImplementationEIA-232definesthefunctionsassignedtoeachofthe25pinsintheDB-25connector.

    NoteRemember that a female connector will be the mirror image of the male, so that pin 1 in the plug matches tube 1 in the receptable, and so on.DB-9 implementationMany of the pins on the DB-25 implementation are not necessary in a single asynchronous connection. A simpler9-pinversionofEIA-232knownasDB-9andshowninfig.6.11

    Other interface standardBoth data rate and cable length (signal distance capability) are restricted by EIA-232: data rate to 20 kbps and cable length to 50 feet (15 meters).

    To meet the needs of users who require more speed and/or distance, the EIA and the ITU-T have introduced additional interface standards: EIA-449, EIA-530 and X.21.

  • Computer Networks and Tools

    18/uts

    Summary Computerscameintoexistenceintheearly1950sandduringthefirsttwodecadesofitsexistence,itremainedas a centralised system housed in a single large room. In those days, the computers were large in size and were operated by trained personnel. To the users, it was a remote and mysterious object having no direct communication with the users. Jobs were submitted in the form of punched cards or paper tape and outputs were collected in the form of computer printouts. The submitted jobs were executed by the computer one after the other, which is referred to as batch mode of data processing.In this scenario, there was long delay between the submission of jobs and receipt of the results.In the 1960s, computer systems were still centralised, but users provided with direct access through interactive terminals connected by point-to-point low-speed data links with the computer.OnesignificantdevelopmentwastheAPPANET(AdvancedResearchProjectsAgencyNetwork).

    Starting with four-node experimental network in 1969, it has subsequently grown into a network several thousand computers spanning half of the globe, from Hawaii to Sweden. Most of the present-day concepts such as packet switching evolved from the ARPANET project. The low bandwidth (3KHz on a voice grade line) telephone network was the only generally available communication system available for this type of network. Computer networks can be broadly categorised into two types based on transmission technologies is Broadcast networks and Point-to-point networks.The end devices that wish to communicate are called stations. The switching devices are called nodes. Some Nodes connect to other nodes and some to attached stations. It uses FDM or TDM for node-to-node communication. LAN isusuallyprivatelyownedand links thedevices in a singleoffice,buildingor campusofup to fewkilometers in size. These are used to share resources (may be hardware or software resources) and to exchange information. LANs are distinguished from other kinds of networks by three categories: their size, transmission technology and topology.Various networks such as LAN and WAN connected through suitable hardware and software to work in a seamless manner. Thepurposeofanetworkistotransmitinformationfromonecomputertoanother.Todothis,youfirsthavetodecide how to encode the data to be sent, in other words its computer representation. This will differ according to the type of data. The distance over which data moves within a computer may vary from a few thousandths of an inch, as is the case within a single IC chip, to as much as several feet along the backplane of the main circuit board. Over such small distances, digital data may be transmitted as direct, two-level electrical signals over simple copper conductors. Except for the fastest computers, circuit designers are not very concerned about the shape of the conductor or the analog characteristics of signal transmission.Frequently, however, data must be sent beyond the local circuitry that constitutes a computer. In many cases, the distances involved may be enormous. Acommunicationschannel isapathwayoverwhich informationcanbeconveyed. Itmaybedefinedbyaphysical wire that connects communicating devices, or by a radio, laser, or other radiated energy source that has no obvious physical presence.

  • 19/uts

    Information sent through a communications channel has a source from which the information originates, and a destination to which the information is delivered. Although information originates from a single source, there may be more than one destination, depending upon how many receive stations are linked to the channel and how much energy the transmitted signal possesses.

    ReferencesTanenbaum, 2003. Computer Networks, Pearson Education. Peterson, L.L and Davie. B. S., 2007. Computer networks: A systems approach, Morgan Kaufmann. Singh, K. A., 2005. Computer Network, Firewall Media. megaboy84, 2006. Computer Networks, [Video Online] Available at: [Accessed 19 Jauary 2012].lonelyusa, 2009. Computer Network Tutorial, [Video Online] Available at:[Accessed 19 Jauary 2012].Networking Fundamentals , [Pdf] Available at: [Accessed 10 January 2012].Dr. Banerjee, R., Computer Networks, [Pdf] Available at: [Accessed 10 January 2012].

    Recommended ReadingKwiecien, A, 2010. Computer Networks: 17th Conference, CN 2010, Ustron, Poland, June 15-19, 2010. Springer. Hsu, J. Y, 1996. Computer networks: architecture, protocols, and software. Artech house.Black, U. D, 1993. Computer networks: protocols, standards, and interfaces. PTR Prentice Hall.

  • Computer Networks and Tools

    20/uts

    Self Assessment Thenetworkthatismakingsignificantimpactonourday-to-daylifeisthe_____________.1.

    telecommunication network a. computer networkb. electric network c. electronic network d.

    Totheusers,_________wasaremoteandmysteriousobjecthavingnodirectcommunicationwiththeusers.2. computer a. satellite b. aeroplane c. radio d.

    Broadcastnetworkhasa________communicationchannelthatissharedbyallthemachinesonthenetwork.3. double a. multiple b. singlec. many d.

    SomeBroadcastsystemsalsosupporttransmissiontoasub-setofmachines,somethingknownas_________.4. multicastinga. multiple casting b. mix casting c. mode casting d.

    Theenddevicesthatwishtocommunicatearecalled_________.5. setsa. stationsb. stagesc. sitesd.

    _______isusuallyprivatelyownedandlinksthedevicesinasingleoffice,buildingorcampusofuptofew6. kilometres in size.

    WANa. LANsb. PANc. CANd.

    ______isdesignedtoextendovertheentirecity.7. MANa. PANb. CANc. WANd.

  • 21/uts

    __________provideslong-distancetransmissionofdata,voice,imageandinformationoverlargegeographical8. areas that may comprise a country, continent or even the whole world.

    CANa. LANb. WANc. PANd.

    __________isacollectionofnetworksornetworkofnetworks.9. Sub-neta. Internetb. Extra-Netc. Entra-netd.

    Thepurposeofanetworkistotransmitinformationfromone___________toanother.10. rooma. computerb. areac. networkd.

  • Computer Networks and Tools

    22/uts

    Chapter II

    OSI Reference Model and Protocols

    Aim

    The aim of this chapter is to:

    explain the standards used in communications

    elucidate ISO organisation

    evaluate OSI reference models layer

    Objectives

    The objectives of this chapter are to:

    describe layers in reference model

    discuss the terminology of OSI model

    explain the working of each layer in reference model

    Learning outcome

    At the end of this chapter, you will be able to:

    explain the RS-232 working in communication

    describetheconceptofflowcontrol

    discuss the automatic repeat req uest

  • 23/uts

    2.1 The Need For StandardsOver the past couple of decades, many of the networks that were built, used different hardware and software implementations and as a result theywere incompatible and it becamedifficult for networks using differentspecificationstocommunicatewitheachother.Toaddresstheproblemofnetworksbeingincompatibleandunableto communicate with each other, the International Organisation for Standardisation (ISO) researched various network schemes. The ISO recognised that there was a need to create a network model which would help vendors create interoperable network implementations.

    2.2 ISO - Organisation for StandardisationThe International Organisation for Standardisation (ISO) is an International standards organisation responsible for a wide range of standards, including many that are relevant to networking. In 1984, in order to aid network interconnection without necessarily requiring complete redesign, the Open Systems Interconnection (OSI) reference model was approved as an international standard for communications architecture.

    2.2.1 The OSI Reference ModelThis model was developed by the International Organisation for Standardisation (ISO) in 1984. It is now considered the primary Architectural model for inter-computer communications. The Open Systems Interconnection (OSI) reference model is a descriptive network scheme. It ensures greater compatibility and interoperability between various types of network technologies.

    The OSI model describes how information or data makes its way from application programmes (such as spreadsheets) through a network medium (such as wire) to another application programme located on another network. The OSI reference model divides the problem of moving information between computers over a network medium into seven smaller and more manageable problems. This separation into smaller more manageable functions is known as layering.

    2.2.2 A Layered Network ModelThe OSI Reference Model is composed of seven layers, each specifying particular network functions.

    The process of breaking up the functions or tasks of networking into layers reduces complexity.Eachlayerprovidesaservicetothelayeraboveitintheprotocolspecification.

    Each layer communicates with the same layers software or hardware on other computers.Thelower4layers(transport,network,datalinkandphysical-Layers4,3,2,and1)areconcernedwiththeflowof data from end to end through the network.The upper four layers of the OSI model (application, presentation and session-Layers 7, 6 and 5) are orientated more towards services to the applications. Data is encapsulated with the necessary protocol information as it moves down the layers before network transit.

  • Computer Networks and Tools

    24/uts

    2.3 The Seven OSI Reference Model Layers

    7. Application Layer Network Processes to Applications6. Presentation Layer Data Representation5. Session Layer Interhost Communication4. Transport Layer End- to end Connections3. Network Layer Address and Best Path2. Data Link Layer Access to media1. Physical Layer Binary Transmission

    Fig. 2.1 OSI Model

    Layer 7: ApplicationApplication layer provides network services to the users applications.

    It differs from the other layers. It does not provide services to any other OSI layer, but rather, only to applications outside the OSI model.Examples of such applications are spreadsheet programs, word processing programs, and bank terminal programs.The application layer establishes the availability of intended communication partners synchronises and establishes agreement on procedures for error recovery and control of data integrity.

    Layer 6: PresentationThe presentation layer ensures that the information that the application layer of one system sends out is readable by the application layer of another system.

    If necessary, the presentation layer translates between multiple data formats by using a common format.It provides encryption and compression of data.Examples: JPEG, MPEG, ASCII, EBCDIC, HTML

    Layer 5: SessionThesessionlayerdefineshowtostart,controlandendconversations(calledsessions)betweenapplications.

    This includes the control and management of multiple bi-directional messages using dialogue control.It also synchronises dialogue between two hosts presentation layers and manages their data exchange.Thesessionlayeroffersprovisionsforefficientdatatransfer.

    Examples :- SQL, ASP (AppleTalk Session Protocol)

    Layer 4: TransportThetransportlayerregulatesinformationflowtoensureend-to-endconnectivitybetweenhostapplicationsreliablyand accurately.

    The transport layer segments data from the sending hosts system and reassembles the data into a data stream on the receiving hosts system.The boundary between the transport layer and the session layer can be thought of as the boundary between applicationprotocolsanddata-flowprotocols.Whereastheapplication,presentation,andsessionlayersareconcerned with application issues, the lower four layers are concerned with data transport issues.Layer 4 protocols include TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).

  • 25/uts

    Layer 3: NetworkNetworklayerdefinesend-to-enddeliveryofpackets.

    Defineslogicaladdressing,sothatanyendpointcanbeidentified.

    Defineshowroutingworksandhowroutesarelearnedsothatthepacketscanbedelivered.

    The network layer also defines how to fragment a packet into smaller packets to accommodate differentmedia.Routers operate at Layer 3.Examples :- IP, IPX, AppleTalk

    Layer 2: Data linkThe data link layer provides access to networking media and physical transmission across the media and this enables the data to locate its intended destination on a network.

    The data link layer provides reliable transit of data across a physical link by using the Media Access Control (MAC) addresses.ThedatalinklayerusestheMACaddresstodefinehardwareordatalinkaddressinorderformultiplestationsto share the same medium and still uniquely identify each other.Concernedwithnetwork topology,networkaccess,errornotification,ordereddeliveryof frames,andflowcontrol.Examples: Ethernet, Frame Relay, FDDI.The Data Link Layer is Layer 2 of the seven-layer OSI model of computer networking. It corresponds to, or is part of the link layer of the TCP/IP reference model. The Data Link Layer is the protocol layer which transfers data between adjacent network nodes in a wide area network or between nodes on the same local area network segment.The Data Link Layer provides the functional and procedural means to transfer data between network entities and might provide the means to detect and possibly correct errors that may occur in the Physical Layer. Examples of data link protocols are Ethernet for local area networks (multi-node), the Point-to-Point Protocol (PPP), HDLC and ADCCP for point to-point (dual-node) connections.The Data Link Layer is concerned with local delivery of frames between devices on the same LAN. Data Link frames, as these protocol data units are called, do not cross the boundaries of a local network. Inter-network routing and global addressing are higher layer functions, allowing Data Link protocols to focus on local delivery, addressing, and media arbitration. Inthisway,theDataLinklayerisanalogoustoaneighbourhoodtrafficcop;itendeavourstoarbitratebetweenparties contending for access to a medium.When devices attempt to use a medium simultaneously, frame collisions occur. Data Link protocols specify how devices detect and recover from such collisions, and may provide mechanisms to reduce or prevent them. Delivery of frames by layer 2 devices is affected through the use of unambiguous hardware addresses. A frames header contains source and destination addresses that indicate which device originated the frame and which device is expected to receive and process it. Incontrasttothehierarchicalandroutableaddressesofthenetworklayer,layer2addressesareflat,meaningthat no part of the address can be used to identify the logical or physical group to which the address belongs.The data link thus provides data transfer across the physical link. That transfer can be reliable or unreliable; many data link protocols do not have acknowledgments of successful frame reception and acceptance, and some data link protocols might not even have any form of checksum to check for transmission errors. Inthosecases,higher-levelprotocolsmustprovideflowcontrol,errorchecking,andacknowledgmentsandretransmission.

  • Computer Networks and Tools

    26/uts

    Sub layers of the data link layerData link layer is divided into two layers. These are discussed as follows:

    Logical Link Control sub layer The uppermost sub layer is called the Logical Link Control (LLC).

    ThissublayermultiplexesprotocolsrunningatoptheDataLinkLayer,andoptionallyprovidesflowcontrol,acknowledgment,anderrornotification.

    The LLC provides addressing and control of the data link. Itspecifieswhichmechanismsaretobeusedforaddressingstationsoverthetransmissionmediumandforcontrolling the data exchanged between the originator and recipient machines.

    Media Access Control sub layerThe sub layer below LLC is the Media Access Control (MAC) layer.

    Sometimes, this refers to the sub layer that determines who is allowed to access the media at any one time (usually CSMA/CD). Usually it is referred as a frame structure with MAC addresses inside.There are generally two forms of media access control: distributed and centralised. Both of these may be compared to communication between people. In a network made up of people speaking, i.e., a conversation, we look for clues from our fellow talkers to see if any of them appear to be about to speak. If two people speak at the same time, they will back off and begin a long and elaborate game of saying no, youfirst.

    The Media Access Control sub layer also determines where one frame of data ends and the next one starts frame synchronisation. Therearefourmeansofframesynchronisation:timebased,charactercounting,bytestuffingandbitstuffing.

    Thetimebasedapproachsimplyputsaspecifiedamountoftimebetweenframes.Themajordrawbackofthisisthatnewgapscanbeintroducedoroldgapscanbelostduetoexternalinfluences.

    Character counting simply notes the count of remaining characters in the frames header. This method, however, iseasilydisturbedifthisfieldgetsfaultyinsomeway,thusmakingithardtokeepupsynchronisation.

    BytestuffingprecedestheframewithaspecialbytesequencesuchasDLESTXandsucceedsitwithDLEETX. Appearances of DLE (byte value 0x10) has to be escaped with another DLE. The start and stop marks are detected at the receiver and removed as well as the inserted DLE characters. Similarly,bitstuffingreplacesthesestartandendmarkswithflagconsistingofaspecialbitpattern(Forexample,a 0, six 1 bits and a 0). Occurrences of this bit pattern in the data to be transmitted are avoided by inserting a bit.Tousetheexamplewheretheflagis01111110,a0isinsertedafter5consecutive1sinthedatastream.

    Theflagsandtheinserted0sareremovedatthereceivingend.Thismakesforarbitrarylongframesandeasysynchronisation for the recipient. Note that this stuffed bit is added, even if the following data bit is 0, which could not be mistaken for a sync sequence, so that the receiver can unambiguously distinguish stuffed bits from normal bits.

    Data link layer: Flow and error control flow layerFlowControlspecifieshowmuchdatathesendercantransmitbeforereceivingpermissiontocontinuefromthereceiver. Error Control allows the receiver to tell the sender about frames damaged or lost during transmission and coordinates the re-transmissionof those framesby the sender.Sinceflowcontrol provides theReceiversacknowledgement (ACK) of correctly-received frames, it is closely linked to error control.

  • 27/uts

    Layer 1: PhysicalThe physical layer deals with the physical characteristics of the transmission medium.

    Itdefinestheelectrical,mechanical,procedural,andfunctionalspecificationsforactivating,maintaining,anddeactivating the physical link between end systems.Such characteristics as voltage levels, timing of voltage changes, physical data rates, maximum transmission distances,physicalconnectorsandothersimilarattributesaredefinedbyphysicallayerspecifications.

    Examples: EIA/TIA-232, RJ45, NRZ.ThePhysicalLayerdefineselectricalandphysicalspecificationsfordevices.

    Inparticular,itdefinestherelationshipbetweenadeviceandatransmissionmedium,suchasacopperoropticalcable.Thisincludesthelayoutofpins,voltages,cablespecifications,hubs,repeaters,networkadapters,hostbus adapters (HBA used in storage area networks) and more.To understand the function of the Physical Layer, contrast it with the functions of the Data Link Layer. Think of the Physical Layer as concerned primarily with the interaction of a single device with a medium, whereas the Data Link Layer is concerned more with the interactions of multiple devices (i.e., at least two) with a shared medium. Standards such as RS-232 do use physical wires to control access to the medium.The major functions and services performed by the Physical Layer are: Establishment and termination of a connection to a communications medium. Participation in the process whereby the communication resources are effectively shared among multiple users. Forexample,contentionresolutionandflowcontrol.

    Modulation or conversion between the representation of digital data in user equipment and the corresponding signals transmitted over a communications channel. These are signals operating over the physical cabling (such ascopperandopticalfiber)oroveraradiolink.

    Parallel SCSI buses operate in this layer, although it must be remembered that the logical SCSI protocol is a Transport Layer protocol that runs over this bus. Various Physical Layer Ethernet standards are also in this layer; Ethernet incorporates both this layer and the Data Link Layer. The same applies to other local-area networks, such as token ring, FDDI, ITU-T G.hn and IEEE 802.11, as well as personal area networks such as Bluetooth and IEEE 802.15.4.

    2.4 RS-232In telecommunications, RS-232 (Recommended Standard 232) is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE (Data Terminal Equipment) and a DCE(DataCircuit-terminatingEquipment).Itiscommonlyusedincomputerserialports.Thestandarddefinestheelectrical characteristics and timing of signals, the meaning of signals, and the physical size and pinout of connectors. The current version of the standard is TIA-232-F Interface between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange, issued in 1997.

    2.4.1 Scope of the StandardTheElectronicIndustriesAssociation(EIA)standardRS-232-Casof1969defines:

    Electrical signal characteristics such as voltage levels, signalling rate, timing and slew-rate of signals, voltage withstand level; short-circuit behaviour, and maximum load capacitance. Interfacemechanicalcharacteristics,pluggableconnectorsandpinidentification.

    Functions of each circuit in the interface connector. Standard subsets of interface circuits for selected telecom applications. Thestandarddoesnotdefinesuchelementsascharacterencoding(forexample,ASCII,BaudotcodeorEBCDIC)the framing of characters in the data stream (bits per character, start/stop bits, parity) protocols for error detection or algorithms for data compression bit rates for transmission, although the standard says it is intended for bit rates lower than 20,000 bits per second.

  • Computer Networks and Tools

    28/uts

    Many modern devices support speeds of 115,200 bit/s and above power supply to external devices. Details of character format and transmission bit rate are controlled by the serial port hardware, often a single integrated circuit called a UART that converts data from parallel to asynchronous start-stop serial form. Details of voltage levels, slew rate, and short-circuit behaviour are typically controlled by a line driver that converts from the UARTs logic levels to RS-232 compatible signal levels, and a receiver that converts from RS-232 compatible signal levels to the UARTs logic levels.

    2.5 Stop-and-Wait Flow Control

    WT= wait time

    WT

    WT

    WT

    Time Time

    Sender Receiver

    DataACK

    Data

    ACKDataACKEOT

    Fig. 2.2 Stop-and-wait flow control

    ACKcanbeaframebyitself,oracontrolfieldindataframesgoingfromreceivertosender(piggybacking).Itsadvantageisitssimplicity.Ontheotherhand,itsdisadvantageisinefficiency(waittimes).

    Note: Wait times may vary for different frame transmissions, as is the case here can talk about average wait time.

    2.5.1 Basic Idea of Flow ControlEven if frames are received error-free, the receiver will be forced to drop some of them if the sender transmits faster than the receiver can process them. The sender has to slow the signal rate acceptable to the receiver. This signal can be explicit or implicit (e.g. delay sending ACK to sender). 2.5.2 Basic Idea of Error ControlACK every correctly-received frame and negatively acknowledge (NAK) each incorrectly-received frame. Sender keeps copies of un-ACKed frames to re-transmit if required. Packet (inside frames) passed to receivers network layer in order.

    Sliding window flow control

    Sender can transmit several frames continuously before needing an ACK. IfACKreceivedbysenderbeforecontinuoustransmissionisfinished,sendercancontinuetransmitting.

    An ACK can acknowledge the correct receipt of multiple frames at the Receiver. Frames and ACKs must be numbered:

    Each Frames number is 1 greater than the previous Frame. Each ACKs number is the number of the next frame expected by the Receiver.

  • 29/uts

    Window Number of grames that can betransmitted without an ACK

    6 17 20 3 4 5 6 7 0 2 3 4 51

    Fig. 2.3 Sliding window flow control

    Frames may be acknowledged by the Receiver at any time, and may be transmitted by the Sender as long as theWindowhasntfilledup.

    Frames are numbered modulo-n, from 0 to n-1: 0,1,2,....,n-1,0, 1,...Size of the window is n-1: 1 less than the number of different numbers.

    Senders sliding windowIf sender receives ACK 4, then Frames up to and including Frame 3 were correctly received.

    0 31 42 5 6 7 0 1 2 4 5 6 7 03

    This wall move to theright, by frame, when

    a frame is send

    This wall move to theright, the side of several frame at a time, when an

    ACK is received

    Direction

    Sender Windows

    Direction

    Fig. 2.4 Senders sliding window

  • Computer Networks and Tools

    30/uts

    Receivers sliding window Receivers window represents the number of un-ACKed Frames.

    0 31 42 5 6 7 0 1 2 4 5 6 7 03

    This wall move to theright, by frame, when

    a frame is received

    The sides of several frames will move to the right at the same time,

    when wall moves and anACK is sent

    Direction

    Sender Windows

    Direction

    Fig. 2.5 Receivers sliding window

    Sliding window flow control example (assume no errors:)

    Data 1

    ACK 2

    Data 0

    Data 2

    ACK 3

    Data 3

    Data 4

    Data 5

    ACK 6

    Sender ReceiverWindow size = 7

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    Fig. 2.6 Sliding window flow control

  • 31/uts

    Data 1

    ACK 2

    Data 0

    Data 2

    ACK 3

    Data 3

    Data 4

    Data 5

    ACK 6

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    Fig. 2.7 Sliding window flow control: sender behaviour

    Data 1

    ACK 2

    Data 0

    Data 2

    ACK 3

    Data 3

    Data 4

    Data 5

    ACK 6

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    1 23 4 5 6 7 0 120 3 4

    Fig. 2.8 Sliding window flow control: receiver behaviour

    2.6 Frame Correct First TimeCould try and get everything through correctly. If we Knew the problem then we could work out a parity correcting scheme to do this. Generally, we have to add substantial overhead even for fairly low Bit Error Rates (BER). However, for most networks we do not know in advance the properties of the links. We would also like our scheme to deal well with all types of links as best as is possible. Use a different philosophy to do this.

  • Computer Networks and Tools

    32/uts

    2.7 Automatic Repeat Request (ARQ)Now let us consider automatic repeat request in data transmission.

    When the receiver detects errors in a frame, how does it request the transmitter to resend the corresponding packet? The problem is that the feedback channel too is error prone. The simplest strategy is stop and wait: The sender sends a frame and waits for an ACK or NAK; then sends new packet or resends the old packet.

    msg arrival times at Receiver

    msg departure times at SenderTime

    NAKACK

    pkt 0Accepted

    pkt 1Accepted

    pkt 0 pkt 1 pkt 1CRC CRC CRC

    Fig. 2.9 Pure stop and wait protocol

    Notethatthereceiverdoesnotknowthecontentofthepacketreceivediscleanuntilitreceivesandverifiesthe CRC.

    Sequence number and request numberThe use of time-outs for lost packet requires sequence numbers to distinguish the retransmit packet and the next packet.

    Times -out Time

    ACK

    pkt 0Accepted pkt 0 or pkt 1?

    pkt 0 pkt 0CRC CRC

    Fig. 2.10 Sequence number

    Request Numbers are required on ACKs to distinguish packet ACKed.

    Time

    ?

    ACK ACK

    pkt 0Accepted

    pkt 1Accepted

    pkt 0 pkt 00 0 pkt 1Times -out

    X

    1

    Fig. 2.11 Request number

  • 33/uts

    Request numberInstead of sending ACK or NAK, the receiver sends the number of packets currently awaited.

    Sequence numbers and request numbers can be sent module 2. What is the name of this protocol?This works correctly for all combinations of delay and time-outs assuming that following points:

    Frames travel in order (FCFS) on links The CRC never fails to detect errors The system is correctly initialized.

    321

    Time

    1 3

    210 0

    2

    3

    31

    SN

    Sender

    Receiver

    pktAccepted 0

    Fig. 2.12 Request number

    Go Back n ARQ & Selective Repeat ARQDesirable to send data while awaiting an ackThe usual approach for this is called go back n ARQ.Two alternate approaches:

    Selective repeat ARQ ARPANET (Multiplex stop and wait schemes)

    Goback n (sliding window) ARQStandard scheme used by HDLC, SDLC, ADCCP, X25.Packets are numbered in order of arrival (SN); SN is sent in frame header (as in stop and wait).Receiver sends request number RN back to transmitter; says that receiver wants packet RN next (i.e., RN is theawaitednumber).RNisusuallypiggybackedonreturntraffic.

    SN RN Packet CRC

    Frame Header

    Fig. 2.13 Goback n (Sliding Window) ARQ

    The transmitter has a window of n packets that can be sent without acknowledgments.This window ranges from the last value of RN obtained from the receiver (denoted SN min) to SNmin+n1.When the transmitter reaches the end of its window, or times out, it goes back and retransmits packets starting from SNmin.

    Window (0.6)SN

    RN

    Node A

    Node B

    (1.7) (2.8) (3.9) (5.11)0 1 2 3 4 5 6

    10 2 3 4 5

    0 0pktAccepted

    Time

    1 2 3 5 5

    Fig. 2.14 Example of Goback 7 ARQ

    Note that packet RN1 must be accepted at Node B before a frame containing request RN can start transmission at Node B.

  • Computer Networks and Tools

    34/uts

    Retransmission due to errors in Goback 4 ARQ

    Window (0.3)SN

    RN

    Node A

    Node B

    (1.4) (2.8)0 1 2 3 4 3 4

    0 4

    0pktAccepted

    Time

    1

    1 2

    1 11 1 2 3

    321

    Fig. 2.15 Retransmission due to errors in Goback 4 ARQ

    Module m in Goback n systemsSN and RN are actually sent module m in Goback n systems.The constraint is that n < m.The standard choice is m=8; three bits for SN, three bits for RN.Optional standard is m=128 (for satellite channels and other channels where round trip delay is large relative to packet transmission time).Goback n is guaranteed to work correctly if condition is true:

    System is correctly initialised No failures in detecting errors Frame travel in FCFS order Positive probability of correct reception Transmitter occasionally resends SNmin Receiver occasionally sends RN

    Go Back n < 2mWheremisthe#ofbitsusedinsequence#field.

    If we use n = 2m, we will accept retransmitted frames.For the following go-back-3 protocol execution, what ack msg should be sent back?

  • 35/uts

    B

    A

    ACK1

    ACK2

    ACK3

    ACK4

    Receiver has Rnext =0 but it dose not know whether its ACK for frame 0 was received, so it dose not know whether this is the old frame 0 or anew frame 0

    timefr1

    fr1

    fr2

    fr3

    fr3

    fr0

    fr0

    fr2

    M=22=4, Go-Back - 4: Transmitter goes back 4

    B

    A

    ACK1

    ACK2

    ACK3

    Receiver has Rnext =3 so it rejects the oldframe 0

    timefr1

    fr1

    fr2

    fr0

    fr0

    fr2

    M=22=4, Go-Back - 3: Transmitter goes back 3

    Fig. 2.16 Go Back n < 2m

    Goback N with NAK

    fr1

    fr1

    fr2

    fr3

    fr4

    fr5

    fr6

    fr7

    fr0

    fr0

    fr3

    fr4

    fr5

    fr2

    ACK1

    NAK1

    ACK2

    ACK3

    ACK4

    ACK5

    ACK6

    ACK7

    error

    Transmitter goes back to frame 1

    Goes Back 7:

    time

    Out- of-sequence frames

    A

    B

    Fig. 2.17 Goback N with NAK

  • Computer Networks and Tools

    36/uts

    Selective Repeat ARQ

    Send WindowReceive Window

    Timer

    Framestransmittedand ACKed

    FramesreceivedSlast Rnext Rnext +Wr-1

    Rnext +Wr=1

    Rnext +1

    Rnext +2Timer

    Timer

    SlastSlast+1

    Slast+1Ws-1

    Slast+1Ws-1

    Srecent

    SrecentBuffers

    need more buffer on receivercan receive pkts out of order

    Fig. 2.18 Selective Repeat ARQ sender and receiver window

    EfficiencyofGobackncanbeincreasedbyacceptingpacketsoutoforder.

    An explicit NAK (selective reject) can request retransmission of just one packet. Typicalframeerrorratesarelessthan0.001;selectiverepeatdoesnotgainmuchinefficiencyunlesstherearevery many frames in a round trip delay. For a window size of n, the modulus must be at least 2n. Or For m bit sequence #, us window size of 2 m-1.

    fr1

    fr6

    fr2

    fr7

    fr8

    fr9

    fr10

    fr11

    fr12

    fr0

    fr3

    fr4

    fr5

    fr2

    ACK1

    ACK2

    ACK2

    ACK2

    ACK2

    ACK2

    ACK7

    ACK8

    ACK9

    ACK10

    ACK11

    ACK12

    error

    time

    A

    B

    Fig. 2.19 Select repeat ARQ

  • 37/uts

    2m-1 window size for Selective Repeat ARQ

    Frame 0 resentretransmission

    Correct Window size to use 2m-1

    Frame 0 resent

    time

    time

    Receive window {3,0,1}

    M-22-4, selective Repeat: Send Window - Receive Window - 3 Incorrect WayUse a window sizesimillar to Goback n n=2m -1

    it falls in receive window and will be accepted as a new msg.

    Send Window - Receive Window -2

    fr1

    fr1

    fr0

    fr0

    fr2

    fr0

    fr0

    ACK1

    ACK1

    ACK2

    ACK2

    ACK3

    A

    A

    B

    B

    Its sequence # not within receive window it is recognised as duplicate msg.

    frame 0 rejected

    Receive Window {2,3}

    Fig. 2.20 2m-1 window size for selective repeat ARQ

    2.8 Frame SynchronisationThreeapproachestofindframeandidlefillboundariesare:

    Character-oriented protocolsBit-orientedprotocol(useflags)

    Length counts (characters or bits)

    2.8.1 Character-oriented ProtocolsIn IBM BSC (Binary Synchronous Comm.), a frame begins at the end of a sequence of two or more SYN characters in the incoming signal.

    Normal modeSYN SYN [control and data characters] BCC BCC 8 8 terminated by ITB,ETB or ETX character

    SYN SYN [Control characters]Note:

    SYN is an ASCII character with 00010110 patterns.BCC BCC are 16 parity bits for error detection.

    Transparent text modeSYN SYN DLE STX [transparent data] DLE ETX BCC BCCThetransparentdatamaycontainDLEcontrolcharactercharacterstuffing.

  • Computer Networks and Tools

    38/uts

    Character stuffing

    DLEDLE DLESTX BA ETX

    DLEDLE DLESTX BA ETX

    Data from Network layer

    Data Link Layer: Character-oriented Protocol at transprant text mode

    Data Link Layer: Character-oriented Protocol at transprant text mode

    DLE DLEDLE DLEDLE STX DLE ETX DLE ETX BCC BCCASYN DLESYN STX B

    Sender

    Physical Layer

    :Stuffed DLE

    Receiver

    Data to Network Layer

    Stuffed transprant dataFrame come down from data link layer

    Fig. 2.21 Character stuffing

    Drawbacks of character-oriented framingCharacter code dependentErrorsincontrolcharactersaredifficulttohandle.

    Exercise on character stuffingUsing BSC protocol operating at text transparent mode, given the data DLE, DLE, A, DLE from the network layer, what will be the frame sent out?Ans: The frame sent out is as follows (in transparent text mode)

    DLEDLE DLE DLE DLE DLEDLE ETX BCC BCCASYN DLESYN STX:stuffed DLE

    Fig. 2.22 Character stuffing exercise

    2.8.2 Bit-oriented ProtocolHDLC, SDLC, ADCCP are bit-oriented protocols.All frames look like

    Bits subject to1. error checking2. insertion/deletion of a zero following 5 consecutive ones

    variable length transparent data

    F Address Control info FCS F

    Fig. 2.23 Bit-oriented protocol

    Flag F is the unique sequence 01111110

    Bit stuffing

    A0isstuffedaftereachconsecutivefive1sintheoriginalframe.

    Aflag,01111110,withoutstuffing,issentattheendoftheframe.

  • 39/uts

    Destuffing

    If 0 is preceded by 011111 in received bit stream, remove it.If0isprecededby0111111,itisthefinalbitoftheflag.

    Example: Bits to be removed are underlined below1001111101100011110111110001111110 Flag

    Why is it necessary to stuff 0 in 0111110? If not, then011111011101111101110111111110111110111Theoverheadperframeintheflagschemeisonebytefortheflagplus1/64timestheexpectedframelength.Forshortframelengths,thisisessentiallyoptimallyefficient.

    2.8.3 Length Counts FramingSomeDLCprotocolsuseaheaderfieldtogivethelengthoftheframe(inbits,orbytes).Thisconveysthesameinformationastheflagschemeandusesessentiallythesameoverhead.

    Example: DECNET uses length counts approach.

    A disadvantage is that resynchronisation is needed after an error in the length count.

    2.9 Framing ErrorsSome framing errors are as follows:

    Anerrorinaflag,oraflagcreatedbyanerrorcausesaframetodisappearoranextraframetoappear.

    Anerrorinalengthcountfieldcausestheframetobeterminatedatthewrongpointandmakesittrickytofindthe beginning of the next frame. An error in DLE, STX, or ETX causes the same problems. When a framing error is made, the receiver looks in the wrong place for CRC. With a 16 bit CRC, the probability of false acceptance is about 2-16.DECNETpartiallyavoidtheproblembyputtingCRConpacketheader;inefficient.

    Using a longer CRC is probably the best current solution to this problem.

    2.10 DLC StandardsHDLC, ADCCP, LAPB (X.25 layer 2), and SDLC are almost the same except that LAPB and SDLC are subsets of HDLCandADCCP(whicharevirtuallyidentical).Theseclassesofprotocolsalluseflagsforflamingandgobackn for error detection and retransmission.

    Flag Address Control Packet CRC Flag8 8 8 16 8

    Fig. 2.24 DLC standards

    Theaddressfieldallowuseonmultipointlines.

    0 SN P/F RN

    1 0 Type P/F RN

    1 1 Type P/F Type

    Table 2.1 Polling/Final bit

  • Computer Networks and Tools

    40/uts

    Information frames use SN and RN for goback n (mod 8)Supervisory frames send ACKs (RN) without dataUnnumbered frames are for initiation, termination, etc.

    2.11 Control FramesThere are four types of supervisory frames that send ack information. These are as follows:

    receive ready (normal ACK) receive not ready (ACks but requests no further data) reject (to explicitly send a NAK) selective reject (for primitive selective repeat)

    The unnumbered frames are used to initiate and terminate the link protocol and to send various special commands.

    There are 3 modes of operations - asynchronous balanced (LAPB), normal response (SDLC), and asynchronous response (SDLC). Thethirdisrarelyused,thesecondisformaster/slaverelationships(andnotatallnormal),andthefirstis normal for data networks. The unnumbered frames initiate operation in one of these modes. The error handling on these unnumbered frames is somewhat defective.

    2.12 High-level Data Link Control (HDLC)High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-point and multipoint links.

    Configurations and transfer modesHDLCprovidestwocommontransfermodesthatcanbeusedindifferentconfigurations:Normal response mode (NRM) and asynchronous balanced mode (ABM).

    Normal response modeInnormalresponsemode(NRM),thestationconfigurationisunbalanced.

    We have one primary station and multiple secondary stations. A primary station can send commands; a secondary station can only respond. TheNRMisusedforbothpoint-to-pointandmultiple-pointlinks,asshowninfiguregivenbelow.

    Commend

    Primary Secondary

    Response

    Fig. 2.25 Point-to-point normal response mode

  • 41/uts

    Command

    Primary

    Secondary Secondary

    Response Response

    Fig. 2.26 Multipoint normal response mode

    Asynchronous balanced mode Inasynchronousbalancedmode(ABM),theconfigurationisbalanced.Thelinkispoint-to-point,andeachstationcanfunctionasaprimaryandasecondary(actingaspeers),asshowninfiguregivenbelow.Thisisthecommonmode today.

    Command Response

    Command Response

    CombinedCombined

    Fig. 2.27 Asynchronous balanced mode

    FramesToprovidetheflexibilitynecessarytosupportall theoptionspossibleinthemodesandconfigurationsjustdescribed,HDLCdefinesthreetypesofframes:informationframes(I-frames),supervisoryframes(S-frames),and unnumbered frames (V-frames). Each type of frame serves as an envelope for the transmission of a different type of message.I-frames are used to transport user data and control information relating to user data (piggybacking). S-frames are used only to transport control information. V-frames are reserved for system management. Information carried by V-frames is intended for managing the link itself.

    Frame formatEachframeinHDLCmaycontainuptosixfields,asshowninfiguregivenbelow:abeginningflagfield,anaddressfield,acontrolfield,aninformationfield,aframechecksequence(FCS)field,andanendingflagfield.

    Inmultiple-frame transmissions, the endingflagof one frame can serve as the beginningflagof the nextframe.

    Flag

    Flag

    Flag Address

    Address

    Address Control

    Control

    User Information

    ManagementInformation

    PCS

    PCS

    Flag

    FlagControl

    FCS Flag S-frame

    I-frame

    U-frame

    Fig. 2.28 HDLC frames

  • Computer Networks and Tools

    42/uts

    FieldsLetusnowdiscussthefieldsandtheiruseindifferentframetypes.

    Flag fieldTheflagfieldofanHDLCframeisan8-bitsequencewiththebitpattern01111110thatidentifiesboththebeginningand the end of a frame and serves as a synchronization pattern for the receiver.

    Address field

    ThesecondfieldofanHDLCframecontainstheaddressofthesecondarystation.

    If a primary station created the frame, it contains a to address. If a secondary creates the frame, it contains a from address. Anaddressfieldcanbe1byteorseveralbyteslong,dependingontheneedsofthenetwork.

    One byte can identify up to 128 stations (l bit is used for another purpose). Largernetworksrequiremultiple-byteaddressfields.

    Iftheaddressfieldisonly1byte,thelastbitisalwaysa1.

    If the address is more than 1 byte, all bytes but the last one will end with 0; only the last will end with 1. Ending each intermediate byte with 0 indicates to the receiver that there are more address bytes to come.

    Control field

    Thecontrolfieldisa1-or2-bytesegmentoftheframeusedforflowanderrorcontrol.

    Theinterpretationofbitsinthisfielddependsontheframetype.

    Information fieldTheinformationfieldcontainstheusersdatafromthenetworklayerormanagementinformation.Itslengthcanvary from one network to another.

    FCS fieldTheframechecksequence(FCS)is theHDLCerrordetectionfield.Itcancontaineithera2-or4-byteITU-TCRC.

    2.13 X.25 ProtocolX.25 is an International Telecommunication UnionTelecommunication Standardization Sector (ITU-T) protocol standardforWANcommunicationsthatdefineshowconnectionsbetweenuserdevicesandnetworkdevicesareestablished and maintained.

    X.25 is designed to operate effectively regardless of the type of systems connected to the network. It is typically used in the packet-switched networks (PSNs) of common carriers, such as the telephone companies. Subscribers are charged based on their use of the network. The development of the X.25 standard was initiated by the common carriers in the 1970s.At that time, there was a need for WAN protocols capable of providing connectivity across public data networks (PDNs). X.25 is now administered as an international standard by the ITU-T. This chapter covers the basic functions and components of X.25.

  • 43/uts

    2.13.1 X.25 Devices and Protocol OperationX.25 network devices fall into three general categories: data terminal equipment (DTE), data circuit-terminating equipment (DCE), and packet switching exchange (PSE).

    Data terminal equipment devices are end systems that communicate across the X.25 network. They are usually terminals, personal computers, or network hosts, and are located on the premises of individual subscribers. DCE devices are communications devices, such as modems and packet switches that provide the interface between DTE devices and a PSE and are generally located in the carriers facilities. PSEs are switches that compose the bulk of the carriers network. They transfer data from one DTE device to another through the X.25 PSN.

    Figure given below illustrates the relationships between the three types of X.25 network devices.

    DTE

    DTE

    Network Host

    PersonalComputer

    DCE

    PSE

    x.25 WAN

    SwitchModem

    Fig. 2.29 DTEs, DCEs, and PSEs make up an X.25 network

    2.13.2 Packet Assembler/Disassembler (PAD)The packet assembler/disassembler (PAD) is a device commonly found in X.25 networks.

    PADs are used when a DTE device, such as a character-mode terminal, is too simple to implement the full X.25 functionality. The PAD is located between a DTE device and a DCE device, and it performs three primary functions: buffering, packet assembly, and packet disassembly. The PAD buffers data sent to or from the DTE device. It also assembles outgoing data into packets and forwards them to the DCE device. (This includes adding an X.25 header.) Finally, the PAD disassembles incoming packets before forwarding the data to the DTE. (This includes removing the X.25 header.) Figure given below illustrates the basic operation of the PAD when receiving packets from the X.25 WAN.

    Data

    Data

    Assembly/Disassembly

    PAD

    Buffer

    X. 25

    DCE

    Fig. 2.30 PAD buffers, assembles, and disassembles data packets

  • Computer Networks and Tools

    44/uts

    2.13.3 X.25 Session EstablishmentX.25 sessions are established when one DTE device contacts another to request a communication session. The DTE device that receives the request can either accept or refuse the connection. If the request is accepted, the two systems begin full-duplex information transfer. Either DTE device can terminate the connection. After the session is terminated, any further communication requires the establishment of a new session.

    2.13.4 X.25 Virtual CircuitsA virtual circuit is a logical connection created to ensure reliable communication between two network devices.

    A virtual circuit denotes the existence of a logical, bidirectional path from one DTE device to another across an X.25 network.Physically, the connection can pass through any number of intermediate nodes, such as DCE devices and PSEs. Multiple virtual circuits (logical connections) can be multiplexed onto a single physical circuit (a physical connection). Virtual circuits are demultiplexed at the remote end, and data is sent to the appropriate destinations. Figure given below illustrates four separate virtual circuits being multiplexed onto a single physical circuit.

    Virtual Circuits

    Physical Circuit

    Multiplexing

    Source Destination

    Demultiplexing

    Fig. 2.31 Virtual circuits can be multiplexed onto a single physical circuit.

    Two types of X.25 virtual circuits exist: switched and permanent. Switched virtual circuits (SVCs) are temporary connections used for sporadic data transfers. They require that two DTE devices establish, maintain, and terminate a session each time the devices need to communicate. Permanent virtual circuits (PVCs) are permanently established connections used for frequent and consistent data transfers. PVCs do not require that sessions be established and terminated. Therefore, DTEs can begin transferring data whenever necessary, because the session is always active. ThebasicoperationofanX.25virtualcircuitbeginswhenthesourceDTEdevicespecifiesthevirtualcircuitto be used (in the packet headers) and then sends the packets to a locally connected DCE device. At this point, the local DCE device examines the packet headers to determine which virtual circuit to use and then sends the packets to the closest PSE in the path of that virtual circuit. PSEs(switches)passthetraffictothenextintermediatenodeinthepath,whichmaybeanotherswitchortheremote DCE device.WhenthetrafficarrivesattheremoteDCEdevice,thepacketheadersareexaminedandthedestinationaddressis determined. The packets are then sent to the destination DTE device. If communication occurs over an SVC and neither device has additional data to transfer, the virtual circuit is terminated.

  • 45/uts

    2.13.5 The X.25 Protocol SuiteThe X.25 protocol suite maps to the lowest three layers of the OSI reference model.

    The following protocols are typically used in X.25 implementations: Packet-Layer Protocol (PLP), Link Access Procedure, Balanced (LAPB), and those among other physical-layer serial interfaces (such as EIA/TIA-232, EIA/TIA-449, EIA-530, and G.703). Figure given below maps the key X.25 protocols to the layers of the OSI reference model.

    Application

    Data Link

    Physical

    Transport

    Network

    Presentation

    Session

    OSI Reference Model

    OtherServices

    X.21b is EIA/TIA-232,EIA/TIA-449, EIA-530,

    G.703

    LAPB

    PLP

    X.25Protocol

    Suite

    Fig. 2.32 Key X.25 protocols map to the three lower layers of the OSI reference model

    2.14 Packet-Layer Protocol (PLP)PLP is the X.25 network-layer protocol. PLP manages packet exchanges between DTE devices across virtual circuits. PLPs also can run over Logical-Link Control 2 (LLC2) implementations on LANs and over Integrated Services Digital Network (ISDN) interfaces running Link Access Procedure on the D channels (LAPD). The PLP operates infivedistinctmodes:callsetup,datatransfer,idle,callclearing,andrestarting.

    Call setup Call setup mode is used to establish SVCs between DTE devices. A PLP uses the X.121 addressing scheme to set up the virtual circuit. The call setup mode is executed on a per-virtual circuit basis, which means that one virtual circuit can be in call-setup mode while another is in data-transfer mode. This mode is used only with SVCs, not with PVCs.

    Data transfer Data-transfer mode is used for transferring data between two DTE devices across a virtual circuit. In this mode, PLPhandlessegmentationandreassembly,bitpadding,anderrorandflowcontrol.Thismodeisexecutedonaper-virtual circuit basis and is used with both PVCs and SVCs.

    Idle modeIdle mode is used when a virtual circuit is established but data transfer is not occurring. It is executed on a per-virtual circuit basis and is used only with SVCs.

    Call-clearing Call-clearing mode is used to end communication sessions between DTE devices and to terminate SVCs. This mode is executed on a per-virtual circuit basis and is used only with SVCs.

  • Computer Networks and Tools

    46/uts

    Restarting mode Restarting mode is used to synchronize transmission between a DTE device and a locally connected DCE device. This mode is not executed on a per-virtual circuit basis. It affects all the DTE devices established virtual circuits.

    2.14.1 Four Types of PLP Packet Fields ExistFourdifferenttypesofPLPpacketfieldsare:General Format Identifier (GFI)Identifiespacketparameters, suchaswhether thepacketcarriesuserdataorcontrol information,whatkindofwindowingisbeingused,andwhetherdeliveryconfirmationisrequired.

    Logical Channel Identifier (LCI)IdentifiesthevirtualcircuitacrossthelocalDTE/DCEinterface.

    Packet Type Identifier (PTI)Identifiesthepacketasoneof17differentPLPpackettypes.

    User dataContainsencapsulatedupper-layerinformation.Thisfieldispresentonlyindatapackets.Otherwise,additionalfieldscontainingcontrolinformationareadded.