53359551 mc0075 february 2011 computer networks assignement

Upload: ravish-ravindran

Post on 07-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    1/24

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

    1.

    Discuss the advantages and disadvantages of synchronous and asynchronous transmission.

    Ans: There are different ways of transmitting the information. In this section we will study these various methods with their relative merits and demerits. Serial & Parallel Serial communication is the sequential transmission of the signalelements of a group representing a character or other entity of data. The characters are transmitted in a sequence over a single line, rather than simultaneously over two or more lines, as in parallel transmission as shown in below figure.

    Serial transmission: one bit at a time

    The sequential elements may be transmitted with or without interruption. Parallel communication refers to when data is transmitted byte-by-byte i.e., all bits of one or more bytes are transmitted simultaneously over separate wires as shownin given figure.

    Parallel transmissions: Several bits at a time

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

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    2/24

    The comparisons of the serial and parallel transmission modes are listed in table.S E R IAL M O D E COST SPEED TH ROUGHPUT U S ED IN PARALLEL MOD E

    Less costly (only one wire) Low ( only 1 bit at a time) Low Longer distance comm

    .

    More costly (many wires) High (more bits at a time) High Shorter distance comm..

    Comparison of serial and parallel transmission mode

    Simplex, Half duplex & Full duplex Simplex refers to communications in only onedirection from the transmitter to the receiver as shown in figure (a). There isno acknowledgement of reception from the receiver, so errors cannot be conveyedto the transmitter. Half-duplex refers to two-way communications but in only onedirection at a time as shown in figure (b).

    (a) Simplex

    (b) Half Duplex

    (c) Full Duplex

    Full 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 video cards are full-duplex devices. Similarly, radio orTV broadcast is a simplex system, transfer of inventory data from a warehouse to an accounting office is a half duplex system, and videoconferencing representsa full-duplex application. Full Duplex provides maximum function and performance. Synchronous & Asynchronous transmission Synchronous Transmission: Synchronous

    is any type of communication in which the parties communicating are "live" or present in the same space and time. A chat room where both parties must be at their computer, connected to the Internet, and using software to communicate in thechat room protocols is a synchronous method of communication. E-mail is an example of an asynchronous mode of communication where one party can send a note

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    3/24

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

    SYNCHRONOUSSERIALDATA

    7E7E 7E

    TAIL

    DATA DATAPACKET

    HEADER

    7E7E 7E

    IdleLineState=7ESynchronous and Asynchronous Transmissions

    The two ends of a link are synchronized, by carrying the transmitters clock information along with data. Bytes are transmitted continuously, if there are gaps then inserts idle bytes as padding Advantage: This reduces overhead bits It overcomes the two main deficiencies of the asynchronous method, that of inefficiency and lack of error detection. Disadvantage: For correct operation the receiver must start to sample the line at the correct instant Application: Used in high speed transmission example: HDLC Asynchronous transmission: Asynchronous refers to processes that proceed independently of each other until one process needs to "interrupt" the other process with a request. Using the client- server model, the server handles many asynchronous requests from its many clients. The client is often able to proceed with other work or must wait on the service requested from the server.

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    4/24

    ASYNCHRONOUSSERIALDATA1 StopCharacter

    Start

    IdleLineState=7EAsynchronous Transmissions

    synchronous mode of transmissions is illustrated in figure 3.12. Here a Start and Stop signal is 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 synchronized Transmitting and receiving clocks areindependent of each other Disadvantage: Overhead of start and stop bits False recognition of these bits due to noise on the channel Application: If channel isreliable, then suitable for high speed else low speed transmission Most common u

    se is in the ASCII terminals Efficiency of transmission is the ratio of the actual message bits to the total number of bits, including message and control bits,as shown in Equation 3.4. In any transmission, the synchronization, error detection, or any other bits that are not messages are collectively referred to as overheads, represented in Equation. 3.5. The higher are the overheads; the lower 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 messagebits

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    5/24

    C = Number of control bits In other words, Efficiency % = 100 -Overhead % (3.6)2. Describe the ISO-OSI reference model and discuss the importance of every layer.

    Ans: The OSI Reference Model: This reference model is proposed by International

    standard organization (ISO) as a a first step towards standardization of the protocols used in various layers 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 the systems are open for communicationwith 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 wherea different level of abstraction is needed. 2. Each layer should perform a welldefined task. 3. The function of each layer should define internationally standardized protocols 4. Layer boundaries should be chosen to minimize the information flow across the interface. 5. The number of layers should not be high or toosmall.

    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. Itjust tells what each layer should do and where it lies. The bottom most layer isreferred as physical layer. ISO has produced standards for each layers and arepublished separately.

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    6/24

    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 bits over the communication channel (physical medium). The design issues have to dowith making sure that when one side sends a 1 bit, it is received by other sideas a 1 bit, and not as a 0 bit. It performs direct transmission of logical info

    rmation that is digital bit streams into physical phenomena in the form of electronic pulses. Modulators/demodulators are used at this layer. The design issue here largely deals with mechanical, electrical, and procedural interfaces, and the physical transmission medium, which lies below this physical layer. In particular, it defines the relationship between a device and a physical medium. This includes the layout of pins, voltages, and cable specifications. Hubs, repeaters,network adapters and Host Bus Adapters (HBAs used in Storage Area Networks) arephysical-layer devices. The major functions and services performed by the physical layer are: Establishment and termination of a connection to a communicationsmedium. Participation in the process whereby the communication resources are effectively shared among multiple users. For example, contention resolution and flow control. Modulation, is a technique of conversion between the representation o

    f digital data in user equipment and the corresponding signals transmitted overa communications channel. These are signals operating over the physical cabling(such as copper and fiber optic) or over a radio link. Parallel SCSI buses operate in this layer. 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, and IEEE 802.11, aswell as personal area networks such as Bluetooth and IEEE 802.15.4. 2. Data LinkLayer The Data Link layer provides the functional and procedural means to transfer data between network entities and to detect and possibly correct errors thatmay occur in the Physical layer. That is it makes sure that the message indeedreach the other end without corruption or without 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 the frames sequ

    entially, and processes acknowledgement frames sent back by the receiver. Afterprocessing acknowledgement frame, may be the transmitter needs to re-transmit acopy of the frame. So therefore the DLL at receiver is required to detect duplications of frames.

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    7/24

    The best known example of this is Ethernet. This layer manages the interaction of devices with a shared medium. Other examples of data link protocols are HDLC and ADCCP for pointto-point or packet-switched networks and Aloha for local areanetworks. On IEEE 802 local area networks, and some non-IEEE 802 networks such as FDDI, this layer may be split into a Media Access Control (MAC) layer and the

    IEEE 802.2 Logical Link Control (LLC) layer. It arranges bits from the physicallayer into logical chunks of data, known as frames. This is the layer at which the bridges and switches operate. Connectivity is provided only among locally attached network nodes forming layer 2 domains for unicast or broadcast forwarding.Other protocols may be imposed on the data frames to create tunnels and logically separated layer 2 forwarding domain. The data link layer might implement a sliding window flow control and acknowledgment mechanism to provide reliable delivery of frames; that is the case for SDLC and HDLC, and derivatives of HDLC suchas LAPB and LAPD. In modern practice, only error detection, not flow control using sliding window, is present in modern data link protocols such as Point-toPoint 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

    control and acknowledgment mechanisms are rarely used. Sliding window flow control and acknowledgment is used at the transport layers by protocols such as TCP.3. Network Layer The Network layer provides the functional and procedural meansof transferring variable length data sequences from a source to a destination via one or more networks while maintaining the quality of service requested by theTransport layer. The Network layer performs network routing functions, and might also perform fragmentation and reassembly, and report delivery errors. Routersoperate at this layer sending data throughout the extended network and making the Internet possible. This is a logical addressing scheme values are chosen 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 easier to visualize this layer as managing the sequence of human carriers taking a letter from the sender to the local post office, trucks that carry sacks of mail to other

    post offices or airports, airplanes that carry airmail between major cities, trucks that distribute mail sacks in a city, and carriers that take a letter to itsdestinations. Think of fragmentation as splitting a large document into smallerenvelopes for shipping, or, in the case of the network layer, splitting an application 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 53359551 MC0075 February 2011 Computer Networks Assignement

    8/24

    Finds the best route. Finds alternate routes. It accomplishes buffering and deadlock handling. 4. Transport Layer The Transport layer provides transparent transfer of data between end users, providing reliable data transfer while relievingthe upper layers of it. The transport layer controls the reliability of a givenlink through flow control, segmentation/de-segmentation, and error control. Some

    protocols are state and connection oriented. This means that the transport layer can keep track of the segments and retransmit those that fail. The best knownexample of a layer 4 protocol is the Transmission Control Protocol (TCP). The transport layer is the layer that converts messages into TCP segments or User Datagram Protocol (UDP), Stream Control Transmission Protocol (SCTP), etc. packets.Perhaps an easy way to visualize the Transport Layer is to compare it with a Post Office, which deals with the dispatch and classification of mail and parcels sent. Do remember, however, that a post office manages the outer envelope of mail. Higher layers may have the equivalent of double envelopes, 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-IP protocols such as IBMs SNA or Novells IPX over an IP network, or end-to-end encrypt

    ion with IP security (IP sec). While Generic Routing Encapsulation (GRE) might seem to be a network layer protocol, if the encapsulation of the payload takes place only at endpoint, GRE becomes closer to a transport protocol that uses IP headers but contains complete frames or packets to deliver to an endpoint. The major tasks of Transport layer are listed below: It locates the other party It creates a transport pipe between both end-users. It breaks the message into packetsand 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. It establishes, manages and terminates the connections between the local and remote application. It provides for either full-duplex or half-duplex operation, and establishes check pointing, adjournment, termination, and restart procedures. The OSI model made this layer

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    9/24

    responsible for "graceful close" of sessions, which is a property of TCP, and also for session check pointing and recovery, which is not usually used in the Internet protocols suite. 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 o

    ther 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 Layer The Presentation layer transforms the data to provide a standard interface for the Applicationlayer. MIME encoding, data encryption and similar manipulation of the presentation are done at this layer to present the data as a service or protocol developersees fit. Examples of this layer are converting an EBCDIC-coded text file to anASCII-coded file, or serializing objects and other data structures into and outof 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 aspossible, and then they can concentrate on conversation. 7. Application Layer (end users) The application layer is the seventh level of the seven-layer OSI mode

    l. It interfaces directly to the users and performs common application servicesfor the application processes. It also issues requests to the presentation layer. Note carefully that this layer provides services to user-defined application processes, and not to the end user. For example, it defines a file transfer protocol, but the end user must go through an application process to invoke file transfer. The OSI model does not include human interfaces. The common application services sub layer provides functional elements including the Remote Operations Service Element (comparable to Internet Remote Procedure Call), Association Control, and Transaction Processing (according to the ACID requirements). Above the common application service sub layer are functions meaningful to user applicationprograms, such as messaging (X.400), directory (X.500), file transfer (FTAM), virtual terminal (VTAM), and batch job manipulation (JTAM).

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    10/24

    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 what parameters are and what result toexpect. Protocols: It provides the offered service. It is used in a layer and are layers own business. The TCP/IP did not originally distinguish between the se

    rvice, interface & protocols. The only real services offered by the internet layer are SEND IP packets and RECEIVE IP packets. The OSI model was devised beforethe protocols were invented. Data link layer originally dealt only with point-to-point networks. When broadcast networks came around, a new sublayer had to be hacked into the model. With TCP/IP the reverse was true, the protocols came firstand the model was really just a description of the existing protocols. This TCP/IP model did fit any other protocol stack. Then OSI model has seven layers andTCP/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 OSI model supports both theseservices in the network layer but supports only connection oriented communicatio

    n in the transport layer. Where as the TCP/IP has supports only connection lesscommunication in the network layer, and supports both these services in the transport layer. A Critique of the OSI Model and Protocols Why OSI did not take overthe world Bad timing

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    11/24

    Bad technology Bad implementations Bad politics A Critique of the TCP/IP Reference Model Problems: Service, interface, and protocol not distinguished Not a general model Host-to-network layer not really a layer No mention of physical and datalink layers Minor protocols deeply entrenched, hard to replace Network standardization Network standardization is a definition that has been approved by a reco

    gnized standards organization. Standards exist for programming languages, operating systems, data formats, 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 touse them. They have not been formally approved as standards E.g., IBM PC for small office computers, UNIX for operating systems in CS departments. PostScript isa good example of a de 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 industry because they allow th

    e combination of products from different manufacturers to create a customized system. Without standards, only hardware and software from the same company

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    12/24

    could be used together. In addition, standard user interfaces can make it much easier to learn how to use new applications. Most official computer standards areset 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 (Vi

    deo 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 telecommunication companies (most of the world). ITU (International Telecommunication Union): an agency of the UN for international telecommunication coordination. CCITT (an acronym for its French name): one of the organs ofITU (i.e., ITU-T), specialized for telephone and data communication systems. 3.Explain the following with respect to Data Communications: A) Fourier analysis

    Ans: In 19th century, the French mathematician Fourier proved that any periodicfunction of time g (t) with period T can be constructed by summing a number of c

    osines and sines.

    Where f=1/T is the fundamental frequency, and are the sine and cosine amplitudesof the nth harmonics. Such decomposition is called a Fourier series. B) Band limited signals

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    13/24

    Ans: Consider the signal given in figure below. Figure shows the signal that isthe ASCII representation of the character b which consists of the bit pattern 01100010 along with its harmonics.

    Any transmission facility cannot pass all the harmonics and hence few of the har

    monics are diminished 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 reconstructed functions for 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 datarates. C) Maximum data rate of a channel

    Ans: In 1924, H. Nyquist realized the existence of the fundamental limit and derived the equation expressing the maximum data for a finite bandwidth noiseless channel. In 1948, Claude Shannon carried Nyquist work further and extended it tothe case of a channel subject to random noise. In communications, it is not really the amount of noise that concerns us, but rather the amount of 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 any communication system. The decibel is a logarithmic unit usedfor comparisons of power levels or voltage levels. In order to understand the implication of dB, it is important to know that a sound level of zero dB corresponds to the threshold of hearing, which is the smallest sound that 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, the filtered signal can becompletely reconstructed by making only 2H samples per second. Sampling the line

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    14/24

    faster than 2H per second is pointless. If the signal consists of V discrete levels, then Nyquist theorem 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, the maximum data rate according to Shannon is given as Maximum data rate = H.log2 (1+S/N) bits per second. (3.3) 4. Expl

    ain the following concepts of Internetworking: A) Internet architecture

    Ans: Internet Architecture: B1-226, B2-56: The Internet is a worldwide, publiclyaccessible network of interconnected computer networks that transmit data by packet switching using the standard Internet Protocol (IP). It is a "network of networks" that consists of millions of smaller domestic, academic, business, and government networks, which together carry various information and services, suchas electronic mail, online chat, file transfer, and the interlinked web pages and other documents of the World Wide Web. How are networks interconnected to forman internetwork? The answer has two parts. Physically, two networks can only beconnected by a computer that attaches both of them. But just a physical connection cannot provide interconnection where information can be exchanged as there i

    s no guarantee that the computer will cooperate with other machines that wish tocommunicate. Internet is not restricted in size. Internets exist that contain afew networks and internets also exist that contain thousands of networks. Similarly the number of computers attached to each network in an internet can vary. Some networks have no computers attached, while others have hundreds. To have a viable internet, we need a special computer that is willing to transfer packets from one network to another. Computers that interconnect two networks and pass packets from one to the other are called internet gateways or internet routers.

    B)

    Protocols and Significance for Internetworking

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    15/24

    Ans: Protocols for internetworking: Many protocols have been used for use in aninternet. One suite known as The TCP/IP internet protocol stands out most widelyused for internets. Most networking professional simply refer this protocol asTCP/IP. Work on the transmission control protocol (TCP) began in the 1970s. The U.S military funded the research in TCP/IP and internetworking through the Advanc

    ed Research Projects Agency in short known as ARPA. Significance of internetworking and TCP/IP Internetworking has become one of the important technique in themodern networking. Internet technology has revolutionized the computer communication. The TCP/IP technology has made possible a global Internet, which reaches millions of schools, commercial organizations, government and military etc aroundthe world. The worldwide demand for internetworking products has affected mostcompanies sell networking technologies. Competition has increased among the companies that sell the hardware and software needed for internetworking. Companieshave extended the designs in two ways The protocols have adapted to work with many network technologies And new features have been adapted that allow the protocols to transfer data across the internets C) Internet Layering Model

    Ans: Internet uses the TCP/IP reference model. This model is also called as Internet layering model or internet reference model. This model consists of 5 layersas illustrated in figure below.

    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 ofits main protocols, TCP (Transmission Control Protocol) and IP (Internet Protocol). The purpose of each layer of TCP/IP is given below:

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    16/24

    Layer 1: Physical layer This layer corresponds to basic network hardware Layer 2: Network interface This layer specifies how to organize data into frames and how a computer transfers frames over a network. It interfaces the TCP/IP protocolstack to the physical network. Layer 3: Internet This layer specifies the formatof packets sent across an internet. It also specifies the mechanism used to for

    ward packets from a computer through one or more routers to the final destination. Layer 4: Transport This layer deals with opening and maintaining connections,ensuring that packets are in fact received. The transport layer is the interface between the application layer and the complex hardware of the network. It is designed to allow peer entities on the source and destination hosts to carry on conversations. Layer 5: Network interface Each protocol of this layer specifies how one application uses an internet. 5. What is the use of IDENTIFIER and SEQUENCE NUMBER fields of echo request and echo reply message? Explain.

    Ans: The echo request contains an optional data area. The echo reply contains the copy of the data sent in the request message. The format for the echo requestand echo reply is as shown in figure below

    echo request and echo reply message format

    The field OPTIONALDATA is a variable length that contains data to be returned tothe original sender. An echo reply always returns exactly the same data as ws to receive in the request. Field IDENTIFIER and SEQUENCE NUMBER are used by the sender to match replies to

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    17/24

    requests. The value of the TYPE field specifies whether it is echo request whenequal to 8 or echo reply when equal to 0. Reports of Unreachability When a router cannot forward or deliver the datagram to the destination owing to various problems, it sends a destination unreachable message back to the original sender and then drops the datagram.

    Destination unreachable message format

    The format of destination unreachable is as shown in figure 5.3. The TYPE fieldin destination unreachable message contains an integer equal to 3. The CODE field here contains an integer that describes the problem why the datagram is not reachable. Possible values for CODE field are listed in below figure. DE VALUE 0 12 3 4 5 6 7 8 9 10 11 12 Network unreachable Host unreachable Protocol unreachable Port unreachable Fragment needed and DF set Source route failed Destinationnetwork unknown Destination host unknown Source host isolated Communication withdestination network administratively prohibited Communication with destinationhost administratively prohibited Network unreachable for type of service Host un

    reachable for type of service MEANING

    Possible problems in Destination unreachable message

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    18/24

    Network unreachable errors imply routing failures and host unreachable errors imply delivery failures. As ICMP error message contains a short prefix of the datagram that caused the problem, the source will know exactly which address is unreachable. The port is the destination point discussed at the transport layer. Ifthe datagram contains the source route option with a wrong route, it may report

    source route failure message. If a router needs to fragment a datagram and DF-bit which is dont fragment bit in IP header is set, the router sends a Fragment needed and DF set message back to the source. Rests of the errors listed in figure5.4 are self explanatory. Obtaining a subnet mask To participate in subnet addressing, a host needs to know which bits of the 32-bit internet address correspondto physical network and which corresponds to host identifiers. The informationneeded to interpret the address is represented in 32-bit quantity is called subnet mask. To learn the subnet mask used for local network, a machine can send anaddress mask 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. Host broadcasts a request without knowing which specific router will respond. The TYPE field value is 17 for address mask request and 18 for address mask reply message. A reply contains the networkssubnet address mask in the ADDRESS MASK field. IDENTIFIER and SEQUENCE 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 standard method 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 is also used for IP over other LAN technologies, such asToken Ring, FDDI, or IEEE 802.11, and for IP over ATM. ARP is used in four cases of two hosts communicating:

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    19/24

    1. When two hosts are on the same network and one desires to send a packet to the other 2. When two hosts are on different networks and must use a gateway/router to reach the other host 3. 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 host on the same network The first case is used when two ho

    sts are on the same physical network. That is, they can directly communicate without going through a router. The last three cases are the most used over the Internet as two computers on the internet are typically separated by more than 3 hops. Imagine computer A sends a packet to computer D and there are two routers, B& C, between them. Case 2 covers A sending to B; case 3 covers B sending to C;and case 4 covers C sending to D. ARP is defined in RFC 826. It is a current Internet Standard, STD 37. ARP implementation We will see the implementation with the help of an example. Consider an university with several class C (/24) networks. As illustrated in figure 3.1. here we have two Ethernets. One is in computerscience (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. Each machine on an Ethernet has uni

    que physical addresses, labeled E1 through E6, and similarly each machine on FDDI ring has physical addresses, labeled F1 through F3.

    ARP protocol

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    20/24

    Let us assume the sender on host 1 want to send a packet to a receiver on host 2. Sender knows the name of the intended receiver say [email protected]. Thefirst step is to find the IP address for host 2 known as eagle.cs.uni.edu. Thismapping of name to IP address is done by domain name server (DNS). Here we willassume that DNS gives the IP address of host 2 as 192.31.65.5. The upper layer s

    oftware on host 1 builds a packet with 192.31.65.5 in the destination address field and gives it to IP software to transmit. The IP software can look at the address see that the destination is on its own network, but needs a way to find thedestinations physical 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 WHO owns IP address 192.31.65.5? The broadcast will arrive at every machine on Ethernet 192.31.65.0, and each one will check itsIP address. Host 2 alone will respond with its physical address E2. The packet used for asking this question is called ARP request. And the packet 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 thepayload field and dumps it onto the Ethernet. The Ethernet board of host 2 detec

    ts this frame, recognizes it as frame for itself, scoops it up, and causes an interrupt. The Ethernet driver extracts IP packet from the payload and passes it to the IP software, 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 and the other is ARP reply. ARP request An ARP request is structured in a particular way. As shown in figure 3.2 an ARP request frame consists of two fields 1. Frame header 2. ARP request messageFrameHeader ARPrequestmessage MayIknowyourphysicalAddress?(a) ARP request frame

    Frame header is subdivided into 1. Physical address

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    21/24

    2. IP address A complete ARP request frame is as shown in figure 3.2(b). We haveseen that broadcast address consists of all 1s. hence the destinations physicaladdress in ARP request frame is broadcast address with all ones equivalently FF-FF-FF-FF-FF-FF.

    (b) ARP request frame

    ARP replies An ARP reply frame is also structured in a similar way as ARP request frame. As shown in figure (a) an ARP reply frame also consists of two fields 1. Frame header 2. ARP reply message

    FrameHeader ARP reply Frame header is subdivided again into 1. Physical address 2. IP address

    FrameHeader ThisismyphysicalAddress(a) ARP reply frame

    A complete ARP request frame is as shown in figure (b).

    (b) ARP request frame

    ARP replies An ARP reply frame is also structured in a similar way as ARP request frame. As shown in figure (a) an ARP reply frame also consists of two fields

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    22/24

    1. Frame header 2. ARP reply messageFrameHeader ARPreplymessage ThisismyphysicalAddress(a) ARP reply frame

    ARP reply Frame header is subdivided again into 1. Physical address 2. IP addres

    s A complete ARP request frame is as shown in figure (b).

    (b) ARP reply frame

    The Address Resolution Cache Broadcasting the ARP request packet is too expensive to be used every time one machine wants to transmit a packet to another. As with this broadcasting every machine on the network must receive and then processthe broadcast packet. To reduce the communication cost 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 IP address and physical address That whenever a computer sends an ARP request and receives an ARP reply, it saves the IP address and corresponding hardware address inf

    ormation in its cache for successive look ups. When transmitting a packet, a computer always looks in its cache for binding before sending an ARP request. If itfinds the desired binding in its ARP cache, the computer need not broadcast onthe network. Thus when two computers on a network communicate, they begin with an ARP request and response, and then repeatedly transfer packets without using ARP for each packet. ARP cache timeouts An ARP cache provides an example of softstate, a technique commonly used in network protocols. The name describes a situation in which information can become stale without warning. In case of ARP consider two computers A and B, both connected to Ethernet.

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    23/24

    Assume A has sent an ARP request, and B has replied. Further assume that after the exchange, computer B crashes. Computer A will not receive any information ofthe crash. And moreover as it already has binding information for B in its ARP cache, computer A will continue to send packets to B. the Ethernet hardware provides no indication that B is not online because Ethernet does not have guarantee

    delivery. Thus A has no way of knowing when information in its Arp cache has become incorrect. Usually such protocols use timers, with the state information being deleted when the timer expires. That is when a computer places the address bindings in cache it needs to set the timer. Typical value of timeout being say 20minutes, and when the timer expires, that address binding information is deleted.

  • 8/6/2019 53359551 MC0075 February 2011 Computer Networks Assignement

    24/24