Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relationship between TCP and IP Packets

Tags:

tcp

ip

router

So I have trouble finding a source that describes whether the TCP Packet is the payload of the IP Datagram or vice versa. I imagine the TCP Packet must be the payload because presumably the router can divide the IP Datagram therefore splitting up the TCP Packet and then the final router would have to reassamble them. Am I right?

like image 408
yyg Avatar asked Sep 04 '25 17:09

yyg


1 Answers

If by "payload" you're referring to the data that comes after an IP header, then TCP is the "payload" of an IP packet when receiving data, since it's an upper level protocol.

The proper term for networking is actually encapsulation though.

It basically works by adding on progressive layers of protocols as information travels down from the application to the wire. After transmission, the packets are re-assembled and then the packets are error checked, the headers are stripped off, and what you are referring to as the "payload" becomes the next chunk of information that is checked. Once all of the outer protocol layers are stripped off the server/client has the information that directly corresponds to what the application sent.

like image 103
photoionized Avatar answered Sep 07 '25 17:09

photoionized