Router And Its Functionalities
The router is the network layer device that provides the best optimal path in its functionality. It is used to connect multiple LANs over the internet through IP addressing. So, it is an internetworking device. Some popular companies (i.e., Cisco, HP, 3Com, Juniper, D-Link, Nortel) are developing routers.
Keep in mind that HUB, Switch, and Bridge are networking devices that create networks, but a Router is an internetworking device rather than a networking device that connects the networks.
- Every router holds multiple interfaces to connect multiple LANs.
- Each interface holds its own Network ID (IP address).
- The different network IDs that are assigned to different interfaces of routers are derived from their belonging LAN. The IP address of One Network ID can’t exist in any other Network ID.
- Assigning IP to the interface of the router is called the default gateway belonging to the LAN. So, different networks hold different gateways to connect with the router interface.
Note: Gateway is entering an existing point in the network.
Routing Table
There are millions of networks and thousands of routers that are connected with each other over the internet.
If a node from one network wants to send a message to another node of any other network, then the message first goes to the router, and then the router uses its routing table for optimal path delivery.
There may be several subnets connected to a single router, but there will be a single routing table for each router.
Entries of Routing Table
A routing table holds the necessary information to forward a packet through the optimal path. The Routing Table helps the router send the packet to the next hop in the network. Each entry in the routing table involves the following entries.
1. Network ID: It represents the destination corresponding to the route.
2. Subnet Mask: the mask that is used to match a destination IP address to the network ID.
3. Next Hop: It is an IP address of next Hope (Router), to which the packet is forwarded.
4. Interface: The interface is an outgoing point; initially, through this interface, the packet can go out to reach the destination network. Remember, every router holds at least 2 interfaces.
5. Metric: It tells the minimum number of hops (routers) crossed to the network ID. It identifies the route with the fewest hops. It helps to minimize the “cost of the route.”
Working of Router
The router is an intelligent inter-networking device. It is responsible for routing the data packets from source to destination. The end of the router is connected to the Modem, and the rest of the interface of the router is used to connect (either wired or wireless) networking devices such as PCs, laptops, Mobile phones, tablets, etc.
In various forms,
- The router can directly connect to a single or more devices with the cable using Router ports.
- The router is connected to the switch. Then, various devices are connected to the switch.
Routers have two types of connection: wired and wireless. Wired Router connects devices through some cables, i.e. (Ethernet), but wireless uses Wi-Fi instead of cable. The Wired Routers generally have faster speeds. The router transmits the data packets by using an IP address. It transmits data from one network to another or within a network.
Types of Router
There are different types of the router. Some types are given under
- Wireless Router
- Wired Router/Broadband Router
- Edge Router
- Core Router
- Virtual Router
Important: We can access the internet without using a router.
Functionalities of Router
There are various types of router functionalities, some of which are given under
- Routing
- Store and Forwarding
- Flooding
- Filtering
- Collision
Comparison of Router and Switch
The comparison of the Router and switch is given below
Switch | Router |
The switch is capable of communicating all devices within the same network by using the same network ID. |
The router is capable of communicating all devices existing in the network by using the different network IDs. |
The switch looks similar to the Router, but It holds a lot of ports | The router also looks similar to Switch but generally holds 2, 4, or 8 ports. |
It is used in local area networks. | It is mostly used in WAN. It may rarely used in LAN but is more costly than a switch. |
Communication devices are directly connected to the Switch | Generally, Routers are connected with switches, not directly connected to devices |
Router Assign Private IP address to each device connected to it.
In the next lecture, we will see the difference between Public and Private IP addresses.