Propagate default route when BGP session is up

Robert Sander r.sander at heinlein-support.de
Fri Aug 18 16:04:51 CEST 2017


Hi,

how do I propagate a default route into OSPF when a specific BGP session
is up and not propagate it when it is down?

Currently I have these config snippets:

protocol static static_default {
  preference 10;
  route 0.0.0.0/0 unreachable;
}

function export_ospf() {
  if source = RTS_BGP then {
    return false;
  }
  if proto = "static_bgp" then {
    return false;
  }
  return true;
}

protocol ospf {
  rfc1583compat on;
  import all;
  export filter {
    if export_ospf() then accept;
    reject;
  };
  area 0 {
    interface "ospf" {
      cost 10;
      hello 10;
      retransmit 5;
      dead 45;
    };
  };
}

protocol bgp ispa1 {
  description "ISP A1";
  import all;
  export filter {
    if proto = "static_bgp" then accept;
    reject;
  };
  local 1.2.3.6 as 1;
  neighbor 1.2.3.5 as 2;
  password "xyz";
}

I can manually "birdc disable static_default" to not propagate the
default route but how can this be automated when the BGP session to
ispa1 is down?

Regards
-- 
Robert Sander
Heinlein Support GmbH
Schwedter Str. 8/9b, 10119 Berlin

http://www.heinlein-support.de

Tel: 030 / 405051-43
Fax: 030 / 405051-19

Zwangsangaben lt. §35a GmbHG:
HRB 93818 B / Amtsgericht Berlin-Charlottenburg,
Geschäftsführer: Peer Heinlein -- Sitz: Berlin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20170818/575bba0f/attachment.asc>


More information about the Bird-users mailing list