01-10-2018 11:14 PM - edited 03-05-2019 09:44 AM
01-10-2018 11:35 PM
Packet flow would be below.
1) PC-1 will calculate its subnet and see that PC-2 is out of local network so it will send an ARP request to get MAC address of gateway and then PC-1 will send packet with below details to Router-1.
Src-IP = PC-1
Dst-IP = PC-2
Src-Mac = PC-1
Dst-Mac = Router-1 (Fa0/0)
2.) Now router has received packet on interface fa0/0 from pc-1 so it will first check DST-IP which is PC-2 and match this IP with a network-ID in its routing table. it will see that to reach 30.1.1.2 packet needs to be forwarded to router-2 because routes point towards router-2. so router-1 will re-write L2 header with below details and send it to router-2.
Src-IP = PC-1
Dst-IP = PC-2
Src-Mac = Router-1 ( S1/0 )
Dst-Mac = Router-2 ( S1/0 )
3. Now router-2 has received the packet so now it will again do the same thing which router-1 did upon receving packet from PC-1, and it will see that DST-IP 30.1.1.2 belongs to network 30.1.1.0/24 which is connected to f0/0 interface so now it will again re-write L2 header with below details and forward to interface F0/0.
Src-IP = PC-1
Dst-IP = PC-2
Src-Mac = Router-2 ( F0/0 )
Dst-Mac = PC-2
4. Now PC-2 has received this packet so first it will compare Dst-Mac received in packet with its own Mac and if it matches then it will match Dst-IP from same packet to its own IP and if both things matchs then it will accpet the packet and process it towards application layer.
if you have any specific question let me know or please mark the answer as solved.
01-10-2018 11:35 PM
Packet flow would be below.
1) PC-1 will calculate its subnet and see that PC-2 is out of local network so it will send an ARP request to get MAC address of gateway and then PC-1 will send packet with below details to Router-1.
Src-IP = PC-1
Dst-IP = PC-2
Src-Mac = PC-1
Dst-Mac = Router-1 (Fa0/0)
2.) Now router has received packet on interface fa0/0 from pc-1 so it will first check DST-IP which is PC-2 and match this IP with a network-ID in its routing table. it will see that to reach 30.1.1.2 packet needs to be forwarded to router-2 because routes point towards router-2. so router-1 will re-write L2 header with below details and send it to router-2.
Src-IP = PC-1
Dst-IP = PC-2
Src-Mac = Router-1 ( S1/0 )
Dst-Mac = Router-2 ( S1/0 )
3. Now router-2 has received the packet so now it will again do the same thing which router-1 did upon receving packet from PC-1, and it will see that DST-IP 30.1.1.2 belongs to network 30.1.1.0/24 which is connected to f0/0 interface so now it will again re-write L2 header with below details and forward to interface F0/0.
Src-IP = PC-1
Dst-IP = PC-2
Src-Mac = Router-2 ( F0/0 )
Dst-Mac = PC-2
4. Now PC-2 has received this packet so first it will compare Dst-Mac received in packet with its own Mac and if it matches then it will match Dst-IP from same packet to its own IP and if both things matchs then it will accpet the packet and process it towards application layer.
if you have any specific question let me know or please mark the answer as solved.
01-11-2018 12:54 AM
Thankyou sir for the detailed explanation.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide