Você está na página 1de 10

Subject Code: TCS 703 Solutions to Mid Term Examination (Odd Semester), 2011 BTech(CSE) 7th Semester Paper

Name: COMPUTER NETWORKS-II Time: Three Hours Section A-Part I 1. Attempt all multiple choice questions choosing correct option. (10 * 2 = 20 marks) (i) In CSMA/CD after the fifth collision, the probability that a node chooses K=4 is _______ and the result K=4 corresponds to a delay of _______ microseconds on a 10 Mbps Ethernet. a) 1/32, 202.8 b) 1/32, 204.8 c) 1/64, 204.8 d) 1/16, 202.8 (ii) What is the actual reason for limiting the Ethernet payload to 1500 bytes? a) A longer frame increases the probability that one or more bits in the frame will be received in error, necessitating retransmission of the frame hence an optimum size of 1500 bytes. b) The longer the maximum frame allowed, the longer the maximum delay on a shared medium. c) A longer maximum frame increases the memory requirement for a NIC using a simple, fixed buffer design. d) Only God knows. (iii) What is the remainder obtained by dividing x7 + x5 + 1 by the generator polynomial x3 + 1? a) x2 + x + 1 b) x3 + x + 1 c) x3 + 1 d) x2 + 1 (iv) To improve find w not in N' such that D(w) is a minimum in LS algorithm from linear to logarithmic will require using which of the following data structures? a) Binary Tree b) Heap c) Linked List d) AVL Tree (v) A way of achieving broadcast is that the source node sends single copy of the packet to its neighbors, then these neighbors send single copy of the packets to the their neighbor nodes and so on (except the one from where they receive). Which one of the following is a major drawback of this? MM: 100

a) Its complexity is extremely high and rises exponentially with increasing number of nodes b) If there are cycles, then one or more copies of each broadcast packet will cycle indefinitely. c) The limited processing powers of routers are wasted in creating multiple copies of the same packet. d) Only God knows. (vi) The ARP Request is a broadcast message whereas the ARP Response in a unicast message a) The above statement is true b) The above statement is false c) The above statement is true only when more than one LAN is involved in the Request-Response process d) The above statement is true only when the messages are passing through Network Layer Devices and is false for Link Layer Devices (vii) There are two curves in the following graph. Without any specific knowledge about the x-axis or y-axis the top curve (the one showing a peak value between 0.30 and 0.40) can be related to

a) b) c) d)

Pure Aloha Ethernet-II Token based Taking Turn protocol Slotted Aloha

(viii) A workstation is connected by a ______ cable to a switch, a hub by a _______ cable to a switch, a switch by a _______ cable to another switch and a computer running to program the switch is connected by a ________ cable to another switch. a) b) c) d) Crossover, Straight, Serial, Crossover Straight, Crossover, Straight, Serial Straight, Crossover, Crossover, Serial Crossover, Crossover, Straight, Serial

(ix) Which of the following statement is true about public key and private key in Public-Key cryptography

a) b) c) d)

Public key is applied before private key Private key is applied before private key It does not matter which key is applied first There is no private key in Public-Key cryptography hence the question is misleading. To allow the sender to detect a collision in CSMA/CD frames must include a checksum frames must be encrypted and authenticated frames need to be shorter than some maximum length frames need to be longer than some minimum length Section A-Part II

(x) a) b) c) d)

2. Write short notes on any four of the following:

(4*6 = 24 marks)

(a) Comparison of LS and DV with robustness as the criteria What can happen if a router fails, misbehaves, or is sabotaged? Under LS, a router could broadcast an incorrect cost for one of its attached links (but no others). A node could also corrupt or drop any packets it received as part of an LS broadcast. But an LS node is computing only its own forwarding tables; other nodes are performing similar calculations for themselves. This means route calculations are somewhat separated under LS , providing a degree of robustness. Under DV, a node can advertise incorrect least-cost paths to any or all destinations. More generally, we note that, at each iteration, a node's calculation in DV is passed on to its neighbor and then indirectly to its neighbor 's neighbor on the next iteration. In this sense, an incorrect node calculation can be diffused through the entire network under DV. (b) CSMA/CD for Ethernet and its stand in the current switch based networks. In the days of bus topologies and hub-based star topologies, Ethernet was clearly a broadcast link in which frame collisions occurred when nodes transmitted at the same time. To deal with these collisions, the Ethernet standard included the CSMA/CD protocol, which is particularly effective for a wired broadcast LAN spanning a small geographical radius. But if the prevalent use of Ethernet today is a switch-based star topology, using store-and-forward packet switching, is there really a need any more for an Ethernet MAC protocol? Switch coordinates its transmissions and never forwards more than one frame onto the same interface at any time. Furthermore, modern switches are full-duplex, so that a switch and a node can each send frames to each other at the same time without interference. In other words, in a switch-based Ethernet LAN there are no collisions and, therefore, there is no need for a MAC protocol!!! (c) VLAN as an important addition in Data Link Layer Technology.

Formation of virtual workgroups, Reducing unnecessary traffic, Reducing cost, Security (d) Purpose of Spanning Tree Algorithm in Switches/Bridges The purpose of the ST protocol is to maintain an acyclic (tree) structure so that frames will not loop in the network. With the bridge/switch selflearning and forward algorithm, frames would loop forever if there were parallel bridges (i.e., loops). (e) Link cost changes (both increasing and decreasing) in DV algorithm. Refer Lecture No-4 or Page No 386-388 in the text book (fifth edition) (f) Error types and correcting single bit errors using single bit parity. Refer Lecture No-6 or Page No 451 in the text book (fifth edition)

Section B Answer any four of the following questions: (4*14 = 56 marks)

3. (a) What are the differences between message confidentiality and message integrity? Can you have one without the other? Justify your answer. Also mention one important difference between a symmetric key system and a public key system?

One important difference between symmetric and public key systems is that in symmetric key systems both the sender and receiver must know the same (secret) key. In public key systems, the encryption and decryption keys are distinct. The encryption key is known by the entire world (including the sender), but the decryption key is known only by the receiver. (b) Suppose two nodes, A and B, are attached to opposite ends of a 900 m cable, and that they each have one frame of 1000 bits (including all headers and preambles) to send to each other. Both nodes attempt to transmit at time t=0. Suppose there are four repeaters between A and B, each inserting a 20 bit delay. Assume the transmission rate is 10 Mbps, and CSMA/CD with backoff intervals of multiples of 512 bits is used. After the first collision, A draws K=0 and B draws K=1 in the exponential backoff protocol. Ignore the jam signal.

(i) What is the one-way propagation delay (including repeater delays) between A and B in seconds. Assume that the signal propagation speed is 2 * 108m/sec. (ii) At what time (in seconds) is A's packet completely delivered at B? (iii)Now suppose that only A has a packet to send and that the repeaters are replaced with bridges. Suppose that each bridge has a 20 bit processing delay in addition to a store-and-forward delay. At what time in seconds is A's packet delivered at B? Refer to a similar problem in CT-1. 4. (a) Suppose a user, Dexter, discovers that his private RSA key (d 1, n 1) is same as the public RSA key (e 2, n 2) of another user, Mandark. In other words, d 1 = e 2 and n 1 = n 2. Should Dexter consider changing his public and private keys? Explain your answer giving solid technical reason. Dexter should consider changing his keys. This is because it is relatively easy for Mandark to figure out Dexters private key as follows. Mandark knows Dexters public key is (e 1, n 1). Mandark notices n 2 = n 1. Mandark now can guess Dexters private key(d 1, n 1) by simply enumerating different solutions of the equation d 1 e 1 = 1 mod 1. (b) Using RSA, choose p = 3 and q = 11, and encode the phrase "hello". Apply the decryption algorithm, to the encrypted version to recover the original plaintext message. p=3, q=11. So we have n=33 and z=20. Let us choose e=9 (there are other choices also). Let us choose d=9 [e*d = 81, ed-1=80 is exactly divisible by 20). So we have now n=33, e=9,d=9 We will take a=1, b=2, c=3 to perform the encryption and decryption. Encryption:

Decryption:

(a) A host was shut down and its faulty network interface card was replaced with a new one effectively giving it a new physical address. It will now cause the inconsistency of ARP tables in the other hosts in the same LAN because they have the old physical address associated with that node. How this will be solved. You need not do anything, ARP is self learning. After sometime when a frame will be sent from the new card the new entry will be made to the ARP table. The old entry is removed anyway on expiry of TTL. (b) Consider the following network. With the indicated link costs, use LS algorithm to compute the shortest path from A to all network nodes. Show the results in a tabular format.

6. (a) For the network given below, give the contents of the bridge forwarding tables. Assume that all stations have communicated with all other stations, EXCEPT that station A has never sent a frame (it may have received frames). Assume the letters

(A,B,C, etc.) are the station MAC addresses. Assume suitable interface numbers for the bridges.

Also mention four differences between switches and routers. 1. Router is a network layer device whereas switch is a data link layer device. 2. A router works on the principle of IP addresses; A switch works on the basis of MAC addresses. 3. Routers are store-and-forward packet switches that forward packet switches using network layer addresses. Although a switch is also a storeand-forward packet switch it is fundamentally different from a router in that it forwards packets using MAC addresses. 4. Routers need to be administered; switches are plug-n-play devices. 5. Router has its own IP address(es), and switch dont 6. .. (b) Consider the network in the figure below with indicated cost links. Assume that nodes initially know only the cost of adjacent links (link to which they are directly connected). The network runs the distance-vector algorithm. Assume that the algorithm works in a synchronous manner: In one time-slot, all nodes simultaneously receive distance vectors from their neighbors, compute their new distance vectors, and

inform their neighbors if their distance vectors have changed. Fill out the distance tables at node C for each time-slot.

7. (a) Discuss how similar and/or dissimilar ARP is with DNS. Mention four lines each about RIP, OSPF and BGP4. How ARP is similar to DNS? Both provide some sort of mapping service. ARP provides mapping from IP address to physical address, DNS provides mapping from host names to IP addresses. How ARP is different from DNS? DNS resolves hostnames for hosts anywhere in the Internet, whereas ARP only resolves IP addresses for nodes on the same LAN.

RIP: Is a DV protocol; Use hops as the metric, has a maximum hop of 15; It sets all the costs between the nodes to 1; Every 30 seconds the routers exchange information with the neighbors.; In RIP, costs are actually from source router to a destination subnet.; It was one of the earliest intra-AS Internet routing protocols. OSPF: Is a LS protocol; In every 30 minutes every router exchange information with all other routers in the autonomous system, not just to its neighboring routers; More complex than RIP with extra overhead; Cost is not mentioned by the protocol, is a responsibility of the administrator to specify cost; Updates are propagated faster than RIP BGP4: Is the de facto standard inter-AS routing protocol; BGP does not count individual routers rather it counts individual networks; In BGP, an autonomous system is identified by its globally unique autonomous system number(ASN) like IP addresses which are assigned by ICANN regional registries; It determines "good" routes to subnets based on the reachability information and on AS policy. (b) When there are N active nodes the efficiency of slotted ALOHA is Np(1-p)N-1. Find the value of p that maximizes this expression. Then using the value of p, find the efficiency of slotted ALOHA by letting N approach infinity. Value of p that maximizes this expression:

Using the value of p the efficiency of slotted ALOHA by letting N approach infinity

8. (a) Data link protocols almost always put the CRC in a trailer rather than in a header. Why? Describe the role of preamble in Ethernet frame. The CRC is computed during transmission and appended to the output stream as soon as the last bit goes out onto the wire. If the CRC were in the header, it would be necessary to make a pass over the frame to compute the CRC before transmitting. This would require each byte to be handled twiceonce for check summing and once for transmitting. Using the trailer cuts the work in half. Role of preamble in Ethernet frame: synchronization between sender and receiver. (b) Design an efficient and cost-effective LAN for the CS/IT block at GEU. Each of the four classrooms at top and first floor will contain a workstation. The faculty room at first floor will have four workstations and a FTP server and a printer. The conference room at ground floor will be provided one connection where any node can be connected on demand. The faculty room at ground floor will have 12 workstations, a printer and two Linux based servers. The Deans chamber and HoDs chamber will have a workstation each. All the devices mentioned including the printers will be connected to the LAN. Multiple solutions exist. If you have done your assignment sincerely this is a 3 minute task.

Você também pode gostar