3 ms·
That's an IP packet. There's no such thing as "TCP packets". IP packets can encapsulate various things depending on how you set their protocol fields. But pack
by AStonesThrow 2y ago
That's an IP packet. There's no such thing as "TCP packets".
IP packets can encapsulate various things depending on how you set their protocol fields. But packets are not TCP. This is quite straightforward. It simply has to do with distinct PDU nomenclature at each layer.
You can have Ethernet frames carrying IP packets too, but they are not "Ethernet packets"; that would be absurd.
- simeonmiteff 2y agoNo, the nomenclature is not consistent at each layer. Another layer down, IEEE 802.3 names the complete message (i.e., including preamble, SFD and FC) that an Ethernet PHY sends to an Ethernet MAC (which processes "frames")... a packet! "TCP packet" is correct.
- adrian_b 2y agoThe IP packets are divided into many kinds, based on the higher-level protocol that they carry, i.e. based on the type of the header that follows the IP header. Thus there are ICMP packets, UDP packets, TCP packets, IPsec packets and so on. Everybody who has anything to do with network management understands that when it is said "ICMP packet", "IPsec packet", "TCP packet" and so on, what is meant is "IP packet carrying the ICMP/IPsec/TCP protocol". When you manage or monitor network traffic, you see and examine IP packets of various kinds. Nobody cares about how a TCP stream happened to be partitioned in TCP segments. That may be interesting only for those who look on the other side of a TCP socket, its internal side, i.e. those who debug some program that communicates through TCP and which may have some throughput or latency problems. The Ethernet frames are also divided into many kinds based on the protocol that they carry, which may be ARP, IP, IPX and so on. For more consistency, those could have been called ARP, IP, IPX etc. frames, but they are also usually called ARP, IP, IPX etc. packets. The reason is that frame and packet are almost synonymous terms. One or the other has been preferred depending on the organization that has prepared a standard.
- AStonesThrow 2y ago> when it is said "ICMP packet", "IPsec packet", "TCP packet" and so on, what is meant is "IP packet carrying the ICMP/IPsec/TCP protocol". But an "IP packet carrying TCP" is totally different from a "TCP segment", and so why the fuck is everyone trying to muddy the waters in this regard? Likewise, "an Ethernet frame with IP stuff in it" is not an IP packet. Because it's at a lower layer!!! Due to fragmentation, these higher protocol layers can be split up into two or more PDUs at lower levels. They are reassembled as steps to decoding the protocol. A TCP stream, made of multiple segments, will surely be split up across multiple IP packets. Even a single TCP segment is never guaranteed to map 1:1 with a single IP packet. That's why you can't equate them, and that's why it's idiotic to try and force the wrong PDU terminology in the wrong layer, because they simply don't match up, and you confuse newbies into believing these things are equivalent or interchangeable. They are not! A TCP segment is a thing in its own right. It is not equivalent to an IP packet with protocol 6. Why is that a crazy idea to y'all?
- lxgr 2y ago> A TCP segment is a thing in its own right. It is not equivalent to an IP packet with protocol 6. Why is that a crazy idea to y'all? Nobody is claiming they're the same in this thread, as far as I can tell. "TCP packet" is simply a pretty clear/unambiguous contraction of "an IP packet carrying TCP", or "an IP packet containing a TCP segment", to me.
- adrian_b 2y agoYes you are right that an "IP packet carrying TCP" is totally different from a "TCP segment". Like I have explained, this is precisely the reason why we need two different terms, "TCP packet" and "TCP segment", to name the two different things. There exists no 1-to-1 mapping between TCP packets and TCP segments. It is frequent for a TCP segment to span multiple TCP packets. Muddying the waters would be if the same term would be used for the two different things. When two different things have two different names, the waters are clear. Likewise, there is a 1-to-1 mapping between the "Ethernet frame with IP stuff in it" and the IP packet contained inside the Ethernet frame (ignoring the distinction between complete IP packets and fragmented IP packets, which has been removed in IPv6). The IP packet is obtained by deleting or ignoring the Ethernet header & CRC, while the Ethernet frame is obtained by adding to the IP packet the Ethernet header and CRC. Because of the 1-to-1 mapping, there is no risk of confusion when using a term like "IP packet", regardless whether you speak about the IP packet alone, as existing in the memory before being sent or after reception, on about the IP packet as existing on the communication links or in some tool for network monitoring/sniffing, where it is encapsulated in the Ethernet frame. Similarly for an ARP packet or any other kind of packet that can be encapsulated in an Ethernet frame.
- icedchai 2y agoOkay, let's call them "IP packets with protocol 6 (TCP) in the header." Does that make it clearer?
- lxgr 2y ago> You can have Ethernet frames carrying IP packets too, but they are not "Ethernet packets"; that would be absurd. Yes, because "Ethernet packet" would be the wrong way around, layer wise. The pattern is "x y", short for "an y of type x" or "an y containing x" in this case. It would be "IP frames" by analogy, i.e. Ethernet frames containing IP packets, although I do find that association a bit harder to make.