Red Hat / CentOS Setup Routing Metric For Network Device

by on January 16, 2008 · 1 comment· LAST UPDATED January 16, 2009

in , ,

Q. How do I set the routing metric on my network device under Fedora / RHEL / Red Hat / CentOS Linux server / workstation operating system?

A. Routing is the process of selecting paths in a network along which to send network traffic. Path selection involves applying a routing metric to multiple routes, in order to select (or predict) the best route. The term "metric"as applied to networking, is used to assign priority to network routes. The higher the metric, the lower the priority of the route.

Open your network interface configuration file for eth0 - /etc/sysconfig/network-scripts/ifcfg-eth0, type:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
Add / append the following line:
METRIC=xyz
Replace xyz with actual with actual metric number. Save and close the file. Restart the network service:
# /etc/init.d/networking restart

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 1 comment… read it below or add one }

1 Arindam April 12, 2012 at 1:00 am

Just what I needed. Thank u for posting this.

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: