A router, pronounced /ˈraʊtər/ in the United States and Canada, and /ˈruːtər/ in the UK and Ireland (to differentiate it from the tool used to rout wood), is a purposely customized computer used to forward data among computer networks beyond directly connected devices. (The directly connected devices are said to be in LAN, where data are forwarded using Network switches.)
More technically, a router is a networking device whose software and hardware [in combination] are customized to the tasks of routing and forwarding information. A router differs from an ordinary computer in that it needs special hardware, called interface cards, to connect to remote devices through either copper cables or Optical fiber cable. These interface cards are in fact small computers that are specialized to convert electric signals from one form to another, with embedded CPU or ASIC, or both. In the case of optical fiber, the interface cards (also called ports) convert between optical signals and electrical signals.
Routers connect two or more logical subnets, which do not share a common network address. The subnets in the router do not necessarily map one-to-one to the physical interfaces of the router. The term "layer 3 switching" is used often interchangeably with the term "routing". The term switching is generally used to refer to data forwarding between two network devices that share a common network address. This is also called layer 2 switching or LAN switching.
Conceptually, a router operates in two operational planes (or sub-systems):
- Control plane: where a router builds a table (called routing table) as how a packet should be forwarded through which interface, by using either statically configured statements (called statical routes) or by exchanging information with other routers in the network through a dynamical routing protocol;
- Forwarding plane: where the router actually forwards the traffic (or called packets in IP protocol) from ingress (incoming) interfaces to an egress (outgoing) interface that is appropriate for the the destination address that the packet carries with it, by following rules derived from the routing table that has been built in the control plane.