Dear users of the Bird internet routing daemon, First of all I am sorry for my e-mail which I have sent some minutes before. It was a mistake and you can ignore my last mail. Now to my question: I want my OSPF to distribute the default-route ONLY and ONLY if the ISP is available. Means, if the link, or the IP isn't available, my OSPF should be quite. Further information: ISP (ISP is up) l (Link is up) R1 (Interface is up) R1: everything is ok, I can reach the ISP, so I am the default-gateway for everybody below me. ISP (ISP is down) l (Link is up) R1 (Interface is up) R1: Oh gosh! The ISP is down! I am now no longer the default-gateway for everybody below me. ISP (ISP is up) l (Link is down) R1 (Interface is up) R1: Oh, I can't reach my ISP... Ok, I need to stop telling everybody below me I am the default-gateway. I was thinking about the bfd protocol, but bfd is kinda new and you can't run more than one instance in bird. So I need another solution... Btw, yes I've already searched for these problem in the mailing list but I am not satisfied. Either my keywords were wrong or there isn't any person with this kind of problem... yet. Thank you very much for reading. Regards.
On Thu, Dec 03, 2015 at 02:34:02PM +0000, Rohrmann Sascha wrote:
Dear users of the Bird internet routing daemon,
First of all I am sorry for my e-mail which I have sent some minutes before. It was a mistake and you can ignore my last mail.
Now to my question:
I want my OSPF to distribute the default-route ONLY and ONLY if the ISP is available. Means, if the link, or the IP isn't available, my OSPF should be quite.
Further information:
ISP (ISP is up) l (Link is up) R1 (Interface is up)
R1: everything is ok, I can reach the ISP, so I am the default-gateway for everybody below me.
ISP (ISP is down) l (Link is up) R1 (Interface is up)
R1: Oh gosh! The ISP is down! I am now no longer the default-gateway for everybody below me.
ISP (ISP is up) l (Link is down) R1 (Interface is up)
R1: Oh, I can't reach my ISP... Ok, I need to stop telling everybody below me I am the default-gateway.
Well, you could use static default-route and 'check link' option, but that will help you only in the third case, not in the second one. For the second case, you must have some other way to establish whether ISP is up or down, either by running some routing protocol between you and ISP, or running BFD session.
I was thinking about the bfd protocol, but bfd is kinda new and you can't run more than one instance in bird.
Well, is there any reason why to run multiple BFD instances in BIRD? -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Well, you could use static default-route and 'check link' option, but that will help you only in the third case, not in the second one. For the second case, you must have some other way to establish whether ISP is up or down, either by running some routing protocol between you and ISP, or running BFD session.
Just as you said, that will only help me in the third case. In which way should BFD be able to accomplish my goal? In my understandings BFD only checks if the link is available. If this isn't given, BFD tells Bird this problem. Second problem is, not every ISP supports BFD yet because BFD is kinda new. I was thinking about a simple ping which checks the availability of the opposite party. Am I able to include a simple shell script in bird? E.g.: ======================= Include ping.sh (ping check) If (ping.sh = 1) { export 0.0.0.0/0 via eth0; } ======================= Do you have more information and/or tips for me, by chance?
I was thinking about the bfd protocol, but bfd is kinda new and you can't run more than one instance in bird. Well, is there any reason why to run multiple BFD instances in BIRD?
Well... you could create one bfd instance for one single interface. Furthermore you could then check the availability for e.g. my problem instead of checking all BFD instances. Regards :) -----Ursprüngliche Nachricht----- Von: Ondrej Zajicek [mailto:santiago@crfreenet.org] Gesendet: Donnerstag, 3. Dezember 2015 16:00 An: Rohrmann Sascha Cc: bird-users@network.cz Betreff: Re: default route via OSPF depending on the ISP On Thu, Dec 03, 2015 at 02:34:02PM +0000, Rohrmann Sascha wrote:
Dear users of the Bird internet routing daemon,
First of all I am sorry for my e-mail which I have sent some minutes before. It was a mistake and you can ignore my last mail.
Now to my question:
I want my OSPF to distribute the default-route ONLY and ONLY if the ISP is available. Means, if the link, or the IP isn't available, my OSPF should be quite.
Further information:
ISP (ISP is up) l (Link is up) R1 (Interface is up)
R1: everything is ok, I can reach the ISP, so I am the default-gateway for everybody below me.
ISP (ISP is down) l (Link is up) R1 (Interface is up)
R1: Oh gosh! The ISP is down! I am now no longer the default-gateway for everybody below me.
ISP (ISP is up) l (Link is down) R1 (Interface is up)
R1: Oh, I can't reach my ISP... Ok, I need to stop telling everybody below me I am the default-gateway.
Well, you could use static default-route and 'check link' option, but that will help you only in the third case, not in the second one. For the second case, you must have some other way to establish whether ISP is up or down, either by running some routing protocol between you and ISP, or running BFD session.
I was thinking about the bfd protocol, but bfd is kinda new and you can't run more than one instance in bird.
Well, is there any reason why to run multiple BFD instances in BIRD? -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hi Sascha, On Thu, Dec 03, 2015 at 15:12:10 +0000, Rohrmann Sascha wrote: [...]
Second problem is, not every ISP supports BFD yet because BFD is kinda new. I was thinking about a simple ping which checks the availability of the opposite party. Am I able to include a simple shell script in bird? E.g.: ======================= Include ping.sh (ping check) If (ping.sh = 1) { export 0.0.0.0/0 via eth0; } =======================
Do you have more information and/or tips for me, by chance? [...]
As I have exactly the same problem, here's, what I am planing to do: - Have a static route (in its own static protocol) in bird, activated by default. - Run an external script, that pings the isp regularly. In fact, I am considering to let icinga do that. - If the ping fails, let that script (icinga) call "birdc disable static_isp_route" - If the ping works again, call "birdc enable static_isp_route" - Finally: Be annoyed, that your isp doesn't support bfd or ospf/bgp. In our case, the major difference is: We're not going to ping, but query the state of the modem. Which in itself is annoying, because we're forced to use an avm fritzbox and the only way to ask it about its state is by doing upnp. Cheers Christian -- www.cosmokey.com
Le 03/12/15 19:45, Christian Tacke a écrit :
In our case, the major difference is: We're not going to ping, but query the state of the modem. Which in itself is annoying, because we're forced to use an avm fritzbox and the only way to ask it about its state is by doing upnp.
What am I doing is rather overkill but work : - using exabgp on each router linked to each isp - exabgp announce a default route based if a periodic script (pinging different well known ip like 8.8.8.8 on each isp, resolving some well know domain, etc...) is ok - exabgp peer localy with bird, and redistribute default route on ospf with different weigh. -- Raphael Mazelier
Hi Christian,
- Have a static route (in its own static protocol) in bird, activated by default.
Check ✓
- Run an external script, that pings the isp regularly. In fact, I am considering to let icinga do that. - If the ping fails, let that script (icinga) call "birdc disable static_isp_route"
What do you mean by "static_isp_route"? Got some more detailed information of that?
- If the ping works again, call "birdc enable static_isp_route"
- Finally: Be annoyed, that your isp doesn't support bfd or ospf/bgp.
Check ✓ Thanks in advance. -----Ursprüngliche Nachricht----- Von: Christian Tacke [mailto:Christian.Tacke+bird.network.cz@cosmokey.com] Gesendet: Donnerstag, 3. Dezember 2015 19:46 An: Rohrmann Sascha Cc: bird-users@network.cz Betreff: Re: default route via OSPF depending on the ISP Hi Sascha, On Thu, Dec 03, 2015 at 15:12:10 +0000, Rohrmann Sascha wrote: [...]
Second problem is, not every ISP supports BFD yet because BFD is kinda new. I was thinking about a simple ping which checks the availability of the opposite party. Am I able to include a simple shell script in bird? E.g.: ======================= Include ping.sh (ping check) If (ping.sh = 1) { export 0.0.0.0/0 via eth0; } =======================
Do you have more information and/or tips for me, by chance? [...]
As I have exactly the same problem, here's, what I am planing to do: - Have a static route (in its own static protocol) in bird, activated by default. - Run an external script, that pings the isp regularly. In fact, I am considering to let icinga do that. - If the ping fails, let that script (icinga) call "birdc disable static_isp_route" - If the ping works again, call "birdc enable static_isp_route" - Finally: Be annoyed, that your isp doesn't support bfd or ospf/bgp. In our case, the major difference is: We're not going to ping, but query the state of the modem. Which in itself is annoying, because we're forced to use an avm fritzbox and the only way to ask it about its state is by doing upnp. Cheers Christian -- www.cosmokey.com
On Thu, Dec 03, 2015 at 03:12:10PM +0000, Rohrmann Sascha wrote:
Well, you could use static default-route and 'check link' option, but that will help you only in the third case, not in the second one. For the second case, you must have some other way to establish whether ISP is up or down, either by running some routing protocol between you and ISP, or running BFD session.
Just as you said, that will only help me in the third case. In which way should BFD be able to accomplish my goal? In my understandings BFD only checks if the link is available. If this isn't given, BFD tells Bird this problem.
BFD checks whether specified/destination IP is available (but it also must run BFD). Therefore both link and host must be up.
Second problem is, not every ISP supports BFD yet because BFD is kinda new.
That is true, and also BFD-controlled static routes are only in devel version of BIRD, not in v1.5.0
I was thinking about a simple ping which checks the availability of the opposite party. Am I able to include a simple shell script in bird?
No
Do you have more information and/or tips for me, by chance?
As others wrote, you could do periodic pinging by e.g. fping and enable/disable a static protocol using birdc (birdc disable XXX). See the attached script, which does something like that and estimating packet loss.
I was thinking about the bfd protocol, but bfd is kinda new and you can't run more than one instance in bird. Well, is there any reason why to run multiple BFD instances in BIRD?
Well... you could create one bfd instance for one single interface. Furthermore you could then check the availability for e.g. my problem instead of checking all BFD instances.
I don't understand here. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hi Ondrej,
Do you have more information and/or tips for me, by chance?
As others wrote, you could do periodic pinging by e.g. fping and enable/disable a static protocol using birdc (birdc disable XXX). See the attached script, which does something like that and estimating packet loss.
Thank you very much for that script. I have two additional questions about this: 1) Why do you stop the whole routing process if the ISP is down? Isn't there a chance to "only" stop distributing the default-route and keep the OSPF process? If yes, how am I able to realize that? 2) If 1) isn't possible, is there a way to check and count incoming routes from eBGP so that the router sees that the connection works and distributes the default-route after the check? My goal is to only stop distributing the default-route and not to kill any routing-protocol such as OSPF. Thanks in advance. -----Ursprüngliche Nachricht----- Von: Ondrej Zajicek [mailto:santiago@crfreenet.org] Gesendet: Samstag, 5. Dezember 2015 16:34 An: Rohrmann Sascha Cc: bird-users@network.cz Betreff: Re: default route via OSPF depending on the ISP On Thu, Dec 03, 2015 at 03:12:10PM +0000, Rohrmann Sascha wrote:
Well, you could use static default-route and 'check link' option, but that will help you only in the third case, not in the second one. For the second case, you must have some other way to establish whether ISP is up or down, either by running some routing protocol between you and ISP, or running BFD session.
Just as you said, that will only help me in the third case. In which way should BFD be able to accomplish my goal? In my understandings BFD only checks if the link is available. If this isn't given, BFD tells Bird this problem.
BFD checks whether specified/destination IP is available (but it also must run BFD). Therefore both link and host must be up.
Second problem is, not every ISP supports BFD yet because BFD is kinda new.
That is true, and also BFD-controlled static routes are only in devel version of BIRD, not in v1.5.0
I was thinking about a simple ping which checks the availability of the opposite party. Am I able to include a simple shell script in bird?
No
Do you have more information and/or tips for me, by chance?
As others wrote, you could do periodic pinging by e.g. fping and enable/disable a static protocol using birdc (birdc disable XXX). See the attached script, which does something like that and estimating packet loss.
I was thinking about the bfd protocol, but bfd is kinda new and you can't run more than one instance in bird. Well, is there any reason why to run multiple BFD instances in BIRD?
Well... you could create one bfd instance for one single interface. Furthermore you could then check the availability for e.g. my problem instead of checking all BFD instances.
I don't understand here. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
On Mon, Dec 07, 2015 at 12:07:59PM +0000, Rohrmann Sascha wrote:
Hi Ondrej,
Do you have more information and/or tips for me, by chance?
As others wrote, you could do periodic pinging by e.g. fping and enable/disable a static protocol using birdc (birdc disable XXX). See the attached script, which does something like that and estimating packet loss.
Thank you very much for that script.
I have two additional questions about this:
1) Why do you stop the whole routing process if the ISP is down? Isn't there a chance to "only" stop distributing the default-route and keep the OSPF process?
I would not stup the whole routing process, i would just shut down static protocol (XXX instead of name in the example) used to originate the default route. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Le 08/12/15 10:56, Ondrej Zajicek a écrit :
On Mon, Dec 07, 2015 at 12:07:59PM +0000, Rohrmann Sascha wrote:
I would not stup the whole routing process, i would just shut down static protocol (XXX instead of name in the example) used to originate the default route.
Why not just changing the metric of the route ? -- Raphael Mazelier
Am 08.12.2015 um 11:37 schrieb Raphael Mazelier:
Le 08/12/15 10:56, Ondrej Zajicek a écrit :
On Mon, Dec 07, 2015 at 12:07:59PM +0000, Rohrmann Sascha wrote:
I would not stup the whole routing process, i would just shut down static protocol (XXX instead of name in the example) used to originate the default route.
Why not just changing the metric of the route ?
Raphael, could you explain this idea a little for me? we have a router, eBGP connected to an upstream provider, iBGP connected to its neighbour, which has the other upstream connection. Both of them get a whole bunch of routes. But to the internal network they shall only propagate a default route, if *any* upstream is reachable. So besides checking the functionality of BGP to the neighbour or just the IP connectivity it could also be a test which checks if there are more then say 100 routes visible via BGP. If this condition is met then inject a default route into the OSPF connected local network below. So what would a changed metric give me? Regards Gerold
Do you have more information and/or tips for me, by chance?
As others wrote, you could do periodic pinging by e.g. fping and enable/disable a static protocol using birdc (birdc disable XXX). See the attached script, which does something like that and estimating packet loss.
Thanks for the script Ondrej. It worked perfectly for me and it was exactly what I was searching for.
participants (5)
-
Christian Tacke -
Gruber Gerold -
Ondrej Zajicek -
Raphael Mazelier -
Rohrmann Sascha