Router: Network router can be defined as network device with interfaces multiple networks whose task is to copy packets from one network to another usingthe routing tables stored in the memory. Router utilizes one or more routing protocols( i.e RIP,BGP, OSPF. Routers also accept routes which are configured manually by a network administrator. Those routes can be called as static routes. The router use this information to make routing tables. The network router will then use these routing table to make decisions about which packets to copy to which of its interfaces. This process is known as routing.
Router has four components: input ports, output ports, the routing processor and the switching fabric.
a) Input port performs the physical and data link layer functions of the router. The bits are constructed from the received signal, packet is de-capsulated from the frame, errors are detected and corrected. The packet is ready to be forwarded by the network layer. Input ports has buffers (queues) to hold the packets before they are directed to the switching fabric.
b) An output port performs the same function as the input port, but in the reverse order.
c) Routing Processor: The destination address is used to find the address of the next hop. Routing processor searches routing tables.
Switching Fabrics: It moves the packet from the input queue to the output queue. In the past, memory of the computer or a bus was used as the switching fabric. The simplest type of switching fabric is the crossbar switch which connects n inputs to n outputs in a grid, using electronics micro-switches at each cross point.