Está en la página 1de 6

Q:

[GATE 2004]

Ans: Packet A sends an IP packet of 180 bytes of data +20 bytes of TCP header +20
bytes of IP header to B.

IP layer of B now removes 20 bytes of IP header and has 200 bytes of data. So, it
makes 3 IP packets - [80+20,80+20,40+20] and sends to C as the Ip packet size of B
is 100. So, C receives 260 bytes of data which includes 60 bytes of IP headers and 20
bytes of TCP header.

For data rate, we need to consider only the slowest part of the network as data will be
getting accumulated at that sender (data rate till that slowest part, we need to add
time if a faster part follows a slower part).

So, here 180 bytes of application data are transferred from A to C and this causes
260 bytes to be transferred from B to C.

Correct Answer: D
Q: Consider three IP networks A,B and C. Host HA in network A sends messages each
containing 180 bytes of application data to a host HC in network C. The TCP layer
prefixes 20 byte header to the message. This passes through an intermediate network
B. The maximum packet size, including 20 byte IP header, in each network, is:
 A:1000 bytes
 B:100 bytes
 C:1000 bytes

The network A and B are connected through a 1 Mbps link, while B and C are
connected by a 512 Kbps link (bps = bits per second).

What is the rate at which application data is transferred to host HC ? Ignore errors,
acknowledgments, and other overheads. [GATE 2004]
A. 325.5 Kbps
B. 354.5 Kbps
C. 409.6 Kbps
D. 512.0 Kbps

Ans:

Another Form
(B) is correct option, after the delivery of first packet, Host C will receive a new packet
for each 4.0625 milliseconds.
Q: A host X send a message to host Y having two intermediate networks in between
them. A TCP message consisting of 2100 bytes is passed to IP for delivery across two
hosts. In first network has MTU of 1200 bytes second network has MTU of 400 bytes
excluding network overhead. Assume that IP overhead per packet is 20 bytes. What is
the fragmentation offset for the Last fragment that reaches destination?

Ans: File size = 2100 when it goes to network layer 20 bytes are added so it becomes
2120B but this is just for understanding as we can solve it without considering IP
overhead because fragmentation is done on data not headers.
At sender S: 2100 B to intermediate router P (1200 bytes without header) to
intermediate router Q (400 B w/o header) to destination D.
S to P :
fragment 1 : 1200 fragment 2 : 900 to P
P to Q :
for 1200B fragment
F1 : 400(data length in bytes) offset : 0
F2 : 400 offset : 400/8=50
F3 : 400 offset : 100
for 900B fragment
F4: 400 offset : 150
F5: 400 offset : 200
F6: 100 offset : 250 last fragment

In other way 250*8 = 2000 bytes ahead of this last fragment (from 0 to 1999)
and sequence number of last fragment is 2000.
So 250 should be answer.

Q: Consider three IP networks A, B and C. Host HA in network A sends messages


each containing 200 bytes of application data to a host HC in network C. This passes
through an intermediate network B. The maximum packet size, including 20 byte IP
header, in each network is:
 A: 1000 bytes
 B: 100 bytes
 C: 200 bytes
The network A and B are connected through a 512 Kbps link, while B and C are
connected by a 1 Mbps link (bps = bits per second). What is the rate at which
application data is transferred to host HC ? Ignore errors, acknowledgements, and
other overheads

Ans: message = 200


TCP datagram = 200 + 20
IP datagram = 220 + 20
fragmentation will take place at network B and 220 IP packet will be fragmented in 3
IP datagram. 80+20, 80+20, 60 + 20.
So, total data send = 280 instead of 200. // total data=220+20 × 3=280
Efficiency=200/280
Hence, rate at which application data will be send = (200/280) × 512 Kbps.
=0.714 × 512=365.71 Kbps
Q: Suppose a network:-

Suppose a TCP message contains 492 B of data and TCP header is of size 20B then
deliver it to IP. IP header is 20 B. Assume link A-R1 has the maximum frame size of
700 B including a frame size of 14 B, link R1-R2 can support a maximum frame size
of 256 B including an 8 B of the frame header and link R2-B can support a maximum
of 256 B including a 12 B frame header. Then calculate the no of fragments at each
link and show the format of fragments in each link.

Ans: TCP data size = 492 B


TCP header size = 20 B
IP header size = 20 B
So packet size = 492 B + 20 B + 20 B = 532 B
512 B 20 B
Now our data will travel from A - R1
Maximum frame size allowed = 700 B (include frame header)
Frame Header Size = 14 B
So maximum packet size allowed = 700 B - 14 B = 686 B
Since 532 B < 686 B, so no need of fragmentation.
----------------------------------------------------------------------------------------
Now our data will travel from R1 - R2
Maximum frame size allowed = 256 B (include frame header)
Frame Header Size = 8 B
So maximum packet size allowed = 256 B - 8 B = 248 B
Since 532 B > 248 B, so here we will do fragmentation
Maximum fragment data allowed = 248 B - 20 B = 228 B
But we know that fragment must carry data in multiple of 8.
So, 1st fragment will carry a data of 224 B and IP header of 20 B i.e 244 B
then 2nd fragment will carry a data of 224 B and IP header of 20 B i.e 244 B
3rd fragment will carry a data of 64 B and IP header of 20 B i.e 84 B
------------------------------------------------------------------------------------------
Now our data will travel from R2 - B
Maximum frame size allowed = 256 B (include frame header)
Frame Header Size = 12 B
So maximum packet size allowed = 256 B - 12 B = 244 B
Since 244 B = 244 B, so here we don't do any fragmentation

Q:

Ans: Given answer is 460


Maximum frame size allowed = 512 B (include frame header)
Frame Header Size = 8 B
So maximum packet size allowed = 512 B - 8 B = 504 B
Maximum data size=504-20=484 ≈ 480 // multiply of 8
 First packet will carry =480 data+20 IP header+8 frame header=508B
 Second packet will carry 920-480 =440 B
Total length of IP header = 440+ 20 (include IP header) = 460 B

Q: Fragmentation of a datagram is needed in-


A. Datagram circuit only
B. Virtual circuit only
C. Both (A) and (B)
D. None

Solution-

 Each network has its Maximum Transmission Unit (MTU).


 If the size of data packet is greater than MTU, then it will have divided into
fragments to transmit it through the network.
 So, fragmentation may be required in datagram circuits as well as virtual
circuits.
 Thus, Option (C) is correct.

Q: What are all the fields required from IP header to allow the destination to perform
reassembly of fragments?
A. Identification, MF, Offset, Header length and Total length
B. MF, Offset and Destination IP
C. MF, Datagram length, Source IP
D. MF, Options and Offset

Solution-

Clearly, Option (A) is correct.

Q: The checksum in IP must be recomputed at every router because of change in ____


fields.
A. TTL, Options, Identification Number, Offset
B. TTL, Options, Datagram Length, Offset
C. TTL, Options, Data, Offset
D. TTL, Header Length, Offset, ToS
Solution-

Clearly, Option (B) is correct.

Q: If the value available in “fragment offset” field of IP header is 100, then the number
of bytes ahead of this fragment is ___ ?
A. 100 B
B. 400 B
C. 800 B
D. 200 B
Solution-

 Fragment offset field use a scaling factor of 8.


 If Fragment offset field value = 100, then fragment offset = 8 x 100 = 800.
 It suggests 800 bytes of data is ahead of this fragment.
 Thus, Option (C) is correct.
Q: When the source does not trust the routers to route properly or source wishes to
make sure that the packet does not stray from specified path, what options can be
used?
A. Loose source routing
B. Trace route
C. Strict source routing
D. Internet Time Stamp

Solution-

Clearly, Option (C) is correct.

Q: The checksum computation in IP header includes-


A. IP header only
B. IP header and data
C. IP header and Pseudo header
D. None

Solution-

 Checksum computation in IP header includes IP header only.


 Errors in the data field are handled by the encapsulated protocol.
 Thus, Option (A) is correct.

Q: Suppose a router receives an IP packet containing 600 data bytes and has to
forward the packet to a network with maximum transmission unit of 200 bytes.
Assume that IP header is 20 bytes long. What are fragment offset values for divided
packets?
A. 22, 44, 66, 88
B. 0, 22, 44
C. 0, 22, 44, 66
D. 22, 44, 66
Solution-
Given-
 MTU size of the destination network = 200 bytes
 IP header length = 20
Now,
 Maximum amount of data that can be sent in one fragment = 200 – 20 = 180
bytes.
 Amount of data sent in a fragment must be a multiple of 8.
 So, maximum data sent that can be in one fragment = 176 bytes.
Thus, 4 fragments are created-
 1st fragment contains 176 bytes of data.
 2nd fragment contains 176 bytes of data.
 3rd fragment contains 176 bytes of data.
 4th fragment contains 72 bytes of data
So,
 Fragment offset value for 1st fragment = 0
 Fragment offset value for 2nd fragment = 176 / 8 = 22
 Fragment offset value for 3rd fragment = (176+176) / 8 = 44
 Fragment offset value for 4th fragment = (176 + 176 + 176) / 8 = 66

Thus, Option (C) is correct.

También podría gustarte