Routing involves the process of selecting a path for traffic in a network, or between or across multiple networks. Systems perform routing in many types of networks, including circuit-switched networks, such as the public switched telephone network (PSTN), computer networks, such as the Internet, as well as in networks used in public and private transportation, such as the system of streets, roads, and highways in transport infrastructure.
In packet-switching networks, routing takes place with the higher-level decision-making that directs network packets from their source toward their destination through intermediate network nodes by specific packet-forwarding mechanisms. Packet forwarding is the transit of logically addressed network packets from one network interface to another. Intermediate nodes are typically network hardware devices such as routers, bridges, gateways, firewalls, or switches. General-purpose computers also forward packets and perform routing, although they have no specially optimized hardware for the task. The routing process usually directs forwarding on the basis of routing tables, which maintain a record of the routes to various network destinations. Thus the construction of routing tables, which are held in the router's memory, is very important for efficient routing. Most routing algorithms use only one network path at a time. Multipath routing techniques enable the use of multiple alternative paths.