0x90
0x90

Reputation: 40982

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

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

Upvotes: 6

Views: 3500

Answers (3)

Joel
Joel

Reputation: 2824

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.

Upvotes: 5

PinnyM
PinnyM

Reputation: 35533

You are confusing the TCP packet information (transport layer) with the IP wrapper (network layer). The ip address is contained as part of the outer IP packet wrapper.

Upvotes: 3

Kyle Jones
Kyle Jones

Reputation: 5532

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

Upvotes: 7

Related Questions