设为首页收藏本站language 语言切换
查看: 1749|回复: 1
收起左侧

[求助] route-map路由策略问题

[复制链接]
发表于 2016-7-18 00:19:39 | 显示全部楼层 |阅读模式
R1和R2通过S1/0口相连,R1上两个LOOPBACK接口分别配置未1.1.1.0/24和5.5.5.0/24,两台路由器间运行OSPF协议。实验目的是不重分发5.5.5.0/24这个网段给R2,用的是route-map,但是实际运行后发现没有起作用,请问是哪里错了?附上配置,请知道的告诉下谢谢了
R1配置:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Loopback1
ip address 5.5.5.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 10.12.0.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
ip address 10.14.0.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
redistribute connected subnets route-map 1
network 10.12.0.0 0.0.0.255 area 0
network 10.14.0.0 0.0.0.255 area 0
!
!
no ip http server
no ip http secure-server
!
!
!
ip prefix-list 1 seq 5 deny 5.5.5.0/24
!
route-map 1 permit 10
match ip address prefix-list 1
!
route-map 1 permit 20
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
shutdown
!
!
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配置:
interface Loopback0
ip address 2.2.2.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 10.12.0.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 10.23.0.1 255.255.255.0
ip policy route-map 1
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
router-id 2.2.2.1
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 10.12.0.0 0.0.0.255 area 0
network 10.23.0.0 0.0.0.255 area 0
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
shutdown
!
!
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



您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-8-28 00:08 , Processed in 0.096751 second(s), 24 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表