5

I have a "Tun0" interface over which I speak EIGRP. On this same router I have a "Vlan1" interface. What i'd like to do is speak only of the interfaces that pass a route-map, e.g.

route-map foo permit 10
  match interface Vlan1
router eigrp 100
  distribute-list route-map foo out
  eigrp stub connected summary

However, this doesn't work. A debug shows that 'Vlan1' is being denied by the route-map rather than permitted by it. 'sh ip eigrp top' on the prefix in question suggests that the next-hop for this route is 0.0.0.0. The behavior appears to be the same with or without the EIGRP stub processing and the other stub processing features are desirable in this case.

How do I only include routes sourced from this interface in EIGRP?

  • Are you open to using VRFs? – Mike Pennington Apr 23 '14 at 11:42
  • Not in this particular case. We just want to filter the EIGRP advertisements from this router to only ones that include certain VLANs, but right now all that is defined at this site is Vlan1. Vlan1 is a connected interface and has no other routers behind it. We're trying to create a sort of "universal" template configuration, thus the match interface. – Arima Apr 23 '14 at 12:16
  • Are you open to using a scripting language such as python or tcl to generate your routing configurations? – Mike Pennington Apr 24 '14 at 10:05
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 8 '17 at 16:46
3

if you want to enable eigrp on selected interfaces only, you can use passive interface feature, and if you want to reditribute routes you can use leakmap(and\or redistribution), a-la:

router eigrp 10050
 network 10.192.0.0 0.0.255.255
 redistribute static route-map rmap_leak_to_10050 
 passive-interface default
 no passive-interface Vlan816
 no passive-interface Vlan916
 eigrp router-id 10.192.127.218
 eigrp stub connected static leak-map rmap_leak_to_10050

 ip access-list standard leak_to_10050
 permit 10.192.0.0 0.0.255.255
 permit 192.168.0.0 0.0.255.255
 permit 10.10.10.0 0.0.0.255

 route-map rmap_leak_to_10050 permit 10
 match ip address leak_to_10050

added:

 router eigrp 123
 redistribute connected route-map rm_connected

route-map rm_connected permit 10
 match interface g0/0.123 g0/0.321 g0/0.231

added:

cisco3750x: Cisco IOS Software, C3750E Software (C3750E-UNIVERSALK9NPE-M), Version 15.0(2)SE, RELEASE SOFTWARE (fc1)

sw1
interface Loopback100
 ip address 172.16.10.1 255.255.255.0

interface GigabitEthernet1/0/48
 switchport access vlan 100
 switchport mode access

interface Vlan100
 ip address 10.0.0.1 255.255.255.252

router eigrp 100
 network 10.0.0.0
 redistribute connected route-map rm_con
 eigrp stub connected summary

route-map rm_con permit 10
 match interface Loopback100


sw2
interface Loopback100
 ip address 172.16.20.1 255.255.255.0
!
interface GigabitEthernet1/0/48
 switchport access vlan 100
 switchport mode access

interface Vlan100
 ip address 10.0.0.2 255.255.255.252

router eigrp 100
 network 10.0.0.0
 redistribute connected route-map rm_con
 eigrp stub connected summary

route-map rm_con permit 10
 match interface Loopback100

sh ip route on sw1:
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.0.0.0/30 is directly connected, Vlan100
L        10.0.0.2/32 is directly connected, Vlan100
      172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C        172.16.10.0/24 is directly connected, Loopback100
L        172.16.10.1/32 is directly connected, Loopback100
D EX     172.16.20.0/24 [170/130816] via 10.0.0.1, 00:02:31, Vlan100

sh ip route on sw2:
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.0.0.0/30 is directly connected, Vlan100
L        10.0.0.1/32 is directly connected, Vlan100
      172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
D EX     172.16.10.0/24 [170/130816] via 10.0.0.2, 00:02:52, Vlan100
C        172.16.20.0/24 is directly connected, Loopback100
L        172.16.20.1/32 is directly connected, Loopback100

added(sw1 config is the same, only sw2 was changed):

sw2 config:

interface Loopback100
 ip address 172.16.20.1 255.255.255.0
!
interface GigabitEthernet1/0/48
 switchport access vlan 100
 switchport mode access
!
interface Vlan1
 ip address 172.16.200.1 255.255.255.0
!
interface Vlan100
 ip address 10.0.0.2 255.255.255.252
!
router eigrp 100
 network 10.0.0.0
 redistribute connected route-map rm_con
 eigrp stub connected summary
!
route-map rm_con permit 10
 match interface Loopback100 Vlan1

sw2:
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.0.0.0/30 is directly connected, Vlan100
L        10.0.0.2/32 is directly connected, Vlan100
      172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
C        172.16.20.0/24 is directly connected, Loopback100
L        172.16.20.1/32 is directly connected, Loopback100
D EX     172.16.10.0/24 [170/130816] via 10.0.0.1, 00:05:44, Vlan100
C        172.16.200.0/24 is directly connected, Vlan1
L        172.16.200.1/32 is directly connected, Vlan1



sw1:
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.0.0.0/30 is directly connected, Vlan100
L        10.0.0.1/32 is directly connected, Vlan100
      172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
D EX     172.16.20.0/24 [170/130816] via 10.0.0.2, 00:06:09, Vlan100
C        172.16.10.0/24 is directly connected, Loopback100
L        172.16.10.1/32 is directly connected, Loopback100
D EX     172.16.200.0/24 [170/3072] via 10.0.0.2, 00:04:29, Vlan100
  • I don't want to enable speaking on certain interfaces or redistribute routes. I want EIGRP to only include certain routes in the routing table that are defined using a route-map, but I do not want to do so via IP address prefix-lists since I may not know that prefix list. I want to do it based on interfaces. – Arima Apr 23 '14 at 11:29
  • Ok, (updated my post), this should to work ;-) – pyatka Apr 23 '14 at 11:35
  • In my case, the 'match interface' with the route-map (which is very similar to my example though you use a redistribute connected and I use a distribute-list) doesn't work on Vlan1. I think this might have something to do with EIGRP's use of next hops on interfaces. – Arima Apr 23 '14 at 11:38
  • hm, i`ve cheked on real hardware redistribute connected feature, and its work(look at added text in my post) – pyatka Apr 23 '14 at 12:23
  • Does it work on VLAN1? I won't be able to test redistribute connected tonight but neither of them worked on my test environment (C1941, 15.x) – Arima Apr 23 '14 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.