Router is a networking device whose software and hardware are typically customized to the tasks of routing and forwarding information. For instance, on the Internet, information is directed to various paths by routers. Routers connect two or more logical subnets, which do not essentially map one-to-one to the physical interfaces of the router. It operates in two different planes:
- Control plane: It is a plane in which the router learns the outgoing interface that is most appropriate for forwarding specific packets to specific destinations.
- Forwarding plane: A plane which is responsible for the actual process of sending a packet received on a logical interface to an outbound logical interface.
In packet-switched networks like Internet, a router is a device or, in some cases, software in a computer which decides the next packet forwarding point in a network. The router is connected to at least two networks and decides which way to send each information packet based on its current understanding of the state of the networks it is connected to. A router is located at any gateway i.e. a point where one network meets another including each point-of-presence on the Internet. A router is often included as part of a network switch.
A router creates and maintains a table of the accessible routes and their conditions and makes use of this information along with distance and cost algorithms to establish the best route for a given packet. Normally, a packet travels through a number of network points with routers before arriving at its final destination. Routing is a function associated with the Network layer i.e. layer 3 in the Open Systems Interconnection (OSI) model (the standard model of network programming). A layer-3 switch is a switch that can perform routing functions.
A generic router has four components:
- Input ports: These are the point of attachment for a physical link and are the point of entry for incoming packets. Ports are instantiated on line cards, which typically support 4, 8, or 16 ports.
- Output ports: stores packets and schedules them for service on an output link.
- A switching fabric: It interconnects input ports with output ports.
- A routing processor: It participates in routing protocols and creates a forwarding table which is used in packet forwarding.
Types of Routers
Routers offer connectivity inside enterprises, between enterprises and the Internet, and inside Internet Service Providers (ISP). The largest routers, for example, the Cisco CRS-1 or Juniper T1600 interconnect ISPs, are used inside ISPs, or may be used in very large enterprise networks whereas the smallest routers provide connectivity for small and home offices. An edge router is a router which interfaces with an asynchronous transfer mode (ATM) network. A brouter is a network bridge combined with a router.
Also, depending on the relative speed of the input ports and the switching fabric a router can be classified as an:
- Output-queued: If the switching fabric has a bandwidth greater than the sum of the bandwidths of the input ports, then packets are queued only at the outputs, and the router is called an output-queued router.
- Input queued: Otherwise if the packets are queued up at the inputs, then the router is called an input-queued router.