• Webconn Technology
    • GPU Server
      • Dedicated GPU Servers with NVIDIA RTX/A100 GPUs for accelerated AI training, rendering, and scientific computing. Features CUDA cores, 24GB-141GB VRAM, and parallel processing. Pre-configured with TensorFlow/PyTorch.

      • nvidia rtx A6000
    • Dedicated Server
      • Experience blazing-fast speeds & ironclad security with your own dedicated server. No shared resources. Fully customizable plans for gaming, e-commerce, and big data. Start now!

      • datacenter
    • Shared Hosting
      • Get user-friendly DirectAdmin shared hosting for your website. Enjoy an intuitive control panel, one-click app installs, and reliable performance. Perfect for blogs, small business sites, and portfolios.

      • shared hosting web
    • Domains
      • Search and register the perfect domain name for your website. Get a memorable .com, .net, .org or niche TLD to start building your brand online. Includes free privacy protection.

    • VPS
      • Experience the power of a dedicated server without the high cost. Our VPS hosting guarantees CPU, RAM, and storage for your site, ensuring optimal performance and stability.

      • data center
  • Blog
  • Dashboard

How to set the route metric on network interface in CentOS 7

What is a Route Metric?

In networking, the term metric is used to assign priority to network routes. The lower the metric, the lower the route’s priority.

Set Route Metric Without Network Manager

Under Red Hat Enterprise Linux, the correct way to set the route metric is to edit the appropriate <ifcfg-interface> file in the /etc/sysconfig/network-scripts/ directory, where <interface> is the name of the interface to which the metric is related. A directive like the one below should be added.

METRIC=XXXX

For changes to take effect, the network service must be restarted.

# service network restart

Set Route Metric With Network Manager

To change the connection route Metric value, use nmcli, nmtui, or the GUI tools.

Modify the ipv4.route-metric property of the connection with nmcli to add a route metric. To add a route metric 600 to a connection named external, for example.

# nmcli connection modify external ipv4.route-metric 600

After any of the modifications above, bring the connection up to put the changes into place. For example, after having modified the properties of a connection named external.

# nmcli connection up external

Comments

Leave a Reply