• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 123
  • Last Modified:


what happens at every step of our network model, when a node on one network establishes a TCP connection with a node on another network. You can assume that the two networks are both connected to the same router...... how it works?
Khushboo Yadav
Khushboo Yadav
  • 2
2 Solutions
Martin MillerCTOCommented:
Hi  Khushboo,

I feel you're asking about the TCP/IP protocol, here is a link to explain that. Is there something else you need ?


With regards to two nodes on the same network, there is a session there is a session setup, as part of the protocol,  and then communication flows.
atlas_shudderedSr. Network EngineerCommented:
Khush -

Assuming you are asking what actually happens in order to get a packet from a to b on separate networks:

Host A - Sender
Host B - Receiver

Host A - Initiate Network Data Transfer
Host A - Host Lookup - (DNS, Hostfile, etc.) for network address resolution
Host A - First packet - session request - negotiate - data to transfer
Host A - Evaluate Host B address to determine local or remote (Anding operation against Host A IP address and mask)
Host A - After determining B is remote begins encapsulation process and pushing down through stack
Host A - ARP for gateway MAC.  Perform Lookup, if gateway MAC is known, continue.  If not, ARP Broadcast Request to local subnet to determine.  If received, continue.  If not - return gateway unknown, general protocol failure
Host A - (Layer 3) Creates Packet   Source IP is local, Destination IP is Host B IP address
Host A - (Layer 2) Creates Frame - Source MAC is Host A local, Destination is Gateway MAC
Host A - (Layer 1) Full encapsulation - bit encode and transmit to gateway
Gateway - (Layer 1) Receive frames, evaluate packet
Gateway - (Layer 3) Evaluate Dest IP.  Perform Route Lookup.  If Route known - sequence, otherwise send to default route/interface
Gateway - ARP process as above at Host A but for Host B MAC
Gateway - (Layer 3) Packets remain unchanged - push to outbound interface and re-encode to Layer 2
Gateway - (Layer 2) Packet segmented to Frames - Frame re-addressed - Source becomes Gateway exit interface MAC, Dest become Host B MAC
Gateway - (Layer 1) Full encapsulation - bit encode and transmit to Host B
Host B - (Layer 1) data received - session request - negotiate, windowing negotiated between A and B
Host B - data exchange begins, each packet - send ACK
Host A - Final ACK received - End transmitted - tear down session
Host B - End received - tear down session
Martin MillerCTOCommented:
Kush, Can we close this question?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now