What is routing?
Routing is the process of selecting a path for the data packets across a network like a computer network, telephone network, or a public transportation network. In computer networks, like the Internet, routing is done via specialized hardware called routers, which select the best (fastest and shortest) path for data packets to travel from point A to point B.
When a router receives a data packet, it first reads the packet's header to see it wants to go. Then, using an internal routing table, the router selects the best route for that packet.
There are three main types of routing:
- In default routing the router sends all data packets to a single router regardless of the network that packet belongs to.
- For static routing, the user has to manually add routes in the routing table. Basically, it's like making your own travel itinerary.
- Finally, in dynamic routing, the routes don't stay the same but change depending on their state in the routing table. This type of routing uses different predefined algorithms to find the optimal path.