Wednesday, September 14, 2011

Packet flow in Network

DATA FLOW
A typical data flow which we deal with on daily bases in our homes and offices is like this:
Host A -> Switch -> Router R -> Switch -> Host B
  1. The 1.x host A wants to send to 2.x host B.
  2. Host A realises B is on a different network judging from the subnet mask and ip addresses and knows it need help from a router.
  3. Host A does an ARP operation to find out the MAC address of its default gateway, which is a router R.
  4. Host A sends to router R with source MAC = A‘s MAC and destination MAC = R‘s MAC. The switches in between them pass the frames intact.
  5. Router R sends to host B through the switch in between, rewriting the source MAC to R‘s MAC and the destination MAC to B‘s MAC (before this it should have an ARP entry of host B; otherwise it would do an ARP operation to find out B‘s MAC).

packet creation layer  from url type to page opening ? how pkt flows ? if there are 2 router in subnet ?
when is dns query fired ???