Routing - packet flowing and processing.

shreybhatnagar2864 169 views 13 slides Mar 29, 2024
Slide 1
Slide 1 of 13
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13

About This Presentation

Packet flowing in router


Slide Content

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. MAC address never crosses its broadcast domain

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/