如果您只想在选定的接口上启用 eigrp,您可以使用被动接口功能,如果您想重新分配路由,您可以使用leakmap(和/或重新分配),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
添加:
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
添加:
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
添加(sw1 配置相同,只更改了 sw2):
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