cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3385
Views
10
Helpful
7
Replies

EIGRP is preferred over Static why?

rpatel006
Level 1
Level 1

I have EIGRP Configured

router eigrp 2247

network 10.0.0.0 0.0.0.255

also static route ip route 10.10.0.0 255.255.0.0 10.0.0.1

so if i do sh ip route 10.10.210.0 it is showing that it using EIGRP but it should use static route because static route has 1 AD  but it  is not doing that, please advice.

1 Accepted Solution

Accepted Solutions

ip route 10.10.210.0 255.255.225.0 10.0.0.1

You need to write this route to take preference. Subnet mask of you static route is 16 while subnet mask of your EIGRP route is 24. They are two different routes.

Masoud

View solution in original post

7 Replies 7

Rolf Fischer
Level 9
Level 9

You have a static route for a /16 prefix; what subnet mask is advertised in EIGRP for the 10.10.210.0 prefix?

Remember that the AD only is considered when the the prefix lengths are the same.

HTH

Rolf

If you check I believe that you will find that EIGRP has redistributed the static route. When there is a static route whose next hop is an address in the subnet of a connected interface and there is a network statement in EIGRP for that interface EIGRP will assume that it should redistribute the static route.

HTH

Rick

HTH

Rick

Let me Explain What I am trying to do

I have Firewall with 10.0.0.253 ----- Switch 10.0.0.239 ---- 10.0.0.1 Other Site

Right now if i do

sh ip route 10.10.210.0
Routing entry for 10.10.210.0/24
  Known via "eigrp 2247", distance 90, metric 402944, type internal
  Redistributing via eigrp 2247
  Last update from 10.0.0.1 on Vlan1, 3d20h ago
  Routing Descriptor Blocks:
  * 10.0.0.1, from 10.0.0.1, 3d20h ago, via Vlan1
      Route metric is 402944, traffic share count is 1
      Total delay is 120 microseconds, minimum bandwidth is 6402 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 22/255, Hops 2

This is my routing table and EIGRP Config.

sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.0.0.253 to network 0.0.0.0
C    192.168.224.0/24 is directly connected, Vlan224
     10.0.0.0/8 is variably subnetted, 34 subnets, 2 masks
S       10.10.0.0/16 [1/0] via 10.0.0.1
C       10.111.98.0/24 is directly connected, Vlan98
D       10.97.99.0/24 [90/402688] via 10.0.0.1, 6d17h, Vlan1
D       10.10.9.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
C       10.111.111.0/24 is directly connected, Vlan111
D       10.99.99.0/24 [90/28416] via 10.0.0.254, 1w0d, Vlan1
D       10.10.10.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
C       10.0.0.0/24 is directly connected, Vlan1
D       10.10.11.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
D       10.10.12.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
D       10.10.13.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
D       10.10.14.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
D       10.10.15.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
D       10.10.16.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
D       10.10.17.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
D       10.10.18.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
D       10.10.19.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
D       10.30.1.0/24 [90/28416] via 10.0.0.193, 1w0d, Vlan1
D       10.30.2.0/24 [90/28416] via 10.0.0.193, 1w0d, Vlan1
S       10.40.0.0/16 [1/0] via 10.0.0.253
D       10.50.10.0/24 [90/402688] via 10.0.0.1, 6d17h, Vlan1
D       10.10.99.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
C       10.111.0.0/24 is directly connected, Vlan66
C       10.111.9.0/24 is directly connected, Vlan9
C       10.111.10.0/24 is directly connected, Vlan10
C       10.111.225.0/24 is directly connected, Vlan225
C       10.111.201.0/24 is directly connected, Vlan201
C       10.111.212.0/24 is directly connected, Vlan212
C       10.111.211.0/24 is directly connected, Vlan211
C       10.111.210.0/24 is directly connected, Vlan210
C       10.111.170.0/24 is directly connected, Vlan170
D       10.10.210.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1
S       10.40.210.0/24 [1/0] via 10.0.0.253
S       10.255.0.0/16 [1/0] via 10.0.0.253
     11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D       11.0.1.2/32 [90/728320] via 10.0.0.1, 4d15h, Vlan1
D       11.0.1.0/24 [90/728320] via 10.0.0.1, 4d15h, Vlan1
     47.0.0.0/16 is subnetted, 1 subnets
D       47.10.0.0 [90/402944] via 10.0.0.1, 3d20h, Vlan1
C    192.168.223.0/24 is directly connected, Vlan223
S    192.168.222.0/24 [1/0] via 10.10.10.1
S*   0.0.0.0/0 [1/0] via 10.0.0.253
router eigrp 2247
 network 10.0.0.0 0.0.0.255
 network 10.111.0.0 0.0.255.255
 network 192.168.223.0
 no auto-summary
!
ip route 0.0.0.0 0.0.0.0 10.0.0.253
ip route 10.10.0.0 255.255.0.0 10.0.0.1
ip route 10.40.0.0 255.255.0.0 10.0.0.253
ip route 10.40.210.0 255.255.255.0 10.0.0.253
ip route 10.255.0.0 255.255.0.0 10.0.0.253
ip route 192.168.222.0 255.255.255.0 10.10.10.1
So I want to put static route to route trafffic for 10.10.210.0/24 to 10.0.0.253 (firewall)
but the problem is I have static route
ip route 10.10.0.0 255.255.0.0 10.0.0.1 and EIGRP
router eigrp 2247
 network 10.0.0.0 0.0.0.255
so if i do
sh ip route 10.10.210.0
Routing entry for 10.10.210.0/24
  Known via "eigrp 2247", distance 90, metric 402944, type internal
  Redistributing via eigrp 2247
  Last update from 10.0.0.1 on Vlan1, 3d20h ago
  Routing Descriptor Blocks:
  * 10.0.0.1, from 10.0.0.1, 3d20h ago, via Vlan1
      Route metric is 402944, traffic share count is 1
      Total delay is 120 microseconds, minimum bandwidth is 6402 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 22/255, Hops 2

Why it is showing eigrp when i have this route ip route 10.10.0.0 255.255.0.0 10.0.0.1 why static is not taking precedence over eigrp?

D       10.10.210.0/24 [90/402944] via 10.0.0.1, 3d20h, Vlan1

Let me know if you need any thing else from any config.

ip route 10.10.210.0 255.255.225.0 10.0.0.1

You need to write this route to take preference. Subnet mask of you static route is 16 while subnet mask of your EIGRP route is 24. They are two different routes.

Masoud

I believe that Masoud has correctly identified the issue as the difference in the prefix length/mask. Let me add a bit to his explanation. In IOS the decision on which route to use in the routing table is always based on longest match wins. So if you have a /16 static route and a /24 EIGRP route the longer EIGRP route will be preferred.

As Rolf correctly commented in his previous post the AD is only considered when the prefix lengths are equal. In this case the longer /24 is preferred over the shorter /16.

HTH

Rick

HTH

Rick

Thanks Richad for your comment.

I assumed that Poser is willing to replace EIGRP with static route in the routing table. If there are two routes in the routing table, the most specific one( longer mask) is prefered. In this sense, you are completely right. The Rolf answer was also correct so I rated it before I received your post.

Masoud

Hello,

EIGRP route administrative distance is 90 while static route administrative distance is 1, so static route route is preferable over EIGRP route and sits into the routing table. You should check both routes subnet mask. 10.10.210.0/24 is different from 10.10.0.0/16.

In your case, If you check you routing table, you will see both static route and EIGRP route for 10.10.

Hope it helps,

Masoud