Routing – Controlling route-map distribution with ‘match interface’ in EIGRP

cisco-ioseigrprouting

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?

Best Answer

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