What is IP Routing?
Routing is the process of selecting a path in the network for the transfer of packets between different nodes. The path that a packet follows in the network is called a route. The routes are shared among different networks using a different set of rules and policies, which are called protocols. The decision of forwarding packets among different networks is done by an intelligent device called the router.
We have two main routing techniques, which are below.
• Static Routing
• Dynamic Routing
1- Static Routing
In this type of routing administrator configures the routers manually, routers cannot decide on their own. Administrators manually add routes on every router where routing is required, which provides the administrator full control over the network. Static routing is a simple way of configuring routers for exchanging packets, it does not use any complex algorithm. Static routing is also called non-adaptive routing.
Features of Static Routing
• In static routing, the usage of CPU is very low b/c router does not take decisions and reading overheads.
• Static routing is much secure routing as routes are not advertised to other routers and the administrator has full control over the network.
• In static routing, no updates are shared with connected routers, so usage of RAM and Bandwidth is very less.
• Static routing is not fault-tolerant as the router cannot take the decision and re-route traffic to any other path.
• Static routing is good for small networks but when networks get bigger, static routing becomes complex.
The default route is also a type of static route where whole network traffic is directed to a single hop.
2- Dynamic Routing
Dynamic routing is a type of routing in which routing decisions are taken by the router without any manual intervention of the administrator. In dynamic routing routers periodically share updates and thus inform others about every change that occurs in the network. Dynamic routing uses a complex network algorithm that continuously checks the network changes and calculates updated status to the destination network using the algorithms. These algorithms assisted by a set of rules and policies are called routing protocols which help the router to take decisions.
Features of Dynamic Routing
• It is suitable for all types of topologies even when we have many routers.
• Dynamic routing is less secure than static routes due to the broadcast and multicasts.
• Dynamic routing more fault-tolerant as the router takes the decision and re-routes traffic to other paths.
• It needs additional resources like CPU, RAM, and interface bandwidth for better performance.
• In dynamic routing, the router selects the best path to destination therefore we always experience better latency.
• When new routers are integrated into an existing network, we do not need to change the configuration of all routers in the new excepts the connected routers.
• When multiple policies are implemented against the same network, the router can decide on its own without administrator influence.
2b- Dynamic Routing Protocols
We have multiple protocols for implementing dynamic routing in our networks which are chosen based on the need and size of the network. Below is the list of dynamic routing protocols.
2c- Steps to perform Static Routing.
In static routing, we manually add the required routes in the router, which are saved in the routing table of the router, and packets are forwarded accordingly.
In the below network we have three routers R1, R2 & R3 connected but we want to reach the PCB from the PCA through the network. We will use the following commands and procedures to do that.
Router R3 Configuration
R3(config)#interface GigabitEthernet0/1
R3(config-if) #ip address 192.168.4.1 255.255.255.0
R3(config-if) #no shutdown
R3(config)#interface GigabitEthernet0/0
R3(config-if) #ip address 192.168.3.2 255.255.255.0
R3(config-if) #no shutdown
R3(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.1
R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1
Router R2 Configuration
R2(config)#interface GigabitEthernet0/1
R2(config-if) #ip address 192.168.3.1 255.255.255.0
R2(config-if) #no shutdown
R2(config)#interface GigabitEthernet0/0
R2(config-if) #ip address 192.168.2.2 255.255.255.0
R2(config-if) #no shutdown
R2(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.1
R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1
Router R1 Configuration
R1(config)#interface GigabitEthernet0/1
R1(config-if) #ip address 192.168.2.1 255.255.255.0
R1(config-if) #no shutdown
R1(config)#interface GigabitEthernet0/0
R1(config-if) #ip address 192.168.1.1 255.255.255.0
R1(config-if) #no shutdown
R1(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.1
R1(config)#ip route 192.168.3.0 255.255.255.0 192.168.3.1
Routing Table Analysis-Static Routing
Routing Table at R1
R1#show ip route static
S 192.168.3.0/24 [1/0] via 192.168.2.2
S 192.168.4.0/24 [1/0] via 192.168.3.2
Routing Table at R2
R2#show ip route static
S 192.168.1.0/24 [1/0] via 192.168.2.1
S 192.168.4.0/24 [1/0] via 192.168.3.2
Routing Table at R3
R3#show ip route static
S 192.168.1.0/24 [1/0] via 192.168.3.1
S 192.168.2.0/24 [1/0] via 192.168.3.1
We will use the same topology for implementing dynamic routing and check the reachability.
RIP: Routing Information Protocol
We will use RIPV2 for checking the reachability on the same topology first.
The configuration related to interfaces will remain the same, below is the configuration related to routing protocol RIP only. The PCA-PCB are successfully reaching each other, the same is verified from routing Tables of the routers.
Router R3 Configuration
R3(config)#router rip
R3(config-router) #version 2
R3(config-router) #network 192.168.4.0
R3(config-router) #network 192.168.3.0
R3(config-router) #no auto-summary
Router R2 Configuration
R2(config)#router rip
R2(config-router) #version 2
R2(config-router) #network 192.168.2.0
R2(config-router) #network 192.168.3.0
R2(config-router) #no auto-summary
Router R1 Configuration
R1(config)#router rip
R1(config-router) #version 2
R1(config-router) #network 192.168.2.0
R1(config-router) #network 192.168.1.0
R1(config-router) #no auto-summary
Routing Table Analysis-RIP
Exterior Gateway Routing Protocol
The configuration related to interfaces will remain the same, below is the configuration related to routing protocol EIGRP only. The PCA-PCB are successfully reaching each other, the same is verified from the routing tables of the routers.
Router R3 Configuration
R3(config)#router eigrp 100
R3(config-router) #network 192.168.3.0 0.0.0.255
R3(config-router) #network 192.168.4.0 0.0.0.255
Router R2 Configuration
R2(config)#router eigrp 100
R2(config-router) #network 192.168.3.0 0.0.0.255
R2(config-router) #network 192.168.2.0 0.0.0.255
Router R1 Configuration
R1(config-router) #router eigrp 100
R1(config-router) #network 192.168.1.0 0.0.0.255
R1(config-router) #network 192.168.2.0 0.0.0.255
Routing Table Analysis-EIGRP
OSPF: Open Shortest Path First
The configuration related to interfaces will remain the same, below is the configuration related to routing protocol OSPF only. The PCA-PCB are successfully reaching each other, the same is verified from the routing tables of the routers.
Router R3 Configuration
R3(config)# router ospf 100
R3(config-router) #network 192.168.3.0 0.0.0.255 area 10
R3(config-router) #network 192.168.4.0 0.0.0.255 area 10
Router R2 Configuration
R2(config)#router ospf 100
R2(config-router) #network 192.168.3.0 0.0.0.255 area 10
R2(config-router) #network 192.168.2.0 0.0.0.255 area 10
Router R1 Configuration
R1(config-router) #router ospf 100
R1(config-router) #network 192.168.1.0 0.0.0.255 area 10
R1(config-router) #network 192.168.2.0 0.0.0.255 area 10
Routing Table Analysis-OSPF
BGP: Border Gateway Protocol
The configuration related to interfaces will remain the same, below is the configuration related to routing protocol BGP only. The PCA-PCB are successfully reaching each other, the same is verified from the routing tables of the routers.
Router R3 Configuration
R3(config)#router bgp 65532
R3(config-router) #neighbor 192.168.3.1 remote-as 65531
R3(config-router) #network 192.168.4.0
R3(config-router) #network 192.168.3.0
Router R2 Configuration
R2(config)#router bgp 65531
R2(config-router) #neighbor 192.168.3.2 remote-as 65532
R2(config-router) #neighbor 192.168.2.1 remote-as 65530
R2(config-router) #network 192.168.2.0
R2(config-router) #network 192.168.3.0
Router R1 Configuration
R1(config)#router bgp 65530
R1(config-router) #neighbor 192.168.2.2 remote-as 65531
R1(config-router) #network 192.168.1.0
R1(config-router) #network 192.168.2.0
Routing Table Analysis-BGP
Whenever we find the entry for a router in the routing table of a router, the router will reach the specific network. The routing table of all the protocols shows the entry for all remote routes and we will reach the remote network.
No comments:
Post a Comment