| Author |
Diferences between Datagrams and Segments
|
|
| jocampo 2003-01-27, 3:57 pm |
| Hi.
Checking my network monitor when i'm connected to internet i've found that the Datagrams send are equal to Datagrams Delivered, but Datagrams IN are not equal to the Datagrams OUT...¿why?....also, Segments Received are different to Segments Delivered. Could someone please explain this to me? And what's the main different between Datagrams and Segments.
Thanks a lot,
 | |
| Slinky 2003-01-27, 4:23 pm |
| Generally datagrams refer to UDP, and segments refer to TCP. As far as why the numbers are different, I can't explain that.  | |
|
| A segment is the PDU this is formed at the Transport layer when the data stream is segmented. This is then pasted down to the Network layer where the segment is encapsulated in a datagram (packet) this contains logical address information etc used for routing the packet (datagram) to the remote network. This is then passed down to the Data Link layer where the datagram is framed with information which includes physical addressing (MAC addresses). Finally the frame is passed down to the physical layer where it is broken down into bits ready to be placed on the physical network.
There is loads of info I've left out but that is a very basic look from segments to bits etc.
From all my studying the terms packet and datagram have been used interchangeably.
As for the difference in datagram's in to datagram's out. This is to do with the way TCP/IP works. You request a web page with only a few datagram's (three way handshake) and then the web server will send say four datagram's and your PC will send 1 acknowledgement that those four datagram's were received. So your receiving four times more datagram's than your sending. This is why most cable and xDSL connections are asynchronous as you normally receive more data (download) than you send (upload).
Sorry I got a bit carried away there. | |
|
|
|
| No. As your a client machine you should find that you have received more datagrams than you have sent. | |
| jocampo 2003-01-27, 6:41 pm |
| quote: Originally posted by Tronn
No. As your a client machine you should find that you have received more datagrams than you have sent.
Hi.
Check my post again, i edited it...

Well!!!!! i think i recall now, Segments received must be less than Sent because the 3 way handshake SYN process, right?....ok...i see ....but what about the IP values of Datagrams Send and Received? they have to be the same if there are no problems on the network? | |
|
| quote: Originally posted by jocampo
Hi.
Check my post again, i edited it...

Well!!!!! i think i recall now, Segments received must be less than Sent because the 3 way handshake SYN process, right?....ok...i see ....but what about the IP values of Datagrams Send and Received? they have to be the same if there are no problems on the network?
Also, depending on the sliding window size, you only send one ACK datagram for every 3 or 4 datagrams received.
As for your IP figures. I'm not really sure what that's measuring. Again I would have thought that amount sent would be less than the amount received.
Anybody else?  | |
| jocampo 2003-01-28, 3:31 pm |
| (IP)Datagramas received: 13257
(IP)Datagrams sent: 13257
(UDP)Datagrams In: 4790
(UDP)Datagrams Out: 5203
(TCP)Segments Received: 8378
(TCP)Segments Sent: 9046
Can someone please explain these values to me? They are taken from my Internet connection. why some of 'em are identicals...why some not......etc.... nobody??
 | |
| cutshaw 2003-01-28, 4:26 pm |
| "From all my studying the terms packet and datagram have been used interchangeably."
A datagram is a data packet that has had the network address added to it during the ecapsulation process.
A packet is a group of bits which encompasses a header, data, and trailer. | |
|
| quote: Originally posted by cutshaw
"From all my studying the terms packet and datagram have been used interchangeably."
A datagram is a data packet that has had the network address added to it during the ecapsulation process.
A packet is a group of bits which encompasses a header, data, and trailer.
But doesn't the encapsulation process include the addition of the header and trailer to the data (segment) with the header containing the network address?
From your description they still look very much like the same thing. Unless your saying that the header, which includes the source and destination network addresses, is added which makes a datagram. Then the trailer is added afterwards which then makes it a packet.
All very ambiguous if you ask me. | |
|
| On the subject of interchange ability of the terms Datagrams and Packets I've found this.
"A datagram, often called a packet, is much more atomic in nature. It is a small piece of data, often required to be less than a maximum length (typically in the 256 to 2000 byte range). Datagrams are completely self contained. They have a source and a destination, but nothing that could be called a connection. Datagrams have no relationship to any others that came before or after them."
This quote has been taken from this web page.
http://www.freesoft.org/CIE/Course/Section3/5.htm | |
| jocampo 2003-01-29, 2:01 am |
| Yeah! i have on my David Groth Net+ book that the term datagram and packet are the same...
 | |
| me? I dunno... 2003-01-29, 4:23 pm |
| quote: Datagrams are completely self contained. They have a source and a destination, but nothing that could be called a connection. Datagrams have no relationship to any others that came before or after them."
would that mean that UDP protocol would use datagrams instead of packets, in order to be asynchronous? | |
|
| The last few posts have been discussing the point that a datagram and a packet are the same thing. So to answer you question. No, UDP wouldn't use a datagram instead of a packet because they're the same thing. | |
| me? I dunno... 2003-01-29, 5:25 pm |
| quote: UDP wouldn't use a datagram instead of a packet because they're the same thing.
I bet as soon as I start reading up about this, I'll find out what the difference is between packets that are used in UDP, and packets that are used in TCp/Ip, and how those diffences enable sychronous versus asynchronous transmission, and at what cost in terms of performance and security, and why. I think I'm going to like networking | |
|
| I like the Data link layer with all it's different framing protocols and stuff. Like 802.3, SNAP, ethernet II and all the other bit's and pieces that go on in that layer.  |
|
|
|