54033131 53359551 mc0075 february 2011 computer networks assignement set 1[1]

Upload: dushyantsethi9289

Post on 07-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    1/31

    February 2011Master of Computer Application (MCA) Semester 3MC0075 Computer Networks 4 Credits(Book ID: B0813 & B0814) Assignment Set 1

    1.

    Discuss the advantages and disadvantages of synchronous and asynchronoustransmission.Ans:There are different ways of transmitting the information. In this section we will study thesevarious methods with their relative merits and demerits.

    Serial & Parallel

    Serial communication is the sequential transmission of the signal elements of agrouprepresenting a character or other entity of data. The characters are transmitted

    in a sequenceover a single line, rather than simultaneously over two or more lines, as in paralleltransmission as shown in below figure.

    Serial transmission: one bit at a time

    The sequential elements may be transmitted with or without interruption. Parallelcommunication refers to when data is transmitted byte-by-byte i.e., all bits ofone or morebytes are transmitted simultaneously over separate wires as shown in given figur

    e.

    Parallel transmissions: Several bits at a time

    Most transmission lines are serial, whereas information transfer within computers andcommunications devices is in parallel. Therefore, there must be tech-niques forconvertingbetween parallel and serial, and vice versa. A Universal Asynchronous Receiver Transmitter(UART) usually accomplishes such data conversions.

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    2/31

    The comparisons of the serial and parallel transmission modes are listed in table.

    SERIAL MODE PARALLEL MODECOST ..Less costly (only one wire) ..More costly (many wires)

    SPEED ..Low ( only 1 bit at a time) ..High (more bits at a time)THROUGHPUT ..Low ..HighUSED IN ..Longer distance comm. ..Shorter distance comm..Comparison of serial and parallel transmission mode

    Simplex, Half duplex & Full duplex

    Simplex refers to communications in only one direction from the transmitter to the receiver asshown in figure (a). There is no acknowledgement of reception from the receiver,so errorscannot be conveyed to the transmitter. Half-duplex refers to two-way communicati

    ons but inonly one direction at a time as shown in figure (b).

    (a) Simplex(b) Half Duplex(c) Full DuplexFull duplex refers to simultaneous two-way transmission as shown in figure (c).For example,a radio is a simplex device, a walkie-talkie is a half-duplex device, and certain computer videocards are full-duplex devices. Similarly, radio or TV broadcast is a simplex system, transfer of

    inventory data from a warehouse to an accounting office is a half duplex system,andvideoconferencing represents a full-duplex application. Full Duplex provides maximumfunction and performance.

    Synchronous & Asynchronous transmission

    Synchronous Transmission: Synchronous is any type of communication in which theparties communicating are "live" or present in the same space and time. A chat room whereboth parties must be at their computer, connected to the Internet, and using software tocommunicate in the chat room protocols is a synchronous method of communication.E-mailis an example of an asynchronous mode of communication where one party can senda note

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    3/31

    to another person and the recipient need not be online to receive the e-mail. Synchronousmode of transmissions are illustrated in shown figure

    SYNCHRONOUSSERIALDATATAILDATAHEADER7E7E7E7E7E7EDATAPACKETIdleLineState=7ESynchronous and Asynchronous Transmissions

    The two ends of a link are synchronized, by carrying the transmitters clock information alongwith data. Bytes are transmitted continuously, if there are gaps then inserts idle bytes aspadding

    Advantage:

    This reduces overhead bitsIt overcomes the two main deficiencies of the asynchronous method, that of ineff

    iciency andlack of error detection.Disadvantage:

    For correct operation the receiver must start to sample the line at the correctinstantApplication:

    Used in high speed transmission example: HDLCAsynchronous transmission: Asynchronous refers to processes that proceedindependently of each other until one process needs to "interrupt" the other pro

    cess with arequest. Using the client- server model, the server handles many asynchronous requests fromits many clients. The client is often able to proceed with other work or must wait on theservice requested from the server.

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    4/31

    ASYNCHRONOUSSERIALDATACharacterIdleLineState=7E1StopStartASYNCHRONOUSSERIALDATACharacterIdleLineState=7E1StopStartAsynchronous Transmissions

    synchronous mode of transmissions is illustrated in figure 3.12. Here a Start an

    d Stop signalis necessary before and after the character. Start signal is of same length as information bit.Stop signal is usually 1, 1.5 or 2 times the length of the information signal

    Advantage:

    The character is self contained & Transmitter and receiver need not be synchronizedTransmitting and receiving clocks are independent of each other

    Disadvantage:

    Overhead of start and stop bitsFalse recognition of these bits due to noise on the channelApplication:

    If channel is reliable, then suitable for high speed else low speed transmissionMost common use is in the ASCII terminals

    Efficiency of transmission is the ratio of the actual message bits to the totalnumber of bits,including message and control bits, as shown in Equation 3.4. In any transmission, thesynchronization, error detection, or any other bits that are not messages are collectivelyreferred to as overheads, represented in Equation. 3.5. The higher are the overheads; thelower is the efficiency of transmission, as shown in Equation 3.6.

    Efficiency = M/ (M+C) x 100% (3.4)

    Overhead = (1 M/ (M+C)) x 100% (3.5)

    Where M = Number of message bits

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    5/31

    C = Number of control bitsIn other words,Efficiency % = 100 -Overhead % (3.6)

    2. Describe the ISO-OSI reference model and discuss the importance of every laye

    r.Ans: The OSI Reference Model: This reference model is proposed by Internationalstandardorganization (ISO) as a a first step towards standardization of the protocols used in variouslayers in 1983 by Day and Zimmermann. This model is called Open system Interconnection(OSI) reference model. It is referred OSI as it deals with connection open systems. That is thesystems are open for communication with other systems. It consists of seven layers.

    Layers of OSI Model

    The principles that were applied to arrive at 7 layers:

    1. A layer should be created where a different level of abstraction is needed.2. Each layer should perform a well defined task.3. The function of each layer should define internationally standardized protocols4. Layer boundaries should be chosen to minimize the information flow across theinterface.5. The number of layers should not be high or too small.The ISO-OSI reference model is as shown in figure 2.5. As such this model is nota network

    architecture as it does not specify exact services and protocols. It just tellswhat each layershould do and where it lies. The bottom most layer is referred as physical layer. ISO hasproduced standards for each layers and are published separately.

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    6/31

    Each layer of the ISO-OSI reference model are discussed below:

    1. Physical LayerThis layer is the bottom most layer that is concerned with transmitting raw bitsover thecommunication channel (physical medium). The design issues have to do with makin

    g surethat when one side sends a 1 bit, it is received by other side as a 1 bit, and not as a 0 bit. Itperforms direct transmission of logical information that is digital bit streamsinto physicalphenomena in the form of electronic pulses. Modulators/demodulators are used atthis layer.The design issue here largely deals with mechanical, electrical, and proceduralinterfaces,and the physical transmission medium, which lies below this physical layer.

    In particular, it defines the relationship between a device and a physical mediu

    m. Thisincludes the layout of pins, voltages, and cable specifications. Hubs, repeaters, networkadapters and Host Bus Adapters (HBAs used in Storage Area Networks) are physical-layerdevices. 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 effectivelysharedamong multiple users. For example, contention resolution and flow control.

    Modulation, is a technique of conversion between the representation of digital data in userequipment and the corresponding signals transmitted over a communications channel.These are signals operating over the physical cabling (such as copper and fiberoptic) orover a radio link.Parallel SCSI buses operate in this layer. Various physical-layer Ethernet standards are alsoin this layer; Ethernet incorporates both this layer and the data-link layer. The same applies toother local-area networks, such as Token ring, FDDI, and IEEE 802.11, as well aspersonalarea networks such as Bluetooth and IEEE 802.15.4.

    2. Data Link LayerThe Data Link layer provides the functional and procedural means to transfer data betweennetwork entities and to detect and possibly correct errors that may occur in thePhysical layer.That is it makes sure that the message indeed reach the other end without corruption orwithout signal distortion and noise. It accomplishes this task by having the sender break the

    input data up into the frames called data frames. The DLL of transmitter, then transmits theframes sequentially, and processes acknowledgement frames sent back by the recei

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    7/31

    ver. Afterprocessing acknowledgement frame, may be the transmitter needs to re-transmit acopy ofthe frame. So therefore the DLL at receiver is required to detect duplications of frames.

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    8/31

    The best known example of this is Ethernet. This layer manages the interaction of deviceswith a shared medium. Other examples of data link protocols are HDLC and ADCCP for pointto-point or packet-switched networks and Aloha for local area networks. On IEEE 802local

    area networks, and some non-IEEE 802 networks such as FDDI, this layer may be split into aMedia Access Control (MAC) layer and the IEEE 802.2 Logical Link Control (LLC) layer. Itarranges bits from the physical layer into logical chunks of data, known as frames.

    This is the layer at which the bridges and switches operate. Connectivity is provided onlyamong locally attached network nodes forming layer 2 domains for unicast or broadcastforwarding. Other protocols may be imposed on the data frames to create tunnels

    andlogically separated layer 2 forwarding domain.

    The data link layer might implement a sliding window flow control and acknowledgmentmechanism to provide reliable delivery of frames; that is the case for SDLC andHDLC, andderivatives of HDLC such as LAPB and LAPD. In modern practice, only error detection, notflow control using sliding window, is present in modern data link protocols suchas Point-to-Point Protocol (PPP), and, on local area networks, the IEEE 802.2 LLC layer is not used for

    most protocols on Ethernet, and, on other local area networks, its flow controlandacknowledgment mechanisms are rarely used. Sliding window flow control andacknowledgment is used at the transport layers by protocols such as TCP.

    3. Network LayerThe Network layer provides the functional and procedural means of transferring variablelength data sequences from a source to a destination via one or more networks whilemaintaining the quality of service requested by the Transport layer. The Networklayerperforms network routing functions, and might also perform fragmentation and reassembly,and report delivery errors. Routers operate at this layer sending data throughout the extendednetwork and making the Internet possible. This is a logical addressing scheme values arechosen by the network engineer. The addressing scheme is hierarchical.

    The best known example of a layer 3 protocol is the Internet Protocol (IP). Perhaps its easierto visualize this layer as managing the sequence of human carriers taking a letter from thesender to the local post office, trucks that carry sacks of mail to other post o

    ffices or airports,airplanes that carry airmail between major cities, trucks that distribute mail sacks in a city, and

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    9/31

    carriers that take a letter to its destinations. Think of fragmentation as splitting a largedocument into smaller envelopes for shipping, or, in the case of the network layer, splitting anapplication or transport record into packets.

    The major tasks of network layer are listed

    It controls routes for individual message through the actual topology.

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    10/31

    Finds the best route.Finds alternate routes.It accomplishes buffering and deadlock handling.

    4. Transport LayerThe Transport layer provides transparent transfer of data between end users, providingreliable data transfer while relieving the upper layers of it. The transport layer controls thereliability of a given link through flow control, segmentation/de-segmentation,and errorcontrol. Some protocols are state and connection oriented. This means that the transportlayer can keep track of the segments and retransmit those that fail. The best known exampleof a layer 4 protocol is the Transmission Control Protocol (TCP).

    The transport layer is the layer that converts messages into TCP segments or User DatagramProtocol (UDP), Stream Control Transmission Protocol (SCTP), etc. packets. Perhaps aneasy way to visualize the Transport Layer is to compare it with a Post Office, which deals withthe dispatch and classification of mail and parcels sent. Do remember, however,that a postoffice manages the outer envelope of mail. Higher layers may have the equivalentof doubleenvelopes, such as cryptographic Presentation services that can be read by the addressee

    only.

    Roughly speaking, tunneling protocols operate at the transport layer, such as carrying non-IPprotocols such as IBMs SNA or Novells IPX over an IP network, or end-to-end encryptionwith IP security (IP sec). While Generic Routing Encapsulation (GRE) might seemto be anetwork layer protocol, if the encapsulation of the payload takes place only atendpoint, GREbecomes closer to a transport protocol that uses IP headers but contains complete frames orpackets to deliver to an endpoint.

    The major tasks of Transport layer are listed below:

    It locates the other partyIt creates a transport pipe between both end-users.It breaks the message into packets and reassembles them at the destination.It applies flow control to the packet stream.5. Session Layer

    The Session layer controls the dialogues/connections (sessions) between computers. Itestablishes, manages and terminates the connections between the local and remote

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    11/31

    application. It provides for either full-duplex or half-duplex operation, and establishes checkpointing, adjournment, termination, and restart procedures. The OSI model made this layer

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    12/31

    responsible for "graceful close" of sessions, which is a property of TCP, and also for sessioncheck pointing and recovery, which is not usually used in the Internet protocolssuite.

    The major tasks of session layer are listed

    It is responsible for the relation between two end-users.It maintains the integrity and controls the data exchanged between the end-users.The end-users are aware of each other when the relation is established (synchronization).It uses naming and addressing to identify a particular user.

    It makes sure that the lower layer guarantees delivering the message (flow control).6. Presentation LayerThe Presentation layer transforms the data to provide a standard interface for the Applicationlayer. MIME encoding, data encryption and similar manipulation of the presentation are doneat this layer to present the data as a service or protocol developer sees fit. Examples of thislayer are converting an EBCDIC-coded text file to an ASCII-coded file, or serializing objectsand other data structures into and out of XML.

    The major tasks of presentation layer are listed below:

    It translates the language used by the application layer.It makes the users as independent as possible, and then they can concentrate onconversation.7. Application Layer (end users)The application layer is the seventh level of the seven-layer OSI model. It interfaces directly tothe users and performs common application services for the application processes. It alsoissues requests to the presentation layer. Note carefully that this layer provides services touser-defined application processes, and not to the end user. For example, it defines a filetransfer protocol, but the end user must go through an application process to invoke filetransfer. The OSI model does not include human interfaces.

    The common application services sub layer provides functional elements includingtheRemote Operations Service Element (comparable to Internet Remote Procedure Call),Association Control, and Transaction Processing (according to the ACID requireme

    nts).Above the common application service sub layer are functions meaningful to userapplication

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    13/31

    programs, such as messaging (X.400), directory (X.500), file transfer (FTAM), virtual terminal(VTAM), and batch job manipulation (JTAM).

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    14/31

    A Comparison of OSI and TCP/IP Reference Models

    Concepts central to the OSI model are:

    Services: It tells what the layer does.

    Interfaces: It tells the processes above it how to access it. It specifies whatparameters areand what result to expect.Protocols: It provides the offered service. It is used in a layer and are layersown business.The TCP/IP did not originally distinguish between the service, interface & protocols. The onlyreal services offered by the internet layer are SEND IP packets and RECEIVE IP packets.

    The OSI model was devised before the protocols were invented. Data link layer originallydealt only with point-to-point networks. When broadcast networks came around, anew sub-layer had to be hacked into the model. With TCP/IP the reverse was true, the protocols camefirst and the model was really just a description of the existing protocols. This TCP/IP modeldid fit any other protocol stack.

    Then OSI model has seven layers and TCP/IP has four layers as shown in figure below

    Comparisons of the two reference models

    Another difference is in the area of connectionless and connection oriented services. The OSImodel supports both these services in the network layer but supports only connectionoriented communication in the transport layer. Where as the TCP/IP has supportsonlyconnection less communication in the network layer, and supports both these services in thetransport layer.

    A Critique of the OSI Model and Protocols

    Why OSI did not take over the world

    Bad timing

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    15/31

    Bad technologyBad implementationsBad politics

    A Critique of the TCP/IP Reference Model

    Problems:

    Service, interface, and protocol not distinguishedNot a general modelHost-to-network layer not really a layerNo mention of physical and data link layersMinor protocols deeply entrenched, hard to replaceNetwork standardization

    Network standardization is a definition that has been approved by a recognized standardsorganization. Standards exist for programming languages, operating systems, dataformats,communications protocols, and electrical interfaces.

    Two categories of standards:

    De facto (Latin for from the fact) standards:These are those that have just happened without any formal plan. These are formats thathave become standard simply because a large number of companies have agreed to usethem. They have not been formally approved as standards E.g., IBM PC for small officecomputers, UNIX for operating systems in CS departments. PostScript is a good example of ade facto standard.

    De jure (Latin for by law) standards:These are formal legal standards adopted by some authorized standardization body.

    Two classes of standard organizations

    Organizations established by treaty among national governments.Voluntary, nontreaty organizations.From a users standpoint, standards are extremely important in the computer industrybecause they allow the combination of products from different manufacturers to c

    reate acustomized system. Without standards, only hardware and software from the same company

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    16/31

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    17/31

    could be used together. In addition, standard user interfaces can make it much easier to learnhow to use new applications.

    Most official computer standards are set by one of the following organizations:

    ANSI (American National Standards Institute)ITU (International Telecommunication Union)IEEE (Institute of Electrical and Electronic Engineers)ISO (International Standards Organization)VESA (Video Electronics Standards Association)Benefits of standardization:

    Allow different computers to communicate.Increase the market for products adhering to the standard.Whos who in the telecommunication world?

    Common carriers: private telephone companies (e.g., AT&T, USA).

    PTT (Post, Telegraph & Telephone) administration: nationalized telecommunicationcompanies (most of the world).

    ITU (International Telecommunication Union): an agency of the UN for internationaltelecommunication coordination.CCITT (an acronym for its French name): one of the organs of ITU (i.e., ITU-T),specializedfor telephone and data communication systems.3. Explain the following with respect to Data Communications:A) Fourier analysisAns:In 19th century, the French mathematician Fourier proved that any periodic function of time g

    (t) with period T can be constructed by summing a number of cosines and sines.Where f=1/T is the fundamental frequency, and are the sine and cosine amplitudesof thenth harmonics. Such decomposition is called a Fourier series.

    B) Band limited signals

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    18/31

    Ans:Consider the signal given in figure below. Figure shows the signal that is the ASCIIrepresentation of the character b which consists of the bit pattern 01100010 along with itsharmonics.

    Any transmission facility cannot pass all the harmonics and hence few of the harmonics arediminished and distorted. The bandwidth is restricted to low frequencies consisting of 1, 2, 4,and 8 harmonics and then transmitted. Figures show the spectra and reconstructedfunctionsfor these band-limited signals.

    Limiting the bandwidth limits the data rate even for perfect channels. However complex

    coding schemes that use several voltage levels do exist and can achieve higher data rates.

    C) Maximum data rate of a channel

    Ans:In 1924, H. Nyquist realized the existence of the fundamental limit and derivedthe equationexpressing the maximum data for a finite bandwidth noiseless channel. In 1948, ClaudeShannon carried Nyquist work further and extended it to the case of a channel subject torandom noise.

    In communications, it is not really the amount of noise that concerns us, but rather the amountof noise compared to the level of the desired signal. That is, it is the ratio of signal to noisepower that is important, rather than the noise power alone. This Signal-to-NoiseRatio(SNR), usually expressed in decibel (dB), is one of the most important specifications of anycommunication system. The decibel is a logarithmic unit used for comparisons ofpower levelsor voltage levels. In order to understand the implication of dB, it is importantto know that asound level of zero dB corresponds to the threshold of hearing, which is the smallest soundthat can be heard. A normal speech conversation would measure about 60 dB.

    If an arbitrary signal is passed through the Low pass filter of bandwidth H, thefiltered signalcan be completely reconstructed by making only 2H samples per second. Sampling the line

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    19/31

    faster than 2H per second is pointless. If the signal consists of V discrete levels, then Nyquisttheorem states that, for a noiseless channel

    Maximum data rate = 2H.log2 (V) bits per second. (3.2)

    For a noisy channel with bandwidth is again H, knowing signal to noise ratio S/N, themaximum data rate according to Shannon is given as

    Maximum data rate = H.log2 (1+S/N) bits per second. (3.3)

    4.Explain the following concepts of Internetworking:A) Internet architectureAns: Internet Architecture: B1-226, B2-56: The Internet is a worldwide, publiclyaccessiblenetwork of interconnected computer networks that transmit data by packet switchi

    ng using thestandard Internet Protocol (IP). It is a "network of networks" that consists ofmillions of smallerdomestic, academic, business, and government networks, which together carry variousinformation and services, such as electronic mail, online chat, file transfer, and the interlinkedweb pages and other documents of the World Wide Web.

    How are networks interconnected to form an internetwork? The answer has two parts.Physically, two networks can only be connected by a computer that attaches bothof them.

    But just a physical connection cannot provide interconnection where informationcan beexchanged as there is no guarantee that the computer will cooperate with other machines thatwish to communicate.

    Internet is not restricted in size. Internets exist that contain a few networksand internets alsoexist that contain thousands of networks. Similarly the number of computers attached to eachnetwork in an internet can vary. Some networks have no computers attached, whileothershave hundreds.

    To have a viable internet, we need a special computer that is willing to transfer packets fromone network to another. Computers that interconnect two networks and pass packets fromone to the other are called internet gateways or internet routers.

    B) Protocols and Significance for Internetworking

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    20/31

    Ans: Protocols for internetworking: Many protocols have been used for use in aninternet. Onesuite known as The TCP/IP internet protocol stands out most widely used for internets. Mostnetworking professional simply refer this protocol as TCP/IP. Work on the transmission

    control protocol (TCP) began in the 1970s. The U.S military funded the research in TCP/IPand internetworking through the Advanced Research Projects Agency in short knownasARPA.

    Significance of internetworking and TCP/IP

    Internetworking has become one of the important technique in the modern networking.Internet technology has revolutionized the computer communication. The TCP/IP technology

    has made possible a global Internet, which reaches millions of schools, commercialorganizations, government and military etc around the world.

    The worldwide demand for internetworking products has affected most companies sellnetworking technologies. Competition has increased among the companies that sellthehardware and software needed for internetworking. Companies have extended the designs intwo ways

    The protocols have adapted to work with many network technologiesAnd new features have been adapted that allow the protocols to transfer data across theinternetsC) Internet Layering Model

    Ans:Internet uses the TCP/IP reference model. This model is also called as Internetlayeringmodel or internet reference model. This model consists of 5 layers as illustrated in figurebelow.

    The five layers of TCP/IP reference model

    A goal was of continuing the conversation between source and destination even iftransmission went out of operation. The reference model was named after two of its mainprotocols, TCP (Transmission Control Protocol) and IP (Internet Protocol). The purpose ofeach layer of TCP/IP is given below:

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    21/31

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    22/31

    requests. The value of the TYPE field specifies whether it is echo request whenequal to 8 orecho reply when equal to 0.

    Reports of Unreachability

    When a router cannot forward or deliver the datagram to the destination owing tovariousproblems, it sends a destination unreachable message back to the original senderand thendrops the datagram.

    Destination unreachable message format

    The format of destination unreachable is as shown in figure 5.3. The TYPE fieldin destinationunreachable message contains an integer equal to 3. The CODE field here contains

    aninteger that describes the problem why the datagram is not reachable. Possible values forCODE field are listed in below figure.

    DE VALUE MEANING

    0 Network unreachable1 Host unreachable2 Protocol unreachable3 Port unreachable4 Fragment needed and DF set5 Source route failed

    6 Destination network unknown7

    Destination host unknown8

    Source host isolated9

    Communication with destination network administratively prohibited10

    Communication with destination host administratively prohibited11

    Network unreachable for type of service12

    Host unreachable for type of service

    Possible problems in Destination unreachable message

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    23/31

    Network unreachable errors imply routing failures and host unreachable errors imply deliveryfailures. As ICMP error message contains a short prefix of the datagram that caused theproblem, the source will know exactly which address is unreachable.

    The port is the destination point discussed at the transport layer. If the datagram contains thesource route option with a wrong route, it may report source route failure message. If a routerneeds to fragment a datagram and DF-bit which is dont fragment bit in IP header is set, therouter sends a Fragment needed and DF set message back to the source. Rests of the errorslisted in figure 5.4 are self explanatory.

    Obtaining a subnet mask

    To participate in subnet addressing, a host needs to know which bits of the 32-bit internetaddress correspond to physical network and which corresponds to host identifiers. Theinformation needed to interpret the address is represented in 32-bit quantity iscalled subnetmask. To learn the subnet mask used for local network, a machine can send an addressmask request message to a router and receive address mask reply message.

    Address mask request or reply message format

    Address mask request or reply message format

    The format address mask request or reply message is as shown in figure 5.10. Hostbroadcasts a request without knowing which specific router will respond. The TYPE fieldvalue is 17 for address mask request and 18 for address mask reply message. A replycontains the networks subnet address mask in the ADDRESS MASK field. IDENTIFIERandSEQUENCE NUMBER fields allow to associate replies with requests.

    6. In what conditions is ARP protocol used? Explain.Ans:ARP protocol: In computer networking, the Address Resolution Protocol (ARP)is the standardmethod for finding a hosts hardware address when only its network layer address is known.ARP is primarily used to translate IP addresses to Ethernet MAC addresses. It isalso usedfor IP over other LAN technologies, such as Token Ring, FDDI, or IEEE 802.11, and for IPover ATM.

    ARP is used in four cases of two hosts communicating:

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    24/31

    1. When two hosts are on the same network and one desires to send a packet to the other2. When two hosts are on different networks and must use a gateway/router to reach the otherhost3. When a router needs to forward a packet for one host through another router

    4. When a router needs to forward a packet from one host to the destination hoston the samenetworkThe first case is used when two hosts are on the same physical network. That is,they candirectly communicate without going through a router.

    The last three cases are the most used over the Internet as two computers on theinternet aretypically separated by more than 3 hops. Imagine computer A sends a packet to computer Dand there are two routers, B & C, between them. Case 2 covers A sending to B; ca

    se 3covers B sending to C; and case 4 covers C sending to D. ARP is defined in RFC 826. It is acurrent Internet Standard, STD 37.

    ARP implementation

    We will see the implementation with the help of an example. Consider an university withseveral class C (/24) networks. As illustrated in figure 3.1. here we have two Ethernets. Oneis in computer science (CS) department with IP address 192.31.65.0 and the one in electrical

    (EE) department with IP address 192.31.63.0.

    These are connected by the campus backbone FDDI ring with IP address 192.31.60.0. Eachmachine on an Ethernet has unique physical addresses, labeled E1 through E6, andsimilarlyeach machine on FDDI ring has physical addresses, labeled F1 through F3.

    ARP protocol

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    25/31

    Let us assume the sender on host 1 want to send a packet to a receiver on host 2. Senderknows the name of the intended receiver say [email protected]. The first step is to findthe IP address for host 2 known as eagle.cs.uni.edu. This mapping of name to IPaddress is

    done by domain name server (DNS). Here we will assume that DNS gives the IP address ofhost 2 as 192.31.65.5.

    The upper layer software on host 1 builds a packet with 192.31.65.5 in the destinationaddress field and gives it to IP software to transmit. The IP software can lookat the addresssee that the destination is on its own network, but needs a way to find the destinationsphysical address. A mapping table can be used as discussed in resolution by direct mapping.

    A better solution is for host 1 to output a broadcast packet onto the Ethernet asking WHOowns IP address 192.31.65.5? The broadcast will arrive at every machine on Ethernet192.31.65.0, and each one will check its IP address. Host 2 alone will respond with itsphysical address E2. The packet used for asking this question is called ARP request. And thepacket which is reply to this ARP request is called ARP replies.

    IP software on host 1 builds an Ethernet frame addressed to E2, puts the IP packet

    addresses to 192.31.65.5 in the payload field and dumps it onto the Ethernet. The Ethernetboard of host 2 detects this frame, recognizes it as frame for itself, scoops itup, and causesan interrupt. The Ethernet driver extracts IP packet from the payload and passesit to the IPsoftware, which sees that it is correctly addressed and processes it.

    ARP frame format

    An ARP protocol uses two frame formats as seen in above example. One is ARP request andthe other is ARP reply.

    ARP request

    An ARP request is structured in a particular way. As shown in figure 3.2 an ARPrequestframe consists of two fields

    1. Frame header2. ARP request messageFrameHeaderARP

    requestmessageMay

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    26/31

    IknowyourphysicalAddress?(a) ARP request frameFrame header is subdivided into

    1. Physical address

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    27/31

    2. IP addressA complete ARP request frame is as shown in figure 3.2(b). We have seen that broadcastaddress consists of all 1s. hence the destinations physical address in ARP request frame isbroadcast address with all ones equivalently FF-FF-FF-FF-FF-FF.

    (b) ARP request frameARP replies

    An ARP reply frame is also structured in a similar way as ARP request frame. Asshown infigure (a) an ARP reply frame also consists of two fields

    1. Frame header2. ARP reply messageFrame

    HeaderFrameHeaderThisismyphysicalAddress

    (a) ARP reply frameARP reply Frame header is subdivided again into

    1. Physical address2. IP addressA complete ARP request frame is as shown in figure (b).(b) ARP request frameARP replies

    An ARP reply frame is also structured in a similar way as ARP request frame. Asshown infigure (a) an ARP reply frame also consists of two fields

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    28/31

    1. Frame header2. ARP reply messageFrameHeaderARPreply

    messageThisismyphysicalAddress

    (a) ARP reply frameARP reply Frame header is subdivided again into

    1. Physical address

    2. IP addressA complete ARP request frame is as shown in figure (b).(b) ARP reply frameThe Address Resolution Cache

    Broadcasting the ARP request packet is too expensive to be used every time one machinewants to transmit a packet to another. As with this broadcasting every machine on thenetwork must receive and then process the broadcast packet. To reduce the communicationcost due to broadcast computers that use ARP protocol maintain a cache of recently acquired

    IP to physical address bindings. Thus cache is used to store the recently used mappings of IPaddress and physical address

    That whenever a computer sends an ARP request and receives an ARP reply, it saves the IPaddress and corresponding hardware address information in its cache for successive lookups. When transmitting a packet, a computer always looks in its cache for binding beforesending an ARP request. If it finds the desired binding in its ARP cache, the computer neednot broadcast on the network. Thus when two computers on a network communicate,theybegin with an ARP request and response, and then repeatedly transfer packets without usingARP for each packet.

    ARP cache timeouts

    An ARP cache provides an example of soft state, a technique commonly used in networkprotocols. The name describes a situation in which information can become stalewithoutwarning. In case of ARP consider two computers A and B, both connected to Ethern

    et.

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    29/31

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    30/31

    Assume A has sent an ARP request, and B has replied. Further assume that after theexchange, computer B crashes. Computer A will not receive any information of thecrash. Andmoreover as it already has binding information for B in its ARP cache, computerA will

    continue to send packets to B. the Ethernet hardware provides no indication thatB is not onlinebecause Ethernet does not have guarantee delivery. Thus A has no way of knowingwheninformation in its Arp cache has become incorrect.

    Usually such protocols use timers, with the state information being deleted whenthe timerexpires. That is when a computer places the address bindings in cache it needs to set thetimer. Typical value of timeout being say 20 minutes, and when the timer expires, that

    address binding information is deleted.

  • 8/6/2019 54033131 53359551 MC0075 February 2011 Computer Networks Assignement Set 1[1]

    31/31