metric selection when using 2 network interace

Issues related to configuring your network
Post Reply
cally725
Posts: 2
Joined: 2017/07/18 19:55:13

metric selection when using 2 network interace

Post by cally725 » 2018/02/28 20:15:36

Hi,

I have 2 network interface configured and I would like to inverse the preferred one (invers metric). In ubuntu I know that I can use ifmetric to do that but the tool is not available on centos ?

doing
> ip r
default via xx.x.232.1 dev eth0 proto static metric 100
default via xx.x.232.1 dev eth1 proto static metric 101
xx.x.34.10 via 10.8.232.1 dev eth0 proto dhcp metric 100
xx.x.232.0/23 dev eth0 proto kernel scope link src 10.8.232.175 metric 100
xx.x.232.0/23 dev eth1 proto kernel scope link src 10.8.232.191 metric 101

instead I would like to have eth1 using metric 100 and eth0 using metric 101

/etc/sysconfig/network-script
ifcfg-eth0
# Generated by parse-kickstart
DEVICE="eth0"
IPV6INIT="no"
BOOTPROTO="dhcp"
ONBOOT="yes"

ifcfg-eth1
NM_CONTROLLED=yes
BOOTPROTO=none
ONBOOT=yes
IPADDR=10.8.232.191
NETMASK=255.255.254.0
DEVICE=eth1
GATEWAY=10.8.232.1
PEERDNS=no
#VAGRANT-END

Thanks

Post Reply