Junos OS

last person joined: yesterday 

Ask questions and share experiences about Junos OS.
  • 1.  BGP export policy condition

    Posted 03-03-2017 06:29

     

    I have a MX router with one BGP session with a customer. In the same router, I have two other links, one 1G link and one 10G link. I would like to advertise to the customer some prefixes only if the 10G link is up.

     

    I tried using if-route-exists condition matching the /31 IPv4 address configured in the 10G link. When that link fails due to a fiber cut somewhere in the middle of the transmission path, the interface stays up but the neighbor is not reachable. Since the interface is up, the /31 prefix is kept in the routing table, the condition matches and the prefixes are advertised, which is not what I need.

     

    Is it possible to created a policy that will match only if the IP address on the other side of the /31 link is reachable?

     

    Thanks.

    Luis



  • 2.  RE: BGP export policy condition
    Best Answer

    Posted 03-03-2017 06:37

    Hi

    I would check the reachability of the static route via BFD

     

    http://www.juniper.net/techpubs/en_US/junos/topics/example/policy-static-routes-bfd.html

     

    regards

     

    alexander



  • 3.  RE: BGP export policy condition

    Posted 03-03-2017 09:21

    It worked as expected using a static route with BFD.

     

     

    The topology is:

    Customer -------- BGP session -------- Router A -------- IS-IS -------- Router B

     

     

    In router A, I created a static route using the router B interface IP address as next-hop.

     

    set routing-options static route 192.168.66.0/32 next-hop <router B IP address>
    set routing-options static route 192.168.66.0/32 bfd-liveness-detection minimum-interval 300
    set routing-options static route 192.168.66.0/32 bfd-liveness-detection multiplier 3

    In router B, I created the static route with the receive parameter so it answers the requests.

     

    set routing-options static route 192.168.66.0/32 receive
    set routing-options static route 192.168.66.0/32 no-readvertise

    In router A, I created a condition and applied it to the BGP export policy.

     

    set policy-options condition BACKBONE-UP if-route-exists 192.168.66.0/32
    set policy-options condition BACKBONE-UP if-route-exists table inet.0

    ...
    set policy-options policy-statement MY-POLICY term sp from condition BACKBONE-UP
    set policy-options policy-statement MY-POLICY term sp then accept