8
MCS-042 July 2011 Q1: In data networking and queueing theory, network congestion occurs when a link or node is carrying so much data that its quality of service deteriorates. Typical effects include queueing delay, packet loss or the blocking of new connections. A consequence of these latter two is that incremental increases in offered load lead either only to small increases in network throughput, or to an actual reduction in network throughput. The leaky bucket is an algorithm used in packet switched computer networks and telecommunications networks to check that data transmissions conform to defined limits on  bandwidth and burstiness (a measure of the unevenness or variations in the traffic flow). The leaky  bucket algorithm is also used in leaky bucket counters, e.g. to detect when the average or peak rate of random or stochastic events or stochastic processes exceed defined limits. The Leaky Bucket Algorithm is based on an analogy of a  bucket (figure 1) that has a hole in the  bottom through which any water it contains will leak away at a constant rate, until or unless it is empty. Water can be added intermittently, i.e. in bursts, but if too much is added at once, or it is added at too high an average rate, the water will exceed the capacity of the bucket, which will overflow. the analogue of the bucket is a counter or variable, separate from the flow of traffic, and is used only to check that traffic conforms to the limits, i.e. the analogue of the water is brought to the  bucket by the traffic and added to it so that the level of water in the bucket indicat es conformance to the rate and burstiness limits. This version is referred to here as the leaky bucket as a meter. In the second version [2] , the traffic passes through a queue that is the analogue of the bucket, i.e. the traffic is the analogue of the water passing through the bucket. This version is referred to here as the leaky bucket as a queue. The leaky bucket as a meter is equivalent to (a mirror image of) the token bucket algorithm, and given the same parameters will see the same traffic as conforming or nonconfor ming. The leaky bucket as a queue can be seen as a special case of the leaky bucket as a meter Token Bucket Algorithm The leaky bucket algorithm is sometimes contrasted with the token bucket algorithm. However, the above concept of operation for the leaky bucket as a meter may be directly compared with the token bucket algorithm, the description of which is given in that article as the following: A token is added to the bucket every 1/ r seconds.  The bucket can hold at the most b tokens. If a token arrives when the bucket is full, it is discarded.

MCS-042MunishBhardwaj

Embed Size (px)

Citation preview

8/2/2019 MCS-042MunishBhardwaj

http://slidepdf.com/reader/full/mcs-042munishbhardwaj 1/8

MCS-042 July 2011

Q1:

In data networking and queueing theory, network congestion occurs when a link or

node is carrying so much data that its quality of service deteriorates. Typical effectsinclude queueing delay, packet loss or the blocking of new connections. A

consequence of these latter two is that incremental increases in offered load lead

either only to small increases in network throughput, or to an actual reduction in

network throughput.

The leaky bucket is an algorithm used in packet switched computer networks and

telecommunications networks to check that data transmissions conform to defined limits on

 bandwidth and burstiness (a measure of the unevenness or variations in the traffic flow). The leaky bucket algorithm is also used in leaky bucket counters, e.g. to detect when the average or peak rate

of random or stochastic events or stochastic processes exceed defined limits.

The Leaky Bucket Algorithm is based on an analogy of a  bucket (figure 1) that has a hole in the

 bottom through which any water it contains will leak away at a constant rate, until or unless it isempty. Water can be added intermittently, i.e. in bursts, but if too much is added at once, or it is

added at too high an average rate, the water will exceed the capacity of the bucket, which will

overflow.

the analogue of the bucket is a counter or variable, separate from the flow of traffic, and is usedonly to check that traffic conforms to the limits, i.e. the analogue of the water is brought to the

 bucket by the traffic and added to it so that the level of water in the bucket indicates conformance

to the rate and burstiness limits. This version is referred to here as the leaky bucket as a meter. In

the second version [2], the traffic passes through a queue that is the analogue of the bucket, i.e. thetraffic is the analogue of the water passing through the bucket. This version is referred to here as

the leaky bucket as a queue. The leaky bucket as a meter is equivalent to (a mirror image of) thetoken bucket algorithm, and given the same parameters will see the same traffic as conforming or 

nonconforming. The leaky bucket as a queue can be seen as a special case of the leaky bucket as a

meter 

Token Bucket Algorithm

The leaky bucket algorithm is sometimes contrasted with the token bucket algorithm. However, the

above concept of operation for the leaky bucket as a meter may be directly compared with the

token bucket algorithm, the description of which is given in that article as the following:

• A token is added to the bucket every 1/r seconds.

•  The bucket can hold at the most b tokens. If a token arrives whenthe bucket is full, it is discarded.

8/2/2019 MCS-042MunishBhardwaj

http://slidepdf.com/reader/full/mcs-042munishbhardwaj 2/8

• When a packet (network layer PDU) [sic] [note 1] of "n" bytes arrives,n tokens are removed from the bucket, and the packet is sent to thenetwork.

• If fewer than n tokens are available, no tokens are removed fromthe bucket, and the packet is considered to be non-conformant.

This can be compared with the concept of operation, repeated from above:

• A fixed capacity bucket, associated with each virtual connectionor user, leaks at a fixed rate.

• If the bucket is empty, it stops leaking.

• For a packet to conform, it has to be possible to add a specificamount of water to the bucket: The specific amount added by aconforming packet can be the same for all packets, or can be

proportional to the length of the packet.

• If this amount of water would cause the bucket to exceed itscapacity then the packet does not conform and the water in the bucketis left unchanged.

As can be seen, these two descriptions are essentially mirror images of one another: one adds

something to the bucket on a regular basis and takes something away for conforming packets down

to a limit of zero; the other takes away regularly and adds for conforming packets up to a limit of the bucket's capacity. It would also be perfectly possible to describe the process in terms of adding

tokens or subtracting water for conforming packets as long as the regular process complements

this, at which point it would become impossible to tell which was which: is an implementation thatremoves tokens regularly and adds tokens for a conforming packet an implementation of the leaky bucket or of the token bucket? In fact it is both, as these are the same basic algorithm described

differently. This explains why, given equivalent parameters, the two algorithms will see exactly the

same packets as conforming or nonconforming. The differences in the properties and performanceof implementations of the leaky and token bucket algorithms thus result entirely form the

differences in the implementations, i.e. they do not stem from differences in the underling

algorithms.

The points to note are that the leaky bucket algorithm, when used as a meter, can allow aconforming output packet stream with jitter or burstiness, can be used in traffic policing as well as

shaping, and can be implemented for variable length packets.

Q2:

Routing is the process of selecting paths in a network along which to send network

traffic. Routing is performed for many kinds of networks, including the telephone

network (Circuit switching) , electronic data networks (such as the Internet), and

8/2/2019 MCS-042MunishBhardwaj

http://slidepdf.com/reader/full/mcs-042munishbhardwaj 3/8

transportation networks. This article is concerned primarily with routing in electronic

data networks using packet switching technology.

Q3: AN OVERVIEW OF THE IEEE 802.1 1 STANDARD [2]

Like any 802.x protocol, the 802.11 protocol covers the MAC andphysical layers. The standard currently defines a single MAC

which interacts with three PHYs (all of them running at 1 and 2

Mbis) as follows: frequency hopping spread spectrum in the 2.4

GHz band, direct sequence spread spectrum in the 2.4 GHz band,

and infrared. The MAC layer defines two different access

methods, the distributed coordination function (DCF) and point

coordination function (PCF). The basic access mechanism, the

DCF, is basically a carrier sense multiple access with collision

avoidance (CSMNCA) mechanism. CSMA protocols are well known

in the industry, the most popular being the Ethernet, which is a

CSMA with collision detection (CSMA/CD) protocol. A CSMA

protocol works as follows. A station desir- ing to transmit senses

the medium. If the medium is busy (i.e., some other station is

transmitting), the station defers its transmission to a later time.

If the medium is sensed as free, the station is allowed to

transmit. These kinds of protocols arc very effective when the

medium is not hcavily loadcd, since it allows stations to

transmit with minimum delay. But thcrc is always a chance of 

stations simultaneously sensing the medium as frec and

transmitting at the same timc, causing a collision. These collision

situations must hc idcn- tified so the packets cm be

retransmitted hy the MAC laycr, rathcr than by thc upper layers.

Q4:

Hidden Station Problem Figure 14.10 shows an example of the hidden stationproblem. Station B has a transmission range shown by the left oval (sphere in space);every station in this range can hear any signal transmitted by station B. Station C has

8/2/2019 MCS-042MunishBhardwaj

http://slidepdf.com/reader/full/mcs-042munishbhardwaj 4/8

a transmission range shown by the right oval (sphere in space); every station locatedin this range can hear any signal transmitted by C. Station C is outside the transmissionrange of B; likewise, station B is outside the transmission range of C. Station A,however, is in the area covered by both B and C; it can hear any signal transmitted byB or C.

  Assume that station B is sending data to station A. In the middle of this transmission,station C also has data to send to station A. However, station C is out of B’s range andtransmissions from B cannot reach C. Therefore C thinks the medium is free.

Exposed Station Problem Now consider a situation that is the inverse of the previousone: the exposed station problem. In this problem a station refrains from using achannel when it is, in fact, available. In Figure 14.12, station A is transmitting to station B.Station C has some data to send to station D, which can be sent without interferingwith the transmission from A to B. However, station C is exposed to transmission from

  A; it hears what A is sending and thus refrains from sending. In other words, C is tooonservative and wastes the capacity of the channel.

The handshaking messages RTS and CTS cannot help in this case, despite what youmight think. Station C hears the RTS from A, but does not hear the CTS from B. Station C,after hearing the RTS from A, can wait for a time so that the CTS from B reaches A; it thensends an RTS to D to show that it needs to communicate with D. Both stations B and Amay hear this RTS, but station A is in the sending state, not the receiving state. Station B,however, responds with a CTS. The problem is here. If station A has started sending its

8/2/2019 MCS-042MunishBhardwaj

http://slidepdf.com/reader/full/mcs-042munishbhardwaj 5/8

data, station C cannot hear the CTS from station D because of the collision; it cannot sendits data to D.

Q5:-

Q6:-

Differential Manchester encoding, also called biphase mark code (BMC) or FM1, is a line code in which data and clock signals are combined to form a single 2-level self-synchronizing data

stream. It is a differential encoding, using the presence or absence of transitions to indicate logical

value. It has the following advantages over some other line codes:

• A transition is guaranteed at least once every bit, allowing the receiving device to performclock recovery.

• Detecting transitions is often less error-prone than comparing against a threshold in a noisy

environment.

• Unlike with Manchester encoding, only the presence of a transition is important, not the

 polarity. Differential coding schemes will work exactly the same if the signal is inverted(wires swapped). (Other line codes with this property include  NRZI, bipolar encoding,

coded mark inversion, and MLT-3 encoding).• If the high and low signal levels have the same voltage with opposite polarity, coded

signals have zero average DC voltage, thus reducing the necessary transmitting power and

minimizing the amount of electromagnetic noise produced by the transmission line.

The symbol rate is twice the bitrate of the original signal. Each bit period is divided into two half-

 periods: clock and data. The clock half-period always begins with a transition from low to high or 

from high to low. The data half-period makes a transition for one value and no transition for the

other value. One version of the code makes a transition for 0 and no transition for 1 in the data

half-period; the other makes a transition for 1 and no transition for 0. Thus, if a "1" is represented by one transition, then a "0" is represented by two transitions and vice versa, making Differential

Manchester a form of  frequency shift keying. Either code can be interpreted with the clock half- period either before or after the data half-period.

An example of Differential Manchester encoding: data before clock, and 0 means transition.

8/2/2019 MCS-042MunishBhardwaj

http://slidepdf.com/reader/full/mcs-042munishbhardwaj 6/8

Manchester code

In telecommunication and data storage, Manchester code (also known as Phase Encoding, or PE)

is a line code in which the encoding of each data  bit has at least one transition and occupies thesame time. It therefore has no DC component, and is self-clocking, which means that it may be

inductively or capacitively coupled, and that a clock signal can be recovered from the encodeddata.

Manchester code is widely used (e.g. in Ethernet; see also RFID or   Near Field Communication).

There are more complex codes, such as 8B/10B encoding, that use less  bandwidth to achieve the

same data rate but may be less tolerant of frequency errors and jitter in the transmitter and receiver reference clocks.

Features

Manchester code ensures frequent line voltage transitions, directly proportional to the clock rate;this helps clock recovery.

The DC component of the encoded signal is not dependent on the data and therefore carries no

information, allowing the signal to be conveyed conveniently by media (e.g. Ethernet) whichusually do not convey a DC component.

Q6(b) Refer to block 3 page 36

Q7(a);

Q7(b);- Nagle’s Algo:-

Nagle's algorithm, named after John Nagle, is a means of improving the efficiency of  TCP/IP 

networks by reducing the number of packets that need to be sent over the network.

8/2/2019 MCS-042MunishBhardwaj

http://slidepdf.com/reader/full/mcs-042munishbhardwaj 7/8

 Nagle's document, Congestion Control in IP/TCP Internetworks (RFC 896) describes what he

called the 'small packet problem', where an application repeatedly emits data in small chunks,

frequently only 1 byte in size. Since TCP packets have a 40 byte header (20 bytes for TCP, 20 bytes for  IPv4), this results in a 41 byte packet for 1 byte of useful information, a huge overhead.

This situation often occurs in Telnet sessions, where most keypresses generate a single byte of data

that is transmitted immediately. Worse, over slow links, many such packets can be in transit at thesame time, potentially leading to congestion collapse.

 Nagle's algorithm works by combining a number of small outgoing messages, and sending them all

at once. Specifically, as long as there is a sent packet for which the sender has received no

acknowledgment, the sender should keep buffering its output until it has a full packet's worth of output, so that output can be sent all at once.

Q8(a):

The Domain Name System (DNS) is a hierarchical distributed naming system for computers,

services, or any resource connected to the Internet or a  private network . It associates variousinformation with domain names assigned to each of the participating entities. Most importantly, it

translates domain names meaningful to humans into the numerical identifiers associated with

networking equipment for the purpose of locating and addressing these devices worldwide.

An often-used analogy to explain the Domain Name System is that it serves as the phone book for the Internet by translating human-friendly computer  hostnames into IP addresses. For example, the

domain name www.example.com translates to the addresses 192.0.32.10 (IPv4) and

2620:0:2d0:200::10 (IPv6).

The Domain Name System makes it possible to assign domain names to groups of Internet

resources and users in a meaningful way, independent of each entity's physical location. Becauseof this, World Wide Web (WWW) hyperlinks and Internet contact information can remain

consistent and constant even if the current Internet routing arrangements change or the participantuses a mobile device. Internet domain names are easier to remember than IP addresses such as

208.77.188.166 (IPv4) or 2001:db8:1f70::999:de8:7648:6e8 (IPv6). Users take advantage

of this when they recite meaningful Uniform Resource Locators (URLs) and e-mail addresses without having to know how the computer actually locates them.

Q8(b):

In cryptography, Triple DES is the common name for the Triple Data Encryption Algorithm

(TDEA or Triple DEA)  block cipher , which applies the Data Encryption Standard (DES) cipher algorithm three times to each data block.

The original DES cipher's key size of 56 bits was generally sufficient when that algorithm was

designed, but the availability of increasing computational power made brute-force attacks feasible.

Triple DES provides a relatively simple method of increasing the key size of DES to protect

against such attacks, without the need to design a completely new block cipher algorithm.

8/2/2019 MCS-042MunishBhardwaj

http://slidepdf.com/reader/full/mcs-042munishbhardwaj 8/8

Algorithm

Triple DES uses a "key bundle" which comprises three DES keys, K 1, K 2 and K 3, each of 56 bits(excluding parity bits). The encryption algorithm is:

ciphertext = EK3(DK2(EK1(plaintext)))

I.e., DES encrypt with K 1, DES decrypt with K 2, then DES encrypt with K 3.

Decryption is the reverse:

plaintext = DK1(EK2(DK3(ciphertext)))

I.e., decrypt with K 3, encrypt with K 2, then decrypt with K 1.

Each triple encryption encrypts one block  of 64 bits of data.

In each case the middle operation is the reverse of the first and last. This improves the strength of the algorithm when using keying option 2, and provides backward compatibility with DES with

keying option 3.