|
15鸿鹄币
这张拓扑图。
我将R1和R2相连链路的两个接口宣告进了EIGRP,R1的环回口没有宣告进EIGRP。
现在我在R1上做了将直连路由(环回口)重分发进EIGRP的操作。在做了这个操作之后,写了两条ACL
access-list 10 deny 1.1.1.0 0.0.0.255
accesss-list 10 permit any
将ACL调用到Route-map里面:
route-map king deny 10
match ip add
route-map king permit 20
在执行完上述操作之后,我在R2上查看路由表:
发现1.1.1.0的路由却出现了,可是不合逻辑啊。
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
D EX 1.1.1.0 [170/2560512256] via 192.168.1.1, 00:28:21, Serial2/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, Serial2/0
L 192.168.1.2/32 is directly connected, Serial2/0
R2#
我们都知道如果在ACL当中加了permit any的话,这条ACL调用到Route-map当中会起作用,但是route-map里面调用这条ACL的是deny 10,应该被拒绝,尽管ACL后面还有一个permit any,但是是调用到route-map king deny 10里面的,所以也被拒绝。route map后面还有一个允许所有的permit 20,但是所有重分发的已经被全部拒绝,在R2上怎么会出现1.1.1.0的路由呢?
这个是相关配置信息:
Building configuration...
Current configuration : 1721 bytes
!
! Last configuration change at 23:22:17 UTC Tue May 3 2016
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
!
!
!
!
no ip domain lookup
ip cef
ipv6 multicast rpf use-bgp
no ipv6 cef
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
interface Loopback1
ip address 1.1.1.1 255.255.255.0
!
interface Loopback2
ip address 2.2.2.2 255.255.255.0
!
interface Loopback3
ip address 3.3.3.3 255.255.255.0
!
interface Loopback4
ip address 4.4.4.4 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex full
!
interface FastEthernet1/0
no ip address
shutdown
speed auto
duplex auto
!
interface FastEthernet1/1
no ip address
shutdown
speed auto
duplex auto
!
interface Serial2/0
ip address 192.168.1.1 255.255.255.0
serial restart-delay 0
!
interface Serial2/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial2/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial2/3
no ip address
shutdown
serial restart-delay 0
!
!
router eigrp 90
network 192.168.1.1 0.0.0.0
redistribute connected metric 1 1 1 1 1500 route-map king
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
access-list 10 deny 1.1.1.0 0.0.0.255
access-list 10 permit any
!
route-map king deny 10
match ip address 10
!
route-map king permit 20
!
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
!
!
end
R1#
R2# show ip inter brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet1/0 unassigned YES unset administratively down down
FastEthernet1/1 unassigned YES unset administratively down down
Serial2/0 192.168.1.2 YES manual up up
Serial2/1 unassigned YES unset administratively down down
Serial2/2 unassigned YES unset administratively down down
Serial2/3 unassigned YES unset administratively down down
R2#show runn
Building configuration...
Current configuration : 1299 bytes
!
! Last configuration change at 20:21:35 UTC Tue May 3 2016
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
!
!
!
!
no ip domain lookup
ip cef
ipv6 multicast rpf use-bgp
no ipv6 cef
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex full
!
interface FastEthernet1/0
no ip address
shutdown
speed auto
duplex auto
!
interface FastEthernet1/1
no ip address
shutdown
speed auto
duplex auto
!
interface Serial2/0
ip address 192.168.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial2/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial2/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial2/3
no ip address
shutdown
serial restart-delay 0
!
!
router eigrp 90
network 192.168.1.2 0.0.0.0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
!
!
end
R2#
|
-
最佳答案
查看完整内容
哥们你理解有误,ACL在route-map中只是起到匹配作用,真正起作用的是route-map里面的deny命令,所以你的理解错误,所以如果说你想让1.1.1.1 不要充分发进eigrp进程的话应该是route-map 123 permit 10
match ip add 10 就行了
|