Routing

 View Only
last person joined: 5 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  When to use metric instead of preferences in qualified-next-hop command?

    Posted 08-29-2023 10:50

    I saw many examples showing qualified-next-hop with preference in static route, but I never seen using metric. Why? 

    Because we are running OSPF and also use static route qualified-next-hop metric for choosing the outbound next hop, it seems to work fine with the below example. But not sure if it works perfectly. Need some guidance.

    For example:

    set routing-options static route 10.192.1.1/32 qualified-next-hop 10.1.212.2 metric 100
    set routing-options static route 10.192.1.1/32 qualified-next-hop 10.1.212.6 metric 1000

    - Also, can we configure it with two metrics? Because most example shows only one preference or metric configured is sufficient. 



    ------------------------------
    WILSON CHENG
    ------------------------------


  • 2.  RE: When to use metric instead of preferences in qualified-next-hop command?

    Posted 08-29-2023 22:48
    the original reason to use the gateway metric was to
    provide a metric for your isp system that only
    uses pd ipv6. so the metric for 2001:xxxx is largely
    unpresant. in this system i do not have a metric in
    place for 2001:xxxx . this means that since 2001:xxxx
    is carried by the carrier address 2601:xxxx , we will
    use the gateway to create long distance metric rather
    than using a standard route for the more local addresses
    of fe80::xxxx and 2601:xxxx .
     
    1. trace the first route name server of the system(comcast)
    tracert 2001:558:xxxx:xxxx
    this system has 5 nameservers aside from the dns servers
    of 2001:558:xxxx(your isp) and 2001:558:(your isp2). assuming that
    the first server that is the start of authority is a
    practical view of the habits of traffic to use tracert
    and is a first step, however using tracert on the other
    name servers and not the dns servers could give a better
    metric value to the gateway of course averaging is needed.
     
    2. count the used hops of 30 max. in our example and in
    our network this was 22 hops. in ipv6 hop metrics can be
    very long distance. the default is 1024(gateway). increasing
    this number is desireable.
     
    3. (max possible)65535 / 30(max possible hop metric) = 2184.5
     
    4.   22 / 30 = 0.7333...
     
    5.    0.7333... * 2184.5 = 1601.9666...
     
    6.    1601.9666... = 1602(metric)
     
     
     
    ip -6 route add default via 2601:204:xxxx dev br0 metric 1602
     


    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 3.  RE: When to use metric instead of preferences in qualified-next-hop command?

    Posted 08-30-2023 10:32

    A metric is used to tell us how many hops that

    are supposed to be exact. If this isn't known we

    want to stay away from this. However if you can

    get in the ballpark and don't go over you are

    in good shape. A cost calculation, or similar

    should be done to get a metric. Preferences in

    the case of ospf are your internal(I think), but

    that last hop does exit(if internet). But metric

    isn't just ospf. I would say ospf likes to make

    it's own decisions. So preference is needed.

    metric is not so much for ospf I would say. It

    is for general protocol.



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 4.  RE: When to use metric instead of preferences in qualified-next-hop command?

    Posted 08-31-2023 06:19

    Hi,

    Preference and metric in static routes have different uses. While preference will be used to select which next-hop will be preferred for the static route destination. While the metric parameter is defined to control the metric of the route when it is redistributed in OSPF. 

    In your scenario, as both the qualified next-hops have the same preference (default 5 for static routes), the next-hop 10.1.212.2 will be selected in the routing-table because of its lower metric value.

    If you configure your static route with both metric and preference, then the preference value will decide which next-hop will be chosen for the destination. The metric associated with that next-hop will be the OSPF metric when redistributed into OSPF. If the lower preference next-hop route is withdrawn from the routing table (due to the egress next-hop being unavailable), the next-hop with the next lower preference value will be chosen. The OSPF metric for this route will now be according to the configured metric value for this next-hop, which is the 2nd best next-hop for the static route (due to higher preference value as compared to the first one).

    Hope this helps. Let me know if you want to see the configuration with examples.

    Regards,



    ------------------------------
    Sheetanshu Shekhar
    ------------------------------