You are on page 1of 0

www.ignousolvedassignments.

com

For More Ignou Solved Assignments Please Visit - www.ignousolvedassignments.com
Connect on Facebook :
http://www.facebook.com/pages/IgnouSolvedAssignmentscom/346544145433550
Subscribe and Get Solved Assignments Direct to your Inbox :
http://feedburner.google.com/fb/a/mailverify?uri=ignousolvedassignments_com
Request Any Solved Assignment at :
http://ignousolvedassignments.com/request-and-share-solved-assignments/

Course Code : MCS-042
Course Title : Data Communication and Computer Network
Assignment Number : MCA (4)/042/Assign/12

Q 1: Assume a data stream is made of 000010 Encode this stream using the
following encoding schemes.
(i) Manchester
(ii) Differential Manchester
(iii) UNI polar
(iv) Polar NR Z-1
(v) RZ
Also discuss the usefulness of each scheme.
Ans:
(i)
A method of transmitting bits which enables the receiver to easilysynchronise with the sender.
A simple way of signalling bits might be to transmit a high voltagefor some period for a 1-
bit and a low voltage for a 0 bit:
www.ignousolvedassignments.com

Bits Sent: 1 1 0 0
Signal: High ___________ Low |___________
Time: -> . . . . .
However, when several identical bits are sent in succession, thisprovides no information to the re
ceiver about when each bit startsand stops.
Manchester encoding splits each bit period into two, and ensuresthat there is always a transition
between the signal levels in themiddle of each bit. This allows the receiver to synchronise withth
e sender.
In normal Manchester encoding, a 1-
bit is transmitted with a highvoltage in the first period, and a low voltage in the second, andvice
verse for the 0 bit:
Bits Sent: 1 1 0 0
Signal: High __ __ __ __ Low |__| |_____| |__|
Time: -> . ' . ' . ' . ' .
In Differential Manchester encoding, a 1-
bit is indicated by makingthe first half of the signal equal to the last half of the previousbit's sign
al and a 0-
bit is indicated by making the first half of thesignal opposite to the last half of the previous bit's s
ignal. That is,a zero bit is indicated by a transition at the beginning of the bit.
Like normal Manchester encoding, there is always a transition inthe middle of the transmission o
f the bit.
Differential Manchester Encoding
Bits Sent: 1 1 0 0
Signal: High ____ __ __ __ Low |_____| |__| |__|
Time: -> . ' . ' . ' . ' .
With each bit period half as long, twice as much bandwidth isrequired when using either of the
Manchester
www.ignousolvedassignments.com



(iii)
Unipolar Coding
The most basic transmission code is unipolar or unbalanced coding. In this scheme each discrete
variable is transmitted with a different assigned level, 0V and for example +2.5V. But this holds
a number of disadvantages:
The average power is two times other bipolar codes
The coded signal contains DC and low frequency components.
When long strings of zeros are present, a DC or baseline wander occurs.
This results in loss of timing and data because a receiver/repeater cannot optimally
discriminate ones and zeros.
Repeaters/receivers require a minimum pulse density for proper timing extraction. Long
strings of ones or zeros contain no timing information and lead to timing jitter (when a
clock recovery is used) and possible loss of synchronization.
There is no provision for line error rate monitoring.

www.ignousolvedassignments.com

(iv)
1 = signal on
0 = signal off (no signal)
NRZ is used on low speed links, such as serial ports. Its problems are lack of clock recovery
during long string of 0 or 1 bits and it has a DC component resulting in baseline wander during
long strings of 0 or 1 bits.


(v)
NRZI Nonreturn to Zero Inverted
1 = change of signal level (on-off or off-on)
0 = no change of signal level
NRZI is a differential encoding used in 4B/5B on fast ethernet. It fixes problems in clocking
during long strings of 1 bits. The problems are the DC component and the lack of clock recovery
during long string of 0 bits.




Q 2: (i) Illustrate constellation diagram of 8- PSK and 8- QAM.
Ans:
www.ignousolvedassignments.com





(ii) Given a 10 bit sequence frame: 100101001 and a divisor (polynomial) of
10011, Find the CRC.
Ans:
A CRC has a generating polynomial of the form:
G
n
= d
n-1
x
n-1
+ d
n-2
x
n-2
+ ... + d
0
x
0

For example, for n = 9, a generating polynomial might be:

www.ignousolvedassignments.com

G = 1x
8
+ 0x
7
+ 0x
6
+ 1x
5
+ 1x
4
+ 0x
3
+ 1x
2
+ 0x
1
+ 1x
0

or
G = 100110101
The generating polynomial divides the binary message to determine the remainder which is then
subtracted from the message to get a message that is evenly divided by the generating
polynomial. At the receiving end, if the message divided by the generating polynomial yields a
remainder, it must be corrupted. Both sides have to use the same generating polynomial. Also, so
that no data in the message must be destroyed to subtract the remainder, n-1 zeros are added to
the original message before dividing.
All arithmetic is done in one's complement form, so that there are no carries or borrows. One's
complement arithmetic uses an exclusive or (XOR) to perform both addition and subtraction:
(0+1) = (0-1) = 1.
For example, if the message is 100101001 and the generating polynomial is 10011, then:
1. Append 4 zeros to the message (100101001,0000)
2. Do one's complement polynomial division:
3. 10001 1011
4. ----------------------------
5. 10011 | 100101001,0000
6. 10011
7. --------
8. 11001
9. 10011
10. --------
11. 10100
12. 10011
13. --------
14. 11100
15. 10011
16. --------
17. 11110
18. 10011
19. --------
20. 1111 = remainder
21.
22. Subtract the remainder form the message and send the result.
www.ignousolvedassignments.com

23. 100101001,0000
24. 1111
25. ---------------
26. 1001010011111 = the message transmitted to the other end
You can check the result by dividing the transmitted message by the generating polynomial. It
will be zero.

Q 3: How are problems of Hidden Station and Exposed Station resolved in
wireless LAN? Explain in detail.
Ans:
There 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. 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.



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
www.ignousolvedassignments.com

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?
Ans:
3-Way Handshake
The TCP three-way handshake in Transmission Control Protocol (also called the TCP-
handshake; 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. 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.

Q 5: How does BGP work? How does it solve the Count to Infinity problem?
Ans:
www.ignousolvedassignments.com

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 .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.

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,

www.ignousolvedassignments.com

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.
Ans:
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.
www.ignousolvedassignments.com

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 means: x is divided by y and the remainder is returned
Example:
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?
Ans:
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
www.ignousolvedassignments.com

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 . 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
www.ignousolvedassignments.com

Ans:
An important difference between two traffic shaping algorithms: token bucket throws away
tokens when the bucket is full but never discards packets while leaky bucket discards packets
when the bucket is full. Unlike leaky bucket, token bucket allows saving, up to maximum size of
bucket n. This means that bursts of up to n packets can be sent at once, giving faster response to
sudden bursts of input. Leaky bucket forces bursty traffic to smooth out, token bucket permits
burstiness but bounds it. Token bucket has no discard or priority policy. Token bucket when
compared to leaky bucket, is easy to implement. Each flow needs just a counter to count tokens
and a timer to determine when to add new tokens to the counter.
A token bucket flow is defined by (r,b), r denotes the rate at which tokens(credits) are
accumulated and b is the depth of the token pool(in bytes).















As it shown above the new token are adding to the bucket at rate of r tokens/sec, the maximum
token can be accumulated is b bytes. If the bucket is full, the incoming tokens will be thrown
remove
token
b
r
tokens/sec
Packets
Token
wait
To network
www.ignousolvedassignments.com

away. The Token Bucket(TB) profile contains three parameters: an average rate, a peak rate, and
burst size.

(ii) Distance vector routing and Link state routing
Ans:
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 is the cost of reaching a destination, usually based on the number of hosts the
path passes through, or the total of all the administrative metrics assigned to the links in
the path. From the standpoint of routing protocols, the vector is the interface traffic will be
forwarded out in order to reach an given destination network along a route or path
selected by the routing protocol as the best path to the destination network.
Distance vector protocols use a distance calculation plus an outgoing network interface (a
vector) to choose the best path to a destination network. The network protocol (IPX, SPX,
IP, Appletalk, DECnet etc.) will forward data using the best paths selected.
Common distance vector routing protocols include:
Appletalk RTMP
IPX RIP
IP RIP
IGRP
Advantages of Distance Vector Protocols
Well Supported
Protocols such as RIP have been around a long time and most, if not all devices that
perform routing will understand RIP.
LINK STATE
Link State protocols track the status and connection type of each link and produces a
calculated metric based on these and other factors, including some set by the network
administrator. Link state protocols know whether a link is up or down and how fast it is
and calculates a cost to 'get there'. Since routers run routing protocols to figure out how to
www.ignousolvedassignments.com

get to a destination, you can think of the 'link states' as being the status of the interfaces
on the router. Link State protocols will take a path which has more hops, but that uses a
faster medium over a path using a slower medium with fewer hops.

Because of their awareness of media types and other factors, link state protocols require
more processing power (more circuit logic in the case of ASICs) and memory. Distance
vector algorithms being simpler require simpler hardware.
A Comparison: Link State vs. Distance Vector
See Fig. 1-1 below. If all routers were running a Distance Vector protocol, the path or
'route' chosen would be from A B directly over the ISDN serial link, even though that
link is about 10 times slower than the indirect route from A C D B.
A Link State protocol would choose the A C D B path because it's using a faster
medium (100 Mb ethernet). In this example, it would be better to run a Link State routing
protocol, but if all the links in the network are the same speed, then a Distance Vector
protocol is better.


------------------------------------------------- THE END -----------------------------------------------------

You might also like