I am studying for N+ and I am confused between some topics. From my understanding, Router is a device that routes packets and connects networks. A gateway is a device which can be considered as entry/exit to a network. Switches are capable to route packets in a network. So, why do we need a router? Can't we just send packets directly to gateway and then the switch with redirect to it's destination in LAN? Also, what is the use of routing table on router if a switch already has it. I am aware I am going in terribly wrong direction to understand things but I just don't get it!