How to prefer BGP route over OSPF?
Angel Lopez Delgado
ald at ignis.software
Mon Feb 15 06:33:38 CET 2016
Hi Michael,
change the preference in the OSPF config:
protocol ospf ospf_vdsl {
area 65 {
stub no;
interface "vdsl0" {
cost 1000;
type broadcast;
authentication none;
};
};
* import filter {*
* if net ~ [ 0.0.0.0/0 <http://0.0.0.0/0> ] then {preference
= 50; accept;}*
* reject;*
* };*
export none;
};
bird> show route 0.0.0.0/0
0.0.0.0/0 unreachable [Customer 23:24:18 from 10.10.10.101] *
(100/-) [i]
via 10.10.10.101 on eth1 [ospf1 23:28:40] E2 (50/10/1)
[64] [201.174.1.1]
bird>
Regards.
On Sun, Feb 14, 2016 at 7:24 PM, Michael Ludvig <mludvig at logix.net.nz>
wrote:
> Hi
>
> I've got a linux router with 2 uplinks - one is a Cisco VDSL modem
> advertising 0.0.0.0/0 over OSPF when VDSL is up and one is Fibre link
> where the ISP sends us 0.0.0.0/0 over BGP.
>
> If both links are up I want to route everything over Fibre (BGP), if Fibre
> fails for any reason use the VDSL (OSPF). Here is my config:
>
> protocol ospf ospf_vdsl {
> area 65 {
> stub no;
> interface "vdsl0" {
> cost 1000;
> type broadcast;
> authentication none;
> };
> };
> import where net = 0.0.0.0/0;
> export none;
> };
>
> protocol bgp bgp_fibre {
> local as xx526;
> neighbor x.x.20.201 as xx746;
> source address x.x.20.202;
> import where net = 0.0.0.0/0;
> export none;
> };
>
> With this config Bird 1.4.5 always prefers OSPF whenever the link is up -
> how can I tell it to prefer BGP instead? I even set the cost of the VDSL
> link to 1000 but that didn't make any difference.
>
> ~ # birdc show route for 0.0.0.0/0
> BIRD 1.4.5 ready.
> 0.0.0.0/0 via 10.65.1.1 on vdsl0 [ospf_vdsl 15:47:14] * E2
> (150/1000/1) [1] [10.65.1.1]
> via x.x.20.201 on fibre0 [bgp_fibre 14:28:27] (100)
> [ASxx746i]
>
>
> Thanks!
>
> Michael
>
>
>
--
*Angel Adrián López Delgado*
*Director Network Engineer*
<https://www.facebook.com/IgnisSoftware>
<https://twitter.com/IgnisSoftware>
*+52 656 150 44 53 **| * ald at ignis.software | Ciudad Juárez, Chihuahua,
México |
This e-mail message may contain confidential or legally privileged
information and is intended only for the use of the intended recipient(s).
Any unauthorized disclosure, dissemination, distribution, copying or the
taking of any action in reliance on the information herein is prohibited.
E-mails are not secure and cannot be guaranteed to be error free as they
can be intercepted, amended, or contain viruses. Anyone who communicates
with us by e-mail is deemed to have accepted these risks. Company Name is
not responsible for errors or omissions in this message and denies any
responsibility for any damage arising from the use of e-mail. Any opinion
and other statement contained in this message and any attachment are solely
those of the author and do not necessarily represent those of the company.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20160214/77655b6d/attachment.html>
More information about the Bird-users
mailing list