Chinaunix首页 | 论坛 | 博客
  • 博客访问: 18690018
  • 博文数量: 7460
  • 博客积分: 10434
  • 博客等级: 上将
  • 技术积分: 78178
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-02 22:54
文章分类

全部博文(7460)

文章存档

2011年(1)

2009年(669)

2008年(6790)

分类: 系统运维

2008-03-20 21:17:06

It is entirely possible (and often necessary) to exchange routes learned by one protocol into another. An example of such a case would be where a network cannot be managed by a single protocol due to s oftware or hardware limitations. Such limitations might be due to a lack of adequate memory in the router or a router that does not support the desired protocol. It might also be the case that functionality provided by one protocol is not sufficient in a particular area of the network and another protocl must be left to manage that section. In order for the rest of the network to know the routes to those other sections and vice versa, the protocols must exchange routing information.

Assume that a collection of routers only speak RIP but that these routes need to make their way into EIGRP and the EIGRP routes neet to be injected into RIP. Redistribution would occur at the boundry router and would look similar to the example that follows.

router eigrp 10
redistribute rip

router rip
redistribute eigrp 10

The routes that one protocol learns are now visible to the other. But assume for a momment that the network running RIP only needs to default out to the network running EIGRP. In this case, the RIp network does not need to see the eigrp routes and the redistribution is only necessary into EIGRP. This saves memory on the RIP routers, network bandwidth, calculation time, etc and generaly makes things run cleaner. It also eliminates one problem with the configuration shown above. Once the routes from the RIP process are distributed into the EIGRP process, they become EIGRP routes and are eligigle to be distibuted BACK into the RIP process. This can create routing loops and destroy the connectivity of the network. When using such mutual redistribution, careful filtering is required to avoid such pitfalls. This filtering is set by using a route-map along with the redistribution statement.

In this example, the RIP network needs to learn the EIGRP routes and send its routes back. The RIP network manages routes for 10.2.3.0/24 and 10.2.4.0/24. The EIGRP network routes the rest of the 10.0.0.0/8 network.

router eigrp 10
redistribute rip route-map rip-in

router rip
redistribute eigrp 10 route-map eigrp-in

route-map rip-in permit 10
match ip address 20

route-map eigrp-in permit 10
match ip address 21

access-list 20 permit 10.2.3.0 0.0.0.255
access-list 20 permit 10.2.4.0 0.0.0.255

access-list 21 deny 10.2.3.0 0.0.0.255
access-list 21 deny 10.2.4.0 0.0.0.255

This effectively limits the routes seen by the two processes. This is not the only method of filtering, however. Assuming the same access lists, the following two configurations would also work.

router rip
redistribute eigrp 10 metric 2
distribute-list 21 in

router eigrp 10
redistribute rip
default-metric 1000 100 250 100 200

Or

router rip
redistribute eigrp 10
distribute-list 20 out

router eigrp 10
redistribute rip
distribute-list 21 out

These two examples accomplish the same end result as the route-map example above. In addition, two other features are demonstrated. The first is the setting of a metric on the inbound routes. The second is a default metric used when the metric cannot properly be calculated or when information is missing (as in the redistribution). This information is specific to the protocol and the command refference guide should be used to determine which values to use.
阅读(643) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~