👉 Routers are network devices that operate at the network layer (Layer 3) of the OSI model, responsible for directing data packets between different networks or subnets. They use routing protocols and algorithms to determine the most efficient paths for data transmission, ensuring packets reach their intended destinations. Unlike switches that operate at the data link layer (Layer 2), routers can handle traffic across multiple networks, making them essential for connecting diverse network segments, such as local area networks (LANs) and wide area networks (WANs), including the internet. Routers maintain routing tables that store information about network topology, enabling them to make informed decisions on where to forward packets. They also perform functionalities like packet filtering, NAT (Network Address Translation), and firewalling to enhance network security.