Routing

 View Only
last person joined: 2 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.  OSPF redistribution

    Posted 05-13-2024 04:38

    I have a scenario to connect an EX4100 to a Cisco switch via trunk link. EX4100 basic OSPF config that Mist allows is already already configured and this is how it shows up in the CLI.

            "set groups top routing-options router-id 10.3.15.1",
            "set groups top interfaces lo0 unit 0 family inet address 10.3.15.1/32",
            "set groups top interfaces lo0 unit 0 family inet filter input protect_re",
            "set groups top protocols ospf reference-bandwidth 40000",
            "set groups top protocols ospf area 0 interface lo0.0 passive",

    How do I add the redistribute commands  with a route-map into Juniper? I tried doing

    set protocols ospf area 0.0.0.1 redistribute connected route-map ospf_routemap

    But this gives me an error.



    ------------------------------
    MOHAMMAD ALI
    ------------------------------


  • 2.  RE: OSPF redistribution

    Posted 05-14-2024 05:13

    Hi Mohammad,

    • The CLI command mentioned in your post is not a valid Junos CLI command.
    • Configure a policy-statement, an example is shown below
      set policy-options policy-statement ospf-export term 1 from protocol direct
      set policy-options policy-statement ospf-export term 1 then accept
    • Apply the policy as an export policy under the protocols OSPF configuration.
      set protocols ospf export ospf-export
    • Please note that on Mist, you will need to input the policy-statement and ospf export CLI commands under the additional CLI section of the Mist template.


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



  • 3.  RE: OSPF redistribution

    Posted 05-18-2024 03:01

    In addition to previous comment, considering that groups are being used, something below can be configured

    set groups top policy-options policy-statement ospf-export term 1 from protocol direct
    set groups top policy-options policy-statement ospf-export term 1 then accept
    set groups top protocols ospf export ospf-export


    ------------------------------
    FARID AKHUNDOV
    ------------------------------



  • 4.  RE: OSPF redistribution

    Posted 05-18-2024 13:53

    Thank you both for your help, makes sense. 

    So I have this sample code and looks like between the commands I posted and what y'all posted I can accomplish most of it.

    router ospf 1
      router-id 10.30.15.254
      log-adjacency-changes detail 
      auto-cost reference-bandwidth 40000
      redistribute connected subnets route-map VLAN_TO_OSPF_RM  
      network 10.30.15.254 0.0.0.0 area 0
      network 10.10.15.254 0.0.0.0 area 0
    !
    ip access-list standard OSPF_ACL
    permit 10.16.15.0 0.0.0.255
    permit 192.16.15.0 0.0.0.255
    permit 10.10.15.0 0.0.0.255
    !
    route-map OSPF_RM permit 10
      match ip address OSPF_ACL

    For the Route Maps and Route Map ACL would I need to do something like this?

    set groups top policy-options route-filter-list OSPF_RM 10.16.15.0 addres-mask 255.255.255.0 accept 
    set groups top policy-options route-filter-list OSPF_RM 192.16.15.0 addres-mask 255.255.255.0 accept
    set groups top policy-options route-filter-list OSPF_RM 10.10.15.0 addres-mask 255.255.255.0 accept
    set groups top policy-options policy-statement ospf-export term 1 from protocol direct route-filter-list OSPF_RM
    set groups top policy-options policy-statement ospf-export term 1 then accept
    set groups top protocols ospf export ospf-export

    OR

    set groups top policy-options policy-statement ospf-export term 1 from protocol direct route-filter 10.16.15.0 address-mask 255.255.255.0
    set groups top policy-options policy-statement ospf-export term 1 from protocol direct route-filter 192.16.15.0 address-mask 255.255.255.0
    set groups top policy-options policy-statement ospf-export term 1 from protocol direct route-filter 10.10.15.0 address-mask 255.255.255.0
    set groups top policy-options policy-statement ospf-export term 1 then accept
    set groups top protocols ospf export ospf-export



    ------------------------------
    MOHAMMAD ALI
    ------------------------------



  • 5.  RE: OSPF redistribution

    Posted 05-18-2024 14:17

    NOTE: I'm guessing the Mist UI Routing Policy section is doing the same. But I don't have the OSPF license so I can't tell.



    ------------------------------
    MOHAMMAD ALI
    ------------------------------



  • 6.  RE: OSPF redistribution

    Posted 05-20-2024 00:12

    Hi Mohammad Ali,

    • The selected protocol should be direct in place of OSPF, in the screenshot that has been shared.
    • The policy configured on the Mist portal will show up in the device config only when it is applied as an export/import policy in a protocol configuration.
    • Assuming that the protocol is changed to "direct", the configuration generated is shown below.
      set groups top policy-options route-filter-list 192-168-40-0_24 192.168.40.0/24 exact
      set groups top policy-options policy-statement CONNECTED_TO_OSPF_ROUTEMAP term 01_permit_192.168.40.0 from protocol [ direct ]
      set groups top policy-options policy-statement CONNECTED_TO_OSPF_ROUTEMAP term 01_permit_192.168.40.0 from route-filter-list 192-168-40-0_24
      set groups top policy-options policy-statement CONNECTED_TO_OSPF_ROUTEMAP term 01_permit_192.168.40.0 then accept


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



  • 7.  RE: OSPF redistribution

    Posted 05-19-2024 03:12

    Hi,

    So, the correct way would be something like

    set groups top policy-options policy-statement ospf-export term 1 from protocol direct route-filter 10.16.15.0/24 prefix-length-range /24-/24
    set groups top policy-options policy-statement ospf-export term 1 from protocol direct route-filter 192.16.15.0/24 prefix-length-range /24-/24
    set groups top policy-options policy-statement ospf-export term 1 from protocol direct route-filter 10.10.15.0/24 prefix-length-range /24-/24
    set groups top policy-options policy-statement ospf-export term 1 then accept


    ------------------------------
    FARID AKHUNDOV
    ------------------------------



  • 8.  RE: OSPF redistribution

    Posted 05-20-2024 00:14

    Hi Farid,

    We can use the keyword exact here----> route-filter 10.16.15.0/24 exact. This would match the prefix 10.16.15.0/24.

    Regards



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