- Routing is the process of delivering a message across one or more networks by choosing the most appropriate path.
- It is performed by many kinds of networks like telephone network (Circuit Switching), electronic data networks (such as the Internet).
- In networking, every router maintains a routing table which stores information about the connected routers.
Routing consists of the following:
- A Router
- A set of routing protocols
- A Routing Information Base (RIB)
- Destination address
- Neighbour routers from which it can learn about the remote networks
- Possible routes to all remote networks
- One or more routing algorithms
- The best route to each remote network
- How to maintain and verify routing information
Types of Routing
There are three major types of routing:
- Static Routing
- Dynamic Routing
- Default Routing
1) Static Routing
Static routing occurs when an administrator manually adds routes in each router’s routing table. It is secure and fast. It is used for a small organization with a network of 12-15 routers.
2) Dynamic Routing
Dynamic routing is used to select networks and update routing tables on the routers. It is easier than using static and default routing.
3) Default Routing
Default routing is used to send packets to the unknown remote destination network.
Routing protocols are designed to allow exchange the routing tables between the routers.
There are the following major types of routing protocols:
- Routing Information Protocol (RIP)
- Enhanced Interior Gateway Protocol (EIGRP)
- Open Shortest Path First (OSPF)
- Border Gateway Protocol (BGP)
1) Routing Information Protocol (RIP)
RIP is a distance-vector routing protocol. It is used for both Local Area Network (LAN) and Wide Area Network (WAN). RIP uses only a hop count to determine the best way to a remote network. By default, it allows maximum 15 hops.
There are two types of RIP versions:
- RIP version 1: It uses classful routing.
- RIP version 2: It uses classless routing.
2) Enhanced Interior Gateway Protocol (EIGRP)
EIGRP is a classless, enhanced distance-vector routing protocol. It is also referred as a hybrid routing protocol because it has characteristics of both distance-vector and link-state protocols. It is suitable for large networks. EIGRP uses maximum hop count 255 (the default EIGRP hop count is set to 100).
3) Open Shortest Path First (OSPF)
OSPF is an open standard routing protocol. It uses the Dijkstra algorithm to find the shortest path. OSPF also separate the large internetwork into smaller internetworks called “areas.” It is mostly used for large networks, and it supports both IPv4 and IPv6 routing protocol.
4) Border Gateway Protocol (BGP)
BGP is one of the core IP routing protocol of the Internet. It is responsible for maintaining a table of Internet protocol networks. It runs over a reliable transport protocol.
BGP uses TCP as its transport protocol and also uses TCP port 179 for establishing the connection.