On Wed, Jun 24, 2015 at 10:35:26AM +0100, Stuart Henderson wrote:
> On 2015/06/22 10:20, Reyk Floeter wrote:
> > The router code was mostly done for something like "link balancing",
> > you have two or more uplink gateways and want to select the route
> > based on their availability.
>
> I've never really understood how this is meant to work, in real life
> the usual case is where the gateway is up but the attached circuit is
> down so there's no routing beyond it, am I missing a non-obvious way
> where relayd can check for this?
>
What do you mean with "real life"? Is mine not real? That reminds me
of fobser's signature: "I'm not entirely sure you are real." ;-)
So it is basically a cheap alternative for sites that want uplink
redundancy without speaking BGP. You have to assume that you are the
next hop that is connected to some layer 2 uplink, without a local 3rd
party router in between:
+---------+----- Line 1 ----- [ gateway @ISP-A ]
| OpenBSD |
+---------+----- Line 2 ----- [ gateway @ISP-B ]
The ttl 1 makes sure that you're not accidentally testing ISP-A's
gateway address all the way over ISP-B.
table <gateways> {
$ispgwa ip ttl 1
$ispgwb ip ttl 1
}
I never tried, but you could theoretically use the "parent" option to
inherit the status from a different hop behind your local gateway.
+---------+-----[ local 1 ]----- Line 1 ----- [ gateway @ISP-A ]
| OpenBSD |
+---------+-----[ local 2 ]----- Line 2 ----- [ gateway @ISP-B ]
table <nexthops> {
$ispgwa ip ttl 2
$ispgwb ip ttl 2
}
table <gateways> {
$local1 parent 1
$local2 parent 2
}
You'd have to define a "fake" check somewhere to run health checks on
the gateway IPs behind the nexthops (eg. an unused relay or redirect).
But, as I said, router can be extened, just don't break it ;)
Reyk