<div dir="ltr"><div dir="ltr"><div>Alexander, thank you for your feedback. <br></div><div><br></div><div>Here is a diagram:</div><div><br></div><div>[ ISP1 ] [ ISP2 ] [ ISP3 ] [ ISP4 ]</div><div> | | | |</div><div> | | | |</div><div>[ Router 1 ] [ Router 2 ] <br></div><div> | |</div><div> | |</div><div></div><div> [ Layer 2 Switch ]</div><div> |</div><div> |</div><div> [ Bird Route Server ] <br></div><div><br></div><div><br></div><div>Router 1 and 2 do not peer directly. There is OSPF running, so all nodes learn a route to other nodes connected interfaces.</div><div>Both routers peer to route-server and are route reflection clients. </div><div><br></div><div>There is a route x.y.z.0/24 coming from from each ISP. Router 1 chooses ISP2 (because of as-path), what path Router 2 is choosing doesn't matter. <br></div><div><br></div><div>I need to force traffic to x.y.z.0/24 via ISP1. <br></div><div>In order to do that, I'm matching the route x.y.z.0/24 in the import filter on the route-server (maching a route itself and also ISP1 ASN in the path) and setting the local preference to 150. <br></div><div>Then this route is re-advertised to Router 2, which will select it as best, because of iBGP and high local-preference. The route is not announced back to Router 1, because it came from there.</div><div><br></div><div>An alternative way, to do that is to mach a route on Router 1, increase a local-pref there and that route will be leared by router 2 through the route-server. But I'd like to do that on route-server to use a centralized place for these kinds of things.</div><div><br></div><div>Here is a show route output from a route server:</div><div><br></div><div><br></div><div>bird> show route for x.y.z.0/24 all<br>x.y.z.0/24 via 10.1.1.65 on em2 [edge_r1 18:25:09] * (100/11) [AS123i]<br> Type: BGP unicast univ<br> BGP.origin: IGP<br> BGP.as_path: 111 888 333 999<br> BGP.next_hop: 1.1.1.1<br> BGP.med: 0<br> BGP.local_pref: 150<br> via 10.1.1.65 on em2 [edge_r1 2019-01-17] (100/11) [AS123i]<br> Type: BGP unicast univ<br> BGP.origin: IGP<br> BGP.as_path: 222 777 999<br> BGP.next_hop: 2.2.2.2<br> BGP.med: 0<br> BGP.local_pref: 100<br> via 10.1.1.66 on em2 [edge_r2 2019-01-16] (100/11) [AS123i]<br> Type: BGP unicast univ<br> BGP.origin: IGP<br> BGP.as_path: 333 666 999<br> BGP.next_hop: 3.3.3.3<br> BGP.med: 0<br> BGP.local_pref: 100<br> via 10.1.1.67 on em2 [edge_r2 2019-01-17] (100/11) [AS123i]<br> Type: BGP unicast univ<br> BGP.origin: IGP<br> BGP.as_path: 444 555 999<br> BGP.next_hop: 4.4.4.4<br> BGP.med: 0<br> BGP.local_pref: 100<br> <br>bird><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 18, 2019 at 2:17 PM Alexander Zubkov <<a href="mailto:green@qrator.net">green@qrator.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I do not completely understand your setup. You better show route<br>
tables from all the routers and what is announced in which direction.<br>
<br>
> So I get the desired effect on the second router, it will learn and install a route with high local pref. The first router where the desired transit link is connected by default selects another transit link because of the shorter as-path.<br>
<br>
How this could happen? If you got this route on the route reflector<br>
from the first router, than it should have this route in the required<br>
direction. If it had this route to another transit link, it would<br>
announce this to the route reflector. There is no reason to propagate<br>
the routes back to the peer, because they are already there.I think<br>
you can do some tricks, but first we need to understand what do you<br>
want to achieve.<br>
<br>
On Fri, Jan 18, 2019 at 7:23 PM Roman Romanyak <<a href="mailto:roman.romanyak@gmail.com" target="_blank">roman.romanyak@gmail.com</a>> wrote:<br>
><br>
> Hello Bird users,<br>
><br>
> Does anyone know if there is a way to announce a BGP route back to the router it was received from.<br>
> I need to do this for the following scenario.<br>
> Lets say there are two routers with 2 transit links on each with full view tables and Bird server as a route-reflector. There is a need to force traffic to a specific destination via one of the ISPs, so I match the route in the import filter and set a local pref on it. But that will only make the route server announce the route with a high local pref to a second router, where the desired transit isn't directly connected. So I get the desired effect on the second router, it will learn and install a route with high local pref. The first router where the desired transit link is connected by default selects another transit link because of the shorter as-path.<br>
><br>
> Here is the import filter snippet (x.y.z.0/24 is a dest route, as-path 1234 is a directly connected ISP on router-1:<br>
><br>
> if source = RTS_BGP && net = x.y.z.0/24 && bgp_path.first = 1234 then {<br>
> bgp_local_pref = 150;<br>
> accept;<br>
> }<br>
><br>
> I think that bird doesn't do that because the protocol matches on the peer and on the route.<br>
><br>
><br>
> Thanks!<br>
</blockquote></div>