[oclug] ping

rjordan at CR1004964-A.slnt1.on.wave.home.com rjordan at CR1004964-A.slnt1.on.wave.home.com
Thu Jan 18 23:22:46 EST 2001


IP Header

0                                                                   31
|-------------------------------------------------------------------|  ---
|version | hdr len|Type of Service |  Total length of datagram      |   |  
| 4 bit  | 4 bit  |    8 bit       |           16 bit               |   |
|----------------------------------|--------------------------------|   |
|    identification                |flags |   fragment offse        |   |
|         16 bit                   | 3 bit|     13 bit              |   |
|----------------------------------|--------------------------------|   |
|  time to live   |  protocol      |     checksum                   |   |
|   8 bit         |    8 bit       |   16-bit                       | 20 bytes
|-------------------------------------------------------------------|   |
|                      Source IP Address                            |   |
|                            32 bit                                 |   |
|-------------------------------------------------------------------|   |
|                     Destination IP Address                        |   |
|                            32 bit                                 |   |
|-------------------------------------------------------------------|  --- 
|	                  Options (Optional)                        |
\                          [variable size]                          \
---------------------------------------------------------------------
|                             Data                                  |
\                                                                   \
---------------------------------------------------------------------

The limiting factor is the length field of the header which is 16bits.
Therefore, 2^16=65536 is the maximum size of an IP datagram, and this 
includes the header. That being said, an IP datagram of this size
will usually be fragmented along the way. The MTU (Maximum 
Transmission Unit) for Ethernet is 1500bytes, so an IP datagram
of 2^16bytes would need to be fragmented to fit in an Ethernet frame.
If ping is implemented using ICMP (as opposed to UDP), the IP datagram 
will have an additional ICMP message field, which for ping is 8bytes.
so 2^16 - 20*8 - 8*8 = 65312 will be the maximum size of data that
can be included with a ping, excluding the IP header and ICMP message.

-Ross


> I have a ping question maybe someone can shed some light on. I've been
> fooling around with changing packet data size for ping to do some
> tests.  Anyway, I've noticed I can not send data larger than 65467 plus
> 8 bytes for a header ... total 65475.  Anything larger is said to be too
> big.  
> 
> Now ICMP is in the same layer as IP right?  Below that we are
> essentially down to the physical layer putting stuff into frames.  What
> is causing the 65467 limit on the size of the ping? ... frames??? 
> 
> Greg
> 
> -- 
> It said use Windows 98 or better so I installed Linux.
> _______________________________________________
> oclug mailing list
> oclug at lists.oclug.on.ca
> http://www.oclug.on.ca/mailman/listinfo/oclug
> 




More information about the OCLUG mailing list