3

Now we have a source IP14.135.4.0/24, we are involved in 5 different ISP, such as A, B, C, D, E. Now we want to access 14.135.4.0/24 not through the path of ISP B and ISP D, but through the other three ISPs by BGP policy to select the routing path.

Our router device is Juniper MX480. the bellow is my current A to E ISP:

{master}[edit protocols bgp]                                                    
admin@MX480-RE0# show                                                           
group EBGP_A {                                                               
    type external;                                                              
    import IN_A;                                                          
    authentication-key "$9$TQ/CIEcSlKhcJUiqPfKvWXdbYgoiqmZGuO"; ## SECRET-DATA  
    export Export_A;                                                      
    neighbor 218.30.49.57 {                                                     
        peer-as 4809;                                                           
    }                                                                           
}                                                                               
group EBGP_B {                                                               
    type external;                                                              
    import IN_B;                                                          
    authentication-key "$9$0F5oOhSrevL7-lejkm5zFLX7dYgaZUm5QiHIE"; ## SECRET-DAT
A                                                                               
    export Export_B;                                                      
    neighbor 218.30.54.97 {                                                     
        import IN_B;                                                      
        peer-as 4134;                                                           
    }                                                                           
}                                                                               
group EBGP_C {                                                               
    type external;                                                              
    import Im_C;                                                          
    export Export_C;                                                      
    neighbor 62.115.15.6 {                                                      
        peer-as 1299;                                                           
    }                                                                           
}   
group EBGP_D {                                                               
    type external;                                                              
    import Im_D;                                                          
    export Export_D;                                                      
    neighbor 12.105.15.6 {                                                      
        peer-as 1299;                                                           
    }                                                                           
}
group EBGP_E {                                                               
    type external;                                                              
    import Im_E;                                                          
    export Export_E;                                                      
    neighbor 42.135.15.6 {                                                      
        peer-as 1299;                                                           
    }                                                                           
}      
1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
    – Ron Maupin
    Commented Dec 25, 2018 at 9:38

1 Answer 1

3

If you want to refuse that route, you could add another import statement to those two peergroups, in which you reject the prefix:

policy-statement reject_unwanted {
    from {
        route-filter 14.135.4.0/24 exact;
    }
    then reject;
}

For peergroupd B the import statement would change to something like this:

import [ reject_unwanted im_B ];

And for D:

import [ reject_unwanted im_D ];

Of course, you could add this statement to im_B and im_D as an additional term as well. Make sure to put that term before any accept statements in that case.

Keep in mind that this will only work for exactly the given prefix. If there's an overlapping less specific route (14.135.0.0/20 for example) and there is no more specific route, this path will still be used.

Another option instead of rejecting the prefix alltogether is to set a lower local-preference so traffic is not preferred via these peers instead of rejecting the routes.

2
  • 14.135.4.0/24 This IP address is the address of our local router. We want to choose the routing path in the direction our route is going out. 14.135.4.0/24 does not go through ISP B and ISP D.
    – Jie Zhang
    Commented Oct 5, 2018 at 11:05
  • Please provide a more detailed description (including a diagram if possible) of your network in that case, and add it to the original question.
    – Teun Vink
    Commented Oct 5, 2018 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.