Set an Ethernet Interface Metric

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello All,

I ended up answering my own question, but figured I'd share this and open
up for discussion.

It is possible to set a metric with 'route' or `ip route`.
What I'm wondering is if there's a Red Hat/CentOS way of assigning a metric
in the network-scripts?

Answer:
[0] (from 2008) works.
ex:  METRIC=10

Deployment Guides:  EL5 [1] and EL6 [2] do not mention metrics on the
previous interface configuration pages.

*** The output from `ifconfig` does NOT show the metric as I set it, but
the output from `route` does.

I suppose this is the intended behavior?
The default gateway route would have the metric and not the interface.

Notice "Metric: 1" and "UG 10" below.

>From my test box (EL6):
~]# ifconfig eth0 | grep ric; route -n | grep G
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
0.0.0.0         192.168.X.Y     0.0.0.0         UG    10     0        0 eth0



[0]
http://www.cyberciti.biz/faq/rhel-fedora-centos-setup-routing-metric-networkdevice/
[1]
https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s1-networkscripts-interfaces.html
[2]
https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-networkscripts-interfaces.html


Have a great day,
-- 
---~~.~~---
Mike
//  SilverTip257  //
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux