Data Communication

8
ECX5234 - Data Communications A-1 The Open University of Sri Lanka Department of Electrical & Computer Engineering Bachelor of Technology Programme ECX5234 Data Communications Assignment #1 - 2013/14 Answer all questions. Q1(a) The OSI model was developed before the Internet and was developed by agreement by the US and European nations (CCITT), yet the Internet and its protocols is by far the dominant network technology in the world. Explain why? You need to answer this by giving certain advantages of TCP/IP over OSI model. (b) Explain what is segmentation and why it is required. In which layer of the OSI model is the segmentation done? Dividing a datagram into smaller parts Different networks have different maximum transferring units (MTUs). When a datagram enters a network with a smaller MTU then fragmentation is needed. The connecting router/gateway fragments the original datagram into smaller packets to fit into the new MTU. This is done at the transport layer. (c) Briefly explain the difference between connectionless packet switching network and connection oriented packet switching network. How does the network layer in a connection oriented packet switching network differ from that of connectionless packet switching network? Connection oriented packet switching When two users communicate, a virtual circuit or a connection has to be first established by the network. The following three phases are involved: connection set up data transfer connection disconnect Here each packet is labeled with only an ID. All the address information is transferred to each node only during the connection set up phase. Here, the packet header can be small, as it only needs to contain the ID and any information (such as length, timestamp, or sequence number) which is different for different packets. Connectionless packet switching Here, a user can send packets to a destination without setting up a connection first, i.e., without informing the network prior to transmitting them. The routing of a packet through the network is done on a hop-per-hop basis based on the destination IP address carried in the IP packet’s header.

description

The Open University of Sri Lanka. Notes

Transcript of Data Communication

Page 1: Data Communication

ECX5234 - Data Communications

A-1

The Open University of Sri Lanka

Department of Electrical & Computer Engineering

Bachelor of Technology Programme

ECX5234 Data Communications

Assignment #1 - 2013/14

Answer all questions.

Q1(a) The OSI model was developed before the Internet and was developed by

agreement by the US and European nations (CCITT), yet the Internet and its

protocols is by far the dominant network technology in the world. Explain why?

You need to answer this by giving certain advantages of TCP/IP over OSI model.

(b) Explain what is segmentation and why it is required. In which layer of the OSI

model is the segmentation done?

Dividing a datagram into smaller parts

Different networks have different maximum transferring units (MTUs). When a

datagram enters a network with a smaller MTU then fragmentation is needed.

The connecting router/gateway fragments the original datagram into smaller

packets to fit into the new MTU. This is done at the transport layer.

(c) Briefly explain the difference between connectionless packet switching network

and connection oriented packet switching network. How does the network layer

in a connection oriented packet switching network differ from that of

connectionless packet switching network?

Connection oriented packet switching

When two users communicate, a virtual circuit or a connection has to be first

established by the network. The following three phases are involved:

– connection set up

– data transfer

– connection disconnect

Here each packet is labeled with only an ID. All the address information is transferred

to each node only during the connection set up phase. Here, the packet header can be

small, as it only needs to contain the ID and any information (such as length,

timestamp, or sequence number) which is different for different packets.

Connectionless packet switching

Here, a user can send packets to a destination without setting up a connection first,

i.e., without informing the network prior to transmitting them. The routing of a packet

through the network is done on a hop-per-hop basis based on the destination IP address

carried in the IP packet’s header.

Page 2: Data Communication

ECX5234 - Data Communications

A-2

Each packet is labeled with a complete address or routing information i.e. destination

address, source address, port numbers and sequence number of the packet. Each packet

is dispatched and may go via different routes; potentially, the system has to do as much

work for every packet

(d) (i) Consider a signal which has 20kHz bandwidth which is to be transmitted in

a communication channel. Suppose it has twice the power as noise signal

that is added to it. Calculate the theoretical capacity of the channel.

Bandwidth = 20 kHz SNR = 2

According to Shannon’s formula, C = Blog2(1+SNR)

C = 20 x 103log2(1 + 2) = 31.699 kbps ≈ 32kbps

(ii) Assume that we need to upgrade the above channel to a higher bandwidth. the

following questions: a. How is the rate improved if we triple the bandwidth?

b. How is the rate improved if we triple the SNR?

c. Suggest another method to increase the data rate of the channel with

the same bandwidth and the SNR.

(ii) (a) If we triple the bandwidth, capacity = 3 x Blog2(1+SNR) = 96 kbps

(b) If we triple the SNR, � new SNR = 6

C = 20 x 103log2(1 + 6) = 56.147kbps ≈ 56kbps

(c) Using multi level signalling

Q2. (a) (i) Explain the necessity of line coding in data communication systems.

Line coding is the process of converting a sequence of bits to a digital signal.

With line coding the following advantages can be obtained:

After line coding pulses may be filtered or otherwise shaped to further improve their

properties: for example, their spectral efficiency and/ or immunity to intersymbol

interference etc.

(ii) Find the line coded bit stream of 1001111010 using the following techniques:

a. Polar NRZ

- The voltages are on both sides of the time axis.

- Polar NRZ scheme can be implemented with two voltages. E.g. +V for 1 and -V for 0.

- There are two versions:

→ NRZ - Level (NRZ-L) - positive voltage for one symbol and negative for the other

→ NRZ - Inversion (NRZ-I) - the change or lack of change in polarity determines the

value of a symbol. E.g. a “1” symbol inverts the polarity a “0” does not.

Page 3: Data Communication

ECX5234 - Data Communications

A-3

b. Polar RZ

- The Return to Zero (RZ) scheme uses three voltage values. +, 0, -.

- Each symbol has a transition in the middle. Either from high to zero or from low to

zero.

c. Manchester encoding

- Manchester coding consists of combining the NRZ-L and RZ schemes.

- Every symbol has a level transition in the middle: from high to low or low to high.

- Uses only two voltage levels.

d. Differential Manchester encoding

- Combines the NRZ-I and RZ schemes.

- Every symbol has a level transition in the middle. But the level at the beginning of the

symbol is determined by the symbol value. One symbol causes a level change the

other does not.

e. MLT-3.

- MLT-3 uses three voltage levels. +, 0, -.

- One symbol causes a level change the other does not.

- E.g. It moves to the next state to transmit a 1 bit, and stays in the same state to

transmit a 0 bit.

Page 4: Data Communication

ECX5234 - Data Communications

A-4

(b) Give the advantages of using Differential Manchester encoding over other line

coding methods and mention its applications.

In differential Manchester the inversion at the middle of the bit interval is used for

Synchronization. The presence or absence of an additional transition at the

beginning of the interval is used to identify the bit. Differential Manchester

requires two signal changes to represent binary 0 but only one to represent

binary 1. It has following advantages:

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

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

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

(c) A telephone line has 4kHz bandwidth. What is the maximum number of bits we can

send using the following techniques?

a. ASK b. QPSK c. 64-QAM

Bandwidth B = (1+d) x S where S = symbol rate = Nr

×1

r = no. of bits/signal element = log2L L = type of the signal

N = bit rate

d = a parameter 0<d<1

Assume d=0

a. ASK – Binary - On-Off keying

r = log22 = 1 B = 4kHz S = N

B = (1+d) x S

4x1000 = (1+0) x N

N = 4 kbps

b. QPSK

r = log24 = 2 B = 4kHz S = N×

2

1

B = (1+d) x S

4x1000 = (1+0) x N/2

N = 8 kbps

c. 64-QAM

r = log264= 6 B = 4kHz S = N×

6

1

B = (1+d) x S

4x1000 = (1+0) x N/6

N = 24 kbps

Page 5: Data Communication

ECX5234 - Data Communications

A-5

Q3.

(a) Describe the multiple access technique used in Ethernet.

You need to describe CSMA/CD technique.

(b) Explain the effect of the following parameters on the line efficiency of Ethernet

a. More hosts

b. Smaller packet sizes

c. Longer links

a. As more users are added to a shared network or as applications requiring more data

are added, performance deteriorates. This is because all users on a shared network are

competitors for the Ethernet bus.

Increasing the number of users (and therefore packet transmissions) creates a higher

collision potential. Collisions occur when two or more nodes attempt to send information

at the same time. When they realize that a collision has occurred, each node shuts off for

a random time before attempting another transmission. With shared Ethernet, the

likelihood of collision increases as more nodes are added to the shared collision domain

of the shared Ethernet.

b. In Ethernet, there is a minimum packet size to avoid collisions. This is because the

sender needs to be aware of collisions before it has sent the entire frame. When the

packet size is smaller than the minimum, then the sender cannot identify the collisions

before sending the entire frame. Therefore more collisions occur and the system

efficiency will be reduced.

When the packet size is larger than the minimum, the signal will reach the end of the

network in less than one-half the slot time. If all the stations follow CSMA/CD, they have

already sensed the existence of the signal on the line and have refrained from sending. If

they sent a signal on the line before one-half of the slot time expired, a collision

occurred. i.e. A collision can be occurred in the first half of the slot time. Therefore after

the sender sends the first 512 bits it is guaranteed that collision will not occur during the

transmission of this frame. Therefore selecting a larger frame will increase the efficiency

c. There is a relationship between the slot time and the maximum length of the network.

Maximum length = propagation speed x (slot time/2)

This depends on the propagation speed of the medium.

Usually, in longer links distances are long, this causes time lags to occur and that may

result in inappropriate carrier sensing, and hence collisions.

(c) Draw the structure of Ethernet address and show how we can identify unicast,

multicast and broadcast addresses. Give an example for each.

Page 6: Data Communication

ECX5234 - Data Communications

A-6

Ethernet frame format:

SFD – Start Frame Delimiter

Fig. 2.a

Destination address:

Fig. 2.b

Fig. 2.a shows the general Ethernet frame format. A source address is always a unicast

address i.e. a frame comes from only one station. The destination address which has 6

bytes and it can be unicast, mulicast or broadcast. (Fig. 2.b)

If the least significant bit of the first byte in a destination address is ‘0’, the address is

unicast. Otherwise it is multicast. Broadcast is a special case in mulicast, i.e. when all

digits are 1’s.

Examples:

Unicast – 4A:30:10:21:10:1A (Since A in binary is 1010)

Multicast – 47:20:1B:2E:08:EE (Since 7 in binary is 0111)

Broadcast – FF-FF-FF-FF-FF-FF

(d) Show the principle components of the 802.11 wireless LAN architecture using a

diagram. Refer Fig. 3

(e) Explain the CSMA/CA protocol and show how it avoids the hidden station problem.

– A carrier sensing scheme is used.

– When a node is wishing to transmit data, it first listens to the channel for a

predetermined amount of time to determine whether or not another node is

transmitting on the channel within the wireless range.

– If the channel is sensed "idle," then the node is permitted to begin the

transmission process. If the channel is sensed as "busy," the node defers its

transmission for a random period of time.

Page 7: Data Communication

ECX5234 - Data Communications

A-7

Fig. 3 – wireless LAN architecture

Hidden station problem or hidden terminal problem.

Hidden station problem – Refer the figure 4 to understand this clearly. Suppose that computers

A and C attempt to transmit to a location that is located in between them, say B. A and C are

sufficiently distant from each other so that they cannot hear each other’s transmission. As a

result when they sense the channel they may find that it is idle even though the other channel is

transmitting. This may cause the transmissions from the 2 stations proceeding and colliding at

the intermediate station.

Fig. 4

To avoid the above problems, CSMA/CA is used in wireless LANS a handshake procedure was

developed when there is a hidden station problem.

CSMA/CA – Avoids hidden node problem by using additional signaling packets:

- Sender asks receiver whether it is able to receive a transmission – Request to

Send (RTS)

- Receiver agrees, sends out a Clear to Send (CTS)

- Sender sends, receiver Acknowledgements (ACKs)

(Refer page 68 – 70 of Supplementary Reading material 2)

BSS - Base Service Set

AP – Access Point

Page 8: Data Communication

ECX5234 - Data Communications

A-8

(f) Describe how wireless LANs handle the mobility of users in the same IP subnet.

When a user Moves only within same access network

– If there is a single access point: mobility is irrelevant

– When there are multiple access points: only link-link layer changes

– Either way, users are not mobile at the network layer

That is at Layer 2, a wireless client can associate with an access point, then move to

another access point in the same subnet, without losing connection with the network

(Figure 5).

Fig. 5

(http://www.foundrynet.com/services/documentation/wlan_config/wireless_mobility.html)