Master CCNA

How to Master CCNA Ebook

 

 

My book will help you Master CCNA

Master CCNP SWITCH

How to master CCNP SWITCH ebook

 

 

My book will help you Master CCNP SWITCH

Master CCNP ROUTE

How to master CCNP ROUTE Ebook

 

 

My book will help you Master CCNP ROUTE

Print

RIP EIGRP Redistribution Route Tagging

Written by Rene Molenaar on . Posted in Redistribution

Scenario:

The Australia Zoo has hired you as a crocodile hunter network engineer responsible for all bits & bytes in the zoo. As an experiment the zoo decided to have the kangaroos and dolphins around the same lake to study the interaction between the animals. Both departments need to have access to each other's data which means you'll have to exchange routing information. To make sure there is no single point of failure you will use router Lassie and Willy to configure two-way redistribution. This however will also introduce new problems like routing loops or sub-optimal routing, it's up to you to enable redistribution and solve any problems along the way...

Goal:

  • All IP addresses have been preconfigured for you.
  • RIP and EIGRP have been preconfigred for you on the corresponding routers.
  • Enable two-way redistribution between RIP and EIGRP on router Lassie and Willy.
  • You notice that router Willy or Lassie are sending traffic to 4.4.4.4 towards router Flipper, make sure you get rid of this sub-optimal routing.
  • Use route tagging to accomplish this.

IOS:

c3640-jk9s-mz.124-16.bin

Topology:

Redistribution Route Tagging

You need to register to be able to download the GNS3 Topology File. (Registration is Free!)

Related Articles
Only registered users can write comments!

Comments (23)

  • avatar
    peter_mlr

    Hi Rene
    I got stuck in doing this. Can some one let me know the configuration for this

    Thanks
    Peter

  • avatar
    Mehdi93$

    I got stuck in doing this as well. Can some one let the final configuration.

    Thanks in advance.

    Mehdi.

  • avatar
    ReneMolenaar

    Hi Guys,

    I assume you know how to do redistribution so i'll keep it short to the route tagging part.

    In this scenario we have "two-way redistribution" and we want to make sure prefixes from one routing protocol are not advertised again into the same routing protocol.

    Example: network 4.4.4.0 will be redistributed INTO RIP at router Lassie. The redistributed network 4.4.4.0 will be redistributed AGAIN into EIGRP at router Willy.

    If we put a tag on the redistributed prefixes than we can make sure they won't be redistributed again.8)

    Here we go:

    When you configure redistribution you specify a route-map.

    router rip
    redistribute eigrp 234 metric 2 route-map EIGRP2RIP

    router eigrp 234
    redistribute rip route-map RIP2EIGRP metric 1 1 1 1 1

    When we find a prefix that is tagged with "88" we don't redistribute it

    route-map EIGRP2RIP deny 10
    match tag 88

    When we redistribute we tag the prefix with "77".

    route-map EIGRP2RIP permit 20
    set tag 77

    route-map RIP2EIGRP deny 10
    match tag 77

    route-map RIP2EIGRP permit 20
    set tag 88

    So if we see something that is tagged we don't redistribute it, otherwise we tag it and redistribute it.

    Does this make sense? good luck!

    Rene

  • avatar
    Mehdi93$

    ok thank you that's great !;D

    Mehdi.

  • avatar
    kenjidnb

    I have configured 2-way redistribution without route maps but I don't see the routing loops (all my pings are successful from skippy to flipper and from flipper to skippy).

    My config on Lassie (same redistribution commands on Willie):
    router eigrp 234
    redistribute rip metric 1 1 1 1 1
    network 192.168.24.0
    no auto-summary
    !
    router rip
    version 2
    redistribute eigrp 234 metric 2
    network 192.168.12.0
    no auto-summary


    And routing tables:
    Skippy#sh ip route | b Gate
    Gateway of last resort is not set

    D EX 192.168.12.0/24
    [170/2560002816] via 192.168.34.3, 00:02:10, FastEthernet1/0
    [170/2560002816] via 192.168.24.2, 00:02:10, FastEthernet0/0
    1.0.0.0/24 is subnetted, 1 subnets
    D EX 1.1.1.0 [170/2560002816] via 192.168.34.3, 00:02:10, FastEthernet1/0
    [170/2560002816] via 192.168.24.2, 00:02:10, FastEthernet0/0
    D EX 192.168.13.0/24
    [170/2560002816] via 192.168.34.3, 00:02:10, FastEthernet1/0
    [170/2560002816] via 192.168.24.2, 00:02:10, FastEthernet0/0
    4.0.0.0/24 is subnetted, 1 subnets
    C 4.4.4.0 is directly connected, Loopback0
    C 192.168.24.0/24 is directly connected, FastEthernet0/0
    C 192.168.34.0/24 is directly connected, FastEthernet1/0

    Flipper#sh ip route | b Gate
    Gateway of last resort is not set

    C 192.168.12.0/24 is directly connected, FastEthernet0/0
    1.0.0.0/24 is subnetted, 1 subnets
    C 1.1.1.0 is directly connected, Loopback0
    C 192.168.13.0/24 is directly connected, FastEthernet1/0
    4.0.0.0/24 is subnetted, 1 subnets
    R 4.4.4.0 [120/2] via 192.168.13.3, 00:00:20, FastEthernet1/0
    [120/2] via 192.168.12.2, 00:00:02, FastEthernet0/0
    R 192.168.24.0/24 [120/2] via 192.168.13.3, 00:00:20, FastEthernet1/0
    [120/2] via 192.168.12.2, 00:00:02, FastEthernet0/0
    R 192.168.34.0/24 [120/2] via 192.168.13.3, 00:00:20, FastEthernet1/0
    [120/2] via 192.168.12.2, 00:00:02, FastEther

    Willy#sh ip route | b Gate
    Gateway of last resort is not set

    R 192.168.12.0/24 [120/1] via 192.168.13.1, 00:00:02, FastEthernet0/0
    1.0.0.0/24 is subnetted, 1 subnets
    R 1.1.1.0 [120/1] via 192.168.13.1, 00:00:02, FastEthernet0/0
    C 192.168.13.0/24 is directly connected, FastEthernet0/0
    4.0.0.0/24 is subnetted, 1 subnets
    D 4.4.4.0 [90/156160] via 192.168.34.4, 00:02:40, FastEthernet1/0
    D 192.168.24.0/24 [90/30720] via 192.168.34.4, 00:02:40, FastEthernet1/0
    C 192.168.34.0/24 is directly connected, FastEthernet1/0

    Lassie#sh ip route | b Gate
    Gateway of last resort is not set

    C 192.168.12.0/24 is directly connected, FastEthernet0/0
    1.0.0.0/24 is subnetted, 1 subnets
    R 1.1.1.0 [120/1] via 192.168.12.1, 00:00:10, FastEthernet0/0
    R 192.168.13.0/24 [120/1] via 192.168.12.1, 00:00:10, FastEthernet0/0
    4.0.0.0/24 is subnetted, 1 subnets
    D 4.4.4.0 [90/156160] via 192.168.24.4, 01:18:04, FastEthernet1/0
    C 192.168.24.0/24 is directly connected, FastEthernet1/0
    D 192.168.34.0/24 [90/30720] via 192.168.24.4, 01:18:04, FastEthernet1/0


    Beside suboptimal paths for the 192.168.X.Y (load-balanced equal cost paths), I don't see very bad things in my routing tables. Am I missing something?

  • avatar
    lela

    Hy tulum

    Ping is irelevant for loops , you should do a traceroute ,if you will see more than 2 hops .. is a loop ;)
    skippi#traceroute 1.1.1.1

    Type escape sequence to abort.
    Tracing the route to 4.4.4.4

    1 192.168.34.3 52 msec
    192.168.24.2 28 msec
    192.168.34.3 36 msec
    2 192.168.12.1 68 msec
    192.168.13.1 76 msec
    192.168.12.1 52 msec
    this is a loop.

    Generic LOOP PREVENTION solution by tagging routes without using ACL. This is a more scalable approach than ACL based one. It is a one-for-all solution regardless of the numbers of non-distinctive routes.

    First Mutual Redistribution Point:

    router A #
    router X
    redistribute Y route-map Y_to_X metric x...

    router Y
    redistribute X route-map X_to_Y metric x...

    route-map Y_to_X deny 10
    match tag AD_X

    route-map Y_to_X permit 20
    set tag AD_Y

    route-map X_to_Y deny 10
    match tag AD_Y

    route-map X_to_Y permit 20
    set tag AD_X

    Example
    router rip
    redistribute eigrp 1 route-map eigrp_to_rip metric 2

    router eigrp 1
    redistribute rip route-map rip_to_eigrp metric 10000 100 255 1 1500

    route-map eigrp_to_rip deny 10
    match tag 120

  • avatar
    lela

    For some reason previous post was not complete .
    This should be the solution NOT found by me i was using access list :(

    First Mutual Redistribution Point:

    router A #
    router X
    redistribute Y route-map Y_to_X metric x...

    router Y
    redistribute X route-map X_to_Y metric x...

    route-map Y_to_X deny 10
    match tag AD_X

    route-map Y_to_X permit 20
    set tag AD_Y

    route-map X_to_Y deny 10
    match tag AD_Y

    route-map X_to_Y permit 20
    set tag AD_X

    Example
    router rip
    redistribute eigrp 1 route-map eigrp_to_rip metric 2

    router eigrp 1
    redistribute rip route-map rip_to_eigrp metric 10000 100 255 1 1500

    route-map eigrp_to_rip deny 10
    match tag 120

  • avatar
    kenjidnb

    Thanks Ano. I had noticed the extra hops with traceroute too but I assumed it was okay since pings were successful. Now I know that routing loops doesn't necessary mean packet loss.

  • avatar
    lela

    ;) i was fighting like a ninja with ROUTE REDISTRIBUTION and PATH SELECTION the concept it seems to be simple, but in practice is tricky.
    This is a real great site for GNS labs >> cisco stuff

  • avatar
    lela

    For the 3 time i uplod hope now will be all

    Example
    router rip
    redistribute eigrp 1 route-map eigrp_to_rip metric 2

    router eigrp 1
    redistribute rip route-map rip_to_eigrp metric 10000 100 255 1 1500

    route-map eigrp_to_rip deny 10
    match tag 120

  • avatar
    ReneMolenaar

    Besides routing loops (you can spot those with traceroute) you can have blackhole routing...test some things and see what happens when neighbors go down and come back online.

  • avatar
    djtjlt

    written by Rene Molenaar, March 14, 2011
    Example: network 4.4.4.0 will be redistributed INTO RIP at router Lassie. The redistributed network 4.4.4.0 will be redistributed AGAIN into EIGRP at router Willy.

    I believe, that there is no suboptimal routing int this lab, as the example is wrong from the beginning, as EIGRP is using different AD for internal and external routes. So following is happening next:
    1) When 4.4.4.0 is being redistributed to rip at Lassie, it's AD is 120 (RIP); then when redistributting it back to eigrp at willy, it will have AD 170 (EIGRP external).
    2) So router Willy will not use this route (AD 170), neither RIP route (AD 120), because it hears the route for 4.4.4.0 network from Router skippy with AD 90 and put's this route to it's routing table.

    Eigrp's default AD's 90 and 170 solve this problem automatically.
    I think the lab should have been made with two domains - OSPF and RIP.
    As ospf internal and external routes both have AD 110, the suboptimal routing can occur.

    If to take the same example, then if route is being redistributed from ospf domain to rip at lessie - it will get AD 120, and when redistributing back to ospf, it will get AD 110. So router will hear about this route from two sources with the same AD, but different metric. And if metric received when reredistributing from RIP is better than metric, to reach this network directly via skippy router , then router will put this suboptimal route to it's routing table. To avoid this, you can change either AD for external ospf routes, or you can change the metric. To prove this suboptimal route at willy you could launcht trace to 4.4.4.4 and it would show that the routing is going willy -> flipper -> lassie -> skipper instead of directly going to skipper.

    And I think that folowing trace shows not the suboptimal routing, but just a equal cost load balance...

    1 192.168.34.3 52 msec
    192.168.24.2 28 msec
    192.168.34.3 36 msec
    2 192.168.12.1 68 msec
    192.168.13.1 76 msec
    192.168.12.1 52 msec

    Correct me if I'm wrong :)

  • avatar
    ReneMolenaar

    Hi Tadas,

    You are right I should have designed it differently so I changed it ;)

    EIGRP makes a difference between internal or external which makes sure that internal prefixes are always preferred.

    You could still have a problem in the RIP domain since RIP makes no difference between internal or external prefixes.

    Let's say that you have an internal RIP prefix with a hop count of 10, and you redistribute this prefix back into RIP with a hop count of 1. You'll get sub-optimal routing.

    To demonstrate this I changed router Skippy so the 4.4.4.0 prefix is advertised in EIGRP as an external prefix. You'll see that either router Willy or Lassie will take an sub-optimal path towards 4.4.4.0.

    Enjoy and thanks for the comment

    ;D

  • avatar
    hameidi

    Dear:

    kindly add video for this lab

  • avatar
    uscallesen

    @ muhaned - I believe the solution to the sub-optimal routing is to adjust the administrative distance for External EIGRP routes on Router Lassie and Willy to < 120 & > 90 - I used 95. The routes maps are standard as already suggested.

    Router Willy (basicly same setup on Lassie)
    !
    router eigrp 234
    redistribute rip metric 100 100 100 100 100 route-map INTO-EIGRP
    network 192.168.34.0
    distance eigrp 90 95
    no auto-summary
    !
    router rip
    version 2
    redistribute eigrp 234 metric 5 route-map INTO-RIP
    network 192.168.13.0
    no auto-summary
    !
    route-map INTO-EIGRP deny 10
    match tag 2
    !
    route-map INTO-EIGRP permit 20
    set tag 1
    !
    route-map INTO-RIP deny 10
    match tag 1
    !
    route-map INTO-RIP permit 20
    set tag 2
    !

  • avatar
    plague22

    I'm not sure route tagging is the issue for this lab.
    The issue seems to be when you redistribute originally from rip into eigrp you specify a bandwidth when doing so. i.e.r
    redistribute rip metric 1500 1 1 100 1500
    So from router skippy you will have two paths to reach network 1.1.1.0
    D EX 1.1.1.0 [170/1709312] via 192.168.34.3, 00:00:10, FastEthernet1/0
    [170/1709312] via 192.168.24.2, 00:00:10, FastEthernet0/0
    So when you perform a trace you will see more than two hops as its load balancing between the two
    Tracing the route to 1.1.1.1

    1 192.168.34.3 32 msec
    192.168.24.2 16 msec
    192.168.34.3 8 msec
    2 192.168.12.1 48 msec
    192.168.13.1 24 msec *

    This isnt a routing loop. This is a result of load balancing down the two links.

    If you change the metric on one of the redistributing router for ex on Lassie:
    redistribute rip metric 1 1 1 1 1
    Lassie(config-router)#

    You will now only have 1 path for the 1.1.1.0 network
    D EX 1.1.1.0 [170/1709312] via 192.168.34.3, 00:00:26, FastEthernet1/0

    Final trace is
    Tracing the route to 1.1.1.1

    1 192.168.34.3 24 msec 20 msec 8 msec
    2 192.168.13.1 40 msec * 24 msec

    So in this lab is the design that it should be using both links to reach 1.1.1.0?
    I dont see how the tagging would fix this.

  • avatar
    ibrahim

    i just didn't got the idea...
    the basic principle for redistribution between RIP and EIGRP say that something like that

    "domain-loop" shouldn't happen, because both routers "R2 & R3" know that there is a route

    for the subnet 4.4.4.4 learned through EIGRP with AD = 90, so when they see that there is

    another route coming from the RIP network with AD=120, they are not going to make

    redistribution to avoid such loop.

    my result was as i said, there was no loop even without route tag configured, so where is the problem?

    Lassie(config-router)#do sh ip rou
    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route

    Gateway of last resort is not set

    C 192.168.12.0/24 is directly connected, FastEthernet0/0
    1.0.0.0/24 is subnetted, 1 subnets
    R 1.1.1.0 [120/1] via 192.168.12.1, 00:00:26, FastEthernet0/0
    R 192.168.13.0/24 [120/1] via 192.168.12.1, 00:00:26, FastEthernet0/0
    2.0.0.0/32 is subnetted, 1 subnets
    C 2.2.2.2 is directly connected, Loopback0
    3.0.0.0/32 is subnetted, 1 subnets
    D 3.3.3.3 [90/158720] via 192.168.24.4, 00:35:36, FastEthernet1/0
    4.0.0.0/24 is subnetted, 1 subnets
    D 4.4.4.0 [90/156160] via 192.168.24.4, 00:36:22, FastEthernet1/0
    C 192.168.24.0/24 is directly connected, FastEthernet1/0
    D 192.168.34.0/24 [90/30720] via 192.168.24.4, 00:46:10, FastEthernet1/0

    ************************************************************************************

    Willy(config-router)#do sh ip rou
    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route

    Gateway of last resort is not set

    R 192.168.12.0/24 [120/1] via 192.168.13.1, 00:00:20, FastEthernet0/0
    1.0.0.0/24 is subnetted, 1 subnets
    R 1.1.1.0 [120/1] via 192.168.13.1, 00:00:20, FastEthernet0/0
    C 192.168.13.0/24 is directly connected, FastEthernet0/0
    2.0.0.0/32 is subnetted, 1 subnets
    D 2.2.2.2 [90/158720] via 192.168.34.4, 00:35:58, FastEthernet1/0
    3.0.0.0/32 is subnetted, 1 subnets
    C 3.3.3.3 is directly connected, Loopback0
    4.0.0.0/24 is subnetted, 1 subnets
    D 4.4.4.0 [90/156160] via 192.168.34.4, 00:36:59, FastEthernet1/0
    D 192.168.24.0/24 [90/30720] via 192.168.34.4, 00:46:40, FastEthernet1/0
    C 192.168.34.0/24 is directly connected, FastEthernet1/0


    could that be the IOS version?

    Cisco IOS Software, 3600 Software (C3640-JK9S-M), Version 12.4(16), RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2007 by Cisco Systems, Inc.


  • avatar
    ibrahim

    but thanks anyway!

  • avatar
    ReneMolenaar

    Hello Ibrahim,

    The loopback interface on router Skippy is not advertised in EIGRP but redistributed. The AD of this prefix will be 170 (external) not 90 (internal).

    What happens is that router Lassie and Willy will have 4.4.4.0 /24 with AD 170 in their routing table. Both are configured to redistribute 4.4.4.0 /24 from EIGRP into RIP.

    One of the routers will receive the 4.4.4.0 /24 network through RIP with an AD of 120.

    AD 120 is lower (and thus better) than AD 170 so the EIGRP external prefix will be removed from the routing table and the RIP prefix will be installed.

    Result: sub-optimal routing (do a traceroute to find this).

  • avatar
    stemrikar

    Hi All,
    1st of all I thought that no matter what, there will be suboptimal routing, looking from either direction.
    then I thought there has to be a way out.
    & here it is acc to me.


    Lassie#sh run | s rip|eigrp|map
    router eigrp 234
    redistribute rip metric 100000 10 255 1 1500 route-map r2e
    network 192.168.24.0
    distribute-list route-map tag170 in
    no auto-summary
    router rip
    version 2
    redistribute eigrp 234 metric 5 route-map e2r
    network 192.168.12.0
    distance 180
    no auto-summary
    route-map r2e deny 5
    match tag 5
    route-map r2e permit 10
    set tag 170
    route-map e2r deny 5
    match tag 170
    route-map e2r permit 10
    set tag 5
    route-map tag170 deny 5
    match tag 170
    route-map tag170 permit 10
    Lassie#

    (Likewise for Willy)

    I have tested it by rebooting the routers and the path remains optimal.

    Lassie#tr 4.4.4.4

    Type escape sequence to abort.
    Tracing the route to 4.4.4.4

    1 192.168.24.4 36 msec * 68 msec
    Lassie#
    Lassie#tr 1.1.1.1

    Type escape sequence to abort.
    Tracing the route to 1.1.1.1

    1 192.168.12.1 16 msec * 28 msec
    Lassie#

  • avatar
    stemrikar

    contd...

    Lassie#tr 1.1.1.1

    Type escape sequence to abort.
    Tracing the route to 1.1.1.1

    1 192.168.12.1 16 msec * 28 msec
    Lassie#

    Rene, Thanx 4 such good, challenging labs.

    Regards
    Shoeb

  • avatar
    ReneMolenaar

    Hi Shoeb,

    That looks good to me...redistributing and using route-maps to influence the AD and metric is a good method of dealing with this.

    Rene

  • avatar
    mistborn_soother

    I'm stuck with this. I did create route-maps on Willy and Lassie as follows

    Willy#show route-map
    route-map EIGRP_TO_RIP, permit, sequence 10
    Match clauses:
    Set clauses:
    tag 77
    Policy routing matches: 0 packets, 0 bytes
    route-map EIGRP_TO_RIP, deny, sequence 20
    Match clauses:
    tag 88
    Set clauses:
    Policy routing matches: 0 packets, 0 bytes
    route-map RIP_TO_EIGRP, deny, sequence 10
    Match clauses:
    tag 77
    Set clauses:
    Policy routing matches: 0 packets, 0 bytes
    route-map RIP_TO_EIGRP, permit, sequence 20
    Match clauses:
    Set clauses:
    tag 88
    Policy routing matches: 0 packets, 0 bytes

    Lassie

    route-map EIGRP_TO_RIP, permit, sequence 10
    Match clauses:
    Set clauses:
    tag 77
    Policy routing matches: 0 packets, 0 bytes
    route-map EIGRP_TO_RIP, deny, sequence 20
    Match clauses:
    tag 88
    Set clauses:
    Policy routing matches: 0 packets, 0 bytes
    route-map RIP_TO_EIGRP, deny, sequence 10
    Match clauses:
    tag 77
    Set clauses:
    Policy routing matches: 0 packets, 0 bytes
    route-map RIP_TO_EIGRP, permit, sequence 20
    Match clauses:
    Set clauses:
    tag 88
    Policy routing matches: 0 packets, 0 bytes


    but although now the ASBRs send direct to Skippy for the 4.4.4.4 route, Flipper's routing table looks like this

    C 192.168.12.0/24 is directly connected, FastEthernet0/0
    1.0.0.0/24 is subnetted, 1 subnets
    C 1.1.1.0 is directly connected, Loopback0
    C 192.168.13.0/24 is directly connected, FastEthernet1/0
    4.0.0.0/24 is subnetted, 1 subnets
    R 4.4.4.0 [120/10] via 192.168.12.2, 00:00:00, FastEthernet0/0
    R 192.168.24.0/24 [120/10] via 192.168.12.2, 00:00:00, FastEthernet0/0
    R 192.168.34.0/24 [120/10] via 192.168.12.2, 00:00:00, FastEthernet0/0


    surely Flipper should have two paths to 4.4.4.4. What happened to via 192.168.13.0?