Wired Intelligent Edge

 View Only
last person joined: 3 days ago 

Bring performance and reliability to your network with the Aruba Core, Aggregation, and Access layer switches. Discuss the latest features and functionality of the ArubaOS-Switch and ArubaOS-CX devices, and find ways to improve security across your network to bring together a mobile first solution.
Expand all | Collapse all

Route-map and ospf (hpe flexfabric)

This thread has been viewed 12 times
  • 1.  Route-map and ospf (hpe flexfabric)

    Posted Apr 20, 2022 11:45 AM
    Hello,

    I'm looking for help.

    My goal is to modify the cost of a route in the routing table of a hpe flexfabric 7900.
    This route is learned by ospf.

    So, I did this configuration below matching the nexthop, but it seems to do nothing.

    What is wrong ? And is there a way to do it ?

    route-policy ifselection permit node 10
    if-match ip next-hop acl 2000
    apply cost 200

    acl number 2000
    rule 0 permit source 10.6.4.142 0


    display ospf route
    Routing for network
    Destination Cost Type NextHop AdvRouter Area
    172.22.0.0/16 1 Stub 0.0.0.0 192.168.253.2 0.0.0.0
    10.6.3.0/24 1 Transit 0.0.0.0 192.168.253.2 0.0.0.0
    10.6.4.0/24 1 Transit 0.0.0.0 192.168.253.2 0.0.0.0
    10.142.0.0/16 11 Stub 10.6.4.142 192.168.4.48 0.0.0.0
    10.142.0.0/16 11 Stub 10.6.3.142 192.168.4.48 0.0.0.0


    display ip routing-table
    Destination/Mask Proto Pre Cost NextHop Interface
    10.142.0.0/16 OSPF 10 11 10.6.3.142 Vlan110
    10.6.4.142 Vlan111


    Thanks for your help,

    ------------------------------
    Romain Monger
    ------------------------------


  • 2.  RE: Route-map and ospf (hpe flexfabric)

    EMPLOYEE
    Posted Apr 20, 2022 01:15 PM
    How did you apply the abovementioned route-policy? I am curious because OSPF is a link-state protocol after all and network 10.142.0.0/16 has been learned as intra-area route... Inside one single area OSPF works only and only as link-state protocol, e.g. only interface costs may influence cost metric for intra-area routes, nothing else. I am afraid you are trying to apply distance-vector logic to a link-state protocol. It is not going to work.

    ------------------------------
    Ivan Bondar
    ------------------------------



  • 3.  RE: Route-map and ospf (hpe flexfabric)

    Posted Apr 21, 2022 03:38 AM
    How did you apply the abovementioned route-policy?
    In fact, it was part of the question :)

    I am afraid you are trying to apply distance-vector logic to a link-state protocol. It is not going to work.
    I think, it's the answer. There's no way to do what I try to do... :(

    Thanks, anymay.

    ------------------------------
    Romain Monger
    ------------------------------



  • 4.  RE: Route-map and ospf (hpe flexfabric)

    EMPLOYEE
    Posted Apr 21, 2022 07:06 AM
    Romain, there is one way to influence LSA costs received from particular peer inside one area, and while it is not exactly what you tried to do, it's still pretty close. So we know that we can't modify route metrics for OSPF intra-area prefixes using route-policy, but you can modify the cost of ALL LSAs either for particular OSPF peer (Option #1) or for all peers on particular OSPF interface (Option #2):

    Option #1: The command is 'peer <ip_address> cost <1-65535>'.

    There is a catch, though. This command works only if the peer has been learned over a Point-to-Multipoint Unicast interface. For Broadcast interface it won't work. But you can modify Vlan-interface or physical routed interface OSPF type by using 'ospf network-type p2mp unicast'. This command will require you to set L3 interfaces (Vlan-interface or physical routed interface) which connect both neighbors to P2MP Unicast and declare neighbor on each side of the link, as it is a requirement when you use unicast OSPF Hello messages. To keep things simple be advised that this configuration makes sense when you have more than one OSPF peer learned over a single L3 interface, in many cases in is a Vlan-interface in a VLAN with several OSPF routers.

    Example (here we have only two peers for simplicity):

    Topology:

    [R1] gig1/0/1 <--------> gig1/0/1 [R2]


    R1:
    
    interface Gig1/0/1
     ospf network-type p2mp unicast
     ip address 10.0.0.1 30
    #
    ospf 1
     peer 10.0.0.2 cost 200
     area 0
      network 0.0.0.0 255.255.255.255
    
    
    R2:
    
    interface Gig1/0/1
     ospf network-type p2mp unicast
     ip address 10.0.0.2 30
    #
    ospf 1
     peer 10.0.0.1
     area 0
      network 0.0.0.0 255.255.255.255
    ​

    As a result, R1 will add '200' to metrics of all LSAs it receives from R2. And R2 will use the default cost of its interface Gig1/0/1 since we omitted the 'cost' statement in the 'peer' command.


    Option #2: When you have only one OSPF peer over L3 interface, then it will be much easier - just modify the cost of R1's Gig1/0/1:

    R1:
    
    interface Gig1/0/1
     ospf cost 200
    ​

    ​Hope it helps!

    ​​

    ------------------------------
    Ivan Bondar
    ------------------------------