Routers are network devices that forward packets between different network segments or networks by making decisions based on destination information and a routing table or equivalent forwarding information. Their fundamental purpose is to determine an appropriate next destination for traffic rather than simply repeating every received transmission. A router may connect an internal network to another internal network, an organisation to an external service provider, or multiple routing domains within a larger infrastructure. Routing decisions can involve directly connected networks, manually configured routes or routes learned through routing protocols. Routers commonly operate primarily at the network layer of traditional networking models, although modern devices can incorporate switching, filtering, translation, tunnelling, wireless and other functions.
A router maintains information that associates reachable network destinations with paths or next-hop information. When a packet arrives, the router examines relevant addressing information, determines the best applicable route according to its forwarding logic and sends the packet through the appropriate interface. Routing tables can contain directly connected destinations as well as learned or manually configured routes. Route selection can involve factors such as prefix specificity, administrative preference and protocol-defined metrics.
The distinction between routing and switching is important: switching commonly forwards traffic within an appropriate local communication environment using hardware addresses, whereas routing determines paths between distinct network destinations using network-layer addressing. Modern equipment can perform both functions, but the underlying operations remain conceptually different.
Routers can use static or dynamic routing. Static routing requires an administrator to define routes explicitly and can be predictable and simple in small or specialised environments, but it becomes difficult to maintain when network topology changes frequently. Dynamic routing uses protocols that exchange reachability information so participating routers can discover and adapt to network paths. Different routing protocols use different algorithms, metrics and operational models.
Dynamic routing is particularly useful in larger networks where links can fail or new destinations can appear. However, dynamic routing introduces additional configuration, protocol behaviour and troubleshooting requirements. Incorrect route advertisements, configuration errors or unstable links can result in inefficient paths, unreachable destinations or traffic being sent in undesirable directions.
Routers can also separate communication domains and enforce traffic policies. Because traffic moving between routed networks passes through routing equipment, routers can often apply rules concerning which traffic is permitted, translated, inspected or forwarded. Many modern routers incorporate filtering, address translation, virtual private networking, quality-of-service functions and other services. Network Address Translation is frequently used in domestic and small-business environments to allow multiple internal systems to communicate through a limited set of externally visible addresses. Such additional functions mean that the word router can refer either to a relatively focused routing platform or to an integrated appliance containing numerous networking and security capabilities.
Routing has become essential as networks have grown from isolated local environments into interconnected systems containing many distinct address spaces and administrative domains. The fundamental requirement is unchanged: traffic destined for a remote network needs a mechanism that determines where it should be sent next. Internet-scale routing requires cooperation among many independently operated networks and therefore uses specialised protocols and policies. Internal organisational networks can use different routing approaches suited to their scale and requirements. Routers may also participate in redundant designs in which multiple possible paths exist, allowing traffic to continue when a connection or device fails. The complexity of such systems makes accurate topology documentation and monitoring important.
Router performance depends on factors including packet rate, forwarding architecture, interface capacity, memory, route-table size and enabled processing functions. High-speed environments often use specialised forwarding hardware so common packet-processing operations can be performed efficiently. Additional services such as deep inspection, encryption, address translation or complex filtering can change performance characteristics substantially. Latency is also relevant because every routed hop introduces processing and transmission time, although modern hardware can perform forwarding extremely quickly. A router therefore should not be evaluated solely by the maximum nominal speed of its interfaces; expected traffic patterns and enabled features must also be considered.
Routers are common sources of network problems because their configuration determines communication between network segments. Incorrect addresses, subnet definitions, routes, filtering policies or translation rules can prevent otherwise functioning endpoints from reaching remote destinations. Troubleshooting generally involves determining whether the source has correct local connectivity, whether the router has a valid route to the destination, whether the destination has a return route and whether any policy or translation mechanism alters the traffic. Routing loops, asymmetric paths and stale route information can create more complex failures. Monitoring route changes, interface state, packet counters and relevant logs can help identify these conditions.
A common misconception is that every device that connects several network cables is necessarily performing routing. A Network Switches may connect many endpoints without making network-layer routing decisions, while a Network Bridge performs forwarding at a different conceptual level. Conversely, many modern products marketed as routers contain substantial switching functionality. Routers are best understood by the forwarding role they perform rather than solely by their physical appearance. Their essential function is to connect distinct network destinations and determine paths for traffic between them, while additional services vary according to the equipment's design and intended environment.