You are on page 1of 27

Spring 2012 Bachelor of Computer Application (BCA) Semester 4 BC0048 Computer Networks 4 Credits

(Book ID: B0813)

Assignment Set 1 (40 Marks)

Answer All the Questions. Each question carries equal marks. 1. List the Basic essential components of a computer network. Ans : Components of a computer network A network is a combination of different components. The most essential components of a simple network are listed below: Servers: Servers are faster computers that run various softwares, store and process information and also provide a human interface for the users to be able to use the networked computers. Nodes: Nodes are the computers on the network, which are provided to the users to carry out their tasks using the network. Workstation: A node, which is more powerful, and can handle local information processing or graphics processing is called a workstation. The workstation works only for the person sitting in front of it, where as a server serves all the people on the network to share its resources. A workstation usually has an inexpensive, small hard disk to carry out local tasks. Some workstations, called diskless workstations, have no disk drive of their own. Such workstations also called dumb terminals and they rely completely on the LAN for their access. The network operating system lets the nodes work as if all the resources at the server belong to the node itself. Network Operating System (NOS): The network requires some software to control all the information transfer activity on the network, like the traffic police to control the traffic. The software called NOS handles these tasks. Networks, which are more complex, require network devices like hubs, switches & routers to carry out different network functions.

LAN Software: On the network, each computer is called a node or a workstation unless there are certain computers designed as servers. LAN cables connect all the nodes and servers together to form the network. In addition to its local disk operating system, each node requires networking software that enable the nodes to communicate with the servers. In return, the file servers run network software that communicates with the nodes. LAN Cable: This is the medium or channel over which the information travels from computer to computer. The information travels from one computer onto the medium and then from the medium to another computer in the form that it can be read. Network Interface Card: Each computer contains a network interface card. This card is used to connect the cables to the computers. These cards help the computer to transfer the data at a faster rate and in the form of packets. These cards are plugged into the computer motherboard. These cards are generally called as Ethernet cards.

2. Differentiate LAN and WAN. Ans : Comparison chart LAN


Geographical spread:

WAN Have a large geographical range generally spreading across boundaries and need leased telecommunication lines

Have a small geographical range and do not need any leased telecommunication lines

Example:

Network in an organization can be a Internet is the best example of a LAN WAN

Maintenance costs: Because it covers a relatively small Maintaining WAN is difficult

geographical area, LAN is easier to because of its wider geographical maintain at relatively low costs. coverage and higher maintenance costs. one LAN can be connected to other Computers connected to a wideLANs over any distance via area network are often connected telephone lines and radio waves through public networks, such as the telephone system. They can also be connected through leased lines or satellites

Connection:

Data transfer rates: LANs have a high data transfer rate WANs have a lower data transfer

rate as compared to LANs

Technology:

Tend to use certain connectivity WANs tend to use technology like technologies, primarily Ethernet and ATM, Frame Relay and X.25 for Token Ring connectivity over the longer distances LAN (Local Area Network) is a WAN (Wide Area Network) is a computer network covering a small computer network that covers a geographic area, like a home, office,broad area (e.g., any network schools, or group of buildings. whose communications links

Definition oi.:

LAN

WAN cross metropolitan, regional, or national boundaries over a long distance

Ownership:

Typically owned, controlled, and managed by a single person or organization

WANs (like the Internet) are not owned by any one organization but rather exist under collective or distributed ownership and management over long distances

Set-up costs:

If there is a need to set-up a couple In this case since networks in of extra devices on the network, it is remote areas have to be not very expensive to do that connected hence the set-up costs are higher

3. Explain the TCP/IP Reference Model with diagram. Ans : The TCP/IP Reference Model The TCP/IP reference model is the network model used in the current Internet architecture. It was created in the 1970s by DARPA for use in developing the Internet's

protocols, and the structure of the Internet is still closely reflected by the TCP/IP model. It has fewer, less rigidly defined layers than the commonly referenced OSI model, and thus provides an easier fit for real world protocols. It is considered as the grandfather of the Internet, the ARPANET. This was a research network sponsored by the Department of Defense in the United States. A goal was of continuing the conversation between source and destination even if transmission went out of operation. The reference model was named after two of its main protocols, TCP (Transmission Control Protocol) and IP (Internet Protocol). No document officially specifies the model. Different names are given to the layers by different documents, and different numbers of layers are shown by different documents. There are versions of this model with four layers and with five layers. The original four-layer version of the model has layers as shown in figure 2.7. It consists of the following four layers Layer 4 Process Layer or Application Layer: This is where the "higher level" protocols such as FTP, HTTP, etc. operate. The original TCP/IP specification described a number of different applications that fit into the top layer of the protocol stack. These applications include Telnet, FTP, SMTP and DNS. These are illustrated in figure 2.10. Telnet is a program that supports the TELNET protocol over TCP. TELNET is a general two-way communication protocol that can be used to connect to another host and run applications on that host remotely. FTP (File Transfer Protocol) is a protocol that was originally designed to promote the sharing of files among computer users. It shields the user from the variations of file storage on different architectures and allows for a reliable and efficient transfer of data. SMTP (Simple Mail Transport Protocol) is the protocol used to transport electronic mail from one computer to another through a series of other computers along the route. DNS (Domain Name System) resolves the numerical address of a network node into its textual name or vice-versa. It would translate www.yahoo.com to 204.71.177.71 to allow the routing protocols to find the host that the packet is destined for. Layer 3 Host-To-Host (Transport) Layer: This is where flow-control and connection protocols exist, such as TCP. 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. Data may be user data or control

data. Two modes are available, full-duplex and half duplex. In full-duplex operation, both sides can transmit and receive data simultaneously, whereas in half duplex, a side can only send or receive at one time. Layer 2 Internet or Internetworking Layer: This layer defines IP addresses, with many routing schemes for navigating packets from one IP address to another. The job of the network layer is to inject packets into any network and have them travel independently to the destination. The layer defines IP (Internet Protocol) for its official packet format and protocol. Packet routing is a major job of this protocol. Layer 1 Network Access Layer: This layer describes the physical equipment necessary for communications, such as twisted pair cables, the signalling used on that equipment, and the low-level protocols using that signalling. The Host-to-Network layer interfaces the TCP/IP protocol stack to the physical network. The TCP/IP reference model does not specify in any great detail the operation of this layer, except that the host has to connect to the network using some protocol so it can send IP packets over it. As it is not officially defined, it varies from implementation to implementation, with vendors supplying their own version.

Figure 2.7: TCP/IP Network Protocol The basic idea of the networking system is to allow one application on a host computer to talk to another application on a different host computer. The application forms its request, then passes the packet down to the lower layers, which add their own control information, either a header or a footer, onto the packet. Finally the packet reaches the physical layer and is transmitted through the cable onto the destination host.

The packet then travels up through the different layers, with each layer reading, deciphering, and removing the header or footer that was attached by its counterpart on the originating computer. Finally the packet arrives at the application it was destined for. Even though technically each layer communicates with the layer above or below it, the process can be viewed as one layer talking to its partner on the host.

4. What are the advantages and disadvantages of layered architecture in a network ? Ans: Advantages of Layered Architecture : Any given layer can be modified or upgraded without affecting the other layers.

Modulazition by means of layering simplifies the overall design. Different layers can be assigned to different standards, committees, and design teams. Mechanisms like packet-switching, circuit-switching may be used without effecting more than one layer. Different machines may be plugged in at different layers. The relation between different control functions can be better understood. Common lower levels may be shared by different higher levels. Functions (especially at lower levels) may be removed from software to hardware and micro-codes. Increases the compatibility of different machines.

Disadvantages of Layered Architecture : Total overhead is higher. Two communicating machines may have to use certain functions which they could do without layers. As technology changes, the functions may not be in the most cost-effective layer.

5. What are the problems due to which transmission lines suffers mainly ? Ans : Transmission impairments

Analog signal consist of varying a voltage with time to represent an information steam. If the transmission media were perfectly, the receiver could receive exactly the same signal that the transmitter sent. But communication lines are usually not perfect, so the receive signal is not the same as the transmitted signal. For digital data this difference can lead to errors. Transmission lines suffers from three major problems 1. Attenuation distortion 2. Delay distortion 3. Noise Attenuation distortion It is the loss of energy as the signal propagates outward. The amount of energy depends on the frequency. The signal attenuates as shown in figure 3.2 as it propagates. If the attenuation is too much, the receiver may not be able to detect the signal at all, or the signal may fall below the noise level. For reliable communication, the attenuation and delay over the range of frequencies of transmission should be constant.

Figure 3.2: Signals loose power at it travels time Delay distortion The second transmission impairment is delay distortion. Communication lines have distributed inductance and capacitance, which distort the amplitude of signals and also delay the signals at different frequencies by different amounts. It is caused by the fact that different Fourier components travel at different speed. The delay distortion is illustrated as shown in figure 3.3. It is due to velocity of propagation that varies with frequency. Thus, various frequency components of a signal arrive at the receiver at different times.

Figure 3.3: Delay distortion For digital data, fast components from one bit may catch up and over take slow component from bit ahead, mixing the two bits and increasing the probability of incorrect reception. Thus very critical in particular for digital data, that is because signal components of bit positions spill into other bit positions, and so limiting the allowed rate of transmission.

Dispersion

Figure 3.4: Signal is dispersed Signals tend to spread as they travel, with the amount of spreading dependent on the frequency. It is illustrated as shown in figure 3.4.

6. Describe Circuit switching and message switching. Ans: Circuit switching :

A circuit switching network is one that establishes a dedicated circuit (or channel) between nodes and terminals before the users may communicate. Each circuit that is dedicated cannot be used by other callers until the circuit is released and a new connection is set up. Even if no actual communication is taking place in a dedicated circuit then, that channel still remains unavailable to other users. Channels that are available for new calls to be set up are said to be idle. Circuit switching is used for ordinary telephone calls. It allows communications equipment and circuits, to be shared among users. Each user has sole access to a circuit (functionally equivalent to a pair of copper wires) during network use.

Figure 4.5: (a) circuit switching (b) packet switching For call setup and control (and other administrative purposes), it is possible to use a separate dedicated signalling channel from the end node to the network. ISDN is one such service that uses a separate signalling channel. The method of establishing the connection and monitoring its progress and termination through the network may also utilize a separate control channel. Circuit switching can be relatively inefficient because capacity is wasted on connections which are set up but are not in continuous use (however momentarily). On the other hand, the connection is immediately available and capacity is guaranteed until the call is disconnected

Message switching : Message switching was the precursor of packet switching, where messages were routed in their entirety and one hop at a time. It was first introduced by Leonard

Kleinrock in 1961. Message switching systems are nowadays mostly implemented over packet-switched or circuit-switched data networks Hop-by-hop Telex forwarding are examples of message switching systems. E-mail is another example of a message switching system. When this form of switching is used, no physical path is established in advance in between sender and receiver. Instead, when the sender has a block of data to be sent, it is stored in the first switching office (i.e. router) then forwarded later at one hop at a time. Each block is received in its entity form, inspected for errors and then forwarded or retransmitted. It is a form of store-and-forward network. Data is transmitted into the network and stored in a switch. The network transfers the data from switch to switch when it is convenient to do so, as such the data is not transferred in real-time. Blocking can not occur, however, long delays can happen. The source and destination terminal need not be compatible, since conversions are done by the message switching networks. Again consider a connection of a network shown in figure 4.6. For instance, when a telex (or email) message is sent from A to D, it first passes over a local connection (AB). It is then passed at some later time to C (via link BC), and from there to the destination (via link CD). At each message switch, the received message is stored, and a connection is subsequently made to deliver the message to the neighboring message switch. Message switching is also known as store-and-forward switching since the messages are stored at intermediate nodes en route to their destinations.

Figure 4.8: Message switching to communicate between A and D The figure 4.8 illustrates message switching; transmission of only one message is illustrated for simplicity. As the figure indicates, a complete message is sent from node A to node B when the link interconnecting them becomes available. Since the message may be competing with other messages for access to facilities, a queuing delay may be incurred while waiting for the link to become available. The message is

stored at B until the next link becomes available, with another queuing delay before it can be forwarded. It repeats this process until it reaches its destination. Circuit setup delays are replaced by queuing delays. Considerable extra delay may result from storage at individual nodes. A delay for putting the message on the communications link (message length in bits divided by link speed in bps) is also incurred at each node enroute. Message lengths are slightly longer than they are in circuit switching, after establishment of the circuit, since header information must be included with each message; the header includes information identifying the destination as well as other types of information. Most message switched networks do not use dedicated point-to-point links.

Spring 2012 Bachelor of Computer Application (BCA) Semester 4 BC0048 Computer Networks 4 Credits

(Book ID: B0813)

Assignment Set 2 (60 Marks)

Answer All the Questions. Each question carries equal marks. 1. Briefly explain (i) Coaxial Cable and (ii) Optical fiber. Ans : Coaxial Cable : Coaxial cable has traditionally been an important part of the long distance telephone network. Today, it faces increasing competition from optical fiber, terrestrial microwave, and satellite. Using frequency-division multiplexing (FDM), a coaxial cable can carry over 10,000 voice channels simultaneously. Physical Description

Figure 5.2: Coaxial cable Coaxial cable, like twisted pair, consists of two conductors, but constructed differently to permit it to operate over a wider range frequency. It consists of hollow outer cylindrical conductor that surrounds a single inner wire conductor. The inner conductor is held in place by either regularly spaced insulating rings or a solid dielectric material. The outer conductor is covered with jacket or shield. The physical description is illustrated in figure 5.2. A single coaxial cable has a diameter of from 1 to 2.5cm. Because of its shielded, concentric construction, coaxial cable is much less susceptible to interference and crosstalk than twisted pair. Coaxial cable can be used over long distances and support more stations on a shared line than twisted pair. Coaxial cable is perhaps the most versatile transmission medium and is enjoying widespread use in a wide variety of applications. The most important of these are used in television distribution and Long-distance telephone transmission. Also they find applications in Short-run computer system links and Local area networks. Coaxial cable is spreading rapidly as a means of distributing TV signals to individual homes-cable TV. From its modest beginnings as Community Antenna Television

(CATV), designed to provide service to remote areas, cable TV will eventually reach almost as many homes and offices as the telephone. A cable TV system can carry dozens or even hundreds of TV channels at ranges up to a few tens of kilometers. Coaxial cable is also commonly used for short range connections between devices. Using digital signaling, coaxial cable can be used to provide high-speed I/O channels on computer systems. Optical Fiber : A optical fiber is a thin, flexible medium capable of guiding an optical ray. Total internal reflection is the basic principle on which the transmission of data takes place through fibers. . If the angle of incidence is sufficiently large, then the light in the fiber will reflect repeatedly in the interface between the materials. The fiber need not be straight but can conduct light even when bent.

Figure 5.4: Total internal reflection Physical Description

Figure 5.5: (a) Side view of a single fiber (b) view of sheath with three fibers An optical fiber has a cylindrical shape and consists of three concentric sections; the core, the cladding and the jacket. The core is the inner most sections and consists of one or more very thin strands, or fibers, made of glass or plastic and is as shown in Figure 5.5. The core has a diameter in the range of 8 to 100mm. Each fiber is surrounded by its own cladding, a glass or plastic coating that has optical properties

different from those of the core. Various glasses and plastics can be used to make optical fibers. The lowest losses have been obtained using fibers of ultra-pure fused silica. Ultra pure fiber is difficult to manufacture; higher loss multi component glass fibers are more economical and still provide good performance. Plastic fiber is even less costly and can be used for short-haul links, for which moderately high losses are acceptable. The interface between the core and cladding acts as a reflector to confine light that would otherwise escape the core. The outermost layer, surrounding one or a bundle of cladded fibers, is the jacket. The jacket is composed of plastic and other material layered to protect against moisture, abrasion, crushing and other environmental dangers. One of the most significant technological breakthroughs in data transmission has been the development of practical fiber optic communication systems. Optical fiber already enjoys considerable use in long-distance telecommunications, and its use in military applications is growing. The continuing improvements in performance and decline in prices, together with the inherent advantages of optical fiber, have made it increasingly attractive for LAN.

2. What are the functions of (i) Routers (iii) Bridges Ans : Routers

A router is an intelligent packet sorter, which can look at the ultimate destination for a packet and analyze the best way to get it there. Where the devices above supply a physical path for the packets, a router also provides the information on how to get from one place to another, and this information is added to the packet header. This makes it a much more powerful device for use with complex networks, including the Internet. In fact, the Internet itself could be described as a network of routers. A router is often a full fledged computer system with multiple network cards and its own operating system. The types of tables and routing protocols used by different routers are beyond the scope of this unit and will be discussed in advanced computer networks. At this point it is necessary to remember that any router accessing the Internet must use at least TCP/IP. Routers operate on Layer 3, the network layer that routes data o different networks. Routing is important when multiple segments are connected in such a way that there is more than one possible path between one station and another on the network. A router determines the next network point to which a packet should be forwarded toward its destination. It is located at any juncture of networks, and it decides which way to send each information packet based on its current understanding of the state of the networks to which it is connected. A router creates or maintains a table of the available routes and their conditions and uses this information along with distance and cost algorithms to determine the best route for a given packet. Typically, a packet may travel trough a number of network points with routers before arriving at its destination. Router performance is measured using its packet- forwarding rate, which is the number of packets transferred per second from input to output port. This rate depends on packet size, and how many protocols are being supported. The larger the packet, the greater the router throughput because each forwarded packet requires reading the packet header, which consumes time. Routers have protocol intelligence, which enables them to handle multiple protocols. Many organizations continue to rely upon traditional multi protocol routers to provide the foundation for their networking infrastructure. In that case, the router, or more specifically the back plane of the router, is the collapse point for the entire enterprise as the total network response time depends upon how the router manages all the WAN and LAN connectivity, as illustrated in Fig. 10.17. Routers are an increasingly common sight in any network environment, from a small home office that uses one to connect to an Internet service provider (ISP) to a corporate IT environment where racks of routers manage data communication with disparate remote sites. Routers make internetworking possible, and in view of this, they warrant detailed attention. Routers are network devices that literally route data around the network. By examining data as it arrives, the router is able to determine the

destination address for the data; then, by using tables of defined routes, the router determines the best way for the data to continue its journey. Unlike bridges and switches, which use the hardware-configured MAC address to determine the destination of the data, routers use the software-configured network address to make decisions. This approach makes routers more functional than bridges or switches, and it also makes them more complex because they have to work harder to determine the information. Figure 10.18 illustrates the working of a router.

Fig. 3.18: The basic function of a router. The basic requirement for a router is that it must have at least two network interfaces. If they are LAN interfaces, then the router can manage and route the information between two LAN segments. More commonly, a router is used to provide connectivity across wide area network (WAN) links. Figure 3.19 shows a router with two LAN ports (marked AUI 0 and AUI 1) and two WAN ports (marked Serial 0 and Serial 1). This router is capable of routing data between two LAN segments and two WAN segments.

Bridges Like a repeater, a bridge has just two ports and is used to connect two groups of computers. The difference is that a bridge has a list of which computers are on each side, and it only passes along packets that need to go to the other side. This cuts

down on network activity where the two groups have heavy traffic amongst themselves but not too much with each other. Bridges are intelligent devices that operate at layer 2 and are used to interconnect LANs of the same type, as illustrated in Fig. 10.13. Packets received on one port may be retransmitted or forwarded on another port.

Fig. 10.13: Bridge interconnects two Token Ring LANs A bridge unlike repeaters will not start retransmission until it has received the complete packet. As a consequence, stations on either side of a bridge may be transmitting simultaneously without causing collisions. A bridge, like a repeater, does not modify the contents of a packet in any way; and a simple bridge retransmits every packet whether or not this is necessary. Unlike repeaters, bridges may provide filtering and forwarding services across the link. A learning bridge examines the source field of every packet it seen on each port and builds up a picture of which addresses are connected to which ports; therefore, a packet will not be transmitted to a network segment that has no need to see the information. Filtering means that if the destination of a packet is the same side of the bridge as its origin, the bridge ignores it, but if the address is on the other segment, the bridge lets it across or forwards it. If a bridge sees a packet addressed to a destination that is not in its address table, the packet is retransmitted on every port except the one it was received on. Bridge also age address table entries; if a given address has not been communicating in a specified period of time then the address is deleted from the address table. The learning bridge concept works equally well with several interconnected networks, provided that there are no loops in the system.

Bridges are networking devices that divide up networks. In the days before routers and switches became popular, bridges were used to divide up networks and thus reduce the amount of traffic on each network. Network switches have largely replaced them. A bridge functions by blocking or forwarding data, based on the destination MAC address written into each frame of data. If the bridge believes the destination address is on a network other than that from which the data was received, it can forward the data to the other networks to which it is connected. If the address is not on the other side of the bridge, the data is blocked from passing. Bridges "learn" the MAC addresses of devices on connected networks by "listening" to network traffic and recording the network from which the traffic originates. Figure 10.14 shows a representation of a bridge.

Fig. 10.14: working of a bridge. The advantages of bridges are simple and significant. By preventing unnecessary traffic from crossing onto other network segments, a bridge can dramatically reduce the amount of network traffic on a segment. Bridges also make it possible to isolate a busy network from a not-so-busy one, thereby preventing pollution from busy nodes.

3 . Define the terms Error Detection and Correction with respect to Data Transmission. Also explain the following concepts with respect to Error Detection and Correction: Parity Bits

Ans :

Cyclic Redundancy Check

Error Detection and Correction There are two types of attacks against errors: Error Detecting Codes: Include enough redundancy bits to detect errors and use ACKs and retransmissions to recover from the errors. Error Correcting Codes: Include enough redundancy to detect and correct errors. To understand and deal with errors, we consider the following some of the terms and conventions used: 1. Messages (frames) consist of m data (message) bits and r redundancy bits, yielding an n = (m+r)-bit codeword. 2. Hamming Distance: Given any two codewords, we can determine how many of the bits differ. Simply exclusive or (XOR) the two words, and count the number of 1 bits in the result. 3. Significance? If two codewords are d bits apart, d errors are required to convert one to the other. 4. A codes Hamming Distance is defined as the minimum Hamming Distance between any two of its legal codewords (from all possible codewords). 5. In general, all 2m possible data words are legal. However, by choosing check bits carefully, the resulting codewords will have a large Hamming Distance. The larger the Hamming distance, the better able the code can detect errors. Parity Bits Parity : A single parity bit is appended to each data block (e.g. each character in ASCII systems) so that the number of 1 bits always adds up to an even (odd) number. If the total number of bits including the appended bit is even, the parity bit appended is called even parity. Similarly, If the total number of bits including the appended bit is odd, the parity bit appended is called odd parity of even parity: 1. Data is 1000000 After using even parity the code becomes 10000001 2. Data is 1111101 After using even parity the code becomes 11111010 Error Detection or Cyclic Redundant Code (CRC) The most popular error detection codes are based on polynomial codes or cyclic redundancy codes (CRCs). It is used for error detection and is most commonly used

as Error correction is relatively expensive (computationally and in bandwidth). For example, 10 redundancy bits are required to correct 1 single-bit error in a 1000-bit message. Detection? In contrast, detecting a single bit error requires only a single-bit, no matter how large the message. Using this technique the receiver acknowledges correctly received frames and discards incorrect ones. CRC Checksums The algorithm to find the checksum of CRC code: Represent a k-bit frame as coefficients of a polynomial expansion ranging from to , with the high-order bit corresponding to the coefficient of . For example, represent the string 11011 as the polynomial: Perform modulo 2 arithmetic (e.g. XOR of the bits) Sender and receiver agree on a generator polynomial: G(x). (G(x) must be smaller than the number of bits in the message.) Append a checksum to message; lets call the message M(x), combination T(x). The checksum is computed as follows: 1. and the

Let r be the degree of G(x), append r zeros to M(x). Our new polynomial becomes by G(x) using modulo 2 arithmetic. giving us T(x).

2. Divide

3. Subtract the remainder from

When receiver gets T(x), it divides T(x) by G(x); 1. if T(x) divides cleanly (e.g., no remainder), no error has occurred. 2. The presence of a remainder indicates an error.

4. Write notes on (i) Non-Persistent CSMA (ii) 1-Persistent CSMA (iii) P Persistent CSMA Ans:

Non-Persistent CSMA : Non-persistent CSMA is less greedy. The algorithm is given below: 1. Sense the channel. 2. IF the channel is idle, THEN transmit. 3. If the channel is busy, THEN wait a random amount of time and start over. 1-Persistent CSMA : 1-Persistent CSMA is selfish. The algorithm is given below: 1. Sense the channel. 2. IF the channel is idle, THEN transmit. 3. IF the channel is busy, THEN continue to listen until channel is idle. Now transmit immediately. P Persistent CSMA : p persistent CSMA is a slotted approximation. The algorithm is given below: 1. Sense the channel. 2. IF the channel is idle, THEN with probability p transmit and with probability (1-p) delay for one time slot and start over. 3. IF the channel is busy, THEN delay one time-slot and start over. P Persistent CSMA details the time slot is usually set to the maximum propagation delay. As p decreases, stations wait longer to transmit but the number of collisions decreases. Considerations for the choice of p: (n x p) must be < 1 for stability, where n is maximum number of stations In all three cases a collision is possible. CSMA determines collisions by the lack of an ACK which results in a TIMEOUT. This is extremely expensive with respect to performance. If a collision occurs, THEN wait a random amount of time and start over.

5. Explain about Dynamic or Adaptive Routing algorithms with necessary example. Ans : Dynamic or Adaptive Routing algorithms :

Dynamic or adaptive Routing algorithms in contrast change their routing decisions to reflect changes in topology and usually the traffic as well. Dynamic routing attempts to solve this problem by constructing routing tables automatically, based on information carried by routing protocols, and allowing the network to act nearly autonomously in avoiding network failures and blockages. Dynamic routing dominates the Internet. However, the configuration of the routing protocols often requires a skilled touch; one should not suppose that networking technology has developed to the point of the complete automation of routing. Packet-switched networks, such as the Internet, split data up into packets, each labeled with the complete destination address and each routed individually. Circuit switched networks, such as the voice telephone network, also perform routing, in order to find paths for circuits (such as telephone calls) over which they can send large amounts of data without continually repeating the complete destination address.

6. Discuss the problems that occur while establishing a connection. Ans: Connection establishment :

Establishing a connection sounds easy but in practice it is not so. The problem occurs when the network can lose, store and duplicate packets. The Major problem is the existence of delayed duplicates. It can be solved in various ways but not of them work satisfactorily. One way is to use throw away transport addresses. Here each time a transport address is needed, a new one is generated. When a connection is released, the address is discarded. Another possibility is to give each connection a connection identifier that is a sequence number incremented for each connection established. This number is chosen by initiating party. After each connection is released, each transport entity could update a table listing obsolete connections this scheme has basic flaws: it requires each transport entity to maintain a certain amount of history information indefinitely. If a machine crashes and loses its memory, it will no longer know which connection identifiers have already been used. Another mechanism is to kill off the aged packets. Packet lifetime can be restricted to a known maximum using one of the following ways. 1. Restricted subnet design 2. Putting a hop counter in each packet 3. Time stamping each packet.

Fig. 9.3: Connection establishment (a) Normal Operation (b) Old Duplicate Connection request (c) Duplicate connection request and duplicate Ack

The connection establishment protocol introduced by Tomlinson is known as a three way handshake. This protocol does not require both sides to begin sending with the same sequence number. Figure 9.3 illustrates the three way handshake connection establishment protocol. Figure 9.3(a) illustrates the normal set up procedure when host1 initiates. Host 1 chooses a sequence number, x and sends a CONNECTION REQUEST TPDU containing it to host 2. Host 2 replies with a CONNECTION ACCEPTED TPDU acknowledges x and announcing its own initial sequence number, y. Finally host 1

acknowledge host 2s choice of an initial sequence number in the first data TPDU that it sends. Figure 9.3(b) illustrates the three way handshake that works in the presence of delayed duplicate control TPDUs. The first TPDU is a delayed duplicate CONNECTION REQUEST from an old connection. This TPDU arrives at host 2 without host 1s knowledge. Host 2 reacts to this TPDU by sending host 1 a CONNECTION ACCEPTED TPDU, asking for verification that host 1 was indeed trying to set up a new connection. When host 1 rejects host 2s attempt to establish, host 2 realizes that it was tricked by a delayed duplicate and abandons the connection. Thus a delayed duplicate does no damage. The worst case is as shown in figure 9.3(c). It is when both a delayed CONNECTION REQUEST and an acknowledgement to a CONNECTION ACCEPTED are floating around in the subnet. Host 2 has proposed using y as the initial sequence number for host 2 to host 1 traffic. When the second delayed TPDU arrives at host 2, the fact that this is an old duplicate. An alternative scheme for establishing connections reliably in a situation of delayed duplicates is described by Watson in 1981. It uses multiple timers to exclude undesired events.

You might also like