Showing posts with label bcs-041. Show all posts
Showing posts with label bcs-041. Show all posts

Tuesday 3 February 2015

1 (a) Calculate Cyclic Redundancy Check (CRC), where Message bits M=1010101110 and
Generator bits G=10001.
Ans
(b) Write an algorithm to compute the shortest path using Dijkstra’s algorithm.
Ans

DIJKSTRA (G, w, s)
1. INITIALIZE SINGLE-SOURCE (G, s)
2. S ← { } // S will ultimately contains vertices of final shortestpath
weights from s
3. Initialize priority queue Q i.e., Q ← V[G]
4. while priority queue Q is not empty do
5. u ← EXTRACT_MIN(Q) // Pull out new vertex
6. S ← S È {u}
// Perform relaxation for each vertex v adjacent to u
7. for each vertex v in Adj[u] do

8. Relax (u, v, w)


(c) Describe the configuration of BUS, STAR, and RING network topologies, with their
one advantage and one disadvantage.

Ans Bus topology: - Bus Topology is the simplest of network topologies. In this type of
topology, all the nodes (computers as well as servers) are connected to the single cable (called
bus), by the help of interface connectors. This central cable is the backbone of the network and is
known as Bus. Every workstation communicates with the other device through this Bus.
Advantage
• It is easy to set-up, less expensive and can be extend the bus network.
Disadvantage
• Dependency on central cable, It is difficult to detect and troubleshoot fault at individual
station and Maintenance costs can get higher with time.

Star topology: - In Star topology, all the components of network are connected to the central
device called “hub” which may be a hub, a router or a switch. Unlike Bus topology, where nodes
were connected to central cable, here all the workstations are connected to central device with a
point-to-point connection. So it can be said that every computer is indirectly connected to every
other node by the help of “hub”.
Advantage
• Easy to connect new nodes or devices and Centralized management which helps in
monitoring the network.
Disadvantage
• Too much dependency on central device, if it fails whole network goes down.

Ring Topology: - In Ring Topology, all the nodes are connected to each-other in such a way that
they make a closed loop. Each workstation is connected to two other components on either side,
and it communicates with these two adjacent neighbors. Data travels around the network, in one
direction. Sending and receiving of data takes place by the help of TOKEN.
Advantage
• This type of network topology is very organized. Each node gets to send the data when it
receives an empty token. This helps to reduces chances of collision. Also in ring
topology all the traffic flows in only one direction at very high speed and each computer
has equal access to resources.
Disadvantage
• Each packet of data must pass through all the computers between source and destination.
This makes it slow data transmission. If one workstation or port goes down, the entire
network gets affected.

(d) Describe the different techniques used to multiplex signals?

Ans Multiplexing is a technology to transfer digital or analog data in daily use devices like
telephone and television. Multiplexing is a method of combining multiple analog massage
signals or digital data streams into one signal. The objective of this technology is to share an
expensive medium for transmitting multiple signals. Actually, the low-level communication
signals are divided into high-level logical channels using this technology. Furthermore, each channel is then used for transmitting one message signal or data stream.
Multiplexing Technologies
Time Division
The time division multiplexing technology uses a multiplexor to collect and store incoming
signals from the slow lines connected to it by distributing a time slot on the fast link to each in
turn. The message signals are sent one after another. They are then received and separated by a
demultiplexor according to the time slot provided for each signal. The transmission speed of the
fast link is equal to the sum of all the slow speed signals coming into the multiplexor.
Frequency Division
In frequency division multiplexing, the signals are transferred along the high speed link
simultaneously. This is done by setting a different frequency for each signal. It is essential to
avoid overlapping of frequencies while transmitting signals. To do so, the link must have enough
bandwidth so as it can carry a wide range of frequencies. The demultiplexor present at the
receiver side then separates the signals according to the frequencies.
It is similar to a radio broadcasting, in which all the stations broadcast the signals simultaneously
but on varying frequencies. The receiver is then tuned to receive the signals from the desired
station. A general use of this technology is in cable television.
The bandwidth provided by this system is equal to the combination of the bandwidth of all the
signals. To avoid signal overlapping, guard bands are used that works like a strip of frequency to
separate the signals.
The most important type of FDM is orthogonal frequency division multiplexing. In this
technology, closely spaced orthogonal subcarriers are used in a large scale to carry signals. The
signals are divided into several parallel channels, and each channel is then transferred through a
subcarrier. Each subcarrier is modulated at low speed using conventional modulation methods
such as quadrature amplitude modulation or phase shift keying.

2 (a) What is Pulse Code Modulation (PCM)? Assume the maximum signal bandwidth of
speech data is 4,000Hz. What is the sampling rate for converting speech into digital data
using Pulse Code Modulation (PCM)? If each sample is encoded by 8 bits, what is the data rate
of the encoded signal.

Ans Pulse code modulation (PCM) is a digital representation of an analog signal that takes
samples of the amplitude of the analog signal at regular intervals. The sampled analog data is
changed to, and then represented by, binary data. PCM requires a very accurate clock. The
number of samples per second, ranging from 8,000 to 192,000, is usually several times the
maximum frequency of the analog waveform in Hertz (Hz), or cycles per second, which ranges
from 8 to 192 KHz.
The word pulse refers to pulses found in transmission lines, which are a natural consequence of
two other almost simultaneously evolved analog methods: pulse width modulation and pulse
position modulation, where each uses discrete signal pulses of varying widths or positions.

Otherwise, PCM has little similarity to these other forms of signal encoding.

(b) Write RSA algorithm and explain it using an example.

Ans RSA encrypts messages through the following algorithm, which is divided into 3 steps:
1. Key Generation
I. Choose two distinct prime numbers p and q.
II. Find n such that n = pq.
n will be used as the modulus for both the public and private keys.
III. Find the totient of n, Ï•(n)
Ï•(n)=(p-1)(q-1).
IV. Choose an e such that 1 < e < Ï•(n), and such that e and Ï•(n) share no divisors other than 1 (e
and Ï•(n) are relatively prime).
e is kept as the public key exponent.
V. Determine d (using modular arithmetic) which satisfies the congruence relation
de ≡ 1 (mod Ï•(n)).
In other words, pick d such that de - 1 can be evenly divided by (p-1)(q-1), the totient, or Ï•(n).
This is often computed using the Extended Euclidean Algorithm, since e and Ï•(n) are relatively

prime and d is to be the modular multiplicative inverse of e.
d is kept as the private key exponent.
The public key has modulus n and the public (or encryption) exponent e. The private key has
modulus n and the private (or decryption) exponent d, which is kept secret.
2. Encryption
I. Person A transmits his/her public key (modulus n and exponent e) to Person B, keeping his/her
private key secret.
II. When Person B wishes to send the message "M" to Person A, he first converts M to an integer
such that 0 < m < n by using agreed upon reversible protocol known as a padding scheme.
III. Person B computes, with Person A's public key information, the ciphertext c corresponding
to
c ≡ me (mod n).
IV. Person B now sends message "M" in ciphertext, or c, to Person A.
3. Decryption
I. Person A recovers m from c by using his/her private key exponent, d, by the computation
m ≡ cd (mod n).
II. Given m, Person A can recover the original message "M" by reversing the padding scheme.
This procedure works since
c ≡ me (mod n),
cd ≡(me)d (mod n),
cd ≡ mde (mod n).
By the symmetry property of mods we have that
mde ≡ mde (mod n).
Since de = 1 + kϕ(n), we can write
mde ≡ m1 + kÏ•(n) (mod n),
mde ≡ m(mk)Ï•(n) (mod n),
mde ≡ m (mod n).


(c) Show the signals that will be generated when the sequence 01010001 is encoded using
NRZI and Differential Manchester encoding schemes.
Ans
(d)

(d) Why are the wires twisted in a twisted-pair copper wire?

Ans

The wires are twisted in a twisted-pair copper wire because The twisting keeps the two
wires as close together as possible so both wires experience the same total amount of
interference. If the wires simply ran parallel, they would be significantly more susceptible to

noise and interference.

3 (a) What are the major differences between wired LANs and wireless LANs? What are the
two main problems with wireless LANs. Briefly, describe the physical layer standards
of IEEE 802.11.
Ans

Difference between LAN and wireless LAN
1. LAN is commonly used in fixed networks while WLAN is common in areas where
computers are moved quite often.
2. WLAN is more convenient to users compared to LAN.
3. LAN is much faster compared to WLAN.
4. LAN is more secure compared to WLAN.
The initial 802.11 standard defines two forms of spread spectrum modulation for the physical
layer: frequency hopping (802.11 FHSS) and direct sequence (802.11 DSSS). These two
standards specify a 2.4GHz operating frequency with data rates of 1 and 2Mbps. Another initial
physical layer utilizes infrared passive reflection techniques for transmission of data at 1 and
2Mbps; however, this standard has not been implemented in products. Later the IEEE published
two supplements to this 802.11 standard: 802.11a and 802.11b. The 802.11a standard defines
operation at up to 54Mbps using orthogonal frequency division multiplexing (OFDM)
modulation in the 5.8GHz frequency band. The IEEE 802.11b version of the standard is a data
rate extension of the initial 802.11 DSSS, providing operation in the 2.4GHz band with
additional data rates of 5.5 and 11Mbps.
Most companies implementing wireless LANs today are installing 802.11b-based systems. The

802.11 DSSS radios interoperate with 802.11b access points.

(b) Make a comparative analysis between IPV4 and IPV6.
Ans

1. IPv6 has 128 bits of addresses which provides 340 billion billion billion billion (3.4×1038) of
unique addresses.
2. NAT is not present in IPv6. NAT is a process of modifying IP address information.
3. Due to huge addresses Nat is no longer used in IPv6. So, it causes true end-to-end
connectivity. Due to this reason peer-to-peer applications like VOIP or other media can function
effectively and efficiently.
4. IPv6 has ability of automatic configuration and has simple configuration mechanism known as
plug-and-play auto configuration. A host can automatically configure its own IPv6 address and
doesn’t need any assistance.
5. Ipv6 header structure is designed to minimize the time with much simpler packed header
structure.
6. IPv6 provides better security than IPv4. The main protocols used in IPv6 are: 1.
Authentication header 2. Encapsulating Security Payload 3. Internet Key Exchange etc.
7. IPv6 provides better quality of services.

8. Ipv6 provides better Multi-casting and Anycast ability compared to IPv4.

(c) What is congestion? What are the main reasons for occurring congestion in the network?
Explain the techniques to solve the problem of congestion.
Ans 

Congestion, in the context of networks, refers to a network state where a node or link carries
so much data that it may deteriorate network service quality, resulting in queuing delay, frame or
data packet loss and the blocking of new connections. In a congested network, response time
slows with reduced network throughput. Congestion occurs when bandwidth is insufficient and
network data traffic exceeds capacity. Data packet loss from congestion is partially countered by
aggressive network protocol retransmission, which maintains a network congestion state after
reducing the initial data load. This can create two stable states under the same data traffic load -
one dealing with the initial load and the other maintaining reduced network throughput.

Causes for occurring congestion in the network are:-
• The input traffic rate exceeds the capacity of the output lines.
• The routers are too slow to perform bookkeeping tasks (queuing buffers, updating tables,
etc.).
• The routers' buffer is too limited.
• Congestion in a subnet can occur if the processors are slow.
• Congestion is also caused by slow links.
Remove the congestion problem
Open Loop Congestion Control
• In this method, policies are used to prevent the congestion before it happens.
• Congestion control is handled either by the source or by the destination.
• The various methods used for open loop congestion control are:
1. Retransmission Policy
• The sender retransmits a packet, if it feels that the packet it has sent is lost or corrupted.
• However retransmission in general may increase the congestion in the network. But we need to
implement good retransmission policy to prevent congestion.
• The retransmission policy and the retransmission timers need to be designed to optimize
efficiency and at the same time prevent the congestion.
2. Window Policy
• To implement window policy, selective reject window method is used for congestion control.
• Selective Reject method is preferred over Go-back-n window as in Go-back-n method, when
timer for a packet times out, several packets are resent, although some may have arrived safely at
the receiver. Thus, this duplication may make congestion worse.
• Selective reject method sends only the specific lost or damaged packets.
3. Acknowledgement Policy

• The acknowledgement policy imposed by the receiver may also affect congestion.
• If the receiver does not acknowledge every packet it receives it may slow down the sender and
help prevent congestion.
• Acknowledgments also add to the traffic load on the network. Thus, by sending fewer
acknowledgements we can reduce load on the network.
• To implement it, several approaches can be used:
1. A receiver may send an acknowledgement only if it has a packet to be sent.
2. A receiver may send an acknowledgement when a timer expires.
3. A receiver may also decide to acknowledge only N packets at a time.
4. Discarding Policy
• A router may discard less sensitive packets when congestion is likely to happen.
• Such a discarding policy may prevent congestion and at the same time may not harm the
integrity of the transmission.
5. Admission Policy
• An admission policy, which is a quality-of-service mechanism, can also prevent congestion in
virtual circuit networks.
• Switches in a flow first check the resource requirement of a flow before admitting it to the
network.
• A router can deny establishing a virtual circuit connection if there is congestion in the "network
or if there is a possibility of future congestion.
Closed Loop Congestion Control
• Closed loop congestion control mechanisms try to remove the congestion after it happens.
• The various methods used for closed loop congestion control are:
1. Backpressure
• Backpressure is a node-to-node congestion control that starts with a node and propagates, in the
opposite direction of data flow. The backpressure technique can be applied only to virtual circuit
networks. In such virtual circuit each node knows the upstream node from which a data flow is
coming.
• In this method of congestion control, the congested node stops receiving data from the
immediate upstream node or nodes.
• This may cause the upstream node on nodes to become congested, and they, in turn, reject data
from their upstream node or nodes.
2. Choke Packet
• In this method of congestion control, congested router or node sends a special type of packet
called choke packet to the source to inform it about the congestion.
• Here, congested node does not inform its upstream node about the congestion as in
backpressure method.
• In choke packet method, congested node sends a warning directly to the source station i.e. the
intermediate nodes through which the packet has traveled are not warned.
3. Implicit Signaling
• In implicit signaling, there is no communication between the congested node or nodes and the
source.
• The source guesses that there is congestion somewhere in the network when it does not receive
any acknowledgment. Therefore the delay in receiving an acknowledgment is interpreted as
congestion in the network.
• On sensing this congestion, the source slows down.
• This type of congestion control policy is used by TCP.
4. Explicit Signaling
• In this method, the congested nodes explicitly send a signal to the source or destination to
inform about the congestion.
• Explicit signaling is different from the choke packet method. In choke packed method, a
separate packet is used for this purpose whereas in explicit signaling method, the signal is
included in the packets that carry data .
• Explicit signaling can occur in either the forward direction or the backward direction .
• In backward signaling, a bit is set in a packet moving in the direction opposite to the
congestion. This bit warns the source about the congestion and informs the source to slow down.

4(a) Explain the features of HDLC and describe in detail the Frame Format.
Ans
High Level Data Link Control (HDLC) is a bit oriented synchronous data link layer protocol
developed by the International Organization for Standardization (ISO). The original ISO
standards for HDLC were:
ISO 3309 Frame Structure
ISO 4335 Elements of Procedure
ISO 6159 Unbalanced Classes of Procedure
ISO 6256 Balanced Classes of Procedure
The current standard for HDLC is ISO 13239, which replaces all of those standards.
HDLC provides both connection oriented and connectionless service. HDLC can be used for
point to multipoint connections, but is now used almost exclusively to connect one device to
another, using what is known as Asynchronous Balanced Mode (ABM). The other modes are
Normal Response Mode (NRM) and Asynchronous Response Mode (ARM)
Frame Format of HDLC
• The address field is used to identify one of the terminals on lines with multiple terminals.
• Control field is used for sequence numbers, acknowledgements and other purposes.
• Checksum field is a cyclic redundancy code.

• Data field may contain any information. It may be arbitrarily long.

(b) Make a comparison of channel utilization versus load for various random access protocols.
Ans:

(c) Discuss why repeaters are needed in a communication channel. What is a key difference
between an analog repeater and a digital repeater?

Ans

A repeater is a device that receives a digital signal on an electromagnetic or optical
transmission medium and regenerates the signal along the next leg of the medium. In
electromagnetic media, repeaters overcome the attenuation caused by free-space
electromagnetic-field divergence or cable loss. A series of repeaters make possible the extension
of a signal over a distance.
Repeaters remove the unwanted noise in an incoming signal. Unlike an analog signal, the
original digital signal, even if weak or distorted, can be clearly perceived and restored. With
analog transmission, signals are re strengthened with amplifiers which unfortunately also amplify
noise as well as information
In a wireless communications system, a repeater consists of a radio receiver, an amplifier, a
transmitter, an isolator, and two antennas. The transmitter produces a signal on a frequency that
differs from the received signal. This so-called frequency offset is necessary to prevent the
strong transmitted signal from disabling the receiver. The isolator provides additional protection
in this respect. A repeater, when strategically located on top of a high building or a mountain,
can greatly enhance the performance of a wireless network by allowing communications over

distances much greater than would be possible without it.