What happens when an IP packet reaches a router

What happens when an IP packet reaches a router

 

In the above diagram, PC1 is configured with the IP address 192.168.1.2 and subnet mask 255.255.255.0. The router is configured with the IP address 192.168.1.3 and subnet mask 255.255.255.0. When PC1 pings the IP address of the router, the source IP address in the IP packet is 192.168.1.2 and the destination IP address in the IP packet would be 192.168.1.3. The IP packet is encapsulated in an ethernet frame, which would have the source mac- address as that of PC1 and destination mac-address as that of the routers interface configured with the IP address 192.168.1.3. When the packet reaches the router, the router would look into the destination mac-address inside the frame. After verification, the router would look into the destination IP address inside the packet. It would then understand that the packet is intended for itself, and would then process the upper layer of the packet.

—————————————————————————————————————————————-

The above content is a sample preview from the Ebook

Routing & Switching

 

Routing & Switching Fundamentals

Price $5.99