EIGRP or Enhanced Interior Gateway Routing Protocol is a Cisco proprietary technology. However, it is still possible to integrate other routing protocols into EIGRP and/or vice versa. The most common thing to do in the network is injecting static route into EIGRP routing table so that hosts in the EIGRP network can communicate with the other hosts outside the EIGRP. Similar to OSPF, we can also Redistribute Static Route into EIGRP in Cisco IOS Router – except there’s a little bit difference in the command used, which we will cover in this article.
How to Redistribute Static Route into EIGRP in Cisco IOS Router
Consider the following scenario where we will redistribute static route into EIGRP in Cisco IOS router.
In this scenario, R2 is the central router where it runs both EIGRP and static routes. R2 able to reach everyone in the topology, but both R1 and R4 cannot communicate with R3 in the EIGRP network and vice versa. It is required to modify the some of the configuration below and ensure all routers can communicate to each other.
R1#sh run | s route ip route 0.0.0.0 0.0.0.0 10.12.12.2
R2#sh run | s route router eigrp 23 network 2.2.2.2 0.0.0.0 network 10.23.23.2 0.0.0.0 ! ip route 1.1.1.1 255.255.255.255 10.12.12.1 ip route 4.4.4.4 255.255.255.255 10.24.24.4
R3#sh run | s route router eigrp 23 network 0.0.0.0
R4#sh run | s route ip route 0.0.0.0 0.0.0.0 10.24.24.2
Before we do any configuration, it is best to verify the issue by test pinging R1 and R4 from R3 and then display the existing entries in the routing table.
R3#ping 1.1.1.1 source 3.3.3.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds: Packet sent with a source address of 3.3.3.3 ..... Success rate is 0 percent (0/5)
R3#ping 4.4.4.4 source 3.3.3.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds: Packet sent with a source address of 3.3.3.3 .... Success rate is 0 percent (0/5)
R3#sh ip route | b Gate Gateway of last resort is not set 2.0.0.0/32 is subnetted, 1 subnets D 2.2.2.2 [90/156160] via 10.23.23.2, 00:00:42, FastEthernet0/0 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 10.23.23.0/24 is directly connected, FastEthernet0/0 L 10.23.23.3/32 is directly connected, FastEthernet0/0
From the output above it can be understood that there is no routing entry to R1 and R4 in R3 routing table, therefore the ping failed. The problem can be solved by adding a static default route in R3 but it may not be the best solution because R3 already have EIGRP peering with R2, and R2 already have a specific static route to both R1 and R4. So instead of running a new routing protocol in R3, it is best just to redistribute the static route in R2 into EIGRP and with that way R3 will also obtain the route information to reach R1 and R4.
The command to redistribute static route into EIGRP in Cisco IOS router is:
redistribute static metric [bandwidth] [delay] [reliability] [load] [MTU]
Note that there are 5 metrics that must be specified when we redistribute static route into EIGRP in Cisco IOS router – and this applies when we redistribute other routing protocol into EIGRP as well. This because EIGRP is a smart routing protocol that consider all these aspects when creating a route entry. The mentioned metrics are:
- Bandwidth: Specify the bandwidth value of the link here in Kbits per second — this doesn’t have to be the actual condition and it has nothing to do with the real bandwidth, as this is only for reference used by EIGRP to calculate the final metric.
- Delay: Specify the delay value here in 10 microseconds unit — again, this is only for reference used by EIGRP to calculate its metric.
- Reliability: Specify value here between 0-255 where 255 means EIGRP will see the link with maximum reliability
- Load: Specify value here between 1-255 where 255 means EIGRP will see the link as 100% loaded
- MTU: Specify the MTU value between 1-65535, normally it is 1500 but depending on the applications running in the network you might want to adjust this value. However, this does not change the actual MTU of the link.
Now, after understanding all the EIGRP metrics, here’s the example of how to set the static route redistribution into EIGRP in R2:
R2#conf t R2(config)#router eigrp 23 R2(config-router)#redistribute static metric 10000 0 255 1 1500
Notice the change in R3 routing table after implementing the above command in R2:
R3#sh ip route | b Gate Gateway of last resort is not set 1.0.0.0/32 is subnetted, 1 subnets D EX 1.1.1.1 [170/258560] via 10.23.23.2, 00:04:28, FastEthernet0/0 2.0.0.0/32 is subnetted, 1 subnets D 2.2.2.2 [90/156160] via 10.23.23.2, 00:26:42, FastEthernet0/0 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 4.0.0.0/32 is subnetted, 1 subnets D EX 4.4.4.4 [170/258560] via 10.23.23.2, 00:04:28, FastEthernet0/0 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 10.23.23.0/24 is directly connected, FastEthernet0/0 L 10.23.23.3/32 is directly connected, FastEthernet0/0
R3 now have the route to R1 and R4 loopback address as an EIGRP external route, and ping to both address should now resulting in success.
R3#ping 1.1.1.1 source 3.3.3.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds: Packet sent with a source address of 3.3.3.3 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 32/44/52 ms
R3#ping 4.4.4.4 source 3.3.3.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds: Packet sent with a source address of 3.3.3.3 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 36/41/44 ms
Filtered Static Route Distribution into EIGRP using Route-Map
When a static route redistribution performed in Cisco IOS router, by default it will leak all the static routes information to the neighbor routing table. For some reason this can be unwanted or maybe it is not necessary to distribute all the static routes because only some specific routes are required to be distributed. In order to accommodate this kind of situation, we can control which static route to be distributed into other routing protocol by using route-map.
To create a route-map, first create an access-list which contains the network address that we are permitting to be distributed or denying all the address that we don’t want to distribute. In this example, the access-list is created on R2 to only allow network address 4.4.4.4/32 and all other address will be denied by the implicit rule.
R2(config)#access-list 10 permit 4.4.4.4 0.0.0.0
Next, we create the route-map which refers to the access-list that were created previously.
R2(config)#route-map Permit_to_Redistribute R2(config-route-map)#match ip address 10
Lastly, go to EIGRP configuration and apply the redistribution command followed with reference to the route-map
R2(config)#router eigrp 23 R2(config-router)#redistribute static route-map Permit_to_Redistribute
The final EIGRP config on R2 will now look like this:
R2(config)#do sh run | s eigrp router eigrp 23 network 2.2.2.2 0.0.0.0 network 10.23.23.2 0.0.0.0 redistribute static metric 10000 0 255 1 1500 route-map Permit_to_Redistribute
Notice that it is not required to re-specify the EIGRP metrics but the route-map command is automatically appended to the same redistribution command line we created before. And after implementing the command above, the route 1.1.1.1/32 should be removed from R3 routing table and leaving only 4.4.4.4/32 as we intended.
R3#sh ip route | b Gate Gateway of last resort is not set 2.0.0.0/32 is subnetted, 1 subnets D 2.2.2.2 [90/156160] via 10.23.23.2, 00:01:18, FastEthernet0/0 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 4.0.0.0/32 is subnetted, 1 subnets D EX 4.4.4.4 [170/258560] via 10.23.23.2, 00:01:18, FastEthernet0/0 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 10.23.23.0/24 is directly connected, FastEthernet0/0 L 10.23.23.3/32 is directly connected, FastEthernet0/0
And that’s how you Redistribute Static Route into EIGRP in Cisco IOS Router.