8-3 Redistributing Routing Information


  • Routes can be redistributed from one IP routing protocol to another when both are running simultaneously on a router. Only routes present in the routing table are actually redistributed into and advertised by another routing protocol.

  • Routing information can be conditionally redistributed using a route map.

  • Route metrics do not automatically translate or scale from one routing protocol to another.

  • A default metric can be used for redistribution, or metrics can be modified based on a route map.

NOTE

Use caution when redistributing routes between different routing protocols, because the resulting route metrics might not be what you expect. Always use a default metric or a route map to assign new metrics that agree with the new routing protocol.


Configuration

  1. Enable the routing process into which routes will be redistributed: RIP (see Section 7-2), IGRP (see Section 7-3), EIGRP (see Section 7-4), OSPF (see Section 7-5), BGP (see Section 7-6), or IS-IS (see Section 9-1):

     (global)  router   protocol  [  process-id  ] 
  2. (Optional) Assign a default metric for all redistributed routes:

     (router)  default-metric   metric  

    All routes from all redistributed routing processes receive this metric value. For IGRP and EIGRP, the value metric is actually five values: bandwidth delay reliability loading mtu.

    NOTE

    Table 8-3 compares routing protocol metrics. Metrics do not automatically scale or translate when you redistribute routes between routing protocols. This table provides an idea of the range of metric values and how they are computed so that you can choose appropriate default metric values.

Table 8-3. Routing Protocol Metric Comparisons
Routing Protocol Metric Components Range
RIP Hop count

0 to 16

(16 = unreachable)

IGRP and EIGRP

metric =
   k1 * bandwidth
   + (k2 * bandwidth)/(256load)
   + k3 * delay
if k5 > 0
   metric = metric * (k5/(reliability * k4)

Defaults: k1 = 1, k2 = 0, k3 = 1, k4 = 0, k5 = 0
or metric =  lowest  bandwidth
    + sum of delays along the route

bandwidth: kilobits per second
delay: 10 microsecond units
reliability: 0 to 255 (255 = 100% reliable)
loading: 0 to 255 (255 = 100% loading)
mtu: MTU of route in bytes

Example: Fast Ethernet
   bandwidth = 100000
   delay =100
   reliability = 255
   loading = 1
   mtu = 1500

1 to 4294967295

(4294967295= a poisoned or inaccessible route)

OSPF 10 8 divided by interface bandwidth 1 to 65535
BGP MED 1 to 4294967295
IS-IS Hop count unless configured on each interface 0 to 63 per interface
  1. (Optional) Create a route map to conditionally redistribute routes into a routing process.

    1. Define a route map for redistribution:

       (global)  route map   map-tag  [  permit   deny  ] [  sequence-num  ] 

      The route map named map-tag either permits or denies a certain action. If more than one action is to be defined, the sequence number must be used. Route maps with the same name are processed in sequential order. For route redistribution, a matching permit action redistributes routes according to the route map, whereas a matching deny action does not redistribute them.

    2. (Optional) Define a matching condition for the route map. If no matching condition is defined, every route is successfully matched. Here are some of the matching conditions for route maps:

      • Match the IP address of the route itself:

         (route-map)  match ip address   access-list  [...  access-list  ] 

        -OR-

         (route-map)  match ip address prefix-list   prefix-list-name  [...  prefix-list-name  ] 

        A standard or extended IP access list (either named or numbered) or an IP prefix list can be used to match each route's network address. Refer to Chapter 14, "Access Lists and Regular Expressions," for more information about either list type.

        NOTE

        Normally, a standard access list is used to match the destination network address. However, exactly matching a network address that is a summary or aggregate address (that is, 128.0.0.0) and not any of the more-specific routes contained within the summary requires the use of an extended access list. Here, both the network number and subnet mask are matched. The source address and mask portions of the access list correspond to the route's network number (that is, 128.0.0.0 0.255.255.255). The destination address and mask portions are used to match the subnet mask (that is, 255.0.0.0 0.0.0.0).

        NOTE

        Alternatively, an IP prefix list can be used to exactly match the summary address.

      • Match against a route's metric:

         (route-map)  match metric   metric  

        The metric value is used to match the metric of each route. (In the case of IGRP or EIGRP, the metric value is the composite metric and not the five-part metric.)

      • Match against the IP address of the next -hop router:

         (route-map)  match ip next-hop   access-list  [...  access-list  ] 

        Routes with next-hop router addresses that are permitted by a standard or extended IP access list are matched.

      • Match against a route's tag value:

         (route-map)  match tag   tag  [...  tag  ] 

        The tag attribute of each route is compared to one or more tag values (0 to 4294967295) specified.

      • Match against a route's next-hop outbound interface:

         (route-map)  match interface   type number  [  ... type number  ] 

        Routes with their next hop located out one or more of the specified interfaces are matched.

      • Match against the IP address of the advertising router:

         (route-map)  match ip route-source   access-list  [  ...access-list  ] 

        Routes that have been advertised by a router with IP addresses permitted by a standard or extended IP access list are matched.

      • Match against the type of route:

         (route-map)  match route-type  {  local   internal   external  [  type-1   type-2  ]  level-1   level-2  } 

        Routes are matched according to their type: local (BGP locally generated), internal (EIGRP internal or OSPF intra-area and interarea), external (EIGRP external), external type-1 (OSPF Type 1 external), external type-2 (OSPF Type 2 external), level-1 (IS-IS Level 1), or level-2 (IS-IS Level 2).

      • (BGP only) Match against an AS path :

         (route-map)  match as-path   as-path-list-number  

        An AS path access list (1 to 199) is used to match an AS regular expression. See Section 7-5 for more information about configuring an AS path access list.

      • (BGP only) Match against a community list:

         (route-map)  match community-list   community-list  [  exact  ] 

        A community list (1 to 99) is used to match community values. The exact keyword is used to match the list of community values exactly. Refer to Section 7-5 for more information about configuring an IP community list.

    3. (Optional) Configure attributes to be set during redistribution.

      • Set the next-hop IP address for a route:

         (route-map)  set next-hop   ip-address  
      • Set the route metric:

         (route-map)  set metric  [+  -]  metric  

        -OR-

         (route-map)  set metric   bandwidth delay reliability loading mtu  

        The redistributed route is assigned the specified metric value. Use the first single-value case with all but IGRP and EIGRP. metric ranges from 0 to 4294967295. If the plus or minus signs are used with a value, the metric is adjusted by that value. Lower metric values are preferred.

      • Set the route metric type:

         (route-map)  set metric-type  {  internal   external   type-1   type-2  } 

        The metric types of the redistributed route are internal and external for IS-IS and type-1 and type-2 for OSPF.

      • Set the route tag value:

         (route-map)  set tag   tag  

        By default, a route's tag value is redistributed as is into the new routing protocol. The tag value (0 to 4294967295) can be set if desired. Tags are arbitrary values that can be used to mark and filter routes during redistribution.

      • Automatically compute a route's tag value:

         (route-map)  set automatic-tag  

        By default, route tags are arbitrary values that can be set or matched with route maps. An automatic tag computation is also available, to be used where BGP interacts with OSPF on Autonomous System Boundary Routers (ASBRs). Automatic tag computation is described in RFC 1403, "BGP OSPF Interaction."

      • (BGP only) Set the BGP local preference value:

         (route-map)  set local-preference   value  

        value can be from 0 to 4294967295 (the default is 100). Higher local preference values are preferred.

      • (BGP only) Set the BGP weight:

         (route-map)  set weight   weight  

        The BGP weight value ranges from 0 to 65535 (the default is not changed). Weights set with a route map override weights set with BGP neighbor commands. Routes with a higher weight are preferred.

      • (BGP only) Set the BGP origin:

         (route-map)  set origin  {  igp   egp   as   incomplete  } 

        Set the origin to igp (the origin is inside the local AS; normally seen if the BGP network command is used or if IGP routes are redistributed into BGP), egp (learned from EGP from AS number as ), or incomplete (the origin is unknown, or a static route is redistributed into BGP).

      • (BGP only) Modify the BGP AS path:

         (route-map)  set as-path  {  tag   prepend   as-path-string  } 

        as-path-string is prepended to the AS path attribute. By prepending the local AS multiple times, you can modify the path length to influence the path-selection process on a distant peer.

      • (BGP only) Set the BGP community attribute:

         (route-map)  set community  {  community  [  additive  ]}  none  

        The community attribute is set to the community value. If the additive keyword is used, the community value specified is added to the existing community attribute. The none keyword removes all community values.

      • (BGP only) Set the BGP route dampening parameters:

         (route-map)  set dampening   halflife reuse suppress max-suppress-time  

        The halflife value ranges from 1 to 45 minutes (the default is 15 minutes). The reuse penalty threshold ranges from 1 to 20000 (the default is 750). The suppress penalty threshold ranges from 1 to 20000 (the default is 2000). max-suppress-time ranges from 1 to 20000 minutes (the default is 60 minutes).

    4. (Optional) Define more route map commands, using the same name with greater sequence numbers .

    5. Apply the route map to a redistribution process, as defined next.

  2. For the corresponding routing process described next, redistribute routes from other routing protocols or sources ( connected, static, rip, igrp, eigrp, ospf, bgp, or isis; connected routes result from directly connected interfaces with assigned IP addresses).

    • Redistribute into RIP:

       (router)  redistribute   protocol  [  process-id  ] [  metric   metric  ]   [  route-map   map  ] 

      Routes imported into RIP can receive a fixed metric value metric if desired. You can use an optional route map for conditional redistribution and attribute modification.

    • Redistribute into IGRP:

       (router)  redistribute   protocol  [  process-id  ] [  metric   bandwidth   delay reliability loading mtu  ] [  route-map   map  ] 

      Routes imported into IGRP can receive a fixed set of metric values if desired. When redistributing from EIGRP, the metric values are properly preserved. You can use an optional route map for conditional redistribution and attribute modification.

    • Redistribute into EIGRP:

       (router)  redistribute  protocol [process-id] [  metric  bandwidth   delay reliability  loading mtu  ] [  route-map   map  ] 

      Routes imported into EIGRP can receive a fixed set of metric values if desired. When redistributing from IGRP, the metric values are properly preserved. You can use an optional route map for conditional redistribution and attribute modification.

    • Redistribute into OSPF:

       (router)  redistribute   protocol  [  process-id  ] [  metric   metric  ]   [  metric-type   type  ] [  match  {  internal   external 1   external   2  }]   [  tag   tag  ] [  subnets  ] [  route-map   map  ] 

      Routes imported into OSPF can receive a fixed metric value. By default, routes imported into OSPF are flagged as Type 2 external routes unless the metric-type option is used. When OSPF routes are redistributed into another OSPF process, the match keyword can be used to filter only internal, Type 1, or Type 2 external routes. The tag keyword is used to assign a tag field to external routes to be exchanged between ASBRs. By default, only routes that are not subnetted are redistributed into OSPF unless the subnets keyword is given. An optional route map can be used for conditional redistribution and attribute modification.

      NOTE

      An OSPF router that redistributes routes from another source becomes an ASBR.

    • Redistribute into BGP:

       (router)  redistribute   protocol  [  process-id  ] [  metric   metric  ]   [  weight   weight  ] [  route-map   map  ] 

      Routes imported into BGP can receive a fixed metric value for the Multi-Exit Discriminator (MED) or the INTER_AS (BGP versions 2 and 3). A fixed BGP weight value can also be assigned to all redistributed routes. An optional route map can be used for conditional redistribution and attribute modification.

    • Redistribute into IS-IS:

       (router)  redistribute   protocol  [  process-id  ] [  metric   metric  ]   {  level-1   level-1-2   level-2  } [  route-map   map  ] 

      Routes imported into IS-IS can receive a fixed metric value. Imported routes can be redistributed at level-1 (intra-area) or at level-2 (interarea) or both. An optional route map can be used for conditional redistribution and attribute modification.

Example

Routes from EIGRP process 101 are redistributed into the RIP process and are given a default RIP metric of 5:

  router rip   network 192.168.1.0   default-metric 5   redistribute eigrp 101  

Routes (including subnets) from the RIP process are redistributed into OSPF process 200 with a metric of 10. Routes (including subnets) from EIGRP process 200 are redistributed into OSPF process 200 with a metric of 5. For EIGRP process 200, all routes from RIP are redistributed with a bandwidth metric of 100 Mbps, a delay metric of 100, a reliability metric of 255, a loading metric of 1, and an MTU of 1500 bytes:

  router ospf 200   network 172.16.3.0 0.0.0.255 area 0.0.0.0   redistribute rip metric 10 subnets   redistribute eigrp 200 metric 5 subnets   router rip   network 10.0.0.0   router eigrp 200   network 192.168.1.0   redistribute rip metric 100000 100 255 1 1500  

A route map is used to conditionally redistribute routes from the OSPF process into BGP. Specifically, only routes with a tag number of 10 are redistributed with a metric of 10:

  router ospf 199   network ...   router bgp 1001   neighbor ...   redistribute ospf 199 route-map ospf-to-bgp   route-map ospf-to-bgp permit   match tag 10   set metric 10  


Cisco Field Manual[c] Router Configuration
Cisco Field Manual[c] Router Configuration
ISBN: 1587050242
EAN: N/A
Year: 2005
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net