Packet: Difference between revisions

From Hackepedia
Jump to navigationJump to search
Line 3: Line 3:
== IPv4 Packet ==
== IPv4 Packet ==


An IPv4 packet has a header minimally 20 bytes long and maximally 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.
An IPv4 packet has a header minimally 20 bytes long and maximally 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.  More about IPv4 packet headers in RFC 791.


== IPv6 Packet ==
== 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.  More about IPv6 packet headers in RFC 2460.
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.  More about IPv6 packet headers in RFC 2460.

Revision as of 04:04, 13 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 maximally 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. More about IPv4 packet headers in RFC 791.

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. More about IPv6 packet headers in RFC 2460.