Packet Flow and Processing
Packet Flow
 To deliver the packet to the destination host, the
source IP, destination IP, source MAC address
and destination MAC address should be known.
Some basic rules for the packet flow:
 If the destination host is present in the same
network, then the packet is delivered directly to
the destination host.
 If the destination host is present in a different
network then the packet is delivered to the
default gateway first which in turn delivers the
packet to the destination host.
 If ARP is not resolved then ARP will be resolved
first.
Example:
we will try to ping from Host A to Host B and will check the packet
flow at each link
 At the very beginning of this communication when
we first power on the devices there a Gratuitous
ARP frame sent out from Host A which will have
below packet structure.
The destination address is a broadcast address and hence once switch will
receive this packet it will forward it through all its port. Immediately after
the GARP we see the ARP comes to switch from Host A looking to IP-MAC
mapping for its default gateway address 10.1.1.2
Switch also updates its CAM table with MAC addresses as below:
When GARP frame is received switch 1 gets to know that Host A MAC address
connects to interface E0/0.When ARP replies comes from router switch 1 also
learns Router’s E0/0 interface address on its E0/1 port.
This same procedure happens on the second leg where Router 2, Switch 2 and
Host B connect.
Now when we try to ping from 12.1.1.2 from 10.1.1.1 an AND Ping operation is
performed by Host A based on which Host A comes to know the network lies in
different network and hence it forwards the packet to its Default Gateway. When
this packet crosses the switch 1 it will simply forward the packet without
changing anything.
Here we see when packet traverses from Router 1 to Router 2 only
the source and destination MAC addresses are changed but src-dst
IP remain the same
The same way packet travels back from Host B to Host A
where now the Dst IP is 10.1.1.1 and Src IP is 12.1.1.2.
Web Resources
 https://www.youtube.com/watch?v=rYodcvhh7b8
 https://ipwithease.com/what-is-operating-system-
and-its-functions-2/
 https://www.geeksforgeeks.org/packet-flow-in-
different-network/

Routing - packet flowing and processing.

  • 1.
    Packet Flow andProcessing
  • 2.
    Packet Flow  Todeliver the packet to the destination host, the source IP, destination IP, source MAC address and destination MAC address should be known. Some basic rules for the packet flow:  If the destination host is present in the same network, then the packet is delivered directly to the destination host.  If the destination host is present in a different network then the packet is delivered to the default gateway first which in turn delivers the packet to the destination host.  If ARP is not resolved then ARP will be resolved first.
  • 3.
    Example: we will tryto ping from Host A to Host B and will check the packet flow at each link
  • 5.
     At thevery beginning of this communication when we first power on the devices there a Gratuitous ARP frame sent out from Host A which will have below packet structure.
  • 6.
    The destination addressis a broadcast address and hence once switch will receive this packet it will forward it through all its port. Immediately after the GARP we see the ARP comes to switch from Host A looking to IP-MAC mapping for its default gateway address 10.1.1.2
  • 7.
    Switch also updatesits CAM table with MAC addresses as below: When GARP frame is received switch 1 gets to know that Host A MAC address connects to interface E0/0.When ARP replies comes from router switch 1 also learns Router’s E0/0 interface address on its E0/1 port. This same procedure happens on the second leg where Router 2, Switch 2 and Host B connect. Now when we try to ping from 12.1.1.2 from 10.1.1.1 an AND Ping operation is performed by Host A based on which Host A comes to know the network lies in different network and hence it forwards the packet to its Default Gateway. When this packet crosses the switch 1 it will simply forward the packet without changing anything.
  • 10.
    Here we seewhen packet traverses from Router 1 to Router 2 only the source and destination MAC addresses are changed but src-dst IP remain the same
  • 12.
    The same waypacket travels back from Host B to Host A where now the Dst IP is 10.1.1.1 and Src IP is 12.1.1.2.
  • 13.
    Web Resources  https://www.youtube.com/watch?v=rYodcvhh7b8 https://ipwithease.com/what-is-operating-system- and-its-functions-2/  https://www.geeksforgeeks.org/packet-flow-in- different-network/