21
NAME - KRUSHITHA.V.P ROLL NO. - 520791371 ASSIGNMENT SET 2 SUBJECT - MC0075 COMPUTER NETWORKS 1

MCA-Sem 3-MC0075 - II

Embed Size (px)

DESCRIPTION

SMUDE MCA sem3 MC0075 - II

Citation preview

Master of Computer Application (MCA) Semester 3

NAME - KRUSHITHA.V.P

ROLL NO. - 520791371ASSIGNMENT SET 2SUBJECT - MC0075 COMPUTER NETWORKS

Master of Computer Application (MCA) Semester 3

MC0075 Computer Networks

Assignment Set 2

1. Explain the following design issues regarding the Data Link Layer:

A) Framing B) Error Control C) Flow Control

ANS:A) Framing

Software design is a process of problem-solving and planning for a software solution. After the purpose and specifications of software is determined, software developers will design or employ designers to develop a plan for a solution. It includes low-level component and algorithm implementation issues as well as the architectural view. The software requirements analysis (SRA) step of a software development process yields specifications that are used in software engineering. A software design may be platform-independent or platform-specific, depending on the availability of the technology called for by the design.

Design is a meaningful engineering representation of something that is to be built. It can be traced to a customer's requirements and at the same time assessed for quality against a set of predefined criteria for 'good' design. In the software engineering context, design focuses on four major areas of concern, data, architecture, interfaces, and components.

Designing software is an exercise in managing complexity. The complexity exits within the software design itself, within the software organization of the company, and within the industry as a whole. Software design is very similar to systems design. It can span multiple technologies and often involves multiple sub-disciplines. Software specifications tend to be fluid, and change rapidly and often, usually while the design process is still going on. Software development teams also tend to be fluid, likewise often changing in the middle of the design process. In many ways, software bears more resemblance to complex social or organic systems than to hardware. All of this makes software design a difficult and error prone process.

Software design documentation may be reviewed or presented to allow constraints, specifications and even requirements to be adjusted prior to programming. Redesign may occur after review of a programmed simulation or prototype. It is possible to design software in the process of programming, without a plan or requirement analysis, but for more complex projects this would not be considered a professional approach.

Frame Technology is a language-neutral system that manufactures custom software[1] from reusable, machine-adaptable building blocks, called frames. FT is used to reduce the time, effort, and errors involved in the design, construction, and evolution of large, complex software systems. Fundamental to FT is its ability to stop the proliferation[2] of similar but subtly different components, an issue plaguing software engineering, for which programming language constructs (subroutines, classes, or templates/generics) or add-in techniques such as macros and generators failed to provide a practical, scalable solution.A number of implementations of FT exist. Netron Fusion specializes in constructing business software and is proprietary. XVCL is a general-purpose, open-source implementation of FT. Paul G. Bassett invented the first FT in order to automate the repetitive, error-prone editing involved in adapting (generated and hand-written) programs to changing requirements and contexts. Independent comparisons of FT to alternative approaches [11] confirm that the time and resources needed to build and maintain complex systems can be substantially reduced. One reason: FT shields programmers from softwares inherent redundancies: FT has reproduced COTS object-libraries from equivalent XVCL frame libraries that are two-thirds smaller and simpler[2][6]; custom business applications are routinely specified and maintained by Netron Fusion SPC frames that are 5% - 15% of the size of their assembled source files[7].

B) Error controlError control (error management, error handling) The employment, in a computer system or in a communication system, of error-detecting and/or error-correcting codes with the intention of removing the effects of error and/or recording the prevalence of error in the system. The effects of errors may be removed by correcting them in all but a negligible proportion of cases. Error control aims to cope with errors owing to noise or to equipment malfunction in which case it overlaps with fault tolerance (see fault-tolerant system) but not usually with the effects of errors in the design of hardware or software. An important aspect is the prevention of mistakes by users. Checking of data by software as it is entered is an essential feature of the design of reliable application programs. Error control is expensive: the balance between the cost and the benefit (measured by the degree of protection) has to be weighed within the technological and financial context of the system being designed. Software Quality Control is the set of procedures used by organizations (1) to ensure that a software product will meet its quality goals at the best value to the customer, and (2) to continually improve the organizations ability to produce software products in the future. Software quality control refers to specified functional requirements as well as non-functional requirements such as supportability, performance and usability. [2] It also refers to the ability for software to perform well in unforeseeable scenarios and to keep a relatively low defect rate.C) Flow controlsIn computer networking, flow control is the process of managing the rate of data transmission between two nodes to prevent a fast sender from outrunning a slow receiver. It provides a mechanism for the receiver to control the transmission speed, so that the receiving node is not overwhelmed with data from tranceiving nodes. Flow control should be distinguished from congestion control, which is used for controlling the flow of data when congestion has actually occurred [1]. Flow control mechanisms can be classified by whether or not the receiving node sends feedback to the sending node.

Flow control is important because it is possible for a sending computer to transmit information at a faster rate than the destination computer can receive and process them. This can happen if the receiving computers have a heavy traffic load in comparison to the sending computer, or if the receiving computer has less processing power than the sending computer.In common RS 232 there are pairs of control lines:RTS flow control, RTS (Request To Send)/CTS (Clear To Send) and

DTR flow control, DTR (Data Terminal Ready)/DSR (Data Set Ready),

which are usually referred to as hardware flow control. Oppositely, XON/XOFF is usually referred to as software flow control. In the old mainframe days, modems were called "data sets.

2. Describe the following Medium Access Control Sub Layers multiple access protocols:

A) Pure ALOHA or Unspotted ALOHA B) Slotted ALOHA or Impure ALOHA

ANS:

ALOHA net, also known as ALOHA, was a pioneering computer networking system developed at the University of Hawaii. It was first deployed in 1970 by Bruce Rights, and while the network itself is no longer used, one of the core concepts in the network is the basis for the widely used Ethernet.The ALOHA protocol is an OSI layer 2 protocol for LAN networks with broadcast topology. The difference between ALOHA and Ethernet on a shared medium is that Ethernet uses CSMA/CD, which broadcasts a jamming signal to notify all computers connected to the channel that a collision occurred, forcing computers on the network to reject their current packet or frame. The use of a jamming signal enables early release of the transmission medium where transmission delays dominate propagation delays, and is appropriate for many Ethernet variants..

A) Pure ALOHA or Unslotted ALOHA

The first version of the protocol (now called "Pure ALOHA") was quite simple:

If you have data to send, send the data

If the message collides with another transmission, try resending "later"

Note that the first step implies that Pure ALOHA does not check whether the channel is busy before transmitting. The critical aspect is the "later" concept: the quality of the back off scheme chosen significantly influences the efficiency of the protocol, the ultimate channel capacity, and the predictability of its behavior.

To assess Pure ALOHA, we need to predict its throughput, the rate of (successful) transmission of frames. (This discussion of Pure Alohas performance follows Tanenbaum. First, let's make a few simplifying assumptions:

All frames have the same length.

Stations cannot generate a frame while transmitting or trying to transmit. (That is, if a station keeps trying to send a frame, it cannot also be generating more frames to send.)

The population of stations attempts to transmit (both new frames and old frames that collided) according to a Poisson distribution.

Let "T" refer to the time needed to transmit one frame on the channel, and let's define "frame-time" as a unit of time equal to T. Let "G" refer to the mean used in the Poisson distribution over transmission-attempt amounts: that is, on average, there are G transmission-attempts per frame-time.

Overlapping frames in the pure ALOHA protocol. Frame-time is equal to 1 for all frames.

Consider what needs to happen for a frame to be transmitted successfully. Let "t" refer to the time at which we want to send a frame. We want to use the channel for one frame-time beginning at t, and so we need all other stations to refrain from transmitting during this time. Moreover, we need the other stations to refrain from transmitting between t-T and t as well, because a frame sent during this interval would overlap with our frame.

For any frame-time, the probability of there being k transmission-attempts during that frame-time is:

The average amount of transmission-attempts for 2 consecutive frame-times is 2G. Hence, for any pair of consecutive frame-times, the probability of there being k transmission-attempts during those two frame-times is:

Therefore, the probability (Probpure) of there being zero transmission-attempts between t-T and t+T (and thus of a successful transmission for us) is:

Probpure = e 2GThe throughput can be calculated as the rate of transmission-attempts multiplied by the probability of success, and so we can conclude that the throughput (Spure) is:

Spure = Ge 2GThe maximum throughput is 0.5/e frames per frame-time (reached when G = 0.5), which is approximately 0.184 frames per frame-time. This means that, in Pure ALOHA, only about 18.4% of the time is used for successful transmissions.

B) Slotted ALOHA or Impure ALOHA

An improvement to the original ALOHA protocol was "Slotted ALOHA", which introduced discrete timeslots and increased the maximum throughput. A station can send only at the beginning of a timeslot, and thus collisions are reduced. In this case, we only need to worry about the transmission-attempts within 1 frame-time and not 2 consecutive frame-times, since collisions can only occur during each timeslot. Thus, the probability of there being zero transmission-attempts in a single timeslot is:

Probslotted = e Gthe probability of k packets is:

Probslottedk = e G(1 e G)k 1

The throughput is:

Sslotted = Ge GThe maximum throughput is 1/e frames per frame-time (reached when G = 1), which is approximately 0.368 frames per frame-time, or 36.8%.

5. Explain the following with respect to OSPF Message Formats:

A) Hello B) Database description C) Link state request

D) Link state update E) Link state acknowledgement

ANS:

As a routing protocol, the main job of OSPF is to facilitate the exchange of routing information between routers. Each router in an OSPF autonomous system that runs OSPF software that is responsible for various tasks, such as setting timers to control certain activities that must occur on a regular basis, and the maintenance of important data structures, such as the link-state database (LSDB). Most importantly, each OSPF router must both generate and respond to OSPF messages. It is this messaging system that allows important routing information to be shared within an AS or area, which makes it crucial to understanding how OSPF works. So, it's worth taking a look at the message types and how they are used

A) Hello Message Format

As the name suggests, these messages are used as a form of greeting, to allow a router to discover other adjacent routers on its local links and networks

. The messages establish relationships between neighboring devices (called adjacencies) and communicate key parameters about how OSPF is to be used in the autonomous system or area

OSPF Hello Message Format

Field NameSize (bytes)Description

Network Mask4Network Mask: The subnet mask of the network the router is sending to.

Hello Interval2Hello Interval: The number of seconds this router waits between sending Hello messages.

Options1Options: Indicates which optional OSPF capabilities the router supports.

Rtr Pri1Router Priority: Indicates the router's priority, when electing a backup designated router.

Router Dead Interval4Router Dead Interval: The number of seconds a router can be silent before it is considered to have failed.

Designated Router4Designated Router: The address of a router designated for certain special functions on some networks

. Set to zeroes if there is no designated router.

Backup Designated Router4Backup Designated Router: The address of a backup designated router. Set to all zeroes if there is no backup designated router.

NeighborsMultipleof 4Neighbors: The addresses of each router from which this router has received Hello messages recently.

OSPF Hello Message Format

Database Description:

These messages contain descriptions of the topology of the AS or area. That is, they convey the contents of the link-state database for the autonomous system or area from one router to another. Communicating a large LSDB may require several messages to be sent; this is done by having the sending device designated as a master device and sending messages in sequence, with the slave (recipient of the LSDB information) responding with acknowledgements. OSPF Database Description Message Format

Field NameSize (bytes)Description

Interface MTU2Interface MTU: The size of the largest IP message that can be sent on this router's interface without fragmentation.

Options1Options: Indicates which of several optional OSPF capabilities the router supports.

Flags1

DD Sequence Number4DD Sequence Number: Used to number a sequence of Database Description messages so they are kept in order.

LSA HeadersVariableLSA Headers: Contains link-state advertisement headers, which carry information about the LSDB. See near the end of the topic for more information on LSAs.

Database Description Message Format

Link State Request:

These messages are used by one router to request updated information about a portion of the LSDB from another router. The message specifies exactly which link(s) about which the requesting device wants more current information. OSPF Link State Request Message Format

Field NameSize (bytes)Description

LS Type4Link State Type: The type of link state advertisement (LSA) being sought.

Link State ID4Link State ID: The identifier of the LSA, usually the IP address of either the router or network linked.

Advertising Router4Advertising Router: The ID of the router that created the LSA whose update is being sought.

OSPF Link State Request Message Format

Link State Update:

These messages contain updated information about the state of certain links on the LSDB. They are sent in response to a Link State Request message, and also broadcast or multicast by routers on a regular basis. Their contents are used to update the information in the LSDBs of routers that receive them

OSPF Link State Update Message Format

Field NameSize (bytes)Description

# LSAs4Number of LSAs: The number of link-state advertisements included in this message.

LSAsVariableLSAs: One or more link-state advertisements. See below for more details.

Link State Update Message Format

Link State Acknowledgment:

These messages provide reliability to the link-state exchange process, by explicitly acknowledging receipt of a Link State Update message.

OSPF Link State Acknowledgment Message Format

Field NameSize (bytes)Description

LSA HeadersVariableLSA Headers: Contains link-state advertisement headers, to identify the LSAs acknowledged.

PAGE 1