Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How comes a TCP packet doesn't contains the source and destination IPs?

Tags:

tcp

ip

From here cisco says the TCP packets doesn't contains the source IP and destination IP? how the network layer knows tho thich IP send the packet and who has to get the ack back?

enter image description here

like image 350
0x90 Avatar asked Dec 13 '22 03:12

0x90


2 Answers

TCP is typically run atop IP, and IP addresses are stored within the IP part of the packet that encapsulates the TCP part.

like image 138
Kyle Jones Avatar answered May 14 '23 22:05

Kyle Jones


A TCP packet goes inside of an IP packet. The IP header specifies the source and destination addresses, among other things. See this diagram. Here, the TCP data would be inserted into the data position.

like image 27
Joel Avatar answered May 15 '23 00:05

Joel