Visualizzazione post con etichetta Structure. Mostra tutti i post
Visualizzazione post con etichetta Structure. Mostra tutti i post

sabato 5 aprile 2014

IP Address - IPv6 Header

Hello everybody,

welcome to this new lesson about of networking topics, today we'll cover how IPv6 packet is composed. As perhaps the majority of readers will know the IPv6 has taken hold because the IPv4 addresses are over, so that the computer scientist have decided to create the IPv6 address, and this time the address space is very large because the IPv6 address has 128 bit. Well now explain some things... the IPv6 address use the hexadecimal values so represented in figure below:


This is a structure of IPv6 address where 'X' is switched with 2001:0DB8:AC10:FE01:0000:0000:0000:0000, now see that is a long address and is boring copy when setting a net-device we can use some simple rules:


  1. Zero Omitting: we can remove all zeros in address then the 0DB8 become: DB8.
  2. Omitting segment zeros: The segments zeros are represented of that pile of zeros 0000:0000:0000:0000 how we can delete it? It's simple! We can delete with the omitting segment zeros. 
So that when we write an IPv6 address, we represent in this form: 

2001:DB8:AC10:FE01::

But a warning, when you use the segment omitting, you can use only one time. Now we move on header of this packet. In this packet we can found
some modifications to the header, let's see.
  
IPv6 HEADER 
The IPv6 header has this structure:

Version (4 bit): This field is 4 binary value. In this field we can find the IPv6 version, infact this field is always set to 0110.

Traffic Class (8 bit): This field is 8 binary value. This field is used for the management priority of packet. The 6 most-significant bits are used for differentiated services, which is used to classify packets while the remaining two bits are used for ECN (Explicit Congestion Notification).

Flow Label (20 bit): This field is used by the sender to identify a sequence of packets as if they were in the same flow. Supports the management of QoS, but for now this field is still in an experimental stage.

Payload Lenght (16 bit): This field instead is used for understand the lenght of packet. Then it represents the number of bytes of everything that comes after the header.

Next Header (8 bit): This field is very similar to the protocol field of the IPv4 header, which uses the same values. Because this field is used for understand the type of header follows the basic IPv6 header.

Hop Limit (8 bit): This field deals of the TTL jumps. Let me explain better the limit of jumps allowed. This field is decremented to 1 each time that the packet passes by a router when it reaches zero is discarded (deleted).

Source Address (128 bit): This field is source address or sender of a letter.

Destination Address (128 bit): This field is destination address or receiver of a letter. 

Bye,

Tefnut.

mercoledì 26 marzo 2014

IP Address - IPv4 Header

Hello everybody,

welcome to this lesson for learning how IP packet is composed when it travel on network. The IP packet that we will to analyze, will the IPv4 for now, while in next lesson will the IPv6 packet (I’ll explain both so that you don’t have holes in knowledge). First thing is that the IP address it’s born when ARPANET was born, then in 1983, ARPANET is the precursor of actually Internet. The IPv4 has two section:

  • IP Header
  • Payload

The IP Header are the characteristic of packet, while the Payload contains the Layer 4 segment information and the actual data. Well now, the most important thing is that you have very clear, the scheme of IPv4, look the figure given below:




Ok, let me explain now the situation… In IPv4 packet we have various fields, that is important for transmission between two computer! The first field is:

    Version (4 bit): This field is 4 binary value. In this field we can find the IPv4 version (then 4 or 6) infact for IPv4 packets, this field is always set to 0100.

    Differentiated Services/Type of Service (8 bit): This field instead is 8 bit, and is responsable of QoS mechanism and the priority of each packets. To better specify is work I would tell you, that the first 6 bits are responsable of Differentiated Services Code Point (DSCP) and are used precisely for Quality of Service. While the last 2 bits is used to identify Explicit Congestion Notification (ECN) to prevent some decrease in network during network congestions.

    Time-to-Live (8 bit): Time to Live or TTL contain 8 bit and it used for with program traceroute which router is used between PC1 and PC2. While in IP packet is used to limits the lifetime of data in a network. Or is used to determines the maximum number of routers between a communication between two hosts. If TTL decreases to zero, an packet of ICMP, send a Time Exceed message.

    Protocol (8 bit): This field contain 8 bit of value, and indicate the data payload that is necessary to pass data at upper-layer. The common values used on this field is: TCP(6), UDP (17) and ICMP is (1).

    Source Address (32 bit): This field contain 32 bit, because the IPv4 is formed of 32 bits. This field represent the source address, where the packet is trasmitting or where the packet is originated. In simple terms the Source Address field, for a letter is the sender.

    Destination Address (32 bit): This field contain always 32 bit, but this field represent the destination address, where the packet arrive or recipient for a letter.

    Internet Header Length (IHL – 4 bit): This field contain 4 bit, and it is used for determine the length of header of a datagram, is expressed in words of 32 bits. This length can range from 5 word to 15 words.

    Total Length (16 bit): This field is composed by 16 bits and identifies the size of entire packet including the header and data. This field can range from 20 byte to 65535 byte (that is maximum size).

    Identification (16 bit): This field has 16 bit, and it’s responsable for identification in uniquely mode the fragment of an original packet. In addition to this, this field can keep track of packets.

    Flags (3 bit): This field has 3 bit, and it’s responsable of how packet is fragmented. Infact this field has 3 sub-fields:

    Reserved: This field is always set to 0.

    DF (Don’t Fragment): This field if is set to 1 means that the packet must not be fragmented, but let us ask ourselves a question… if the packet is not fragmented, what happens? It happens that, if the packet can’t be fragmented and forwarded at an host, the packet is simple discarded.
    MF (More Fragments): This field if it set to 0, it’s responsable to tell that’s the last fragment or the only original fragment. Then the other fragments have the MF (More Fragments) bit set to 0.

    Fragment Offset (13 bit): This field is composed by 13 bits, and his work is of identifying the order in which to place the packet fragment in the reconstruction of the original fragmented packet.

    Header Checksum (16 bit): This field has 16 bit, and it’s responsible for the resolving of errors in the header of the IP. If the resolution of the errors doesn’t matching with the correct value, the packet is simply discarded.

The Options and Padding fields are rarely used, so I don’t post them here. If you need an explanation, you need only ask, in comments. I hope that my lesson you liked it, and we’ll read at the next lesson.

Bye,

Tefnut.