3

When I run ip route on my Linux machine, I see

default via xxx.xxx.xxx.xxx dev eno1 metric 202

I wonder, where this 202 metric is configured and what other ip commands use it.

  • Do you have the value 202 specified somewhere in the file /etc/sysconfig/network-scripts/ifcfg-eno1? – Ramesh Dec 2 '14 at 17:24
  • @Ramesh I don't have /etc/sysconfig (I'm using ArchLinux) – Eugene Yarmash Dec 2 '14 at 18:22
  • I don't know enough to provide a full answer but I'm pretty sure the metric default is selected by the kernel. The kernel is the piece of software that actually weights different routes anyways. ip is just a management tool for kernel configuration. – Bratchley Dec 2 '14 at 19:24
  • metric is generally not used, I have no metrics listed in my ip route output. It might be used if you're using a routing protocol via e.g. zebra, it indicates the (relative) cost of using that route. See e.g. here for an explanation of metric. Where your value of 202 comes from can't be determined without more information. – wurtel Dec 3 '14 at 12:28
  • @wurtel I find metrics useful for overriding routes created by a VPN client. As for the value, I suppose it's a default in ArchLinux. – Eugene Yarmash Dec 3 '14 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.