免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3885 | 回复: 9
打印 上一主题 下一主题

重分布加distribute-list 好像无法起作用 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-03-31 09:55 |只看该作者 |倒序浏览
拓扑我简单描述下    R1----------R2------------R3  R1跑RIP  R3跑OSPF  R2做重分布,重分布后3台路由表一切正常  都有对区域相关IP  我想用distribute-list在RIP重分布的时候过滤掉一条路由  但好像不起作用。

R1:
interface Loopback0
ip address 192.168.1.1 255.255.255.0
!
interface Loopback1
ip address 192.168.2.1 255.255.255.0
!
interface Loopback2
ip address 192.168.3.1 255.255.255.0
!
interface Serial1/1
ip address 10.1.1.1 255.255.255.0
serial restart-delay 0
!
router rip
version 2
network 10.0.0.0
network 192.168.1.0
network 192.168.2.0
network 192.168.3.0
no auto-summary
!

论坛徽章:
0
2 [报告]
发表于 2009-03-31 09:58 |只看该作者
R2:
!
interface Serial1/0
ip address 10.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 10.2.2.2 255.255.255.0
serial restart-delay 0
!!
router ospf 1
log-adjacency-changes
redistribute rip subnets
network 10.2.2.0 0.0.0.255 area 0
distribute-list 1 in
!
router rip
version 2
redistribute ospf 1 metric 1
network 10.0.0.0
!!
access-list 1 deny   192.168.1.0 0.0.0.255
access-list 1 permit any
!

论坛徽章:
0
3 [报告]
发表于 2009-03-31 10:00 |只看该作者
R3:
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!!
interface Serial1/0
ip address 10.2.2.3 255.255.255.0
serial restart-delay 0
!!
router ospf 2
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 10.2.2.0 0.0.0.255 area 0
!

论坛徽章:
0
4 [报告]
发表于 2009-03-31 10:03 |只看该作者
路由表:
R1:
R    3.0.0.0/8 [120/1] via 10.1.1.2, 00:00:21, Serial1/1
     10.0.0.0/24 is subnetted, 2 subnets
R       10.2.2.0 [120/1] via 10.1.1.2, 00:00:21, Serial1/1
C       10.1.1.0 is directly connected, Serial1/1
C    192.168.1.0/24 is directly connected, Loopback0
C    192.168.2.0/24 is directly connected, Loopback1
C    192.168.3.0/24 is directly connected, Loopback2

R2:
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 10.2.2.3, 00:15:36, Serial1/1
     10.0.0.0/24 is subnetted, 2 subnets
C       10.2.2.0 is directly connected, Serial1/1
C       10.1.1.0 is directly connected, Serial1/0
R    192.168.1.0/24 [120/1] via 10.1.1.1, 00:00:23, Serial1/0
R    192.168.2.0/24 [120/1] via 10.1.1.1, 00:00:23, Serial1/0
R    192.168.3.0/24 [120/1] via 10.1.1.1, 00:00:23, Serial1/0

R3:
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 2 subnets
C       10.2.2.0 is directly connected, Serial1/0
O E2    10.1.1.0 [110/20] via 10.2.2.2, 00:16:09, Serial1/0
O E2 192.168.1.0/24 [110/20] via 10.2.2.2, 00:16:09, Serial1/0
O E2 192.168.2.0/24 [110/20] via 10.2.2.2, 00:16:09, Serial1/0
O E2 192.168.3.0/24 [110/20] via 10.2.2.2, 00:16:09, Serial1/0

上边是做完过滤的路由表

论坛徽章:
0
5 [报告]
发表于 2009-03-31 10:09 |只看该作者
我在R2 的RIP里的OUT方向也做过结果还是一样,我真不知道那错了

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
6 [报告]
发表于 2009-03-31 12:35 |只看该作者
redistribute rip subnets 应该在这个地方加吧。

论坛徽章:
0
7 [报告]
发表于 2009-03-31 13:31 |只看该作者
R2(config-router)#REdistribute RIp SUbnets ?
  metric       Metric for redistributed routes
  metric-type  OSPF/IS-IS exterior metric type for redistributed routes
  route-map    Route map reference
  tag          Set tag for routes redistributed into OSPF
  <cr>
是应该在ROUTER的相应进程里边加,你说的好好像没明白意思楼上的

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
8 [报告]
发表于 2009-03-31 15:22 |只看该作者
是这样的:
distribute-list,是作用于动态路由协议的数据库与全局路由表之间的一个过滤列表。
你在R2上用于OSPF的Database和全局路由表之间做过滤,但是此时OSPF的Database里并没有192.168.1.0这个路由条目啊。系统路由表里的条目是RIP学习来的啊,因此这个列表是不起作用的。
正确的方法:

1、
在R2上做发布的时候进行过滤,范例如下:
!
router ospf 1
redistribute rip subnets route-map in-rip
!
access-list 1 deny   192.168.1.0 0.0.0.255
access-list 1 permit any
!
route-map in-rip permit 10
match ip address 1

2、
在R2的RIP上做过滤,范例如下:
!
router rip
version 2
redistribute ospf 1 metric 1
network 10.0.0.0
distribute-list 1 in
!
no ip http server
no ip http secure-server
!
!         
!
logging alarm informational
access-list 1 deny   192.168.1.0 0.0.0.255
access-list 1 permit any
!

3、在R3上直接过过滤,范例如下:
!
router ospf 2
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 10.2.2.0 0.0.0.255 area 0
distribute-list 1 in
!
access-list 1 deny   192.168.1.0 0.0.0.255
access-list 1 permit any
!

论坛徽章:
0
9 [报告]
发表于 2009-03-31 16:44 |只看该作者
distribute-list不是要和重分布路由一起应用吗,我是在R2上做重分布,按上边的意思难道可以在其他路由上做distribute-list,我有点糊涂了,是不是我概念不清楚呢。我一直认为distribute-list只能在做重分布的路由上应用在别的路由上是无法应用的。

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
10 [报告]
发表于 2009-03-31 20:31 |只看该作者
看来你的确是没搞清楚,distribute-list只是在动态路由协议数据库和全局路由表间的一个过滤机制而已。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP