From: Patrick Williams <patrick@stwcx.xyz>
To: Johnathan Mantey <johnathanx.mantey@intel.com>
Cc: Ratan Gupta <ratagupt@linux.vnet.ibm.com>, openbmc@lists.ozlabs.org
Subject: Re: Default Gateway for a system v/s Default gateway per Interface
Date: Wed, 6 May 2020 10:24:10 -0500 [thread overview]
Message-ID: <20200506152410.GA4865@heinlein> (raw)
In-Reply-To: <cae1cc3d-b4f3-ac09-e023-b469b45cc478@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]
On Mon, May 04, 2020 at 09:14:05AM -0700, Johnathan Mantey wrote:
> Ratan,
>
> We're not using Windows. What is the Linux kernel/systemd going to do
> for the Metric? So far the only value that has been applied to the
> Metric is "0" (assigned by ??). As the Microsoft article points out,
> using a low value Metric for "private" nets is to be avoided.
> Our DHCP servers are supplying a Metric value of 1024. I'm sure other
> network managers use different values.
> I don't know how to solve this issue. Especially for the IPMI use case
> of assigning a static address. IPMI doesn't have the ability to assign
> metric values. At least with Redfish we can have that feature added.
Lower metric values have priority (0 is most preferred). By default
systemd-networkd sets DHCP routes to 1024 per [1]. You can set an
alternative RouteMetric in a systemd-networkd network file to set up
a different preference.
I do this to automatically tether my phone to my computer when I
plug it in directly and prefer the network routes provided by the phone
by setting RouteMetric to 512:
```
$ cat /etc/systemd/network/30-iphone.network
[Match]
Name=iphone0
[Network]
DHCP=yes
[DHCPv4]
RouteMetric=512
```
[1]: https://www.freedesktop.org/software/systemd/man/systemd.network.html#UseRoutes=
[2]: https://www.freedesktop.org/software/systemd/man/systemd.network.html#RouteMetric=
--
Patrick Williams
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-05-06 15:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 15:06 Default Gateway for a system v/s Default gateway per Interface Ratan Gupta
2020-04-24 15:21 ` Patrick Williams
2020-04-24 17:45 ` William Kennington
2020-04-27 11:11 ` Ratan Gupta
2020-04-27 19:30 ` Johnathan Mantey
2020-04-28 15:16 ` Ratan Gupta
2020-04-28 18:49 ` Johnathan Mantey
2020-05-04 13:38 ` Ratan Gupta
2020-05-04 16:14 ` Johnathan Mantey
2020-05-06 15:24 ` Patrick Williams [this message]
2020-05-08 6:35 ` Ratan Gupta
2020-05-08 17:42 ` Johnathan Mantey
2020-04-28 21:18 ` Patrick Williams
2020-05-04 11:02 ` Andrew Jeffery
2020-06-16 18:02 ` Johnathan Mantey
2020-06-19 22:40 ` Alexander Amelkin
2020-06-23 9:10 ` Ratan Gupta
2020-06-23 10:56 ` 郁雷
2020-06-23 12:57 ` Ratan Gupta
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=20200506152410.GA4865@heinlein \
--to=patrick@stwcx.xyz \
--cc=johnathanx.mantey@intel.com \
--cc=openbmc@lists.ozlabs.org \
--cc=ratagupt@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.