Difference between revisions of "IPv4"

From Ilianko
 
(9 intermediate revisions by the same user not shown)
Line 46: Line 46:
  
 
==Total Length==
 
==Total Length==
Total Length is the length of the datagram, measured in octets,
+
 
 +
Дължината на дейтаграмата, измерва се в октети (байтове). Включва интернет хедъра и данните. Максималната дължина на дейтаграмата е 65 535 октета.
 +
 
 +
Минималната допустима дължина е 576 октета.
 +
 
 +
<!-- Total Length is the length of the datagram, measured in octets,
 
     including internet header and data.  This field allows the length of
 
     including internet header and data.  This field allows the length of
 
     a datagram to be up to 65,535 octets.
 
     a datagram to be up to 65,535 octets.
Line 52: Line 57:
 
All hosts must be prepared
 
All hosts must be prepared
 
     to accept datagrams of up to 576 octets
 
     to accept datagrams of up to 576 octets
 +
 +
-->
  
 
==Identification==
 
==Identification==
Line 57: Line 64:
  
 
An identifying value assigned by the sender to aid in assembling the fragments of a datagram.
 
An identifying value assigned by the sender to aid in assembling the fragments of a datagram.
*Flags:  3 bits
 
**Bit 0: reserved, must be zero
 
**Bit 1: (DF) 0 = May Fragment,  1 = Don't Fragment.
 
**Bit 2: (MF) 0 = Last Fragment, 1 = More Fragments.
 
  
 +
This field is used for uniquely identifying the IP datagrams. This value is incremented every-time an IP datagram is sent from source to the destination. This field comes in handy while reassembly of fragmented IP data grams.
 +
 +
==Flags==
 +
 +
Flags:  3 bits
 +
*Bit 0: reserved, must be zero
 +
*Bit 1: (DF) 0 = May Fragment,  1 = Don't Fragment.
 +
*Bit 2: (MF) 0 = Last Fragment, 1 = More Fragments.
 
           0  1  2
 
           0  1  2
 
         +---+---+---+
 
         +---+---+---+
Line 67: Line 78:
 
         | 0 | F | F |
 
         | 0 | F | F |
 
         +---+---+---+
 
         +---+---+---+
 
 
*Fragment Offset:  13 bits
 
*Fragment Offset:  13 bits
 
This field indicates where in the datagram this fragment belongs. The fragment offset is measured in units of 8 octets (64 bits). The first fragment has offset zero.
 
This field indicates where in the datagram this fragment belongs. The fragment offset is measured in units of 8 octets (64 bits). The first fragment has offset zero.
 +
 +
==Time To Live ==
 +
8 bits
 +
 +
This field indicates the maximum time the datagram is allowed to
 +
    remain in the internet system.  If this field contains the value
 +
    zero, then the datagram must be destroyed.  This field is modified
 +
    in internet header processing.  The time is measured in units of
 +
    seconds, but since every module that processes a datagram must
 +
    decrease the TTL by at least one even if it process the datagram in
 +
    less than a second, the TTL must be thought of only as an upper
 +
    bound on the time a datagram may exist.  The intention is to cause
 +
    undeliverable datagrams to be discarded, and to bound the maximum
 +
    datagram lifetime.
 +
==Protocol==
 +
8 bits
 +
 +
This field indicates the next level protocol used in the data
 +
    portion of the internet datagram.  The values for various protocols
 +
    are specified in "Assigned Numbers"
 +
 +
==Header Checksum==
 +
 +
[[Category:Компютърни мрежи]]
 +
 +
==Protocol==
 +
8 bits
 +
 +
http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml
 +
 +
This field indicates the next level protocol used in the data
 +
    portion of the internet datagram.  The values for various protocols
 +
    are specified in "Assigned Numbers"
 +
 +
==Header Checksum==
 +
 +
 +
==Options==
 +
    The options might not end on a 32-bit boundary.  The internet header
 +
    must be filled out with octets of zeros.  The first of these would
 +
    be interpreted as the end-of-options option, and the remainder as
 +
    internet header padding.
 +
 +
    Every internet module must be able to act on every option.  The
 +
    Security Option is required if classified, restricted, or
 +
    compartmented traffic is to be passed.
 +
 +
 +
==Links==
 +
[[frame]]

Latest revision as of 14:04, 22 June 2013

Version

Internet header lenght

Type of service

Type of Service: 8 bits

   The Type of Service provides an indication of the abstract
   parameters of the quality of service desired.  These parameters are
   to be used to guide the selection of the actual service parameters
   when transmitting a datagram through a particular network.  Several
   networks offer service precedence, which somehow treats high
   precedence traffic as more important than other traffic (generally
   by accepting only traffic above a certain precedence at time of high
   load).  The major choice is a three way tradeoff between low-delay,
   high-reliability, and high-throughput.
     Bits 0-2:  Precedence.
     Bit    3:  0 = Normal Delay,      1 = Low Delay.
     Bits   4:  0 = Normal Throughput, 1 = High Throughput.
     Bits   5:  0 = Normal Relibility, 1 = High Relibility.
     Bit  6-7:  Reserved for Future Use.
        0     1     2     3     4     5     6     7
     +-----+-----+-----+-----+-----+-----+-----+-----+
     |                 |     |     |     |     |     |
     |   PRECEDENCE    |  D  |  T  |  R  |  0  |  0  |
     |                 |     |     |     |     |     |
     +-----+-----+-----+-----+-----+-----+-----+-----+
       Precedence
         111 - Network Control
         110 - Internetwork Control
         101 - CRITIC/ECP
         100 - Flash Override
         011 - Flash
         010 - Immediate
         001 - Priority
         000 - Routine
   The use of the Delay, Throughput, and Reliability indications may
   increase the cost (in some sense) of the service.  In many networks
   better performance for one of these parameters is coupled with worse
   performance on another.  Except for very unusual cases at most two
   of these three indications should be set.

Total Length

Дължината на дейтаграмата, измерва се в октети (байтове). Включва интернет хедъра и данните. Максималната дължина на дейтаграмата е 65 535 октета.

Минималната допустима дължина е 576 октета.


Identification

16 bits

An identifying value assigned by the sender to aid in assembling the fragments of a datagram.

This field is used for uniquely identifying the IP datagrams. This value is incremented every-time an IP datagram is sent from source to the destination. This field comes in handy while reassembly of fragmented IP data grams.

Flags

Flags: 3 bits

  • Bit 0: reserved, must be zero
  • Bit 1: (DF) 0 = May Fragment, 1 = Don't Fragment.
  • Bit 2: (MF) 0 = Last Fragment, 1 = More Fragments.
         0   1   2
       +---+---+---+
       |   | D | M |
       | 0 | F | F |
       +---+---+---+
  • Fragment Offset: 13 bits

This field indicates where in the datagram this fragment belongs. The fragment offset is measured in units of 8 octets (64 bits). The first fragment has offset zero.

Time To Live

8 bits

This field indicates the maximum time the datagram is allowed to

   remain in the internet system.  If this field contains the value
   zero, then the datagram must be destroyed.  This field is modified
   in internet header processing.  The time is measured in units of
   seconds, but since every module that processes a datagram must
   decrease the TTL by at least one even if it process the datagram in
   less than a second, the TTL must be thought of only as an upper
   bound on the time a datagram may exist.  The intention is to cause
   undeliverable datagrams to be discarded, and to bound the maximum
   datagram lifetime.

Protocol

8 bits

This field indicates the next level protocol used in the data

   portion of the internet datagram.  The values for various protocols
   are specified in "Assigned Numbers"

Header Checksum

Protocol

8 bits

http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml

This field indicates the next level protocol used in the data

   portion of the internet datagram.  The values for various protocols
   are specified in "Assigned Numbers"

Header Checksum

Options

   The options might not end on a 32-bit boundary.  The internet header
   must be filled out with octets of zeros.  The first of these would
   be interpreted as the end-of-options option, and the remainder as
   internet header padding.
   Every internet module must be able to act on every option.  The
   Security Option is required if classified, restricted, or
   compartmented traffic is to be passed.


Links

frame