≡ Menu

Red Hat / CentOS Setup Routing Metric For Network Device

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

Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

{ 1 comment… add one }

  • Arindam April 12, 2012, 1:00 am

    Just what I needed. Thank u for posting this.

Leave a Comment