Routing

 View Only
last person joined: 22 hours 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.
Expand all | Collapse all

routing on a EX4300

  • 1.  routing on a EX4300

    Posted 07-14-2020 11:20

    Hi all,

    on my juniper ex4300 is receive routes with tag 666 end i don't want do redisribute them. so i have:
    set policy-options policy-statement export-to-ospf term tag666 from tag 666
    set policy-options policy-statement export-to-ospf term tag666 then reject
    set policy-options policy-statement export-to-ospf term bgp from protocol bgp
    set policy-options policy-statement export-to-ospf term bgp from route-filter 0.0.0.0/0 exact
    set policy-options policy-statement export-to-ospf term bgp then metric 200
    set policy-options policy-statement export-to-ospf term bgp then accept
    set protocols ospf export export-to-ospf
     
    the term bgp is working but the term tag666 not. Another OSPF routers stil receive the routes with tag 666 from the juniper.
    what can i do?
     

    #RoutingOSPF


  • 2.  RE: routing on a EX4300

     
    Posted 07-14-2020 11:33

    Hi,

    what are the tagged routes that you are recieving ? are they OSPF or BGP routes ?




  • 3.  RE: routing on a EX4300

    Posted 07-14-2020 11:50

    Hi,

     

    Could you please provide these o/p ? Also, which protocol has the 666 tag routes on the juniper router ?

     

    show configuration protocols ospf

    show configuration protocols bgp

     

    Best Regards,

    Mohamed



  • 4.  RE: routing on a EX4300

    Posted 07-14-2020 11:59

    show protocols ospf
    traceoptions {
    file ospf size 1m files 3;
    flag event;
    flag state;
    }
    export export-to-ospf;
    import no-default-route-ospf;
    reference-bandwidth 10k;
    area 0.0.0.0 {
    interface lo0.0 {
    passive;
    }
    interface xe-0/2/1.0 {
    retransmit-interval 8;
    hello-interval 2;
    dead-interval 8;
    authentication {
    md5 1 key "<snip>"; ## SECRET-DATA
    }
    }
    interface xe-0/2/2.0 {
    retransmit-interval 8;
    hello-interval 2;
    dead-interval 8;
    authentication {
    md5 1 key "<snip>"; ## SECRET-DATA
    }
    }
    }
    area 0.0.0.1 {
    interface ge-0/0/0.0 {
    metric 20;
    hello-interval 2;
    }
    }

     

    i left the bgp config behind because i receive the tagged 666 routes from ospf and the now redistributed with ospf so it is a ospf thing



  • 5.  RE: routing on a EX4300

    Posted 07-14-2020 11:53

    the routes come from OSPF.



  • 6.  RE: routing on a EX4300
    Best Answer

    Posted 07-14-2020 12:00

    Hi,

     

    If the 666 tagged routes are internal ospf, you can not filter them out. As the LSDB needs to be the same on all routers in ospf domain.

     

    If this solves your problem, please mark this post as "Accepted Solution"

    Best Regards,

    Mohamed



  • 7.  RE: routing on a EX4300

    Posted 07-14-2020 12:11

    I understand now. the routes come from my blackhole router so my plan is to change the routing protocol to rib between the blackhole router and the juniper and then i can use the export policy.

     

    thanks all!

     

     



  • 8.  RE: routing on a EX4300

     
    Posted 07-14-2020 11:50

    Hey mlangendoen,

     

    Greetings, If I'm understanding correctly, this should work:

     

    set policy-options policy-statement block-tag-666 term tag666 from protocol ospf
    set policy-options policy-statement block-tag-666 term tag666 from tag 666
    set policy-options policy-statement block-tag-666 term tag666 then reject

    set policy-options policy-statement block-tag-666 term default then accept
    set protocols ospf import block-tag-666

     

    If this solves your problem, please mark this post as "Accepted Solution" so we can help others too \:)/

    Regards,

     

    Lil Dexx
    JNCIE-ENT#863, 3X JNCIP-[SP-ENT-DC], 4X JNCIA [cloud-DevOps-Junos-Design], Champions Ingenius, SSYB



  • 9.  RE: routing on a EX4300

    Posted 07-14-2020 11:54

    Umm no, The EX4300 must receive the tagged 666 routes but not redistribute them.



  • 10.  RE: routing on a EX4300

     
    Posted 07-14-2020 12:16

    Hey mlangendoen,

     

    Greetings, When you build a routing policy there are import and export attributes. The easiest way to understand import versus export is to visualize the routing table in the middle; the import on the left; and the export on the right.  When you import routes, they are always routes coming from a neighbor that would be installed into the RT.  When you export routes, these are routes within the RT being announced to a neighbor, and for this, you need an import policy instead of an export. for OSPF it is not recommended as the link state data works better when it is consistent, but it is possible depending on your requirements. 

     

    If this solves your problem, please mark this post as "Accepted Solution" so we can help others too \:)/

    Regards,

    Lil Dexx
    JNCIE-ENT#863, 3X JNCIP-[SP-ENT-DC], 4X JNCIA [cloud-DevOps-Junos-Design], Champions Ingenius, SSYB

     

     



  • 11.  RE: routing on a EX4300

     
    Posted 07-14-2020 11:57

    Hi 

     

    Looks like what you woud like to do is to drop a route learned from OSPF neighbor. 

     

    For example:

     

    R1===R2===R3

     

    If R1 is advertising OSPF routes with tag 111, you need to config import policy on R2 to reject it. 

     

    In this case, you need to use import policy to reject by tag.

     

    labroot@jtac-MX80-r053# show logical-systems r2 policy-options policy-statement import-ospf | display set
    set logical-systems r2 policy-options policy-statement import-ospf term reject-tag from tag 111
    set logical-systems r2 policy-options policy-statement import-ospf term reject-tag then reject

     

    Export policy for ospf is used to redistribute routes from other protocols(BGP, RIP, ISIS, static....)

     

    Best

     

    Mu



  • 12.  RE: routing on a EX4300

    Posted 07-14-2020 12:03

    Muzhang,

     

    R1 is sending the 666 tag routes and R2 must have them but not redsitribute them to R3 In my case R3 is a FRR freebsd router that had no option foor filter incoming tagged routes so i hope i can do something with R2.