Score:0

How to add route with "metric" in network-scripts with metric on Centos 7?

cz flag

On centos 7 server, I'd like to set the follow routes

172.22.55.0/26 via 10.1.1.6 dev eno5.xxx metric 100 
172.22.55.0/24 via 10.1.1.5 dev eno5.xxx metric 200

in the /etc/sysconfig/network-scripts/route-eno5.xxx file, how do I do that? This is an existing network setup which I cannot change and I cannot find any documentation that allows metric in the route file.

Score:0
jp flag

It should just be a case of adding the following into the route-eno.xxx file:

172.22.55.0/26 via 10.1.1.6 metric 100
172.22.55.0/26 via 10.1.1.5 metric 200

and then run ./ifup-routes in the /etc/sysconfig/network-scripts directory.

Also, you may want to check the subnet masks/cidr notation in your question as they appear to be different (that might be by design, just uncommon)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.