wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: Robert Dahlem <Robert.Dahlem@gmx.net>
To: Jonathon Fernyhough <jonathon.fernyhough@york.ac.uk>,
	wireguard@lists.zx2c4.com
Subject: Re: Dynamic routes
Date: Wed, 24 Nov 2021 00:03:02 +0100	[thread overview]
Message-ID: <3b6549b1-7ed0-00fc-2951-fc77049faf13@gmx.net> (raw)
In-Reply-To: <edfa128e-7c6d-c329-5d63-4a3b32c2517c@york.ac.uk>

Hi,

On 23.11.2021 23:40, Jonathon Fernyhough wrote:

>> The idea behind this is to have redundant tunnels. Let's say a Wireguard
>> client has a preferred server and a secondary server. Packets should be
>> routed through the preferred router while that tunnel is established and
>> through the secondary server when the preferred server is not available
>> for some reason.

> Would route metrics work for this?

Yes and no.

Metrics do useful things when there are identical prefixes with
different metrics over *working* paths. So when both tunnels are up
metrics can choose the preferred path.

With Wireguard (as far as I understand it) routes exist independently
from tunnel state. If the path through the preferred server has a better
metric, but doesn't work, the system does not fall back to the path
through the secondary server.

Metrics work fine when routes are installed/uninstalled dynamically. Say
you have a system with LAN connectivity (best metric), Wifi connectivity
(medium metric) and mobile (UMTS/LTE) connectivity (worst metric). All
of them give you a default route. If all of them are actually connected,
the system would use the route through the LAN. As soon as you unplug
the LAN cable, the LAN routes disappear and the Wifi routes are
selected. Plug the cable back in, the LAN routes reappear and the system
uses the LAN route.

Yes, metrics would work for this. But only if the routes don't appear
before a tunnel comes up and disappear when the tunnel goes down.

Regards,
Robert

  reply	other threads:[~2021-11-23 23:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 17:20 Dynamic routes Robert Dahlem
2021-11-23 22:40 ` Jonathon Fernyhough
2021-11-23 23:03   ` Robert Dahlem [this message]
2021-11-24 11:18 ` Chriztoffer Hansen
2021-11-24 12:04   ` Mike O'Connor
2021-11-24 15:07     ` Robert Dahlem

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b6549b1-7ed0-00fc-2951-fc77049faf13@gmx.net \
    --to=robert.dahlem@gmx.net \
    --cc=jonathon.fernyhough@york.ac.uk \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).