Wired Intelligent Edge

 View Only
last person joined: 2 days ago 

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

OSPF Filter static routes

This thread has been viewed 25 times
  • 1.  OSPF Filter static routes

    Posted Apr 19, 2021 12:56 PM
    Hello

    Is a 8320 (TL.10.06.0110).

    I want only certain static routes to be inserted into OSPF for redistribution.
    Im fighting a bit with the route-map, prefix-list setup

    For testing purpose i have the following static routes 

    ip route 1.1.1.1/32 192.168.55.55
    ip route 10.1.76.0/24 10.0.1.7
    ip route 10.1.77.0/24 10.0.1.7     <<< should NOT be distributed via OSPF

    I tried with : 

    ip prefix-list route-prefixes seq 10 deny 10.1.77.0/24

    route-map NoDist deny seq 10
    match ip address prefix-list route-prefixes

    router ospf 1
    ......
    redistribute static route-map NoDist

    However with this no static routes are being distributed anymore.

    Thanks for your help
    Andreas

    ------------------------------
    Meyer Marius
    ------------------------------


  • 2.  RE: OSPF Filter static routes

    EMPLOYEE
    Posted Apr 19, 2021 02:50 PM
    This should help.

    1.Create prefix list  with deny and permits
    2. Then attache to a permit route map
    3. redistribute with "static route map"


    see below


    ip prefix-list MyRoutes seq 10 deny 10.10.76.0/24
    ip prefix-list MyRoutes seq 20 permit 10.10.77.0/24
    ip prefix-list MyRoutes seq 30 permit 10.10.66.0/24

    route-map MyDist2 permit seq 10
    match ip address prefix-list MyRoutes

    router ospf 1
    redistribute static route-map MyDist2


    **************output on neighbour*********10.10.76.blocked others are allowed***********
    show ip rou

    Displaying ipv4 routes selected for forwarding

    '[x/y]' denotes [distance/metric]

    1.1.1.0/30, vrf default
    via 1/1/1, [0/0], connected
    1.1.1.2/32, vrf default
    via 1/1/1, [0/0], local
    10.10.66.0/24, vrf default
    via 1.1.1.1, [110/25], ospf
    10.10.77.0/24, vrf default
    via 1.1.1.1, [110/25], ospf

    show ip ospf routes
    Codes: i - Intra-area route, I - Inter-area route
    E1 - External type-1, E2 - External type-2

    OSPF Process ID 1 VRF default, Routing Table
    ---------------------------------------------

    Total Number of Routes : 3

    1.1.1.0/30 (i) area: 0.0.0.0
    directly attached to interface 1/1/1, cost 100 distance 110
    10.10.66.0/24 (E2)
    via 1.1.1.1 interface 1/1/1, cost 25 distance 110
    10.10.77.0/24 (E2)
    via 1.1.1.1 interface 1/1/1, cost 25 distance 110


    ------------------------------
    Kamal Takodra
    If my post was useful accept solution and/or give kudos
    ------------------------------