76 votes 76 votes $\text{Host A}$ sends a $\text{UDP}$ datagram containing $8880\text{ bytes}$ of user data to $\text{host B}$ over an $\text{Ethernet LAN}.$ Ethernet frames may carry data up to $1500\text{ bytes (i.e. MTU = 1500 bytes)}.$ Size of $\text{UDP}$ header is $8\text{ bytes}$ and size of $\text{IP}$ header is $20\text{ bytes}.$ There is no option field in $\text{IP}$ header. How many total number of $\text{IP}$ fragments will be transmitted and what will be the contents of offset field in the last fragment? $6$ and $925$ $6$ and $7400$ $7$ and $1110$ $7$ and $8880$ Computer Networks gatecse-2015-set2 computer-networks ip-packet normal + – go_editor asked Feb 13, 2015 • edited Jan 6, 2018 by pavan singh go_editor 26.0k views answer comment Share Follow See all 11 Comments See all 11 11 Comments reply Show 8 previous comments Arpon Roy commented Oct 28, 2022 reply Follow Share dll mtu means only frame size here after fragmentation 20B of ip header will be added so actually respect to the n/w layer it can divide by 1480 B 1 votes 1 votes Ayushpal commented Nov 10, 2023 reply Follow Share What is offset ? 0 votes 0 votes darcy5 commented Dec 12, 2023 reply Follow Share Similar question: https://gateoverflow.in/204129/gate-cse-2018-question-54 0 votes 0 votes Please log in or register to add a comment.
Best answer 127 votes 127 votes Answer is C. Number of fragments $=\large\Big\lceil\frac{8888}{1480}\Big\rceil = 7$ Offset of last fragment $=\dfrac{(1500 - 20)\times 6} {8}=1110$ (scaling factor of $8$ is used in offset field). $\text{TCP or UDP header}$ will be added to the DataUnit received from Transport Layer to Network Layer. And fragmentation happens at Network Layer. So no need to add $\text{TCP or UDP}$ header into each fragment. Vikrant Singh answered Feb 13, 2015 • edited Jun 20, 2018 by Milicevic3306 Vikrant Singh comment Share Follow See all 29 Comments See all 29 29 Comments reply Show 26 previous comments practicalmetal commented May 29, 2023 reply Follow Share The length of the UDP data is given as 8880 Bytes and the UDP header is 8 Bytes. The UDP datagram(header+data) is inserted into the data field of the IP datagram therefore the length of the data field of the IP datagram is 8880+8=8888B. Hope this clears your doubt :) 0 votes 0 votes dangling-else commented Jul 26, 2023 reply Follow Share If you don't add TCP or UDP header to every fragment, then can you please tell me how you will identify the fragment belongs to which port number/process I'd in receiver ? 0 votes 0 votes kickassakash commented Nov 20, 2023 i edited by kickassakash Nov 20, 2023 reply Follow Share @dangling-else our main motive is to deliver a packet from A to B. routers use ip header(ip header is appended to each fragment) to securely deliver packet from source to the destination address. Then at the Destination host we reassemble the packets and forward to our target port/process. 1 votes 1 votes Please log in or register to add a comment.
45 votes 45 votes Answer is : 7 fragments and last fragment offset is 1110 bahirNaik answered Dec 22, 2015 • edited Feb 1, 2016 by bahirNaik bahirNaik comment Share Follow See all 3 Comments See all 3 3 Comments reply vamp_vaibhav commented Jul 25, 2017 reply Follow Share during my classes we were taught that we cannot take 0- 1479 because 1480 is not divisible by 8 ..so we have to take number which is less than 1480 nd divisible by 8 i.e 1476?? solve this query please?? 0 votes 0 votes VS commented Aug 1, 2017 reply Follow Share @vamp_vaibhav 1480 is divisible by 8 :) 185*8 3 votes 3 votes vamp_vaibhav commented Aug 1, 2017 reply Follow Share hmm i realized my mistake earlier ..forgot to mention :) 0 votes 0 votes Please log in or register to add a comment.
6 votes 6 votes UDP data = 8880 bytes UDP header = 8 bytes IP Header = 20 bytes Total Size excluding IP Header = 8888 bytes. Number of fragments = ⌈ 8888 / 1480 ⌉ = 7 Offset of last segment = (1480 * 6) / 8 = 1110 Paras Nath answered Sep 10, 2016 Paras Nath comment Share Follow See all 3 Comments See all 3 3 Comments reply flash12 commented Jan 25, 2018 reply Follow Share @ Paras Nath excluding IP Header or Udp header ?????? 0 votes 0 votes Rajesh Panwar commented Jan 3, 2019 reply Follow Share udp header. 0 votes 0 votes Pvkarma commented Sep 22, 2020 reply Follow Share excluding ip header 0 votes 0 votes Please log in or register to add a comment.
4 votes 4 votes 1500 is MTU . And header length of ip is 20 . So net data can go is 1500-20 =1480 . and no. of fragment needed (8880+8)/1472 = 6.something so 7 . and offset 6*1480/8= 1110 . Pranay Datta 1 answered Jun 22, 2015 • edited Jun 23, 2015 by Pranay Datta 1 Pranay Datta 1 comment Share Follow See all 8 Comments See all 8 8 Comments reply Shimpy Goyal commented Jun 22, 2015 reply Follow Share all have different explanation then wch one shd correct m getting u even correct but some one mark a option 0 votes 0 votes Pranay Datta 1 commented Jun 22, 2015 i edited by Pranay Datta 1 Jun 23, 2015 reply Follow Share To me i am correct and none of the options are matching for offset (1104) . It is closed to 1110 . And the guy who mark option A ( @sameer ) actually did what i did . But he has made a mistake while computing - Fragment 5, 2292 - 1472 = 820, Offset = (1472 * 4) / 8 = 736 it should be Fragment 5, 2992 - 1472 = 1520, Offset = (1472 * 4) / 8 = 736 .peace 1 votes 1 votes Arjun commented Jun 23, 2015 reply Follow Share Transport is at a higher level than network. There won't be multiple UDP headers for the same UDP datagram. 2 votes 2 votes Pranay Datta 1 commented Jun 23, 2015 reply Follow Share I miss that again . Yeah you are right . 0 votes 0 votes Shimpy Goyal commented Jun 23, 2015 reply Follow Share ok.. thx.. 0 votes 0 votes tiger commented Jan 3, 2016 reply Follow Share final answer is c ? 0 votes 0 votes Neeraj Chandrakar commented Oct 17, 2017 reply Follow Share Answer is C) 0 votes 0 votes Puja Mishra commented Jan 16, 2018 reply Follow Share y r u dividing by 1472 ?? not by 1480 ?? anyone ?? 0 votes 0 votes Please log in or register to add a comment.