Hot Downloads

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Datagram vs Packet, Packet vs Frame

Datagram vs Packet, Packet vs Frame 9 years 6 months ago #21999

  • Asesino
  • Asesino's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
1. Datagram vs Packet
What is the difference between datagram and packet?
I've read many articles about it but they don't give the same definitions.
For example:
wikipedia says:
"Reliable packets vs. unreliable datagrams..."
It means that packets are connected with TCP and datagrams with UDP.

In a book about networks I've found definition which says that datagram is packet with IP header.

2. Packet vs Frame
Theoretically Data Link Layer puts packet into frame by adding header and tail to the packet but how is it possible when you take into consideration CCSDS packet definition:
"
A packet is a block of data with length that can vary between successive packets, ranging from 7 to 65,542 bytes, including the packet header.

Packetized data are transmitted via frames, which are fixed-length data blocks. The size of a frame, including frame header and control information, can range up to 2048 bytes.
"
According to this, frame is smaller than packet, so how can you put packet into frame??


Could anyone explain this to me?
How terms segment,packet,datagram and frame are used in OSI model?
The administrator has disabled public write access.

Re: Datagram vs Packet, Packet vs Frame 9 years 6 months ago #22014

  • Smurf
  • Smurf's Avatar
  • Offline
  • Moderator
  • Posts: 1390
  • Karma: 1
Hello Asesino and welcome to the forum.

I will attempt to answer your question as follows;

The following is out of a fantastic book called "The TCP/IP Guide", ISBN 1-59327-047-X. I would recommend this book, its fantastic.

Anyhow, as i started to research a little more to get my head around this further as i wasn't 100% sure of the difference myself, i came to the conclusion that they just meant the same thing. Then i started getting further confussed as i read more. I then look at page 17 of the TCP/IP Guide where i found the following paragraph
Many networking technologies are based on packet switching, which involves the creation of small chunks of data to be sent over a network. Even though packet appears in the name of this method, the data items sent between networked devices are most generically called messages. Packet is one of a variety of similar words that are used in different contects to refer to messages sent from one device to another.
In some cases, the different terms can be very useful, because the name used to refer to a particular message can tell you something about what the message contains, as you will see shortly. In particular, different message names are usually associated with protocols and technologies operating at specific layers of the OSI Reference Model. Thus, the use of these different names can help clarify discussions that involve multiple protocols operating at different layers.
Unfortunately, these terms can also cause confusion, because they are not always applied in a universal or even consistent manner. Some people are strict about applying particular message designations only to the appropriate technologies where they are normally used, whille others use the different terms completely interchangeably. This means that you should be familar with the different message types and how they are normally used, but you should still be prepared for the unexpected.
The most common terms used for messages are the following:

Packet This term is consided by many to correctly refer to a message sent by protocols operating at the network layer of the OSI Reference Model. So you will commonly see people refer to [i/IP Packets[/i]. However, this termin is commonly also used to refer generically to any type of message, as i menitoned earlier.
Datagram This term is basically synonymous with packet and is also used to refer to network layer technologie. It is also often used to refer to a message that is sent at a higher level of the OSI Reference Model (more often than packet is).
Frame This term is most commonly associated with messages that travel at low levels of the OSI Reference Model. In particular, it is most commonly seen used in reference to data link layer messages. It is occasionally also used to refer to physical layer messages, when message formatting is performed by a layer 1 technology. A frame gets its name from the fact that it is created by taking higher-level packets or datagrams and "framing" them with additional header information needed at the lower level.
Cell Frames and packets, in general, can be of variable length, depending on their contents; in contrast, a cell is most often a message that is fixed in size. For example, the fixed-length, 53-byte messages sent in ATM are called cells. Like frames, cells are usually used by technologies operating at the lower layers of the OSI Model.
Protocol Data Unit (PDU) and Service Data Unit (SDU) These are the forumal terms used in the OSI Reference Model to describe protocol messages. A PDU at layer N is a message sent between protocols at layer N. It consists of layer N header information and an encapsulated message from layer N+1, which is called both the layer N SDU and the layer N+1 PDU. After you stop scratching your head, see the "Data Encapsulation, Protocol Data Units (PDU's), and Service Data Units (SDUs)" section in Chapter 5 for a discussion of this.

I should also point out that there are certain protocols that use unusual names, which aren't used elsewhere in the world of networking, to refer to their messages. One prominent example is TCP, which calls its messages segments.

In this book, i have made a specific effort not to imply anything about the nature of a message solely based on the name it uses, but i do follow the most common name used for a particular technology. For example, messages sent over Ethernet are almost always called Ethernet frames--they are not generally called Ethernet datagrams, for example. However, I do not structure discussions so that they type of name used for a message is the only way to determine what sort of message it is.

Also, from the same book, pg 330, you get this
NOTE IP datagrams are sometimes called IP packets. Whether datagram or packet is the preferred term seems to depend on whom you ask; even the standards don't use one term exclusively. On the other hand, I have seen IP datagrams called IP frames, and that's definetely not correct..

Basically, my general rule of thumb for this is;

Layer 2 - Ethernet Frames
Layer 3 - IP Packets
Layer 4 - Segments

Hope it helps

P.S. I would recommend that everyone gets the book highlighted above, its not exactly a book that you would read cover to cover (unless you really wanted to), however its a fantastic reference book.

Wayne
Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
The administrator has disabled public write access.

Re: Datagram vs Packet, Packet vs Frame 9 years 6 months ago #22021

  • TheBishop
  • TheBishop's Avatar
  • Offline
  • Moderator
  • Posts: 1719
  • Thank you received: 8
  • Karma: 5
Who publishes it smurf?
The administrator has disabled public write access.

Re: Datagram vs Packet, Packet vs Frame 9 years 6 months ago #22022

  • Smurf
  • Smurf's Avatar
  • Offline
  • Moderator
  • Posts: 1390
  • Karma: 1
Published by No Starch Press,US.

I think you can view the book online free of charge but i like to have it to hand in hard copy, well worth the money
Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
The administrator has disabled public write access.

Re: Datagram vs Packet, Packet vs Frame 9 years 6 months ago #22143

  • skepticals
  • skepticals's Avatar
  • Offline
  • Expert Member
  • Posts: 783
  • Karma: 0
I also have that book. I have not really used it yet. And, I agree that it would be hard to read cover to cover. I think it's around 1,500 pages. I like to know I have it for reference if I need it. Good suggestion.
The administrator has disabled public write access.

Re: Datagram vs Packet, Packet vs Frame 9 years 6 months ago #22154

  • Asesino
  • Asesino's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Let's get back to the topic.
Layer 2 Frames AGREE
Layer 3 Datagrams AGREE
Layer 4 Segments (for TCP)
but what with UDP (User Datagram Protocol)
Datagram or Segment?
Basicly name "datagram" is reserved for connectionless protocols.
So it match UDP.
What about packets? "Packets" is a general expresion and it is often used when talking about various layers.
That's what I know based on several articles, Smurf post (thanks) and RFC definitions.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.086 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup