None
Manipulating Routing Updates - digidraft.net

Manipulating Routing Updates

2017-12-11

Multiple IP Routing Protocols

    The key issues that arise when using redistribution are as follows:
  • Routing feedback (loops) - Depending on how you employ redistribution - for example, if more than one boundary router is performing route redistribution - routers might send routing information received from one autonomous system back into that same autonomous system. This feedback is similar to the routing loop problem that occurs with distance vector protocols.
  • Incompatible routing information - Because each routing protocol uses different metrics to determine the best path and because the metric information about a route cannot be translated exactly into a different  protocol, path selection using the redistributed route information might not be optimal.
  • Inconsistent convergence times - Different routing protocols converge at different rates. For example, RIP  converges more slowly than EIGRP, so if a link goes down, the EIGRP network learns about it before the RIP network.

    A metric of infinity tells the router that the route is unreachable and, therefore, should not be advertised. Therefore, when redistributing routes into RIP, IGRP, and EIGRP, you must specify a seed metric; otherwise, the redistributed routes will not be advertised.

  • RIP - 0, which is interpreted as infinity.
  • IGRP/EIGRP - 0, which is interpreted as infinity.
  • OSPF - 20 for all except BGP routes, which have a default seed metric of 1 (all default to type E2). (Note that when redistributing OSPF into OSPF, metrics associated with both intra-area and interarea routes are preserved.)
  • IS-IS - 0.
  • BGP - BGP metric is set to IGP metric value.

    If you use the default-metric command, the default metric you specify applies to all protocols being redistributed into this protocol. If you use the metric parameter in the redistribute command, you can set a different default metric for each protocol being redistributed. A metric configured in a redistribute command overrides the value in the default-metric command for that one protocol.

Redistributing into RIP

RtrA(config)#router rip
RtrA(config-router)#redistribute ospf ?
<1-65535>
Process ID
RtrA(config-router)#redistribute ospf 1 ?
match Redistribution of OSPF routes
metric Metric for redistributed routes
route-map Route map reference

    On Router A, routes from OSPF process 1 are redistributed into RIP and are given a seed metric of 3. Because no route type is specified, both internal and external OSPF routes are redistributed into RIP. Notice that Router B learns about the 172.16.0.0 network from Router A via RIP; Router B’s routing table has 172.16.0.0 installed as a RIP route. 

Redistributing into OSPF

    Redistribute Command for OSPF:

  • protocol - The source protocol from which routes are redistributed. It can be one of thefollowing keywords: bgp, connected, eigrp, isis, iso-igrp, mobile, odr, ospf, rip, or static.
  • process-id - For BGP or EIGRP, this value is an autonomous system number. For OSPF, this value is an OSPF process ID. This parameter is not required for RIP or IS-IS.
  • metric-value (Optional) - A parameter that specifies the OSPF seed metric used for the redistributed route. When redistributing into OSPF, the default metric is 20 (except for BGP routes, which have a default metric of 1). The metric for OSPF is cost. (Note that when redistributing OSPF into OSPF, metrics associated with both intra-area and interarea routes are preserved.)
  • type-value (Optional) - An OSPF parameter that specifies the external link type associated with the external route advertised into the OSPF routing domain. This value canmap-tag be 1 for type 1 external routes or 2 for type 2 external routes. The default is 2.
  • map-tag (Optional) - Specifies the identifier of a configured route map to be interrogated to filter the importation of routes from the source routing protocol to the current OSPF routing protocol.
  • subnets (Optional) - An OSPF parameter that specifies that subnetted routes should also be redistributed. Only routes that are not subnetted are redistributed if the subnets keyword is not specified.
  • tag-value (Optional) - A 32-bit decimal value attached to each external route. The OSPF protocol itself does not use this parameter; it may be used to communicate information between OSPF Autonomous System Boundary Routers (ASBRs).

    Redistribution into OSPF can also be limited to a defined number of prefixes with the redistribute maximum-prefix maximum [threshold] [warning-only] router configuration command. The threshold parameter will default to logging a warning at 75 percent of the defined maximum value configured. After reaching the defined maximum number, no further routes are redistributed. If the warning-only parameter is configured, no limitation is placed on redistribution, and the maximum value number simply becomes a second point where another warning messaged is logged.

Redistributing into EIGRP

    Redistribute Command for EIGRP:

  • protocol - The source protocol from which routes are redistributed. It can be one of the following keywords: bgp, connected, eigrp, isis, iso-igrp, mobile, odr, ospf, rip, or static.
  • process-id - For BGP or EIGRP, this value is an autonomous system number. For OSPF, this value is an OSPF process ID. This parameter is not required for RIP or IS-IS.
  • route-type (Optional) - A parameter used when redistributing OSPF routes into another routing protocol. It is the criterion by which OSPF routes are redistributed into other routing domains. It can be one of the following:
    internal - Redistributes routes that are internal to a specific autonomous system
    external 1 - Redistributes routes that are external to the autonomous system but are imported into OSPF as a type 1 external route
    external 2 - Redistributes routes that are external to the autonomous system butare imported into OSPF as a type 2 external route
  • metric-value (Optional) - A parameter that specifies the EIGRP seed metric, in the order of bandwidth, delay, reliability, load, and maximum transmission unit (MTU), for the redistributed route. When redistributing into EIGRP (and all protocols other than OSPF and BGP), if this value is not specified and no value is specified using the default-metric router configuration command, the default metric is 0. For EIGRP (and all protocols other than IS-IS), the default metric of 0 is interpreted as infinity, and routes will not be redistributed. The metric for EIGRP is calculated based only on bandwidth and delay by default.
  • map-tag (Optional) - Specifies the identifier of a configured route map that is interrogated to filter the importation of routes from the source routing protocol to the current EIGRP routing protocol.

    When redistributing routes from another routing protocol into EIGRP, the default metric is 0, which is interpreted infinity. When redistributing a static or connected route into EIGRP, the default metric is equal to the metric of the associated static or connected interface, so the metric does not have to be specified.

    Metric-value Parameters for EIGRP:

  • bandwidth - The route’s minimum bandwidth in kilobits per second (kbps). It can be 0 or any positive integer.
  • delay - Route delay in tens of microseconds. It can be 0 or any positive integer that is a multiple of 39.1 nanoseconds.
  • reliability - The likelihood of successful packet transmission, expressed as a number from 0 to 255, where 255 means that the route is 100 percent reliable, and 0 means unreliable.
  • loading - The route’s effective loading, expressed as a number from 1 to 255, where 255 means that the route is 100 percent loaded.
  • mtu - Maximum transmission unit. The maximum packet size in bytes along the route; an integer greater than or equal to 1.

    The metric configured in this example is interpreted as follows:
Bandwidth in kbps = 10,000
Delay in tens of microseconds = 100
Reliability = 255 (maximum)
Load = 1 (minimum)
MTU = 1500 bytes

Modifying Administrative Distance

    For all protocols use the distance administrative-distance [address wildcard-mask [ip-standard- list] [ip-extended-list]] router configuration command .

    Alternatively, for EIGRP, the distance eigrp internal-distance external-distance router configuration command can be used .

  • internal-distance - Specifies the administrative distance for EIGRP internal routes. Internal routes are those that are learned from another entity within the same EIGRP autonomous system. The distance can be a value from 1 to 255. The default is 90.
  • external-distance - Specifies the administrative distance for EIGRP external routes. External routes are those for which the best path is learned from a neighbor external to the EIGRP autonomous system. The distance can be a value from 1 to 255. The default is 170.

    Modifying Administrative Distance for EIGRP Example:

router eigrp 100
network 192.168.7.0
network 172.16.0.0
distance eigrp 80 130
distance 90 192.168.7.0 0.0.0.255
distance 120 172.16.1.3 0.0.0.0

    192.168.7 0.0.0.255 command sets the administrative distance to 90 for all routes .0 learned from routers on the Class C network 192.168.7.0. The distance 120 172.16.1.3 0.0.0.0 command sets the administrative distance to 120 for all routes from the router with the address 172.16.1.3.

    Alternatively for OSPF, the distance ospf {[intra-area dist1] [inter-area dist2] [external dist3]} router configuration command.

  • dist1 - (Optional) Specifies the administrative distance for all OSPF routes within an area. Acceptable values are from 1 to 255. The default is 110.
  • dist2 - (Optional) Specifies the administrative distance for all OSPF routes from one area to another area. Acceptable values are from 1 to 255. The default is 110.
  • dist3 - (Optional) Specifies the administrative distance for all routes from other routing domains, learned by redistribution. Acceptable values are from 1 to 255. The default is 110.
router ospf 10
network 192.168.7.0 0.0.0.255 area 0
network 172.16.0.0 0.0.255.255 area 0
distance ospf external 100 inter-area 100 intra-area 100
distance 90 10.0.0.0 0.0.0.255
distance 110 10.11.0.0 0.0.0.255
distance 130 10.11.12.0 0.0.0.255

    Set the adminis trative distance to 90, 110, and 130, respectively, for all routes learned from routers with specific addresses; notice that the router’s addresses are specified from least to the most specific. For example, routes from a router with address 10.10.0.1 will have an administrative distance of 90, and routes from a router with address 10.11.12.1 will have an administrative distance of 130.

    Alternatively, for BGP, the distance bgp external-distance internal-distance local-distance router configuration command.

  • external - Specifies the administrative distance for BGP external routes. External routes distance are routes for which the best path is learned from a neighbor external to the autonomous system. Acceptable values are from 1 to 255. The default is 20.
  • internal - distance Specifies the administrative distance for BGP internal routes. Internal routes are learned from another BGP entity within the same autonomous system. Acceptable values are from 1 to 255. The default is 200.
  • local -  distance Specifies the administrative distance for BGP local routes. Local routes are networks that are listed with a network router configuration command, often as back doors, for that router or for networks that are redistributed from another process. Acceptable values are from 1 to 255. The default is 200.

    Redistribution Using Administrative Distance Example:

hostname R1
!
router ospf 1
redistribute rip metric 10000 metric-type 1 subnets
network 172.31.0.0 0.0.255.255 area 0
distance 125 0.0.0.0 255.255.255.255 64
!
router rip
version 2
redistribute ospf 1 metric 5
network 10.0.0.0
no auto-summary
!
access-list 64 permit 10.3.1.0
access-list 64 permit 10.3.3.0
access-list 64 permit 10.3.2.0
access-list 64 permit 10.200.200.31
access-list 64 permit 10.200.200.32
access-list 64 permit 10.200.200.33
access-list 64 permit 10.200.200.34
hostname R2
!
router ospf 1
redistribute rip metric 10000 metric-type 1 subnets
network 172.31.0.0 0.0.255.255 area 0
distance 125 0.0.0.0 255.255.255.255 64
!
router rip
version 2
redistribute ospf 1 metric 5
network 10.0.0.0
no auto-summary
!
access-list 64 permit 10.3.1.0
access-list 64 permit 10.3.3.0
access-list 64 permit 10.3.2.0
access-list 64 permit 10.200.200.31
access-list 64 permit 10.200.200.32
access-list 64 permit 10.200.200.33
access-list 64 permit 10.200.200.34
  • 125 - Defines the administrative distance that specified routes are assigned
  • 0.0.0.0 255.255.255.255 - Defines the source address of the router supplying the rout ing information - in this case, any router
  • 64 - Defines the access list to be used to filter incoming routing updates to determine which will have their administrative distance changed

    Therefore, when either of these routers learns about these networks from both RIPv2 and OSPF, it selects the routes learned from RIPv2 - with a lower administrative distance of 120 - over the same routes learned from OSPF (via redistribution from the other boundary router) - with an administrative distance of 125 - and puts only the RIPv2 routes in the routing tables.

Route Maps

    It is important to understand what the permit and deny mean when redistributing. When used with a redistribute command, a route-map statement with permit indicates that the matched route is to be redistributed, while a route-map statement with deny indicates that the matched route is not to be redistributed.

router ospf 10
redistribute rip route-map redis-rip subnets
route-map redis-rip permit 10
    match ip address 23 29
    set metric 500
    set metric-type type-1
route-map redis-rip deny 20
    match ip address 37
route-map redis-rip permit 30
    set metric 5000
    set metric-type type-2
access-list 23 permit 10.1.0.0 0.0.255.255
access-list 29 permit 172.16.1.0 0.0.0.255
access-list 37 permit 10.0.0.0 0.255.255.255

    Route Maps with Tags.

router eigrp 100redistribute rip metric 10000 100 255 1 1500 route-map intoeigrp
<output omitted>
!
router rip
redistribute eigrp 100 metric 3 route-map intorip
<output omitted>
!
route-map intoeigrp deny 10
match tag 40
!
route-map intoeigrp permit 20
set tag 20
!
route-map intorip deny 10
match tag 20
!
route-map intorip permit 20
set tag 40
!

Distribute Lists

    Because OSPF routers must maintain LSDB synchronization within an area, the distribute-list out command cannot be used with OSPF to block outbound LSAs on an interface. For OSPF, this command works only on the routes being redistributed by ASBRs into OSPF; in other words, the command can be applied to external type 2 and external type 1 routes, but not to intra-area or interarea routes.

    The distribute-list in command prevents most routing protocols from placing the filtered routes in their database. However, OSPF routes cannot be filtered from entering the OSPF LSDB. Thus, when this command is used with OSPF, the routes are still placed in the LSDB; they are only filtered from entering the routing table.

router ospf 1
    network 10.0.0.8 0.0.0.3 area 0
    redistribute rip subnets
    distribute-list 2 out rip
router rip
    network 10.0.0.0
    version 2
    passive-interface Serial0/0/3
    redistribute ospf 1 metric 5
    distribute-list 3 out ospf 1
access-list 2 deny 10.8.0.0 0.3.255.255
access-list 2 permit any
access-list 3 permit 10.8.0.0 0.3.255.255

Prefix Lists

router ospf 1
    network 10.0.0.8 0.0.0.0 area 0
    redistribute rip route-map intoOSPF subnets
router rip
    network 10.0.0.0
    version 2
    passive-interface s0/0/0
    redistribute ospf 1 route-map intoRIP metric 5
route-map intoOSPF permit 10
    match ip address prefix-list PFX1
route-map intoRIP permit 10
    match ip address prefix-list PFX2
ip prefix-list PFX1 permit 10.0.0.0/14
ip prefix-list PFX2 permit 10.8.0.0/14

Multiple Methods

Leave a Comment: