Router vs Firewall
Lets check whats difference between a router and a firewall operations
In simple words Router do a job of Post Man and Firewall works as a Police Officer.
When router receive a packet, it checks the destination IP and forwards it as a Post Man deliver the letter to the "To" Address. The Post Man don't check who send the letter or whats the content, same way the Router don't check any details on the source or the content of received packet. It just do the forwarding based on the destination IP.
When a firewall receives a Packet it checks the destination address, the source address, the interface through which it came, the data type/protocol ( like is it HTTP/FTP/ICMP etc) , the actual data ( if enabled) , the time when it came and logs all these details to a Session Entry/Table, which it can use to track the packet/transaction. Just like a Police Man creating FIR.
Below pictures shows the difference on what a router and firewall see/check on ICMP packet it receives
Below pictures shows the difference on what a router and firewall see/check on ICMP packet it receives
