免费注册 查看新帖 |

Chinaunix

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

Using Route Maps to Control Routing Updates [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-06-27 02:19 |只看该作者 |倒序浏览
Route maps are similar to a scripting language because of the following reasons:
1: They work like a more sophisticated[sE5fistikeitid] access list.
   -Top down processiong
   -Once there is a match,leave the route map
2: Lines are sequence-numbered for easier editing.
   -Insertion of lines
   -deletion of lines
3: Route maps are named rather than numbered for easier documentation.
4: Match criteria and set criteria can be used,similar to the if, then logic in a scripting language
===============================================================
Route Map Applications
Following are the common uses of route maps:
1: Redistribution route filtering:A more sophisticated alternative to distribute lists
2: Policy-based routing: The ability to determine routing policy based on criteria other than the destination network.
3: NAT:Defines pools of public and private address space used in translation.
4: BGP policy implementation: The primary tool for defining BGP routing policies.
===============================================================
Route-Map Operation
A list of statements compose a route map.
The list is processed top-down like an access list.
The first match found for a route is applied.
The sequence number is used for inserting or deleting specific route-map statements.
    route-map my_bgp permit 10
          ..    ..    ..
          ..    ..    ..
         { match statements }
          ..    ..    ..
          ..    ..    ..
         { set statements }
     route-map my_bgp deny 20
          ..    ..    ..
          ..    ..    ..
     route-map my_bgp permit 30
          ..    ..    ..
          ..    ..    ..
The match statement may contain multiple references.
Multiple match criteria in the same line uses a logical OR.
At lease one reference must permit the route for it to be a candidate for redistribution.
           route-map my_bgp permit 10
           match ip address x y z
                            logical OR
           route-map my_bgp deny 2o
   logical match  ... a
    AND    match  ... b
           match  ... c
Each vertical match uses a logical AND
All match statements must permit the route for it to remain a candidate for redistribution.
Route-map permit or deny determines if the candidate will be redistributed.
=======================================================
Route Map Commands
router(config-router)#redistribute protocol [process id] route-map map-tag
.Allows for detailed control of routes being redistributed into a routing protocol
router(config)#route-map map-tag [permit | deny ] [sequence-number]
.Defines the route-map conditions
router(config-route-map)#match {conditions}
.Defines the conditons to match
router(config-route-map)#set {actions}
.Defines the action to be taken on a match
=======================================================
The match Command
The match commands specify criteria to be matched.
The associated route-map statement permits or denies the matching routes.
    Match {options}
      options :
      ip address ip -access-list
      ip router-source ip-access-list
      ip next-hop ip address-list
      interface type number
      metric metric-value
      route-type [external | internal | level-1 |level-2 |local]
      ...
===========================================================
The set Command
The set commands modify matching routes.
Modifies parameters in redistributed routes
    set {options}
    ...
    bgp specific options :
    ...
=====================================================
Route Maps and Redistribution
router(config)#router ospf 10
router(config-router)#redistribute rip route-map redis-rip
    router(config)#
    route-map redis-rip permit 10    router(config)#
    match ip address 23 29           access-list 23 permit ...
    set metric 500                   access-list 29 permit ...
    set metric-type type-1           access-list 37 permit ...
   
    route-map redis-rip deny 20
    match ip address 37
   
    route-map redis-rip permit 30
    set metric 5000
    set meric-type type-2
==========================================================
Example: Redistribution with Route Maps
    partial configuration for Routers A and B:
    access-list permit 192.168.1.0 0.0.0.255
    route-map pacific deny 10
     match ip address 1
    route-map pacific permit 20
   
    route rip
      redistribute ospf 10 route-map pacific
    router ospf 10
      redistrbute rip subnets
====================================================
Summmary


This lesson presented these key points:
A route map is a complex tool used for manipulating and filtering routes.
Route maps work similarly to access lists,but offer better editing features and complex match and set commands for route manipulation
When used for redistribution,route maps match routes.
These routes are either permitted to redistribute or denied.If permitted, the metric value cam be specified as the route is redistributed into the new protocol

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/15545/showart_133140.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP