Routing

 View Only
last person joined: 3 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.  BGP routing policy question

    Posted 05-07-2021 21:10
    I have the following topology

    ISP1  ------- ME  ---------ISP2
    I do not ME to be a transit route. So I have the following configuration
    set policy-options community ISP1111 members 9999:1111
    set policy-options community ISP2222 members 9999:2222
    
    set policy-options policy-statement FromISP1 term 1 then community set ISP1111
    set policy-options policy-statement FromISP1 term 1 then accept
    set policy-options policy-statement FromISP2 term 1 then community set ISP2222
    set policy-options policy-statement FromISP2 term 1 then accept
    
    set policy-options policy-statement ToISP term 1 from interface lo0.0
    set policy-options policy-statement ToISP term 1 then accept
    set policy-options policy-statement ToISP term 2 from community ISP1111
    set policy-options policy-statement ToISP term 2 to neighbor 10.1.2.1
    set policy-options policy-statement ToISP term 2 then reject
    set policy-options policy-statement ToISP term 3 from community ISP2222
    set policy-options policy-statement ToISP term 3 to neighbor 10.1.1.1
    set policy-options policy-statement ToISP term 3 then reject
    set policy-options policy-statement ToISP term last then next policy
    
    set protocols bgp group ToISP1 type external
    set protocols bgp group ToISP1 import FromISP1
    set protocols bgp group ToISP1 export ToISP
    set protocols bgp group ToISP1 neighbor 10.1.1.1 peer-as 1111
    set protocols bgp group ToISP2 type external
    set protocols bgp group ToISP2 import FromISP2
    set protocols bgp group ToISP2 export ToISP
    set protocols bgp group ToISP2 neighbor 10.1.2.1 peer-as 2222​

    I do not understand what is wrong with the following line
    set policy-options policy-statement ToISP term 3 to neighbor 10.1.1.1

    without this line, nothing filtered out

    root@Bracnch1# run show route advertising-protocol bgp 10.1.1.1 
    
    inet.0: 20 destinations, 27 routes (20 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.100.0.0/16           Self                                    2222 10458 100001 I
    * 10.150.0.99/32          Self                                    I
    * 10.200.0.0/16           Self                                    2222 10458 I
    * 192.168.0.0/16          Self                                    2222 10458 {100001} I


    without this line

    [edit]
    root@Bracnch1# run show route advertising-protocol bgp 10.1.1.1                            
    
    inet.0: 20 destinations, 27 routes (20 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.150.0.99/32          Self                                    I


    thanks in advance !!!



  • 2.  RE: BGP routing policy question
    Best Answer

    Posted 05-08-2021 04:58

    For BGP import policies, specifying to neighbor produces the same result as specifying from neighbor.

    For BGP export policies, specifying the neighbor match condition has no effect and is ignored.


    https://www.juniper.net/documentation/us/en/software/junos/routing-policy/topics/concept/policy-configuring-match-conditions-in-routing-policy-terms.html




  • 3.  RE: BGP routing policy question

    Posted 05-08-2021 10:41
    thanks a lot !!  Good information.


  • 4.  RE: BGP routing policy question

    Posted 05-08-2021 11:15
    glad I was able to help :)