explicitly set metric for one static route

Discussion in 'Cisco' started by Daniel Eyholzer, Dec 6, 2004.

  1. Hi there


    How can I explicitly set the metric for one static route? I want one static
    route to get distributed by eigrp with a very high metric. There are other
    static routes on this router that should not be influenced.


    Thanks, Daniel
     
    Daniel Eyholzer, Dec 6, 2004
    #1
    1. Advertisements

  2. Daniel Eyholzer

    Ivan Ostreš Guest

    It is easy to do this using route-map in 'redistribute static' under
    eigrp routing protocol config. In mentioned route-map you can explicitly
    add metric that will route have when redistributed in routing protocols.

    There are some good examples on www.cisco.com.
     
    Ivan Ostreš, Dec 6, 2004
    #2
    1. Advertisements

  3. I have tried to use route-map, but it does not work. I think I have
    missconfigured something.

    My configuration:
    !
    router eigrp 1
    redistribute connected
    redistribute static route-map myroute
    network 192.168.131.0
    network 192.168.134.0
    no auto-summary
    no eigrp log-neighbor-changes
    !
    ip route 192.168.139.48 255.255.255.248 Serial1
    !
    access-list 25 permit 192.168.139.48 0.0.0.7
    !
    route-map myroute permit 10
    match ip address 25
    set metric +1000000
    !
    route-map myroute permit 15
    !

    The route is distributet with the same metric like without the route-map.
    Any idea what is wrong in my configuration?


    Thanks, Daniel
     
    Daniel Eyholzer, Dec 6, 2004
    #3
  4. I believe the SET METRIC route-map subcommand is exclusively for BGP.

    However, you can use DEFAULT-METRIC under your EIGRP routing process or add
    the METRIC parameter onto the REDISTRIBUTE STATIC command.

    In either case, the metric is in the form bandwidth, delay, reliability,
    load, MTU.

    FWIW,
    Robert


    I have tried to use route-map, but it does not work. I think I have
    missconfigured something.

    My configuration:
    !
    router eigrp 1
    redistribute connected
    redistribute static route-map myroute
    network 192.168.131.0
    network 192.168.134.0
    no auto-summary
    no eigrp log-neighbor-changes
    !
    ip route 192.168.139.48 255.255.255.248 Serial1
    !
    access-list 25 permit 192.168.139.48 0.0.0.7
    !
    route-map myroute permit 10
    match ip address 25
    set metric +1000000
    !
    route-map myroute permit 15
    !

    The route is distributet with the same metric like without the route-map.
    Any idea what is wrong in my configuration?


    Thanks, Daniel
     
    Bob by the Bay, Dec 6, 2004
    #4
  5. Then all static routes will have this same metric, or have I missed
    something? But what I want to do, is just to change the metric of one
    static route, not of all.


    Daniel
     
    Daniel Eyholzer, Dec 6, 2004
    #5
  6. OK, that clarifies things.

    I was mistaken that the SET METRIC route-map command is only for BGP. But
    it does work rather selectively. It works well with OSPF for instance doing
    exactly what you are trying to do. However I don't believe it works with
    EIGRP although it may have originally worked with IGRP.

    For instance, it doesn't appear to work at all when I try redistributing
    OSPF into EIGRP - exactly where it should work if it were going to work.

    But in case I'm running into a bug with my version of IOS, you might try the
    full compound metric per the example below:

    route-map mymap per 10
    match address 10
    set metric 1000000 250 200 100 1500

    FWIW,
    Robert
     
    Bob by the Bay, Dec 6, 2004
    #6
  7. Bob by the Bay, Dec 6, 2004
    #7
  8. Bob by the Bay, Dec 6, 2004
    #8
  9. Thanks Robert! Doing it this way it seems to work.


    Daniel
     
    Daniel Eyholzer, Dec 7, 2004
    #9
  10. Daniel Eyholzer

    Ben Guest

    Ben, Dec 8, 2004
    #10
  11. Ben,

    Excellent point as that method makes a more efficient match than matching
    for an ip address in an access-list.

    One of the problems encountered though was the assignment of the EIGRP
    metric using the SET METRIC route-map command, which doesn't appear to be
    supported for EIGRP in at least some IOS revisions as late as 12.2. If that
    SET METRIC command isn't available for EIGRP, then granularity of the metric
    assignment is greatly reduced.

    Robert
     
    Bob by the Bay, Dec 8, 2004
    #11
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.