Você está na página 1de 15

# MCS-042 Solved Assignment

## By IGNOU CLOUD (www.ignoucloud.com)

Solved By Praveen Soni

## IGNOU Solved Assignment By www.ignoucloud.com

Q 1: Assume a data stream is made of 000010 Encode this stream (i) Manchester (ii) Differential Manchester (iii) UNI polar (iv) Polar NR Z-1 (v) RZ Also discuss the usefulness of each scheme.

Solution-

## of 1011, Find the CRC.

Q 3: How are problems of Hidden Station and Exposed Station resolved in wireless LAN? Explain in detail. SolutionThere are two fundamental problems associated with a wireless network. Assume that there are four nodes A, B, C and D. B and C are in the radio range of each other. Similarly A and B are in the radio range of each other. But C is not in the radio range of A. Now, suppose that there is a transmission going on between A and B (Figure 2 (a)). If C also wants to transmit to B, first, it will sense the medium but will not listen to As transmission to B because, A is outside its range. Thus, C will create garbage for the frame coming from A if, it transmits to B. This is called the hidden station problem. The problem of a station not being able to detect another node because that node is too far away is called hidden station problem. Now, let us consider the reverse situation called the exposed station problem. (Figure 2 (b).)

## Figure 2: Hidden and exposed station problem

In this case, B is transmitting to A. Both are within radio range of each other. Now C wants to transmit to D. As usual, it senses the channel and hears an ongoing transmission and falsely concludes that it cannot transmit to D. But the fact is transmission between C and D would not have caused any problems because, the intended receivers C and D are in a different range. This is called exposed station problem.

Q 4: Explain the 3-way handshake method. How is it different from 2-way handshake method?

Solution
3-Way Handshake

The TCP three-way handshake in Transmission Control Protocol (also called the TCPhandshake; three message handshake and/or SYN-SYN-ACK) is the method used by TCP set up a TCP/IP connection over an Internet Protocol based network. TCP's three way handshaking technique is often referred to as "SYN-SYN-ACK" (or more accurately SYN, SYN-ACK, ACK) because there are three messages transmitted by TCP to negotiate and start a TCP session between two computers. The TCP handshaking mechanism is designed so that two computers attempting to communicate can negotiate the parameters of the network TCP socket connection before transmitting data such as SSH and HTTP web browser requests.

This 3-way handshake process is also designed so that both ends can initiate and negotiate separate TCP socket connections at the same time. Being able to negotiate multiple TCP socket connections in both directions at the same time allows a single physical network interface, such as ethernet, to be multiplexed to transfer multiple streams of TCP data simultaneously.

TCP 3-Way Handshake Diagram Below is a (very) simplified diagram of the TCP 3-way handshake process. Have a look at the diagram on the right as you examine the list of events on the left.

Synchronize and Acknowledge messages are indicated by a either the SYN bit, or the ACK bit inside the TCP header, and the SYN-ACK message has both the SYN and the ACK bits turned on (set to 1) in the TCP header. TCP knows whether the network TCP socket connection is opening, synchronizing, established by using the Synchronize and Acknowledge messages when establishing a network TCP socket connection. When the communication between two computers ends, another 3-way communication is performed to tear down the TCP socket connection. This setup and teardown of a TCP socket connection is part of what qualifies TCP a reliable protocol. TCP also acknowledges that data is successfully received and guarantees the data is reassembled in the correct order. Note that UDP is connectionless. That means UDP doesn't establish connections as TCP does, so UDP does not perform this 3-way handshake and for this reason, it is referred to as an unreliable protocol. That doesn't mean UDP can't transfer data, it just doesn't negotiate how the connection will work, UDP just transmits and hopes for the best.

## 2-way handshake Connection Establishment 2-way Handshake

Initiator sends connection request (w. id) Responder sends accept or reject (w. id) Responder assumes connection exists when it sends the ack Initiator assumes connection exists when it receives the ack OK if network service reliable and CO If not? (consider lost, old conn reqs/ack)

Q 5: How does BGP work? How does it solve the Count to Infinity problem? Solution

## BGP: The Exterior Gateway Routing Protocol

The purpose of Border Gateway Protocol is to enable two different ASes to exchange routing information so that, IP traffic can flow across the AS border. A different protocol is needed between the ASes because the objectives of an interior gateway and exterior gateway routing protocol are different. Exterior gateway routing protocol such as BGP is related to policy matters. BGP is fundamentally a distance vector protocol but, it is more appropriately characterised as path vector protocol. Instead of maintaining just the cost to each destination, each BGP router keeps track of the path used [Ref.1]. Neighbouring BGP routers, known as BGP peers exchange detailed information along with the list of ASes on a path to a given destination rather than record cost information. The main advantage of using BGP is to solve the count to infinity problem which is illustrated in the following Figure 4.

In this Figure 4 there are A, B, C, D, E, F, G, H, I, J and K routers. Now consider Gs routing table. G uses G C D K path to forward a packet to K. As discussed earlier whenever a router gives any routing information, it provides a complete path. For ex. From A, the path used to send a packet to K is ABCDK From B-the path used is BCDK From C-the path used is CGJK From E-EFGJK

From H-HIJK.
After receiving all the paths from the neighbours, G will find the best route available. It will outright reject the path from C and E, since they pass through G itself. Therefore, the choice left is between a

route announced by B and H. BGP easily solves count to infinity problems. Now, suppose C crashes or the line B-C is down. Then if B receives, two routes from its 2 neighbours: ABCDK and FBCDK, then these which can be rejected because it passes through C itself. Other distance vector algorithms make the wrong choice because, they cannot tell which of their neighbours have independent routes to their destination or not.

## Q 6: Explain Diffie Hellman algorithm-with the help of an example. Solution

Diffie-Hellman is a commonly used public-key algorithm for key exchange. It is generally considered to be secure when sufficiently long keys and proper generators are used. The security of Diffie-Hellman relies on the difficulty of the discrete logarithm problem (which is believed to be computationally equivalent to factoring large integers). Diffie-Hellman is claimed to be patented in the United States, but the patent expired on April 29, 1997. There are also strong rumours that the patent might in fact be invalid (there is evidence of it having been published over an year before the patent application was led). Diffie-Hellman is sensitive to the selection of the strong prime, size of the secret exponent, and the generator.
The Diffie-Hellman Method For Key Agreement allow two hosts to create and share a secret key.

1) First the hosts must get the Diffie-Hellman parameters. A prime number, p (larger than 2) and base, g, an integer that is smaller than p. They can either be hard coded or fetched from a server.

2) The hosts each secretly generate a private number called x, which is less than p 1. 3) The hosts next generate the public keys, y. They are created with the function:
y = g^x % p

4) The two host now exchange the public keys (y) and the exchanged numbers are converted
into a secret key, z.
z = y^x % p

z can now be used as the key for whatever encryption method is used to transfer information between the two hosts. Mathematically, the two hosts should have generated the same value for z.
z = (g^x % p)^x' % p = (g^x' % p)^x % p

All of these numbers are positive integers x^y means: x is raised to the y power

x%y Example:

## means: x is divided by y and the remainder is returned

Prime Number p = 353 and primitive root of 353, in this case is g = 3. Let A is sender B is receives A & B select secret key as XA = 97 and XB = 233. Now A & B computes their public keys. YA = 3233. Now A & B computes their public keys. YA = 397 mod 353 = 40 YB = 3233 mod 353 = 248 After exchanging their public keys, A & B can compute the common secret key: A computes: Z=(YB) mod 253 B computes = 24897 mod 353 = 160 Z = (YA)xbmod353 = 40233 mod 353 = 160

Q 7: What is the utility of digital certificate? How are these signatures created? Solution
This is a certificate issued by the Certifying Authority (Figure 11) to the holder of the public key. The contents of a digital certificate are issued by a CA as, a data message and are always available online. Sr. No of the Certificate Applicants name, Place and Date of Birth, Name of the Company Applicants legal domicile and virtual domicile Validity period of the certificate and the signature CAs name, legal domicile and virtual domicile Users public key Information indicating how the recipient of a digitally signed document can verify the senders public key CAs digital signature.

## Uses of Digital Signature

Contracts: The next time you purchase a car, a home, or an insurance policy, you may never

need to meet with an agent or sales representative. You may be able to review and sign all documents online, and save secure backup copies to your own disk.
Checks and money orders: Buying online is now easy with a credit card, but digital checks or

money orders (authenticated by secure digital signatures) may be preferable for some transactions, especially when you dont want to face a large credit card bill.
Letters and memos: Businesses already transmit many letters and memos online, especially

those that are only distributed internally. But when a letter or memo needs the weight of a managers signature, it must be printed, signed, duplicated, and distributed manually or through the mail. Digital signatures will save companies the time and expense of this manual process.
Approvals: Many kinds of documents are collaborative works, such as legal briefs, contracts,

reports, and others. Using digital signatures, people can collaborate on documents online and approve final drafts, before/prior to releasing them for use. CREATION OF DIGITAL SIGNATURES Ravi works at the companys certificate authority centre. Ravi can create a digital certificate for Ram by using Rams public key as well as some information Ram (Figure 10).

Rams co-workers can verify Rams trusted certificate to make sure that his public key truly belongs to him. In fact, no one at Rams company accepts a signature for which there does not exist a certificate generated by Ravi. This gives Ravi the power to revoke signatures if private keys are compromised, or no longer needed. There are even more widely accepted certificate authorities that certify Ravi. If Ram sends a signed document to Shayam, to verify the signature on the document, Shayams software first uses Ravis (the certificate authoritys) public key to check the signature on Rams certificate. Successful de-encryption of the certificate proves that Ravi created it. After the certificate is de-encrypted, Shayams software can check if Ram is in good standing with the certificate authority and that the certificate information concerning Rams identity has not been altered. Shayams software then takes Rams public key from the certificate and uses it to check Rams signature. If Ram's public key de-encrypts the signature successfully, then Shayam is assured that the signature was created using Rams private key, for Ravi has certified the matching public key. And of course, if the signature is valid, then we know that Mohan didnt try to change the signed content.

## Q 8: Differentiate between the following:

(i) Leaky Bucket Traffic Shaper and Token bucket Traffic Shaper (ii) Distance vector routing and Link state routing Solution (i) Leaky Bucket Traffic Shaper and Token bucket Traffic Shaper

(ii)

## Distance vector routing and Link state routing

"Distance Vector" and "Link State" are terms used to describe routing protocols which are used by routers to forward packets between networks. The purpose of any routing protocol is to dynamically communicate information about all network paths used to reach a destination and to select the from those paths, the best path to reach a destination network. The terms distance vector and link state are used to group routing protocols into two broad categories based on whether the routing protocol selects the best routing path based on a distance metric (the distance) and an interface (the vector), or selects the best routing path by calculating the state of each link in a path and finding the path that has the lowest total metric to reach the destination. DISTANCE VECTOR Distance