Difference between revisions of "Packet"

From Hackepedia
Jump to navigationJump to search
m (typo again)
m
Line 1: Line 1:
 
A packet is a construct of bits or bytes that gets sent over [[LAN]] or [[WAN]] links in order to make the [[internet]] work.  A packet holds the data used in telecommunication.  A packet, also called a frame, has a header and a body (or payload).  Inside the header there is a destination and a source address.  Given that information a [[router]] knows where to send the packet and if it doesn't know it'll send a reply packet indicating the error (see [[ICMP]]).
 
A packet is a construct of bits or bytes that gets sent over [[LAN]] or [[WAN]] links in order to make the [[internet]] work.  A packet holds the data used in telecommunication.  A packet, also called a frame, has a header and a body (or payload).  Inside the header there is a destination and a source address.  Given that information a [[router]] knows where to send the packet and if it doesn't know it'll send a reply packet indicating the error (see [[ICMP]]).
 +
 +
== IPv4 Packet ==
 +
 +
An IPv4 packet has a header minimally 20 bytes long and maximum 60 bytes long.  In its body it usually carries a [[TCP]] or [[UDP]] packet that has its own tcp header and payload.  The header of an IPv4 packet has to be on a 4 byte boundary, this means that the packet header length could be 28 but not 26.  Just think of the allowed length to be a multiple of four.
 +
 +
 +
== IPv6 Packet ==
 +
 +
An IPv6 packet has a header 40 bytes long.  Unlike having options like an IPv4 packet, an IPv6 packet can have multiple headers all which have their own size.  An IPv6 header has to be on an 8 byte boundary.

Revision as of 14:03, 12 August 2009

A packet is a construct of bits or bytes that gets sent over LAN or WAN links in order to make the internet work. A packet holds the data used in telecommunication. A packet, also called a frame, has a header and a body (or payload). Inside the header there is a destination and a source address. Given that information a router knows where to send the packet and if it doesn't know it'll send a reply packet indicating the error (see ICMP).

IPv4 Packet

An IPv4 packet has a header minimally 20 bytes long and maximum 60 bytes long. In its body it usually carries a TCP or UDP packet that has its own tcp header and payload. The header of an IPv4 packet has to be on a 4 byte boundary, this means that the packet header length could be 28 but not 26. Just think of the allowed length to be a multiple of four.


IPv6 Packet

An IPv6 packet has a header 40 bytes long. Unlike having options like an IPv4 packet, an IPv6 packet can have multiple headers all which have their own size. An IPv6 header has to be on an 8 byte boundary.