Network Fragmentation and Packet Transmission: Exercises and Explanations, Exercises of Computer Science

It contains solutions to the assignemnts

Typology: Exercises

2020/2021

Uploaded on 12/19/2021

naman-gill
naman-gill 🇮🇳

3 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
14.6. A 4480-octet datagram is to be transmitted and needs to be fragmented
because it will pass through an Ethernet with a maximum payload of 1500
octets. Show the Total Length, More Flag, and Fragment Offset values in each
of the resulting fragments.
The original datagram includes a 20-octet header and a data field of 4480
octets. The Ethernet frame can take a payload of 1500 octets, so each
frame can carry an IP datagram with a 20octet header and 1480 data
octets. Note the 1480 is divisible by 8, so we can use the maximum size
frame for each fragment except the last. To fit 4480 data octets into
frames that carry 1480 data octets we need:
3 datagrams × 1480 octets = 4440 octets, plus 1 datagram that carries
40 data octets (plus 20 IP header octets)
The relevant fields in each IP fragment:
Total Length = 1500 ,More Flag = 1 ,Offset = 0
Total Length = 1500 ,More Flag = 1 ,Offset = 185
Total Length = 1500 ,More Flag = 1 ,Offset = 370
Total Length = 60 ,More Flag = 0 ,Offset = 555
14.10 A transport layer message consisting of 1500 bits of data and 160 bits of
header is sent to an internet layer, which appends another 160 bits of header.
This is then transmitted through two networks, each of which uses a 24-bit
packet header. The destination network has a maximum packet size of 800 bits.
How many bits, including headers, are delivered to the network-layer protocol
at the destination?
Only the data, transport header and network header are delivered to the
destination network layer. Thus a total of 1500 + 160 + 160 = 1820 bits
is delivered to the destination network layer.
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Network Fragmentation and Packet Transmission: Exercises and Explanations and more Exercises Computer Science in PDF only on Docsity!

14.6. A 4480-octet datagram is to be transmitted and needs to be fragmented

because it will pass through an Ethernet with a maximum payload of 1500

octets. Show the Total Length, More Flag, and Fragment Offset values in each

of the resulting fragments.

The original datagram includes a 20-octet header and a data field of 44 80

octets. The Ethernet frame can take a payload of 1500 octets, so each

frame can carry an IP datagram with a 20octet header and 1480 data

octets. Note the 1480 is divisible by 8, so we can use the maximum size

frame for each fragment except the last. To fit 4480 data octets into

frames that carry 1480 data octets we need:

3 datagrams × 1480 octets = 4440 octets, plus 1 datagram that carries

4 0 data octets (plus 20 IP header octets)

The relevant fields in each IP fragment:

Total Length = 1500 ,More Flag = 1 ,Offset = 0

Total Length = 1500 ,More Flag = 1 ,Offset = 185

Total Length = 1500 ,More Flag = 1 ,Offset = 370

Total Length = 6 0 ,More Flag = 0 ,Offset = 555

14.10 A transport layer message consisting of 1500 bits of data and 160 bits of

header is sent to an internet layer, which appends another 160 bits of header.

This is then transmitted through two networks, each of which uses a 24-bit

packet header. The destination network has a maximum packet size of 800 bits.

How many bits, including headers, are delivered to the network-layer protocol

at the destination?

Only the data, transport header and network header are delivered to the

destination network layer. Thus a total of 1500 + 160 + 160 = 1820 bits

is delivered to the destination network layer.

To the Network Layer, packets from the IP layer are considered as data,

we call it IP data.

IP data = User Data + Transport Header + IP Header

= 1500 + 160 + 160 bits = 1820 bits

The maximum packet size for the network is 800 bits and network

header is 24 bits. So the maximum data size the network can handle is

Since we have 1820 bits to be delivered, it is too large to fix in one

packet. So fragmentation is needed.

Define

n = number of fragments

d = total number of data to be transmitted at the network layer

= IP data = 1820

m = maximum data size for the network = 776

n= [ d/m] = [1820/776] = [2.3] = 3

Define

t = total number of delivered to the destination

h = total overhead = network header x n = 24 x 3 = 72

t = h + d

14.13. Provide the following parameter values for each of the network

classes A, B, and C. Be sure to consider any special or reserved addresses

in your calculations.

a. Number of bits in network portion of address

b. Number of bits in host portion of address

c. Number of distinct networks allowed

d. Number of distinct hosts per network allowed

e. Integer range of first octet

a. What is the utilization over the two links? Assume a 500-ms round-

trip delay for the satellite link.

For the first case, the utilization is 122/256 = 47%.

For the second case (satellite), the utilization is 33/256 = 13%.

b. What does the window size appear to be for the two cases?

ER = W/RTT

W = ER × RTT

For the first case W = (122 × 10

3

) × (128 × 10

  • 3

) = 15 616 bits

= 19 52 bytes

For the second case W = (33 × 10

3

) × (500 × 10

  • 3

)

= 16500 bits = 2063 bytes

c. How big should the window size be for the satellite link?

We want ER = (256 × 10

3

) = W / (500 × 10

  • 3

)

W = 128,000 bits = 16,000 bytes.

15.5. Draw diagrams (similar to Figure 15.4) for the following (assume a

reliable sequenced network service):

a. Connection termination: active/passive

b. Connection termination: active/active

c. Connection rejection

d. Connection abortion: User issues an OPEN to a listening user, and

then issues a CLOSE before any data are exchanged

(a) T = (8×

6

bits)/(64×

3

bps) = 125 seconds

(b) Transfer consists of a sequence of cycles. One cycle consists of:

Data Packet = Data Packet Transmission Time + Propagation Time

ACK Packet = ACK Packet Transmission Time + Propagation Time

Define: C = Cycle time , Q = data bits per packet , T = total time

required

Td = Data Packet Transmit Time

Ta = ACK Packet Transmit Time

Tp = Propagation Time

Then: Tp = (D) / (200×

6

m/sec)

Ta = (88 bits) / (B bps)

Td = (P bits) / (B bps)

T = (8×

6

bits × C sec/cycle) / (Q bits/cycle)

C = Ta + Td + 2Tp , Q = P −

Therefore,

1. C = (88) / (

6

) + (256) / (

6

) + (2 × 10

3

) / (200×

6

) = 354×

  • 6

Q = 176

T = (8×

6

×354×

  • 6

) / (176) = 16.09 seconds.

2. C = (88) / (

7

) + (256) / (

7

) + (2×

3

) / (200×

6

) = 44 4×

  • 7

Q = 176

T = (8×

6

× 44 4×

  • 7

) / (176) = 2. 018 seconds.

3. C = (88) / (

6

) + (256) / (

6

) + (2×

4

) / (200×

6

) = 444×

  • 6

Q = 176

T = (8×

6

×444×

  • 6

) / (176) = 20.18 seconds.

4. C = (80) / (50×

6

)+(

4

) / (50×

6

)+(2×

3

) / (200×

6

)

= 211.6×

  • 6

Q = 9,

T = (8×

6

×211.6×

  • 6

) / (9920) = 0.17 seconds.

11.4 .Consider a baseband bus with a number of equally spaced stations with a

data rate of 10 Mbps and a bus length of 1 km.

a. What is the mean time to send a frame of 1000 bits to another station,

measured from the beginning of transmission to the end of reception?

Assume a propagation speed of 200 m/μs.

Assume a mean distance between stations of 0.375 km. This is an

approximation based on the following observation.

For a station on one end, the average distance to any other station

is 0.5 km.

For a station in the center, the average distance is 0.25 km.

With this assumption, the time to send equals transmission time

plus propagation time.

T = (

3

bits / 10

7

bps) + (375 m / (200 ×

6

m / sec) )= 102μ sec

b. If two stations begin to transmit at exactly the same time, their packets

will interfere with each other. If each transmitting station monitors the

bus during transmission, how long before it notices an interference, in

seconds? In bit times?

Tinterfere = 375 m / 200 ×

6

m sec = 1.875μ sec

Tinterfere(bit −times) = 10

7

×1.875 ×

  • 6

= 18.75 bit – times

Bridge 101 Table

from LAN A from LAN B

Dest Next Dest Next

B B A A

C - C A

D B D -

E - E -

F - F A

G - G A

Bridge 103 Table

from LAN B from LAN D

Dest Next Dest Next

A - A B

C - B B

D D C B

E - E B

F - F B

G - G B

Bridge 105 Table

from LAN C from LAN F

Dest Next Dest Next

A - A C

B - B C

D - C C

E - D C

F F E C

G - G C

Bridge 102 Table

from LAN A from LAN C

Dest Next Dest Next

B - A A

C C B A

D - D A

E - E A

F C F -

G C G -

Bridge 104 Table

from LAN B from LAN E

Dest Next Dest Next

A - A -

C - B B

D - C -

E E D B

F - F -

G - G -

Bridge 106 Table

from LAN C from LAN G

Dest Next Dest Next

A - A C

B - B C

D - C C

E - D C

F - E C

G G F C

Bridge 107 Table

from LAN A from LAN E

Dest Next Dest Next

B - A A

C - B -

D - C A

E E D -

F - F A

G - G A

12.2. For p - persistent CSMA, consider the following situation. A station

is ready to transmit and is listening to the current transmission. No other

station is ready to transmit, and there will be no other transmission for an

indefinite period. If the time unit used in the protocol is T , show that the

average number of iterations of step 1 of the protocol is 1> p and that

therefore the expected time that the station will have to wait after the

current transmission is T( 1/ P – 1).

Hint : Use the Equation ∑^ 𝑖 𝑋

∞ 𝑖− 1

𝑖= 1

1

( 1 −𝑋)

2

E[number of iterations] = ∑ 𝑖 × 𝑃 𝑟

𝑖= 1

[exactly i iterations of step 1]

𝑖

= (1- PFi) × ∏^ 𝑃𝐹 𝑗

𝑖− 1

𝑗= 1

Pr [exactly 1 iteration of step 1] = p

Pr [exactly 2 iterations of step 1] = (1 – p)p

Pr [exactly 3 iterations of step 1] = (1 – p)

p

PF 1 = 0.5, P 1 = 0.

PF 2 = 0.25 , P 2 = 0.

PF 3 = 0.125 , P 3 = 0.

PF 4 = 0.0625, P 4 = 0.

The remaining terms are negligible

Therefore E[retransmission] = 1.

12.6 With 8B6T coding, the effective data rate on a single channel is 33 Mbps

with a signaling rate of 25 Mbaud. If a pure ternary scheme were used, what is

the effective data rate for a signaling rate of 25 Mbaud?

With pure ternary signaling, each signal element can take on one of three

states, so that the information carrying capacity of a signal element is

log 2

( 3 ) = 1.585 bits/baud

So that the effective data rate for a signaling rate of 25Mbaud is

1.585 × 25 = 39.62 Mbps