Here we are going to see the effect of packet size on transmission. Assume that
ID: 3746519 • Letter: H
Question
Here we are going to see the effect of packet size on transmission. Assume that Bob is going to send Alice an email message which is 160 KB1, and TCP/IP model is used. Let us assume that the TCP header is 20 bytes, IP header is 20 bytes, and the header sizes in network access layer and physical layer add up to 18 bytes. Please calculate:
a. If the email message is divided into small packets (100 byte each) at the application layer and then transfer to lower layers, how many bytes need to be sent out at the physical layer to transmit the entire email to the network?
b. Repeat the above calculation if Bob’s email is divided into larger packets (1000 byte each).
c. Based on the results, present your own summarization on how the packet size affects the transmission efficiency.
Explanation / Answer
Hello! I have explained the solution to the problem in detail as much as possible. Please do comment if you have any doubts. I am always readily available to solve your doubts.
So firstly let us list out the data we have now.
Message size = 160 kb = 160000 bytes
TCP header = 20 bytes
IP header = 20 bytes
Header sizes = 18 bytes
So we know that the packet size is 100 bytes.
So firstly we need to calculate the additional data that is being sent with the message which is the overhead.
Overhead = TCP header + IP header + Header sizes
= 20 + 20 + 18
= 58 bytes
So for every 100 bytes, we are sending 58 bytes of data which is not the message. So the message is only 42 bytes for every packet.
Actual message size per packet = 42 bytes
So if we divide Message size by the number of bytes of actual message we obtain the number of packets which are to be sent. which is 160000 / 42 which is 3809.52380952381.
So it is 3810 packets of which 3809 are of 100 bytes.
3809 packets are of size 3809 * 100 bytes which is 380900 bytes.
So 0.523 packet means the remaining message is 22 bytes
The last packet is 58 bytes + remaining message. Here the remaining actual message is of size 22 bytes.
So the last packet is 80 bytes
So in total we send 380900 bytes + 80 bytes which is 380980 bytes.
In the question B if the size of each packet is 1000 bytes each then we send the actual message of size 1000 - overhead. which is 1000 - 58 = 942 bytes.
So on diving 160000/942 which is 169.851 packets.
So it is 170 packets in a total of which 169 packets together are of size 169 * 1000 = 169000 bytes.
The last packet has remaining message of size 140 bytes and the overhead of 58 bytes. So the total size is 198 bytes.
So a total size of 169000 + 198 bytes which is 169198 bytes are sent in total.
So as in question C, we can compare the results.
In the first case the total size of the message to be sent is 160000 bytes but the actual size which we are sending is 380980 bytes. This is in fact 238% of the actual message. That is we are sending 2.3 times the actual message which is terrible since we are sending 138% of data which is not even the message.
In the second case, the total size of the message to be sent is 160000 bytes but the actual size we are sending is 169198 bytes. This is 1.05 times more or 105% of the actual message. Which is more than the actual message but there is only 5 % of the extra message.
So this is what we can draw from the results. We need to choose an optimal size of a packet to reduce the size of transmission over the network. As we have seen if the packet size is too small then it takes a lot of memory to just send the message.