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.
"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?
Re: Datagram vs Packet, Packet vs Frame
11 years 1 month ago #22014
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
NOTEIP 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..
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.
Re: Datagram vs Packet, Packet vs Frame
11 years 1 month ago #22154
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.